refactor(api): consume bank operation oneOf contract (WealthLedger/frontend#144)
This commit is contained in:
Vendored
+72
-24
@@ -775,6 +775,77 @@ export interface components {
|
||||
*/
|
||||
password: string;
|
||||
};
|
||||
RubMoneyInputDto: {
|
||||
/** @enum {string} */
|
||||
currency: "RUB";
|
||||
value: string;
|
||||
};
|
||||
CreateExpenseOperationDto: {
|
||||
/** Format: uuid */
|
||||
id: string;
|
||||
/** Format: uuid */
|
||||
cardId: string;
|
||||
amount: components["schemas"]["RubMoneyInputDto"];
|
||||
/** Format: date */
|
||||
date: string;
|
||||
description?: string;
|
||||
/**
|
||||
* @description discriminator enum property added by openapi-typescript
|
||||
* @enum {string}
|
||||
*/
|
||||
kind: "expense";
|
||||
/** Format: uuid */
|
||||
categoryId?: string;
|
||||
};
|
||||
CreateTopupOperationDto: {
|
||||
/** Format: uuid */
|
||||
id: string;
|
||||
/** Format: uuid */
|
||||
cardId: string;
|
||||
amount: components["schemas"]["RubMoneyInputDto"];
|
||||
/** Format: date */
|
||||
date: string;
|
||||
description?: string;
|
||||
/**
|
||||
* @description discriminator enum property added by openapi-typescript
|
||||
* @enum {string}
|
||||
*/
|
||||
kind: "topup";
|
||||
};
|
||||
CreateTransferOperationDto: {
|
||||
/** Format: uuid */
|
||||
id: string;
|
||||
/** Format: uuid */
|
||||
cardId: string;
|
||||
amount: components["schemas"]["RubMoneyInputDto"];
|
||||
/** Format: date */
|
||||
date: string;
|
||||
description?: string;
|
||||
/**
|
||||
* @description discriminator enum property added by openapi-typescript
|
||||
* @enum {string}
|
||||
*/
|
||||
kind: "transfer";
|
||||
/** Format: uuid */
|
||||
targetCardId: string;
|
||||
};
|
||||
CreateRefundOperationDto: {
|
||||
/** Format: uuid */
|
||||
id: string;
|
||||
/** Format: uuid */
|
||||
cardId: string;
|
||||
amount: components["schemas"]["RubMoneyInputDto"];
|
||||
/** Format: date */
|
||||
date: string;
|
||||
description?: string;
|
||||
/**
|
||||
* @description discriminator enum property added by openapi-typescript
|
||||
* @enum {string}
|
||||
*/
|
||||
kind: "refund";
|
||||
/** Format: uuid */
|
||||
originalExpenseId: string;
|
||||
};
|
||||
MoneyDto: {
|
||||
currency: string;
|
||||
value: string;
|
||||
@@ -792,11 +863,6 @@ export interface components {
|
||||
archivedAt: string | null;
|
||||
version: number;
|
||||
};
|
||||
RubMoneyInputDto: {
|
||||
/** @enum {string} */
|
||||
currency: "RUB";
|
||||
value: string;
|
||||
};
|
||||
CreateBankCardDto: {
|
||||
/** Format: uuid */
|
||||
id: string;
|
||||
@@ -841,24 +907,6 @@ export interface components {
|
||||
net: components["schemas"]["MoneyDto"];
|
||||
categories: components["schemas"]["BankSummaryCategoryDto"][];
|
||||
};
|
||||
CreateBankOperationDto: {
|
||||
/** Format: uuid */
|
||||
id: string;
|
||||
/** @enum {string} */
|
||||
kind: "expense" | "topup" | "transfer" | "refund";
|
||||
/** Format: uuid */
|
||||
cardId: string;
|
||||
/** Format: uuid */
|
||||
targetCardId?: string;
|
||||
/** Format: uuid */
|
||||
categoryId?: string;
|
||||
/** Format: uuid */
|
||||
originalExpenseId?: string;
|
||||
amount: components["schemas"]["RubMoneyInputDto"];
|
||||
/** Format: date */
|
||||
date: string;
|
||||
description?: string;
|
||||
};
|
||||
BankOperationDto: {
|
||||
id: string;
|
||||
/** @enum {string} */
|
||||
@@ -2598,7 +2646,7 @@ export interface operations {
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["CreateBankOperationDto"];
|
||||
"application/json": components["schemas"]["CreateExpenseOperationDto"] | components["schemas"]["CreateTopupOperationDto"] | components["schemas"]["CreateTransferOperationDto"] | components["schemas"]["CreateRefundOperationDto"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
|
||||
Reference in New Issue
Block a user