feat: add operations page
This commit is contained in:
Vendored
+105
@@ -116,6 +116,22 @@ export interface paths {
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/api/v1/brokerage-accounts/{accountId}/operations": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get: operations["BrokerageOperationsController_get"];
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/api/v1/brokerage-accounts/{accountId}/portfolio": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
@@ -185,6 +201,32 @@ export interface components {
|
||||
currency: string;
|
||||
value: string;
|
||||
};
|
||||
BrokerageOperationDto: {
|
||||
id: string;
|
||||
/** Format: date-time */
|
||||
occurredAt: string;
|
||||
type: string;
|
||||
/** @enum {string} */
|
||||
category: "trade" | "income" | "tax" | "fee" | "transfer" | "other";
|
||||
description: string;
|
||||
figi: string | null;
|
||||
instrumentUid: string | null;
|
||||
ticker: string | null;
|
||||
instrumentType: string | null;
|
||||
payment: components["schemas"]["MoneyDto"] | null;
|
||||
quantity: string | null;
|
||||
price: components["schemas"]["MoneyDto"] | null;
|
||||
accruedInterest: components["schemas"]["MoneyDto"] | null;
|
||||
commission: components["schemas"]["MoneyDto"] | null;
|
||||
};
|
||||
BrokerageOperationsPageDto: {
|
||||
accountId: string;
|
||||
items: components["schemas"]["BrokerageOperationDto"][];
|
||||
nextCursor: string | null;
|
||||
hasNext: boolean;
|
||||
/** Format: date-time */
|
||||
observedAt: string;
|
||||
};
|
||||
PortfolioPositionDto: {
|
||||
figi: string | null;
|
||||
displayName: string;
|
||||
@@ -715,6 +757,69 @@ export interface operations {
|
||||
};
|
||||
};
|
||||
};
|
||||
BrokerageOperationsController_get: {
|
||||
parameters: {
|
||||
query?: {
|
||||
from?: string;
|
||||
to?: string;
|
||||
categories?: ("trade" | "income" | "tax" | "fee" | "transfer" | "other")[];
|
||||
cursor?: string;
|
||||
limit?: number;
|
||||
};
|
||||
header?: never;
|
||||
path: {
|
||||
accountId: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["BrokerageOperationsPageDto"];
|
||||
};
|
||||
};
|
||||
/** @description Invalid request */
|
||||
400: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/problem+json": components["schemas"]["ProblemDetailsDto"];
|
||||
};
|
||||
};
|
||||
/** @description Authentication required */
|
||||
401: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/problem+json": components["schemas"]["ProblemDetailsDto"];
|
||||
};
|
||||
};
|
||||
/** @description Resource not found */
|
||||
404: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/problem+json": components["schemas"]["ProblemDetailsDto"];
|
||||
};
|
||||
};
|
||||
/** @description Internal server error */
|
||||
500: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/problem+json": components["schemas"]["ProblemDetailsDto"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
PortfolioController_get: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
|
||||
@@ -590,6 +590,137 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/brokerage-accounts/{accountId}/operations": {
|
||||
"get": {
|
||||
"operationId": "BrokerageOperationsController_get",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "accountId",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "from",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"format": "date-time",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"format": "date-time",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "categories",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"trade",
|
||||
"income",
|
||||
"tax",
|
||||
"fee",
|
||||
"transfer",
|
||||
"other"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "cursor",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"minimum": 1,
|
||||
"maximum": 1000,
|
||||
"default": 100,
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/BrokerageOperationsPageDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request",
|
||||
"content": {
|
||||
"application/problem+json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ProblemDetailsDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Authentication required",
|
||||
"content": {
|
||||
"application/problem+json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ProblemDetailsDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Resource not found",
|
||||
"content": {
|
||||
"application/problem+json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ProblemDetailsDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error",
|
||||
"content": {
|
||||
"application/problem+json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ProblemDetailsDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"brokerage-accounts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/brokerage-accounts/{accountId}/portfolio": {
|
||||
"get": {
|
||||
"operationId": "PortfolioController_get",
|
||||
@@ -829,6 +960,139 @@
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"BrokerageOperationDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"occurredAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"category": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"trade",
|
||||
"income",
|
||||
"tax",
|
||||
"fee",
|
||||
"transfer",
|
||||
"other"
|
||||
]
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"figi": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"instrumentUid": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"ticker": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"instrumentType": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"payment": {
|
||||
"nullable": true,
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/MoneyDto"
|
||||
}
|
||||
]
|
||||
},
|
||||
"quantity": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"price": {
|
||||
"nullable": true,
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/MoneyDto"
|
||||
}
|
||||
]
|
||||
},
|
||||
"accruedInterest": {
|
||||
"nullable": true,
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/MoneyDto"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commission": {
|
||||
"nullable": true,
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/MoneyDto"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"occurredAt",
|
||||
"type",
|
||||
"category",
|
||||
"description",
|
||||
"figi",
|
||||
"instrumentUid",
|
||||
"ticker",
|
||||
"instrumentType",
|
||||
"payment",
|
||||
"quantity",
|
||||
"price",
|
||||
"accruedInterest",
|
||||
"commission"
|
||||
]
|
||||
},
|
||||
"BrokerageOperationsPageDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"accountId": {
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/BrokerageOperationDto"
|
||||
}
|
||||
},
|
||||
"nextCursor": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"hasNext": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"observedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"accountId",
|
||||
"items",
|
||||
"nextCursor",
|
||||
"hasNext",
|
||||
"observedAt"
|
||||
]
|
||||
},
|
||||
"PortfolioPositionDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -62,6 +62,35 @@ export const ru = {
|
||||
quantity: "Количество: {{value}}",
|
||||
return: "Доход: {{value}}",
|
||||
},
|
||||
ledger: {
|
||||
title: "Журнал операций",
|
||||
back: "К счету",
|
||||
open: "Открыть журнал",
|
||||
recentTitle: "Последние события",
|
||||
recentLoading: "Загрузка последних событий",
|
||||
recentError: "Не удалось загрузить последние события.",
|
||||
recentEmpty: "Последних событий пока нет.",
|
||||
from: "С",
|
||||
to: "По",
|
||||
categories: "Категории",
|
||||
previous: "Назад",
|
||||
next: "Далее",
|
||||
retry: "Повторить",
|
||||
errorTitle: "Не удалось загрузить журнал",
|
||||
errorText: "Попробуйте запросить операции еще раз.",
|
||||
emptyTitle: "Операций нет",
|
||||
emptyText: "Измените период или фильтры.",
|
||||
noMoney: "Без движения денег",
|
||||
noInstrument: "Без инструмента",
|
||||
category: {
|
||||
trade: "Сделка",
|
||||
income: "Доход",
|
||||
tax: "Налог",
|
||||
fee: "Комиссия",
|
||||
transfer: "Перевод",
|
||||
other: "Прочее",
|
||||
},
|
||||
},
|
||||
settings: { title: "Настройки" },
|
||||
tbank: {
|
||||
title: "T-Bank Invest",
|
||||
|
||||
Reference in New Issue
Block a user