2023-06-22 09:36:43 +00:00
openapi : 3.0 .1
info :
title : Customer - сервис для управления клиентами
description : |-
Область ответственности сервиса - предоставление пользователю функционала корзины и кошелька.
version : 1.0 .0
2023-11-02 09:52:35 +00:00
2023-06-22 09:36:43 +00:00
tags :
- name : account
description : аккаунт
- name : currency
description : доступные валюты
- name : cart
description : корзина
- name : wallet
description : кошелёк
- name : history
description : история
2024-04-14 21:09:29 +00:00
- name : statistic
description : статистика
2023-11-02 09:52:35 +00:00
2023-06-22 09:36:43 +00:00
paths :
/account :
get :
tags :
- account
summary : Получение текущего аккаунта юзера
description : Используется при заходе юзера в систему. Айдишник юзера получает из токена, который передаётся в заголовке authorization
operationId : getAccount
security :
- Bearer : [ ]
responses :
2023-11-02 09:52:35 +00:00
"200" :
2023-06-22 09:36:43 +00:00
description : успешное получение
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Account"
"401" :
2023-06-22 09:36:43 +00:00
description : Неавторизован
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Error"
"404" :
2023-06-22 09:36:43 +00:00
description : Такого пользователя нет
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Error"
2023-06-22 09:36:43 +00:00
post :
tags :
- account
summary : Создать новый аккаунт
description : Создаёт новый аккаунт для юзера, если такого ещё не было
operationId : addAccount
security :
- Bearer : [ ]
responses :
2023-11-02 09:52:35 +00:00
"200" :
2023-06-22 09:36:43 +00:00
description : успешное создание аккаунта
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Account"
"401" :
2023-06-22 09:36:43 +00:00
description : Неавторизован
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Error"
2023-06-22 09:36:43 +00:00
patch :
tags :
- account
summary : Отредактировать аккаунт
description : Изменяет имя и название организации пользователя
operationId : changeAccount
security :
- Bearer : [ ]
requestBody :
2023-11-02 09:52:35 +00:00
description : Модель имени
content :
application/json :
schema :
$ref : "#/components/schemas/Name"
2023-06-22 09:36:43 +00:00
responses :
2023-11-02 09:52:35 +00:00
"200" :
2023-06-22 09:36:43 +00:00
description : успешное создание аккаунта
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Account"
"401" :
2023-06-22 09:36:43 +00:00
description : Неавторизован
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Error"
2023-06-22 09:36:43 +00:00
delete :
tags :
- account
summary : удалить собственный аккаунт
description : помечает аккаунт удалённым
operationId : deleteAccount
security :
- Bearer : [ ]
responses :
2023-11-02 09:52:35 +00:00
"200" :
2023-06-22 09:36:43 +00:00
description : успешное удаление аккаунта
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Account"
"401" :
2023-06-22 09:36:43 +00:00
description : Неавторизован
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Error"
2024-07-12 09:51:33 +00:00
/getList :
2023-06-22 09:36:43 +00:00
get :
tags :
- account
summary : списко аккаунтов с пагинацией
description : получает список аккаунтов на указанной странице + общее количество аккаунтов
operationId : paginationAccounts
parameters :
- name : page
in : query
description : Номер страницы, начиная с 1
required : false
explode : false
schema :
type : integer
default : 1
- name : limit
in : query
description : размер страницы
required : false
explode : false
schema :
type : integer
default : 100
responses :
2023-11-02 09:52:35 +00:00
"200" :
2023-06-22 09:36:43 +00:00
description : успешное получение страницы аккаунтов
content :
application/json :
schema :
type : object
properties :
totalPages :
type : integer
example : 11
2023-11-02 09:52:35 +00:00
accounts :
2023-06-22 09:36:43 +00:00
type : array
items :
$ref : "#/components/schemas/Account"
2023-11-02 09:52:35 +00:00
2023-06-22 09:36:43 +00:00
/account/{userId}:
get :
tags :
- account
summary : Получить аккаунт по ID пользователя системы единой авторизации
description : Метод необходимый в основном только менеджерам, для получения данных о клиенте
security :
- Bearer : [ ]
operationId : getDirectAccount
parameters :
- name : userId
in : path
description : ID аккаунта
required : true
schema :
type : string
responses :
2023-11-02 09:52:35 +00:00
"200" :
2023-06-22 09:36:43 +00:00
description : Успешное получение аккаунта
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Account"
"401" :
2023-06-22 09:36:43 +00:00
description : Неавторизован
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Error"
"404" :
2023-06-22 09:36:43 +00:00
description : Нет такого пользователя
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Error"
2023-06-22 09:36:43 +00:00
patch :
tags :
- account
summary : Выставление статуса верификации
description : Используется сервисом верификации для выставления статуса верификации, является ли юзер Н К О , Юр Лицом или Физ Лицом
operationId : setAccountVerificationStatus
security :
- Bearer : [ ]
parameters :
- name : userId
in : path
description : ID аккаунта
required : true
schema :
type : string
requestBody :
content :
application/json :
schema :
type : object
properties :
status :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/AccountStatus"
2023-06-22 09:36:43 +00:00
responses :
2023-11-02 09:52:35 +00:00
"200" :
2023-06-22 09:36:43 +00:00
description : Успешное выставление статуса
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Account"
"404" :
2023-06-22 09:36:43 +00:00
description : Нет такого пользователя
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Error"
2023-06-22 09:36:43 +00:00
delete :
tags :
- account
summary : Удалить аккаунт по айди
description : Метод необходимый в основном только менеджерам, для удаления клиента
operationId : deleteDirectAccount
security :
- Bearer : [ ]
parameters :
- name : userId
in : path
description : ID аккаунта
required : true
schema :
type : string
responses :
2023-11-02 09:52:35 +00:00
"200" :
description : Успешное удаление аккаунта
2023-06-22 09:36:43 +00:00
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Account"
"401" :
2023-06-22 09:36:43 +00:00
description : Неавторизован
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Error"
"404" :
2023-06-22 09:36:43 +00:00
description : Нет такого пользователя
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Error"
2023-06-22 09:36:43 +00:00
/currencies :
get :
tags :
- currency
summary : получить список одобренных валют
operationId : getCurrencies
responses :
2023-11-02 09:52:35 +00:00
"200" :
2023-06-22 09:36:43 +00:00
description : успешное получение списка валют
content :
application/json :
schema :
type : array
2023-11-02 09:52:35 +00:00
example :
2023-06-22 09:36:43 +00:00
- "RUB"
- "USD"
- "CAD"
2023-11-02 09:52:35 +00:00
items :
2023-06-22 09:36:43 +00:00
type : string
put :
tags :
- currency
summary : обновляет список одобренных валют
operationId : updateCurrencies
security :
- Bearer : [ ]
requestBody :
content :
application/json :
schema :
type : array
2023-11-02 09:52:35 +00:00
example :
2023-06-22 09:36:43 +00:00
- "RUB"
- "USD"
- "CAD"
2023-11-02 09:52:35 +00:00
items :
2023-06-22 09:36:43 +00:00
type : string
responses :
2023-11-02 09:52:35 +00:00
"200" :
2023-06-22 09:36:43 +00:00
description : успешное обновление списка валют
content :
application/json :
schema :
type : array
2023-11-02 09:52:35 +00:00
example :
2023-06-22 09:36:43 +00:00
- "RUB"
- "USD"
- "CAD"
2023-11-02 09:52:35 +00:00
items :
2023-06-22 09:36:43 +00:00
type : string
2023-11-02 09:52:35 +00:00
"401" :
2023-06-22 09:36:43 +00:00
description : Uanuthorized
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Error"
2023-06-22 09:36:43 +00:00
/cart :
patch :
tags :
- cart
summary : Добавляем в корзину тариф
description : Необходимо проверить, что такой тариф существует
operationId : add2cart
security :
- Bearer : [ ]
parameters :
- name : id
in : query
required : true
schema :
type : string
example : "807f1f77bcf81cd799439011"
responses :
2023-11-02 09:52:35 +00:00
"200" :
2023-06-22 09:36:43 +00:00
description : Добавлено в корзину
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Account"
"401" :
2023-06-22 09:36:43 +00:00
description : Неавторизован
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Error"
"404" :
2023-06-22 09:36:43 +00:00
description : Н е найден такой тариф
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Error"
2023-06-22 09:36:43 +00:00
delete :
tags :
- cart
summary : Удаляем из корзины тариф
operationId : removeFromCart
security :
- Bearer : [ ]
parameters :
- name : id
in : query
required : true
schema :
type : string
example : "807f1f77bcf81cd799439011"
responses :
2023-11-02 09:52:35 +00:00
"200" :
2023-06-22 09:36:43 +00:00
description : Удалено из корзины
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Account"
"401" :
2023-06-22 09:36:43 +00:00
description : Неавторизован
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Error"
"404" :
2023-06-22 09:36:43 +00:00
description : Н е найден такой тариф
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Error"
2023-06-22 09:36:43 +00:00
/cart/pay :
post :
tags :
- cart
summary : оплатить козину
operationId : payCart
security :
- Bearer : [ ]
description : Запрос на проведение оплаты корзины
responses :
2023-11-02 09:52:35 +00:00
"200" :
2023-06-22 09:36:43 +00:00
description : успешная оплата корзины
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Account"
"401" :
2023-06-22 09:36:43 +00:00
description : Неавторизован
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Error"
2024-08-23 19:26:43 +00:00
"406" :
description : корзина пустая
content :
application/json :
schema :
$ref : "#/components/schemas/Error"
2023-11-02 09:52:35 +00:00
2023-06-22 09:36:43 +00:00
/wallet :
patch :
tags :
- wallet
summary : Изменить валюту кошелька
operationId : changeCurrency
2023-11-02 09:52:35 +00:00
description : >-
2023-06-22 09:36:43 +00:00
При запросе необходимо :
2023-11-02 09:52:35 +00:00
2023-06-22 09:36:43 +00:00
- Отвалидировать, что такая валюта одобрена
2023-11-02 09:52:35 +00:00
2023-06-22 09:36:43 +00:00
- Получить данные из сервиса cbrf (выдам задачу на него чуть позднее)
2023-11-02 09:52:35 +00:00
2023-06-22 09:36:43 +00:00
- Перевести валюту кошелька в новую валюту. Кошелёк нарочно целочисленный, чтобы не было претензий к точности с плавающей точкой, поэтому, например долларовый счёт считается в центах
2023-11-02 09:52:35 +00:00
2023-06-22 09:36:43 +00:00
security :
- Bearer : [ ]
requestBody :
content :
application/json :
schema :
type : object
required : [ currency]
properties :
2023-11-02 09:52:35 +00:00
currency :
2023-06-22 09:36:43 +00:00
type : string
example : "USD"
responses :
2023-11-02 09:52:35 +00:00
"200" :
2023-06-22 09:36:43 +00:00
description : Успешная смена валюты кошелька
content :
application/json :
schema :
$ref : "#/components/schemas/Account"
2023-11-02 09:52:35 +00:00
"401" :
2023-06-22 09:36:43 +00:00
description : Неавторизован
content :
application/json :
schema :
$ref : "#/components/schemas/Error"
2023-11-02 09:52:35 +00:00
"400" :
2023-06-22 09:36:43 +00:00
description : Такая валюта не одобрена
content :
application/json :
schema :
$ref : "#/components/schemas/Error"
2023-11-02 09:52:35 +00:00
"404" :
2023-06-22 09:36:43 +00:00
description : Пользователь не найден
content :
application/json :
schema :
$ref : "#/components/schemas/Error"
post :
tags :
- wallet
summary : Запрос на получение ссылки на оплату
operationId : requestMoney
security :
- Bearer : [ ]
description : >-
- Формируем запрос к сервису оплаты, с необходимыми постбэками
2023-11-02 09:52:35 +00:00
2023-06-22 09:36:43 +00:00
- Получаем ответ от сервиса оплаты с ссылкой на оплату, которую надо передать пользователю
requestBody :
content :
application/json :
schema :
type : object
required : [ type, currency, amount]
properties :
type :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/PaymentType"
2023-06-22 09:36:43 +00:00
currency :
type : string
description : "ISO-4217 формат"
example : "RUB"
amount :
type : integer
example : 15020
bankCard :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/BankCard"
2023-06-22 09:36:43 +00:00
phoneNumber :
type : string
example : "79000000000"
login :
type : string
example : "login_test"
returnUrl :
type : string
example : "https://site.ru/cart"
responses :
2023-11-02 09:52:35 +00:00
"200" :
2023-06-22 09:36:43 +00:00
description : Успешный запрос денег
content :
application/json :
schema :
type : object
properties :
2023-11-02 09:52:35 +00:00
link :
2023-06-22 09:36:43 +00:00
type : string
example : "https://google.ru"
2023-11-02 09:52:35 +00:00
"500" :
2023-06-22 09:36:43 +00:00
description : Сервис оплаты вернул ошибку
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Error"
2024-02-04 19:30:57 +00:00
/wallet/rspay :
post :
summary : Обработка запроса RSPay
2024-02-05 12:24:56 +00:00
security :
- Bearer : [ ]
2024-02-15 09:03:24 +00:00
requestBody :
2024-02-16 15:27:24 +00:00
required : true
2024-02-15 09:03:24 +00:00
content :
application/json :
schema :
2024-02-16 15:27:24 +00:00
type : object
2024-02-15 09:03:24 +00:00
properties :
money :
2024-02-22 23:53:53 +00:00
type : number
format : float
example : 1000.0
2024-02-04 19:30:57 +00:00
responses :
'200' :
description : Успех
'500' :
description : Внутренняя ошибка сервера
'403' :
description : Запрещено
content :
application/json :
example :
message : not allowed for non organizations
2023-06-22 09:36:43 +00:00
/history :
get :
tags :
- history
summary : Получение лога событий связанных с аккаунтом
operationId : getHistory
security :
2023-12-20 12:42:41 +00:00
- Bearer : [ ]
2023-06-22 09:36:43 +00:00
parameters :
- name : page
in : query
description : Номер страницы, начиная с 1
required : false
explode : false
schema :
type : integer
default : 1
- name : limit
in : query
description : Размер страницы
required : false
explode : false
schema :
type : integer
default : 100
2023-09-14 10:07:28 +00:00
- name : type
in : query
description : Тип события
required : false
explode : false
schema :
type : string
2023-12-20 12:42:41 +00:00
- name : accountID
in : query
description : Идентификатор аккаунта. Если не указан, будет использоваться идентификатор из токена.
required : false
explode : false
schema :
type : string
2023-06-22 09:36:43 +00:00
responses :
2023-11-02 09:52:35 +00:00
"200" :
2023-06-22 09:36:43 +00:00
description : Успешное получение событий
content :
application/json :
schema :
type : object
properties :
2023-11-02 09:52:35 +00:00
totalPages :
2023-06-22 09:36:43 +00:00
type : integer
example : 11
records :
type : array
items :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/History"
"401" :
2023-06-22 09:36:43 +00:00
description : Неавторизован
content :
application/json :
schema :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Error"
2023-06-22 09:36:43 +00:00
2023-11-23 18:55:22 +00:00
/recent :
2023-11-26 13:25:27 +00:00
get :
tags :
- history
summary : Получение недавних тарифов
2023-12-22 15:12:43 +00:00
operationId : getRecentTariffs
2023-11-26 13:25:27 +00:00
description : Возвращает список уникальных тарифов из истории. Айди аккаунта получается из заголовка.
security :
- Bearer : [ ]
responses :
'200' :
description : Успешный запрос
content :
application/json :
schema :
type : array
items :
$ref : "#/components/schemas/TariffID"
'400' :
description : Неверный запрос
content :
application/json :
schema :
$ref : "#/components/schemas/Error"
'404' :
description : Тарифы не найдены
content :
application/json :
schema :
$ref : "#/components/schemas/Error"
'500' :
description : Внутренняя ошибка сервера
content :
application/json :
schema :
$ref : "#/components/schemas/Error"
requestBody :
content :
application/json :
schema :
type : object
required : [ id]
properties :
id :
type : string
example : "807f1f77bcf81cd799439011"
2023-11-02 10:00:15 +00:00
/sendReport :
post :
tags :
- history
summary : отправить акт проделанных работ на почту
operationId : sendReport
security :
- Bearer : [ ]
description : Запрос на отправку акта проделанных работ
requestBody :
content :
application/json :
schema :
type : object
required : [ id]
properties :
id :
type : string
example : "807f1f77bcf81cd799439011"
responses :
"200" :
description : успешная отправка
"401" :
description : Неавторизован
content :
application/json :
schema :
$ref : "#/components/schemas/Error"
2023-11-23 18:55:22 +00:00
2023-12-22 15:12:43 +00:00
/history/ltv :
post :
tags :
- history
summary : Расчет среднего времени жизни платящего клиента (LTV)
operationId : calculateLTV
security :
- Bearer : [ ]
requestBody :
description : Период для расчета LTV
required : true
content :
application/json :
schema :
type : object
properties :
from :
type : integer
format : int64
description : Начальная дата в формате Unix timestamp. Если 0, устанавливает начало истории.
to :
type : integer
format : int64
description : Конечная дата в формате Unix timestamp. Если 0, устанавливает текущее время.
required :
- from
- to
responses :
'200' :
description : Успешный расчет LTV
content :
application/json :
schema :
type : object
properties :
ltv :
type : integer
format : int64
description : Среднее количество дней между первым и последним платежом
'400' :
description : Неверный запрос, если from больше, чем to
content :
application/json :
schema :
$ref : '#/components/schemas/Error'
'401' :
description : Неавторизован
content :
application/json :
schema :
$ref : "#/components/schemas/Error"
'500' :
description : Внутренняя ошибка сервера
content :
application/json :
schema :
$ref : "#/components/schemas/Error"
2024-04-14 21:09:29 +00:00
/quizlogo/stat :
post :
tags :
- statistic
summary : статистика пользователей, перешедших по логотипу в опросах
operationId : quizLogoStat
security :
- Bearer : [ ]
requestBody :
content :
'application/json' :
schema :
type : object
properties :
to :
description : таймштамп времени, до которого выбирать статистику. если 0 или не передано - этого ограничения нет. верхняя граница времени
type : integer
from :
description : таймштамп времени, после которого выбирать статистику. если 0 или не передано - этого ограничения нет. нижняя граница времени
type : integer
2024-04-15 09:27:00 +00:00
page :
description : страница выборки
type : integer
limit :
description : лимит выборки
type : integer
2024-04-14 21:09:29 +00:00
responses :
'200' :
description : Успешный ответ с данными статистики
content :
application/json :
schema :
$ref : '#/components/schemas/QuizLogoStat'
'500' :
description : Внутренняя ошибка сервера
content :
application/json :
schema :
$ref : "#/components/schemas/Error"
2024-04-25 16:47:17 +00:00
/promocode/ltv :
post :
tags :
- statistic
summary : статистика по промокодам в разрезе регистраций и оплат
operationId : promocodeLTV
security :
- Bearer : [ ]
requestBody :
2024-04-26 16:00:22 +00:00
required : true
2024-04-25 16:47:17 +00:00
content :
'application/json' :
schema :
type : object
properties :
to :
description : таймштамп времени, до которого выбирать статистику
type : integer
from :
description : таймштамп времени, после которого выбирать статистику
type : integer
2024-04-26 16:00:22 +00:00
required :
- from
- to
2024-04-25 16:47:17 +00:00
responses :
'200' :
description : Успешный ответ с данными статистики
content :
application/json :
schema :
$ref : '#/components/schemas/PromoLtvStat'
'500' :
description : Внутренняя ошибка сервера
content :
application/json :
schema :
$ref : "#/components/schemas/Error"
2024-05-24 10:25:37 +00:00
/account/pipe :
get :
tags :
- account
summary : Получение изменений аккаунта через SSE
operationId : accountPipe
2024-06-08 10:13:08 +00:00
parameters :
2024-06-08 17:34:40 +00:00
- name : Authorization
2024-06-08 10:13:08 +00:00
in : query
2024-06-08 12:50:59 +00:00
description : токен пользователя
2024-06-08 10:13:08 +00:00
required : true
2024-05-24 10:25:37 +00:00
responses :
'200' :
description : Успешный ответ
content :
text/event-stream :
schema :
$ref : '#/components/schemas/Account'
2024-04-14 21:09:29 +00:00
2023-12-22 15:12:43 +00:00
2023-06-22 09:36:43 +00:00
components :
schemas :
Account :
type : object
2023-11-02 09:52:35 +00:00
required :
[ _id, userId, cart, wallet, name, status, deleted, createdAt, updatedAt]
2023-06-22 09:36:43 +00:00
properties :
_id :
type : string
example : "807f1f77bcf81cd799439011"
userId :
type : string
example : "807f1f77bcf81cd799439011"
name :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/Name"
2023-06-22 09:36:43 +00:00
cart :
type : array
items :
type : string
2023-11-02 09:52:35 +00:00
example :
2023-06-22 09:36:43 +00:00
- "807f1f77bcf81cd799439011"
- "807f1f77bcf81cd799439012"
wallet :
$ref : "#/components/schemas/Wallet"
status :
2023-11-02 09:52:35 +00:00
$ref : "#/components/schemas/AccountStatus"
2023-06-22 09:36:43 +00:00
isDeleted :
type : boolean
example : false
createdAt :
type : string
format : "date-time"
updatedAt :
type : string
format : "date-time"
deletedAt :
type : string
format : "date-time"
2023-11-02 09:52:35 +00:00
2023-06-22 09:36:43 +00:00
Name :
type : object
properties :
2023-11-02 09:52:35 +00:00
firstname :
2023-06-22 09:36:43 +00:00
type : string
example : Иван
secondname :
type : string
example : Иванов
middlename :
type : string
example : Иванович
orgname :
type : string
example : О О О \"Моя Оборона\"
BankCard :
type : object
required : [ number, expiryYear, expiryMonth]
properties :
number :
type : string
example : "RUB"
description : Номер карты
expiryYear :
type : string
example : "2021"
description : Год истечения срока карты (YYYY)
expiryMonth :
type : string
example : "05"
description : Месяц истечения срока карты (MM)
csc :
type : string
example : "05"
description : Код CVC2 или CVV2, 3 или 4 символа, печатается на обратной стороне карты
cardholder :
type : string
description : Имя владельца карты
example : "IVAN IVANOV"
2023-11-02 09:52:35 +00:00
2023-06-22 09:36:43 +00:00
Wallet :
type : object
required : [ currency, cash, money, purchasesAmount, spent]
properties :
currency :
description : Текущий курс валюты
type : string
example : "RUB"
cash :
description : Сумма money переведённая на текущий курс
type : integer
format : int64
example : 10701
purchasesAmount :
type : integer
format : int64
description : Общая сумма денег, которые внёс пользователь
spent :
type : integer
format : int64
description : Общая сумма потраченных денег за всё время существования аккаунта
money :
type : integer
format : int64
description : >-
Деньги на счету в копейках. Чтобы при перессчётах не
возникало денег изниоткуда. фиксируемся к одной валюте,
она будет внутренней, никому её не покажем
example : 10701
2023-11-02 09:52:35 +00:00
2023-06-22 09:36:43 +00:00
History :
type : object
2023-11-02 09:52:35 +00:00
required :
[ id, userId, type, deleted, createdAt, updatedAt, comment, subject]
2023-06-22 09:36:43 +00:00
properties :
id :
type : string
example : "807f1f77bcf81cd799439011"
userId :
type : string
example : "807f1f77bcf81cd799439011"
type :
type : string
example : "customer.tariffEnded"
2023-11-02 09:52:35 +00:00
isDeleted :
2023-06-22 09:36:43 +00:00
type : boolean
example : false
createdAt :
type : string
format : "date-time"
updatedAt :
type : string
format : "date-time"
deletedAt :
type : string
format : "date-time"
comment :
type : string
example : "я это сделал потому что 42"
rawDetails :
type : string
2023-11-02 09:52:35 +00:00
description : >-
2023-06-22 09:36:43 +00:00
Я пока не могу предположить, какие будут фильтры по
истории, поэтому предлагаю в это
поле просто класть строку с json.
Ибо для каждого типа записи она своя.
example : '{"tariffs":["807f1f77bcf81cd799439011","807f1f77bcf81cd799439011"]}'
2023-11-02 09:52:35 +00:00
2023-06-22 09:36:43 +00:00
PaymentType :
type : string
2023-11-02 09:52:35 +00:00
enum :
[
"bankCard" ,
"tinkoffBank" ,
"qiwi" ,
"sberbank" ,
"yoomoney" ,
"mobile" ,
"installments" ,
"cash" ,
"sbp" ,
"b2bSberbank" ,
"alfabank" ,
]
2023-06-22 09:36:43 +00:00
2023-11-26 13:25:27 +00:00
TariffID :
type : object
properties :
ID :
type : string
example : "807f1f77bcf81cd799439011"
2023-06-22 09:36:43 +00:00
AccountStatus :
type : string
enum : [ "no" , "nko" , "org" ]
Error :
type : object
required : [ code, message]
properties :
statusCode :
type : integer
format : int64
example : 404
message :
type : string
example : user not found
2024-04-14 21:09:29 +00:00
QuizLogoStat :
2024-04-24 12:20:21 +00:00
type : array
2024-04-24 12:27:17 +00:00
items :
# count:
# type: integer
# description: Общее количество
type : object
properties :
2024-04-24 12:29:07 +00:00
id :
2024-04-24 12:27:17 +00:00
type : string
description : user id
money :
type : integer
description : Количество денег
regs :
type : integer
description : Количество регистраций
quizes :
type : array
items :
type : object
properties :
quiz :
type : string
description : qid quiz
regs :
type : integer
description : Количество регистраций
money :
type : integer
description : Количество денег
2024-04-25 16:47:17 +00:00
PromoLtvStat :
type : object
properties :
stats :
type : object
description : мапа ключ id промо, знчение количество регистраций и количество денег
additionalProperties :
type : object
properties :
regs :
type : integer
description : количество регистраций
money :
type : integer
description : количество денег
2023-11-02 09:52:35 +00:00
2023-06-22 09:36:43 +00:00
securitySchemes :
2023-11-02 09:52:35 +00:00
Bearer : # arbitrary name for the security scheme
2023-06-22 09:36:43 +00:00
type : http
scheme : bearer
bearerFormat : JWT
description : >-
Enter the token with the `Bearer : ` prefix, e.g. "Bearer abcde12345".