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