H-3656: добавил Wallet admin API в v2 #33
+70
-18
@@ -6915,8 +6915,11 @@ paths:
|
||||
schema: { type: integer, minimum: 1, maximum: 100, default: 20 }
|
||||
- name: sort
|
||||
in: query
|
||||
schema: { type: string }
|
||||
description: Префикс "-" для DESC. Пример "-balance".
|
||||
schema:
|
||||
type: string
|
||||
enum: [created_at, "-created_at", status_id, "-status_id", balance, "-balance", name, "-name"]
|
||||
description: |
|
||||
Префикс `-` для DESC. По умолчанию `-created_at`.
|
||||
- name: user_id
|
||||
in: query
|
||||
schema: { type: string, format: uuid }
|
||||
@@ -6930,13 +6933,17 @@ paths:
|
||||
- name: user_list_key
|
||||
in: query
|
||||
schema: { type: string, format: uuid }
|
||||
description: Ключ закэшированной выборки сотрудников (создаётся через core user-list-cache).
|
||||
- name: reg_status_id
|
||||
in: query
|
||||
schema: { type: string }
|
||||
description: |
|
||||
Comma-separated значения `RegStatus` (статус участия). Без параметра —
|
||||
показываются все валидные для отображения статусы.
|
||||
- name: created_at
|
||||
in: query
|
||||
schema: { type: string }
|
||||
description: Диапазон, формат "from|to" (ISO).
|
||||
description: 'Диапазон в формате `from|to` (ISO дата/время).'
|
||||
responses:
|
||||
200:
|
||||
description: Список кошельков
|
||||
@@ -6992,6 +6999,9 @@ paths:
|
||||
get:
|
||||
tags: [admin-wallet-transaction]
|
||||
summary: Список транзакций (admin-вид — видны транзакции всех юзеров)
|
||||
description: |
|
||||
Под `wallets-transactions` отдаёт все транзакции тенанта (учётная админ-выборка).
|
||||
Без права — только транзакции по своему кошельку.
|
||||
operationId: adminWalletTransactionIndex
|
||||
parameters:
|
||||
- name: page
|
||||
@@ -7002,26 +7012,71 @@ paths:
|
||||
schema: { type: integer, minimum: 1, maximum: 100, default: 20 }
|
||||
- name: sort
|
||||
in: query
|
||||
schema: { type: string }
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- created_at
|
||||
- "-created_at"
|
||||
- wallet_transaction_type
|
||||
- "-wallet_transaction_type"
|
||||
- wallet_operation_type
|
||||
- "-wallet_operation_type"
|
||||
- amount
|
||||
- "-amount"
|
||||
description: |
|
||||
Префикс `-` для DESC. По умолчанию `-created_at`.
|
||||
- name: wallet_id
|
||||
in: query
|
||||
schema: { type: string, format: uuid }
|
||||
description: Транзакции конкретного кошелька (отправитель ИЛИ получатель).
|
||||
- name: sender_wallet_id
|
||||
in: query
|
||||
schema: { type: string, format: uuid }
|
||||
- name: recipient_wallet_id
|
||||
in: query
|
||||
schema: { type: string, format: uuid }
|
||||
- name: sender_user_id
|
||||
in: query
|
||||
schema: { type: string, format: uuid }
|
||||
description: Транзакции, где этот юзер — отправитель ИЛИ администратор начисления.
|
||||
- name: recipient_user_id
|
||||
in: query
|
||||
schema: { type: string, format: uuid }
|
||||
- name: sender_user_list_key
|
||||
in: query
|
||||
schema: { type: string, format: uuid }
|
||||
description: Выборка сотрудников-отправителей (см. core user-list-cache).
|
||||
- name: recipient_user_list_key
|
||||
in: query
|
||||
schema: { type: string, format: uuid }
|
||||
- name: wallet_user_list_key
|
||||
in: query
|
||||
schema: { type: string, format: uuid }
|
||||
description: |
|
||||
Выборка сотрудников: транзакция учитывается, если кто-то из них —
|
||||
отправитель, получатель ИЛИ администратор начисления. Полезно для поиска
|
||||
операций, где одна из сторон NULL (покупка в магазине, авто-начисления).
|
||||
- name: department_id
|
||||
in: query
|
||||
schema: { type: string, format: uuid }
|
||||
- name: wallet_transaction_type
|
||||
in: query
|
||||
schema: { type: integer, enum: [1, 2] }
|
||||
description: 1=Credit, 2=Debit
|
||||
schema:
|
||||
$ref: '#/components/schemas/walletTransactionType'
|
||||
- name: wallet_operation_type
|
||||
in: query
|
||||
schema:
|
||||
$ref: '#/components/schemas/walletOperationType'
|
||||
- name: entity_id
|
||||
in: query
|
||||
schema: { type: integer }
|
||||
- name: reference_id
|
||||
in: query
|
||||
schema: { type: string, format: uuid }
|
||||
- name: created_at
|
||||
in: query
|
||||
schema: { type: string }
|
||||
description: 'Диапазон в формате `from|to` (ISO дата/время).'
|
||||
responses:
|
||||
200:
|
||||
description: Список транзакций
|
||||
@@ -11731,7 +11786,8 @@ components:
|
||||
* `6` - Автоматическое начисление валюты
|
||||
* `7` - Подарок (автоматическое начисление)
|
||||
* `8` - Подарок (процент от баланса)
|
||||
enum: [1, 2, 3, 4, 5, 6, 7, 8]
|
||||
* `9` - Отмена покупки
|
||||
enum: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
example: 3
|
||||
|
||||
walletTransaction:
|
||||
@@ -12037,24 +12093,21 @@ components:
|
||||
id: { type: string, format: uuid }
|
||||
created_at: { type: string }
|
||||
wallet_transaction_type:
|
||||
type: integer
|
||||
enum: [1, 2]
|
||||
description: 1=Credit, 2=Debit
|
||||
$ref: '#/components/schemas/walletTransactionType'
|
||||
wallet_operation_type:
|
||||
type: integer
|
||||
description: Подтип операции (Credit, Debit, AutoCredit, BalancePercentGift, Gift и т.д.)
|
||||
$ref: '#/components/schemas/walletOperationType'
|
||||
sender_wallet_id: { type: string, format: uuid, nullable: true }
|
||||
recipient_wallet_id: { type: string, format: uuid, nullable: true }
|
||||
amount: { type: integer }
|
||||
entity_id: { type: integer, nullable: true }
|
||||
reference_id: { type: string, format: uuid, nullable: true }
|
||||
comment: { type: string, nullable: true }
|
||||
createdAt: { type: string }
|
||||
createdAt: { type: string, description: 'Локализованная дата для отображения.' }
|
||||
senderUserId: { type: string, format: uuid, nullable: true }
|
||||
senderName: { type: string, nullable: true }
|
||||
recipientUserId: { type: string, format: uuid, nullable: true }
|
||||
recipientName: { type: string, nullable: true }
|
||||
walletOperationTypeName: { type: string }
|
||||
walletOperationTypeName: { type: string, description: 'Человекочитаемое название операции.' }
|
||||
|
||||
WalletTransactionList:
|
||||
type: object
|
||||
@@ -12077,14 +12130,13 @@ components:
|
||||
usersListKey:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Ключ выборки сотрудников (создаётся через `POST /core/user-list-cache/set-user-list`)
|
||||
description: Ключ выборки сотрудников (создаётся через core user-list-cache).
|
||||
wallet_transaction_type:
|
||||
type: integer
|
||||
enum: [1, 2]
|
||||
description: 1=Credit (начисление), 2=Debit (списание)
|
||||
$ref: '#/components/schemas/walletTransactionType'
|
||||
amount:
|
||||
type: integer
|
||||
minimum: 1
|
||||
description: Сумма в единицах корп. валюты. На каждого сотрудника выборки.
|
||||
comment:
|
||||
type: string
|
||||
maxLength: 400
|
||||
|
||||
Reference in New Issue
Block a user