-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathTransactionsApi.d.ts
221 lines (221 loc) · 11.7 KB
/
TransactionsApi.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
/**
* YNAB API Endpoints
* Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
*
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
import * as runtime from '../runtime';
import type { HybridTransactionsResponse, PatchTransactionsWrapper, PostTransactionsWrapper, PutTransactionWrapper, SaveTransactionsResponse, TransactionResponse, TransactionsImportResponse, TransactionsResponse } from '../models/index';
export interface CreateTransactionRequest {
budgetId: string;
data: PostTransactionsWrapper;
}
export interface DeleteTransactionRequest {
budgetId: string;
transactionId: string;
}
export interface GetTransactionByIdRequest {
budgetId: string;
transactionId: string;
}
export interface GetTransactionsRequest {
budgetId: string;
sinceDate?: string;
type?: GetTransactionsTypeEnum;
lastKnowledgeOfServer?: number;
}
export interface GetTransactionsByAccountRequest {
budgetId: string;
accountId: string;
sinceDate?: string;
type?: GetTransactionsByAccountTypeEnum;
lastKnowledgeOfServer?: number;
}
export interface GetTransactionsByCategoryRequest {
budgetId: string;
categoryId: string;
sinceDate?: string;
type?: GetTransactionsByCategoryTypeEnum;
lastKnowledgeOfServer?: number;
}
export interface GetTransactionsByMonthRequest {
budgetId: string;
month: string;
sinceDate?: string;
type?: GetTransactionsByMonthTypeEnum;
lastKnowledgeOfServer?: number;
}
export interface GetTransactionsByPayeeRequest {
budgetId: string;
payeeId: string;
sinceDate?: string;
type?: GetTransactionsByPayeeTypeEnum;
lastKnowledgeOfServer?: number;
}
export interface ImportTransactionsRequest {
budgetId: string;
}
export interface UpdateTransactionRequest {
budgetId: string;
transactionId: string;
data: PutTransactionWrapper;
}
export interface UpdateTransactionsRequest {
budgetId: string;
data: PatchTransactionsWrapper;
}
/**
*
*/
export declare class TransactionsApi extends runtime.BaseAPI {
/**
* Creates a single transaction or multiple transactions. If you provide a body containing a `transaction` object, a single transaction will be created and if you provide a body containing a `transactions` array, multiple transactions will be created. Scheduled transactions (transactions with a future date) cannot be created on this endpoint.
* Create a single transaction or multiple transactions
*/
createTransactionRaw(requestParameters: CreateTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SaveTransactionsResponse>>;
/**
* Creates a single transaction or multiple transactions. If you provide a body containing a `transaction` object, a single transaction will be created and if you provide a body containing a `transactions` array, multiple transactions will be created. Scheduled transactions (transactions with a future date) cannot be created on this endpoint.
* Create a single transaction or multiple transactions
*/
createTransaction(budgetId: string, data: PostTransactionsWrapper, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SaveTransactionsResponse>;
/**
* Deletes a transaction
* Deletes an existing transaction
*/
deleteTransactionRaw(requestParameters: DeleteTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TransactionResponse>>;
/**
* Deletes a transaction
* Deletes an existing transaction
*/
deleteTransaction(budgetId: string, transactionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TransactionResponse>;
/**
* Returns a single transaction
* Single transaction
*/
getTransactionByIdRaw(requestParameters: GetTransactionByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TransactionResponse>>;
/**
* Returns a single transaction
* Single transaction
*/
getTransactionById(budgetId: string, transactionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TransactionResponse>;
/**
* Returns budget transactions, excluding any pending transactions
* List transactions
*/
getTransactionsRaw(requestParameters: GetTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TransactionsResponse>>;
/**
* Returns budget transactions, excluding any pending transactions
* List transactions
*/
getTransactions(budgetId: string, sinceDate?: string, type?: GetTransactionsTypeEnum, lastKnowledgeOfServer?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TransactionsResponse>;
/**
* Returns all transactions for a specified account, excluding any pending transactions
* List account transactions
*/
getTransactionsByAccountRaw(requestParameters: GetTransactionsByAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TransactionsResponse>>;
/**
* Returns all transactions for a specified account, excluding any pending transactions
* List account transactions
*/
getTransactionsByAccount(budgetId: string, accountId: string, sinceDate?: string, type?: GetTransactionsByAccountTypeEnum, lastKnowledgeOfServer?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TransactionsResponse>;
/**
* Returns all transactions for a specified category
* List category transactions, excluding any pending transactions
*/
getTransactionsByCategoryRaw(requestParameters: GetTransactionsByCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HybridTransactionsResponse>>;
/**
* Returns all transactions for a specified category
* List category transactions, excluding any pending transactions
*/
getTransactionsByCategory(budgetId: string, categoryId: string, sinceDate?: string, type?: GetTransactionsByCategoryTypeEnum, lastKnowledgeOfServer?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HybridTransactionsResponse>;
/**
* Returns all transactions for a specified month
* List transactions in month, excluding any pending transactions
*/
getTransactionsByMonthRaw(requestParameters: GetTransactionsByMonthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HybridTransactionsResponse>>;
/**
* Returns all transactions for a specified month
* List transactions in month, excluding any pending transactions
*/
getTransactionsByMonth(budgetId: string, month: string, sinceDate?: string, type?: GetTransactionsByMonthTypeEnum, lastKnowledgeOfServer?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HybridTransactionsResponse>;
/**
* Returns all transactions for a specified payee
* List payee transactions, excluding any pending transactions
*/
getTransactionsByPayeeRaw(requestParameters: GetTransactionsByPayeeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HybridTransactionsResponse>>;
/**
* Returns all transactions for a specified payee
* List payee transactions, excluding any pending transactions
*/
getTransactionsByPayee(budgetId: string, payeeId: string, sinceDate?: string, type?: GetTransactionsByPayeeTypeEnum, lastKnowledgeOfServer?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HybridTransactionsResponse>;
/**
* Imports available transactions on all linked accounts for the given budget. Linked accounts allow transactions to be imported directly from a specified financial institution and this endpoint initiates that import. Sending a request to this endpoint is the equivalent of clicking \"Import\" on each account in the web application or tapping the \"New Transactions\" banner in the mobile applications. The response for this endpoint contains the transaction ids that have been imported.
* Import transactions
*/
importTransactionsRaw(requestParameters: ImportTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TransactionsImportResponse>>;
/**
* Imports available transactions on all linked accounts for the given budget. Linked accounts allow transactions to be imported directly from a specified financial institution and this endpoint initiates that import. Sending a request to this endpoint is the equivalent of clicking \"Import\" on each account in the web application or tapping the \"New Transactions\" banner in the mobile applications. The response for this endpoint contains the transaction ids that have been imported.
* Import transactions
*/
importTransactions(budgetId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TransactionsImportResponse>;
/**
* Updates a single transaction
* Updates an existing transaction
*/
updateTransactionRaw(requestParameters: UpdateTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TransactionResponse>>;
/**
* Updates a single transaction
* Updates an existing transaction
*/
updateTransaction(budgetId: string, transactionId: string, data: PutTransactionWrapper, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TransactionResponse>;
/**
* Updates multiple transactions, by `id` or `import_id`.
* Update multiple transactions
*/
updateTransactionsRaw(requestParameters: UpdateTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SaveTransactionsResponse>>;
/**
* Updates multiple transactions, by `id` or `import_id`.
* Update multiple transactions
*/
updateTransactions(budgetId: string, data: PatchTransactionsWrapper, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SaveTransactionsResponse>;
}
/**
* @export
*/
export declare const GetTransactionsTypeEnum: {
readonly Uncategorized: "uncategorized";
readonly Unapproved: "unapproved";
};
export type GetTransactionsTypeEnum = typeof GetTransactionsTypeEnum[keyof typeof GetTransactionsTypeEnum];
/**
* @export
*/
export declare const GetTransactionsByAccountTypeEnum: {
readonly Uncategorized: "uncategorized";
readonly Unapproved: "unapproved";
};
export type GetTransactionsByAccountTypeEnum = typeof GetTransactionsByAccountTypeEnum[keyof typeof GetTransactionsByAccountTypeEnum];
/**
* @export
*/
export declare const GetTransactionsByCategoryTypeEnum: {
readonly Uncategorized: "uncategorized";
readonly Unapproved: "unapproved";
};
export type GetTransactionsByCategoryTypeEnum = typeof GetTransactionsByCategoryTypeEnum[keyof typeof GetTransactionsByCategoryTypeEnum];
/**
* @export
*/
export declare const GetTransactionsByMonthTypeEnum: {
readonly Uncategorized: "uncategorized";
readonly Unapproved: "unapproved";
};
export type GetTransactionsByMonthTypeEnum = typeof GetTransactionsByMonthTypeEnum[keyof typeof GetTransactionsByMonthTypeEnum];
/**
* @export
*/
export declare const GetTransactionsByPayeeTypeEnum: {
readonly Uncategorized: "uncategorized";
readonly Unapproved: "unapproved";
};
export type GetTransactionsByPayeeTypeEnum = typeof GetTransactionsByPayeeTypeEnum[keyof typeof GetTransactionsByPayeeTypeEnum];