ynab 2.0.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/apis/AccountsApi.d.ts +1 -1
- package/dist/apis/AccountsApi.js +1 -1
- package/dist/apis/BudgetsApi.d.ts +1 -1
- package/dist/apis/BudgetsApi.js +1 -1
- package/dist/apis/CategoriesApi.d.ts +17 -2
- package/dist/apis/CategoriesApi.js +43 -1
- package/dist/apis/CustomTransactionsApi.d.ts +1 -1
- package/dist/apis/MonthsApi.d.ts +1 -1
- package/dist/apis/MonthsApi.js +1 -1
- package/dist/apis/PayeeLocationsApi.d.ts +1 -1
- package/dist/apis/PayeeLocationsApi.js +1 -1
- package/dist/apis/PayeesApi.d.ts +17 -2
- package/dist/apis/PayeesApi.js +43 -1
- package/dist/apis/ScheduledTransactionsApi.d.ts +1 -1
- package/dist/apis/ScheduledTransactionsApi.js +1 -1
- package/dist/apis/TransactionsApi.d.ts +13 -13
- package/dist/apis/TransactionsApi.js +9 -9
- package/dist/apis/UserApi.d.ts +1 -1
- package/dist/apis/UserApi.js +1 -1
- package/dist/apis/index.d.ts +0 -1
- package/dist/apis/index.js +5 -2
- package/dist/browser/ynab.js +1 -1
- package/dist/esm/apis/CategoriesApi.d.ts +16 -1
- package/dist/esm/apis/CategoriesApi.js +65 -1
- package/dist/esm/apis/CustomTransactionsApi.d.ts +1 -1
- package/dist/esm/apis/index.d.ts +0 -1
- package/dist/esm/apis/index.js +0 -1
- package/dist/esm/models/Category.d.ts +0 -1
- package/dist/esm/models/Category.js +0 -1
- package/dist/esm/models/CategoryGoalType.d.ts +25 -0
- package/dist/esm/models/CategoryGoalType.js +29 -0
- package/dist/esm/models/HybridTransaction.d.ts +9 -30
- package/dist/esm/models/HybridTransaction.js +7 -26
- package/dist/esm/models/PatchCategoryWrapper.d.ts +32 -0
- package/dist/esm/models/PatchCategoryWrapper.js +44 -0
- package/dist/esm/models/SaveCategory.d.ts +43 -0
- package/dist/esm/models/SaveCategory.js +47 -0
- package/dist/esm/models/SaveTransaction.d.ts +8 -28
- package/dist/esm/models/SaveTransaction.js +6 -24
- package/dist/esm/models/SaveTransactionWithId.d.ts +8 -28
- package/dist/esm/models/SaveTransactionWithId.js +6 -24
- package/dist/esm/models/SaveTransactionWithOptionalFields.d.ts +8 -28
- package/dist/esm/models/SaveTransactionWithOptionalFields.js +6 -24
- package/dist/esm/models/SaveTransactionWithOptionalFieldsFlagColor.d.ts +25 -0
- package/dist/esm/models/SaveTransactionWithOptionalFieldsFlagColor.js +29 -0
- package/dist/esm/models/ScheduledTransactionDetail.d.ts +4 -16
- package/dist/esm/models/ScheduledTransactionDetail.js +3 -14
- package/dist/esm/models/ScheduledTransactionSummary.d.ts +4 -16
- package/dist/esm/models/ScheduledTransactionSummary.js +3 -14
- package/dist/esm/models/ScheduledTransactionSummaryFlagColor.d.ts +25 -0
- package/dist/esm/models/ScheduledTransactionSummaryFlagColor.js +29 -0
- package/dist/esm/models/TransactionClearedStatus.d.ts +24 -0
- package/dist/esm/models/TransactionClearedStatus.js +31 -0
- package/dist/esm/models/TransactionDetail.d.ts +9 -30
- package/dist/esm/models/TransactionDetail.js +7 -26
- package/dist/esm/models/TransactionFlagColor.d.ts +27 -0
- package/dist/esm/models/TransactionFlagColor.js +34 -0
- package/dist/esm/models/TransactionSummary.d.ts +9 -30
- package/dist/esm/models/TransactionSummary.js +7 -26
- package/dist/esm/models/TransactionSummaryDebtTransactionType.d.ts +25 -0
- package/dist/esm/models/TransactionSummaryDebtTransactionType.js +29 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/index.js +5 -1
- package/dist/models/Account.d.ts +8 -8
- package/dist/models/Account.js +51 -46
- package/dist/models/AccountResponse.d.ts +2 -2
- package/dist/models/AccountResponse.js +8 -11
- package/dist/models/AccountResponseData.d.ts +2 -2
- package/dist/models/AccountResponseData.js +8 -11
- package/dist/models/AccountType.d.ts +3 -2
- package/dist/models/AccountType.js +13 -2
- package/dist/models/AccountsResponse.d.ts +2 -2
- package/dist/models/AccountsResponse.js +8 -11
- package/dist/models/AccountsResponseData.d.ts +2 -2
- package/dist/models/AccountsResponseData.js +11 -13
- package/dist/models/BudgetDetail.d.ts +8 -8
- package/dist/models/BudgetDetail.js +45 -48
- package/dist/models/BudgetDetailResponse.d.ts +2 -2
- package/dist/models/BudgetDetailResponse.js +8 -11
- package/dist/models/BudgetDetailResponseData.d.ts +2 -2
- package/dist/models/BudgetDetailResponseData.js +11 -13
- package/dist/models/BudgetSettings.d.ts +2 -2
- package/dist/models/BudgetSettings.js +11 -13
- package/dist/models/BudgetSettingsResponse.d.ts +2 -2
- package/dist/models/BudgetSettingsResponse.js +8 -11
- package/dist/models/BudgetSettingsResponseData.d.ts +2 -2
- package/dist/models/BudgetSettingsResponseData.js +8 -11
- package/dist/models/BudgetSummary.d.ts +4 -4
- package/dist/models/BudgetSummary.js +23 -26
- package/dist/models/BudgetSummaryResponse.d.ts +2 -2
- package/dist/models/BudgetSummaryResponse.js +8 -11
- package/dist/models/BudgetSummaryResponseData.d.ts +2 -2
- package/dist/models/BudgetSummaryResponseData.js +10 -14
- package/dist/models/BulkResponse.d.ts +2 -2
- package/dist/models/BulkResponse.js +8 -11
- package/dist/models/BulkResponseData.d.ts +2 -2
- package/dist/models/BulkResponseData.js +8 -11
- package/dist/models/BulkResponseDataBulk.d.ts +2 -2
- package/dist/models/BulkResponseDataBulk.js +11 -13
- package/dist/models/BulkTransactions.d.ts +5 -5
- package/dist/models/BulkTransactions.js +10 -13
- package/dist/models/CategoriesResponse.d.ts +2 -2
- package/dist/models/CategoriesResponse.js +8 -11
- package/dist/models/CategoriesResponseData.d.ts +2 -2
- package/dist/models/CategoriesResponseData.js +11 -13
- package/dist/models/Category.d.ts +22 -17
- package/dist/models/Category.js +61 -57
- package/dist/models/CategoryGoalType.d.ts +25 -0
- package/dist/models/CategoryGoalType.js +36 -0
- package/dist/models/CategoryGroup.d.ts +2 -2
- package/dist/models/CategoryGroup.js +17 -17
- package/dist/models/CategoryGroupWithCategories.d.ts +2 -2
- package/dist/models/CategoryGroupWithCategories.js +20 -19
- package/dist/models/CategoryResponse.d.ts +2 -2
- package/dist/models/CategoryResponse.js +8 -11
- package/dist/models/CategoryResponseData.d.ts +2 -2
- package/dist/models/CategoryResponseData.js +8 -11
- package/dist/models/CurrencyFormat.d.ts +2 -2
- package/dist/models/CurrencyFormat.js +29 -25
- package/dist/models/DateFormat.d.ts +2 -2
- package/dist/models/DateFormat.js +8 -11
- package/dist/models/ErrorDetail.d.ts +2 -2
- package/dist/models/ErrorDetail.js +14 -15
- package/dist/models/ErrorResponse.d.ts +2 -2
- package/dist/models/ErrorResponse.js +8 -11
- package/dist/models/ExistingTransaction.d.ts +94 -0
- package/dist/models/ExistingTransaction.js +68 -0
- package/dist/models/HybridTransaction.d.ts +29 -44
- package/dist/models/HybridTransaction.js +67 -80
- package/dist/models/HybridTransactionAllOf.d.ts +1 -1
- package/dist/models/HybridTransactionsResponse.d.ts +2 -2
- package/dist/models/HybridTransactionsResponse.js +8 -11
- package/dist/models/HybridTransactionsResponseData.d.ts +2 -2
- package/dist/models/HybridTransactionsResponseData.js +10 -14
- package/dist/models/MonthDetail.d.ts +4 -4
- package/dist/models/MonthDetail.js +30 -28
- package/dist/models/MonthDetailResponse.d.ts +2 -2
- package/dist/models/MonthDetailResponse.js +8 -11
- package/dist/models/MonthDetailResponseData.d.ts +2 -2
- package/dist/models/MonthDetailResponseData.js +8 -11
- package/dist/models/MonthSummariesResponse.d.ts +2 -2
- package/dist/models/MonthSummariesResponse.js +8 -11
- package/dist/models/MonthSummariesResponseData.d.ts +2 -2
- package/dist/models/MonthSummariesResponseData.js +11 -13
- package/dist/models/MonthSummary.d.ts +4 -4
- package/dist/models/MonthSummary.js +27 -26
- package/dist/models/NewTransaction.d.ts +100 -0
- package/dist/models/NewTransaction.js +70 -0
- package/dist/models/PatchCategoryWrapper.d.ts +32 -0
- package/dist/models/PatchCategoryWrapper.js +48 -0
- package/dist/models/PatchMonthCategoryWrapper.d.ts +2 -2
- package/dist/models/PatchMonthCategoryWrapper.js +8 -11
- package/dist/models/PatchPayeeWrapper.d.ts +32 -0
- package/dist/models/PatchPayeeWrapper.js +48 -0
- package/dist/models/PatchTransactionsWrapper.d.ts +5 -5
- package/dist/models/PatchTransactionsWrapper.js +10 -13
- package/dist/models/Payee.d.ts +3 -3
- package/dist/models/Payee.js +16 -18
- package/dist/models/PayeeLocation.d.ts +2 -2
- package/dist/models/PayeeLocation.js +20 -19
- package/dist/models/PayeeLocationResponse.d.ts +2 -2
- package/dist/models/PayeeLocationResponse.js +8 -11
- package/dist/models/PayeeLocationResponseData.d.ts +2 -2
- package/dist/models/PayeeLocationResponseData.js +8 -11
- package/dist/models/PayeeLocationsResponse.d.ts +2 -2
- package/dist/models/PayeeLocationsResponse.js +8 -11
- package/dist/models/PayeeLocationsResponseData.d.ts +2 -2
- package/dist/models/PayeeLocationsResponseData.js +8 -11
- package/dist/models/PayeeResponse.d.ts +2 -2
- package/dist/models/PayeeResponse.js +8 -11
- package/dist/models/PayeeResponseData.d.ts +2 -2
- package/dist/models/PayeeResponseData.js +8 -11
- package/dist/models/PayeesResponse.d.ts +2 -2
- package/dist/models/PayeesResponse.js +8 -11
- package/dist/models/PayeesResponseData.d.ts +2 -2
- package/dist/models/PayeesResponseData.js +11 -13
- package/dist/models/PostAccountWrapper.d.ts +2 -2
- package/dist/models/PostAccountWrapper.js +8 -11
- package/dist/models/PostTransactionsWrapper.d.ts +7 -7
- package/dist/models/PostTransactionsWrapper.js +10 -15
- package/dist/models/PutTransactionWrapper.d.ts +5 -5
- package/dist/models/PutTransactionWrapper.js +10 -13
- package/dist/models/SaveAccount.d.ts +2 -2
- package/dist/models/SaveAccount.js +14 -15
- package/dist/models/SaveCategory.d.ts +43 -0
- package/dist/models/SaveCategory.js +49 -0
- package/dist/models/SaveCategoryResponse.d.ts +2 -2
- package/dist/models/SaveCategoryResponse.js +8 -11
- package/dist/models/SaveCategoryResponseData.d.ts +2 -2
- package/dist/models/SaveCategoryResponseData.js +11 -13
- package/dist/models/SaveMonthCategory.d.ts +2 -2
- package/dist/models/SaveMonthCategory.js +8 -11
- package/dist/models/SavePayee.d.ts +31 -0
- package/dist/models/SavePayee.js +45 -0
- package/dist/models/SavePayeeResponse.d.ts +32 -0
- package/dist/models/SavePayeeResponse.js +48 -0
- package/dist/models/SavePayeeResponseData.d.ts +38 -0
- package/dist/models/SavePayeeResponseData.js +52 -0
- package/dist/models/SaveSubTransaction.d.ts +6 -6
- package/dist/models/SaveSubTransaction.js +16 -20
- package/dist/models/SaveTransaction.d.ts +8 -28
- package/dist/models/SaveTransaction.js +7 -25
- package/dist/models/SaveTransactionWithId.d.ts +8 -28
- package/dist/models/SaveTransactionWithId.js +7 -25
- package/dist/models/SaveTransactionWithIdOrImportId.d.ts +106 -0
- package/dist/models/SaveTransactionWithIdOrImportId.js +72 -0
- package/dist/models/SaveTransactionWithOptionalFields.d.ts +14 -40
- package/dist/models/SaveTransactionWithOptionalFields.js +30 -55
- package/dist/models/SaveTransactionWithOptionalFieldsFlagColor.d.ts +25 -0
- package/dist/models/SaveTransactionWithOptionalFieldsFlagColor.js +36 -0
- package/dist/models/SaveTransactionsResponse.d.ts +2 -2
- package/dist/models/SaveTransactionsResponse.js +8 -11
- package/dist/models/SaveTransactionsResponseData.d.ts +2 -2
- package/dist/models/SaveTransactionsResponseData.js +17 -20
- package/dist/models/ScheduledSubTransaction.d.ts +6 -6
- package/dist/models/ScheduledSubTransaction.js +25 -26
- package/dist/models/ScheduledTransactionDetail.d.ts +18 -24
- package/dist/models/ScheduledTransactionDetail.js +50 -55
- package/dist/models/ScheduledTransactionResponse.d.ts +2 -2
- package/dist/models/ScheduledTransactionResponse.js +8 -11
- package/dist/models/ScheduledTransactionResponseData.d.ts +2 -2
- package/dist/models/ScheduledTransactionResponseData.js +8 -11
- package/dist/models/ScheduledTransactionSummary.d.ts +16 -22
- package/dist/models/ScheduledTransactionSummary.js +40 -47
- package/dist/models/ScheduledTransactionSummaryFlagColor.d.ts +25 -0
- package/dist/models/ScheduledTransactionSummaryFlagColor.js +36 -0
- package/dist/models/ScheduledTransactionsResponse.d.ts +2 -2
- package/dist/models/ScheduledTransactionsResponse.js +8 -11
- package/dist/models/ScheduledTransactionsResponseData.d.ts +2 -2
- package/dist/models/ScheduledTransactionsResponseData.js +11 -13
- package/dist/models/SubTransaction.d.ts +9 -9
- package/dist/models/SubTransaction.js +31 -32
- package/dist/models/TransactionClearedStatus.d.ts +25 -0
- package/dist/models/TransactionClearedStatus.js +48 -0
- package/dist/models/TransactionDetail.d.ts +28 -43
- package/dist/models/TransactionDetail.js +65 -78
- package/dist/models/TransactionFlagColor.d.ts +28 -0
- package/dist/models/TransactionFlagColor.js +51 -0
- package/dist/models/TransactionResponse.d.ts +2 -2
- package/dist/models/TransactionResponse.js +8 -11
- package/dist/models/TransactionResponseData.d.ts +2 -2
- package/dist/models/TransactionResponseData.js +8 -11
- package/dist/models/TransactionSummary.d.ts +26 -41
- package/dist/models/TransactionSummary.js +55 -70
- package/dist/models/TransactionSummaryDebtTransactionType.d.ts +25 -0
- package/dist/models/TransactionSummaryDebtTransactionType.js +36 -0
- package/dist/models/TransactionsImportResponse.d.ts +2 -2
- package/dist/models/TransactionsImportResponse.js +8 -11
- package/dist/models/TransactionsImportResponseData.d.ts +2 -2
- package/dist/models/TransactionsImportResponseData.js +8 -11
- package/dist/models/TransactionsResponse.d.ts +2 -2
- package/dist/models/TransactionsResponse.js +8 -11
- package/dist/models/TransactionsResponseData.d.ts +2 -2
- package/dist/models/TransactionsResponseData.js +11 -13
- package/dist/models/User.d.ts +2 -2
- package/dist/models/User.js +8 -11
- package/dist/models/UserResponse.d.ts +2 -2
- package/dist/models/UserResponse.js +8 -11
- package/dist/models/UserResponseData.d.ts +2 -2
- package/dist/models/UserResponseData.js +8 -11
- package/dist/models/index.d.ts +11 -9
- package/dist/models/index.js +16 -10
- package/dist/runtime.d.ts +10 -10
- package/dist/runtime.js +1 -1
- package/package.json +6 -7
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { CategoriesResponse, CategoryResponse, PatchMonthCategoryWrapper, SaveCategoryResponse } from '../models/index';
|
|
13
|
+
import type { CategoriesResponse, CategoryResponse, PatchCategoryWrapper, PatchMonthCategoryWrapper, SaveCategoryResponse } from '../models/index';
|
|
14
14
|
export interface GetCategoriesRequest {
|
|
15
15
|
budgetId: string;
|
|
16
16
|
lastKnowledgeOfServer?: number;
|
|
@@ -24,6 +24,11 @@ export interface GetMonthCategoryByIdRequest {
|
|
|
24
24
|
month: string;
|
|
25
25
|
categoryId: string;
|
|
26
26
|
}
|
|
27
|
+
export interface UpdateCategoryRequest {
|
|
28
|
+
budgetId: string;
|
|
29
|
+
categoryId: string;
|
|
30
|
+
data: PatchCategoryWrapper;
|
|
31
|
+
}
|
|
27
32
|
export interface UpdateMonthCategoryRequest {
|
|
28
33
|
budgetId: string;
|
|
29
34
|
month: string;
|
|
@@ -64,6 +69,16 @@ export declare class CategoriesApi extends runtime.BaseAPI {
|
|
|
64
69
|
* Single category for a specific budget month
|
|
65
70
|
*/
|
|
66
71
|
getMonthCategoryById(budgetId: string, month: string, categoryId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CategoryResponse>;
|
|
72
|
+
/**
|
|
73
|
+
* Update a category
|
|
74
|
+
* Update a category
|
|
75
|
+
*/
|
|
76
|
+
updateCategoryRaw(requestParameters: UpdateCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SaveCategoryResponse>>;
|
|
77
|
+
/**
|
|
78
|
+
* Update a category
|
|
79
|
+
* Update a category
|
|
80
|
+
*/
|
|
81
|
+
updateCategory(budgetId: string, categoryId: string, data: PatchCategoryWrapper, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SaveCategoryResponse>;
|
|
67
82
|
/**
|
|
68
83
|
* Update a category for a specific month. Only `budgeted` amount can be updated.
|
|
69
84
|
* Update a category for a specific month
|
|
@@ -63,7 +63,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
import * as runtime from '../runtime';
|
|
66
|
-
import { CategoriesResponseFromJSON, CategoryResponseFromJSON, PatchMonthCategoryWrapperToJSON, SaveCategoryResponseFromJSON, } from '../models/index';
|
|
66
|
+
import { CategoriesResponseFromJSON, CategoryResponseFromJSON, PatchCategoryWrapperToJSON, PatchMonthCategoryWrapperToJSON, SaveCategoryResponseFromJSON, } from '../models/index';
|
|
67
67
|
/**
|
|
68
68
|
*
|
|
69
69
|
*/
|
|
@@ -252,6 +252,70 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
252
252
|
});
|
|
253
253
|
});
|
|
254
254
|
};
|
|
255
|
+
/**
|
|
256
|
+
* Update a category
|
|
257
|
+
* Update a category
|
|
258
|
+
*/
|
|
259
|
+
CategoriesApi.prototype.updateCategoryRaw = function (requestParameters, initOverrides) {
|
|
260
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
261
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
262
|
+
return __generator(this, function (_a) {
|
|
263
|
+
switch (_a.label) {
|
|
264
|
+
case 0:
|
|
265
|
+
if (requestParameters.budgetId === null || requestParameters.budgetId === undefined) {
|
|
266
|
+
throw new runtime.RequiredError('budgetId', 'Required parameter requestParameters.budgetId was null or undefined when calling updateCategory.');
|
|
267
|
+
}
|
|
268
|
+
if (requestParameters.categoryId === null || requestParameters.categoryId === undefined) {
|
|
269
|
+
throw new runtime.RequiredError('categoryId', 'Required parameter requestParameters.categoryId was null or undefined when calling updateCategory.');
|
|
270
|
+
}
|
|
271
|
+
if (requestParameters.data === null || requestParameters.data === undefined) {
|
|
272
|
+
throw new runtime.RequiredError('data', 'Required parameter requestParameters.data was null or undefined when calling updateCategory.');
|
|
273
|
+
}
|
|
274
|
+
queryParameters = {};
|
|
275
|
+
headerParameters = {};
|
|
276
|
+
headerParameters['Accept'] = 'application/json';
|
|
277
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
278
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
279
|
+
token = this.configuration.accessToken;
|
|
280
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
281
|
+
case 1:
|
|
282
|
+
tokenString = _a.sent();
|
|
283
|
+
if (tokenString) {
|
|
284
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
285
|
+
}
|
|
286
|
+
_a.label = 2;
|
|
287
|
+
case 2: return [4 /*yield*/, this.request({
|
|
288
|
+
path: "/budgets/{budget_id}/categories/{category_id}".replace("{".concat("budget_id", "}"), encodeURIComponent(String(requestParameters.budgetId))).replace("{".concat("category_id", "}"), encodeURIComponent(String(requestParameters.categoryId))),
|
|
289
|
+
method: 'PATCH',
|
|
290
|
+
headers: headerParameters,
|
|
291
|
+
query: queryParameters,
|
|
292
|
+
body: PatchCategoryWrapperToJSON(requestParameters.data),
|
|
293
|
+
}, initOverrides)];
|
|
294
|
+
case 3:
|
|
295
|
+
response = _a.sent();
|
|
296
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return SaveCategoryResponseFromJSON(jsonValue); })];
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
});
|
|
300
|
+
};
|
|
301
|
+
/**
|
|
302
|
+
* Update a category
|
|
303
|
+
* Update a category
|
|
304
|
+
*/
|
|
305
|
+
CategoriesApi.prototype.updateCategory = function (budgetId, categoryId, data, initOverrides) {
|
|
306
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
307
|
+
var response;
|
|
308
|
+
return __generator(this, function (_a) {
|
|
309
|
+
switch (_a.label) {
|
|
310
|
+
case 0: return [4 /*yield*/, this.updateCategoryRaw({ budgetId: budgetId, categoryId: categoryId, data: data }, initOverrides)];
|
|
311
|
+
case 1:
|
|
312
|
+
response = _a.sent();
|
|
313
|
+
return [4 /*yield*/, response.value()];
|
|
314
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
});
|
|
318
|
+
};
|
|
255
319
|
/**
|
|
256
320
|
* Update a category for a specific month. Only `budgeted` amount can be updated.
|
|
257
321
|
* Update a category for a specific month
|
|
@@ -25,7 +25,7 @@ export declare class CustomTransactionsApi extends TransactionsApi {
|
|
|
25
25
|
* @throws {RequiredError}
|
|
26
26
|
* @memberof TransactionsApi
|
|
27
27
|
*/
|
|
28
|
-
getTransactionsByType(budgetId: string, type: "uncategorized" | "unapproved", lastKnowledgeOfServer?: number, options?: any): Promise<import("..").TransactionsResponse>;
|
|
28
|
+
getTransactionsByType(budgetId: string, type: "uncategorized" | "unapproved" | undefined, lastKnowledgeOfServer?: number, options?: any): Promise<import("..").TransactionsResponse>;
|
|
29
29
|
/**
|
|
30
30
|
* Creates multiple transactions. Provide a body containing a 'transactions' array, multiple transactions will be created.
|
|
31
31
|
* @summary Create a single transaction or multiple transactions
|
package/dist/esm/apis/index.d.ts
CHANGED
package/dist/esm/apis/index.js
CHANGED
|
@@ -163,7 +163,6 @@ export declare const CategoryGoalTypeEnum: {
|
|
|
163
163
|
readonly Mf: "MF";
|
|
164
164
|
readonly Need: "NEED";
|
|
165
165
|
readonly Debt: "DEBT";
|
|
166
|
-
readonly Null: "null";
|
|
167
166
|
};
|
|
168
167
|
export declare type CategoryGoalTypeEnum = typeof CategoryGoalTypeEnum[keyof typeof CategoryGoalTypeEnum];
|
|
169
168
|
/**
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* YNAB API Endpoints
|
|
3
|
+
* 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
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* The type of goal, if the category has a goal (TB='Target Category Balance', TBD='Target Category Balance by Date', MF='Monthly Funding', NEED='Plan Your Spending')
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CategoryGoalType
|
|
16
|
+
*/
|
|
17
|
+
export interface CategoryGoalType {
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Check if a given object implements the CategoryGoalType interface.
|
|
21
|
+
*/
|
|
22
|
+
export declare function instanceOfCategoryGoalType(value: object): boolean;
|
|
23
|
+
export declare function CategoryGoalTypeFromJSON(json: any): CategoryGoalType;
|
|
24
|
+
export declare function CategoryGoalTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CategoryGoalType;
|
|
25
|
+
export declare function CategoryGoalTypeToJSON(value?: CategoryGoalType | null): any;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* YNAB API Endpoints
|
|
5
|
+
* 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
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Check if a given object implements the CategoryGoalType interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfCategoryGoalType(value) {
|
|
18
|
+
var isInstance = true;
|
|
19
|
+
return isInstance;
|
|
20
|
+
}
|
|
21
|
+
export function CategoryGoalTypeFromJSON(json) {
|
|
22
|
+
return CategoryGoalTypeFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
export function CategoryGoalTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
export function CategoryGoalTypeToJSON(value) {
|
|
28
|
+
return value;
|
|
29
|
+
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { TransactionClearedStatus } from './TransactionClearedStatus';
|
|
13
|
+
import type { TransactionFlagColor } from './TransactionFlagColor';
|
|
12
14
|
/**
|
|
13
15
|
*
|
|
14
16
|
* @export
|
|
@@ -40,11 +42,11 @@ export interface HybridTransaction {
|
|
|
40
42
|
*/
|
|
41
43
|
memo?: string | null;
|
|
42
44
|
/**
|
|
43
|
-
*
|
|
44
|
-
* @type {
|
|
45
|
+
*
|
|
46
|
+
* @type {TransactionClearedStatus}
|
|
45
47
|
* @memberof HybridTransaction
|
|
46
48
|
*/
|
|
47
|
-
cleared:
|
|
49
|
+
cleared: TransactionClearedStatus;
|
|
48
50
|
/**
|
|
49
51
|
* Whether or not the transaction is approved
|
|
50
52
|
* @type {boolean}
|
|
@@ -52,11 +54,11 @@ export interface HybridTransaction {
|
|
|
52
54
|
*/
|
|
53
55
|
approved: boolean;
|
|
54
56
|
/**
|
|
55
|
-
*
|
|
56
|
-
* @type {
|
|
57
|
+
*
|
|
58
|
+
* @type {TransactionFlagColor}
|
|
57
59
|
* @memberof HybridTransaction
|
|
58
60
|
*/
|
|
59
|
-
flag_color?:
|
|
61
|
+
flag_color?: TransactionFlagColor | null;
|
|
60
62
|
/**
|
|
61
63
|
*
|
|
62
64
|
* @type {string}
|
|
@@ -154,28 +156,6 @@ export interface HybridTransaction {
|
|
|
154
156
|
*/
|
|
155
157
|
category_name?: string;
|
|
156
158
|
}
|
|
157
|
-
/**
|
|
158
|
-
* @export
|
|
159
|
-
*/
|
|
160
|
-
export declare const HybridTransactionClearedEnum: {
|
|
161
|
-
readonly Cleared: "cleared";
|
|
162
|
-
readonly Uncleared: "uncleared";
|
|
163
|
-
readonly Reconciled: "reconciled";
|
|
164
|
-
};
|
|
165
|
-
export declare type HybridTransactionClearedEnum = typeof HybridTransactionClearedEnum[keyof typeof HybridTransactionClearedEnum];
|
|
166
|
-
/**
|
|
167
|
-
* @export
|
|
168
|
-
*/
|
|
169
|
-
export declare const HybridTransactionFlagColorEnum: {
|
|
170
|
-
readonly Red: "red";
|
|
171
|
-
readonly Orange: "orange";
|
|
172
|
-
readonly Yellow: "yellow";
|
|
173
|
-
readonly Green: "green";
|
|
174
|
-
readonly Blue: "blue";
|
|
175
|
-
readonly Purple: "purple";
|
|
176
|
-
readonly Null: "null";
|
|
177
|
-
};
|
|
178
|
-
export declare type HybridTransactionFlagColorEnum = typeof HybridTransactionFlagColorEnum[keyof typeof HybridTransactionFlagColorEnum];
|
|
179
159
|
/**
|
|
180
160
|
* @export
|
|
181
161
|
*/
|
|
@@ -185,10 +165,9 @@ export declare const HybridTransactionDebtTransactionTypeEnum: {
|
|
|
185
165
|
readonly Fee: "fee";
|
|
186
166
|
readonly Interest: "interest";
|
|
187
167
|
readonly Escrow: "escrow";
|
|
188
|
-
readonly
|
|
168
|
+
readonly BalanceAdjustment: "balanceAdjustment";
|
|
189
169
|
readonly Credit: "credit";
|
|
190
170
|
readonly Charge: "charge";
|
|
191
|
-
readonly Null: "null";
|
|
192
171
|
};
|
|
193
172
|
export declare type HybridTransactionDebtTransactionTypeEnum = typeof HybridTransactionDebtTransactionTypeEnum[keyof typeof HybridTransactionDebtTransactionTypeEnum];
|
|
194
173
|
/**
|
|
@@ -12,26 +12,8 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { exists } from '../runtime';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
18
|
-
export var HybridTransactionClearedEnum = {
|
|
19
|
-
Cleared: 'cleared',
|
|
20
|
-
Uncleared: 'uncleared',
|
|
21
|
-
Reconciled: 'reconciled'
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @export
|
|
25
|
-
*/
|
|
26
|
-
export var HybridTransactionFlagColorEnum = {
|
|
27
|
-
Red: 'red',
|
|
28
|
-
Orange: 'orange',
|
|
29
|
-
Yellow: 'yellow',
|
|
30
|
-
Green: 'green',
|
|
31
|
-
Blue: 'blue',
|
|
32
|
-
Purple: 'purple',
|
|
33
|
-
Null: 'null'
|
|
34
|
-
};
|
|
15
|
+
import { TransactionClearedStatusFromJSON, TransactionClearedStatusToJSON, } from './TransactionClearedStatus';
|
|
16
|
+
import { TransactionFlagColorFromJSON, TransactionFlagColorToJSON, } from './TransactionFlagColor';
|
|
35
17
|
/**
|
|
36
18
|
* @export
|
|
37
19
|
*/
|
|
@@ -41,10 +23,9 @@ export var HybridTransactionDebtTransactionTypeEnum = {
|
|
|
41
23
|
Fee: 'fee',
|
|
42
24
|
Interest: 'interest',
|
|
43
25
|
Escrow: 'escrow',
|
|
44
|
-
|
|
26
|
+
BalanceAdjustment: 'balanceAdjustment',
|
|
45
27
|
Credit: 'credit',
|
|
46
28
|
Charge: 'charge',
|
|
47
|
-
Null: 'null'
|
|
48
29
|
};
|
|
49
30
|
/**
|
|
50
31
|
* @export
|
|
@@ -81,9 +62,9 @@ export function HybridTransactionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
81
62
|
'date': json['date'],
|
|
82
63
|
'amount': json['amount'],
|
|
83
64
|
'memo': !exists(json, 'memo') ? undefined : json['memo'],
|
|
84
|
-
'cleared': json['cleared'],
|
|
65
|
+
'cleared': TransactionClearedStatusFromJSON(json['cleared']),
|
|
85
66
|
'approved': json['approved'],
|
|
86
|
-
'flag_color': !exists(json, 'flag_color') ? undefined : json['flag_color'],
|
|
67
|
+
'flag_color': !exists(json, 'flag_color') ? undefined : TransactionFlagColorFromJSON(json['flag_color']),
|
|
87
68
|
'account_id': json['account_id'],
|
|
88
69
|
'payee_id': !exists(json, 'payee_id') ? undefined : json['payee_id'],
|
|
89
70
|
'category_id': !exists(json, 'category_id') ? undefined : json['category_id'],
|
|
@@ -114,9 +95,9 @@ export function HybridTransactionToJSON(value) {
|
|
|
114
95
|
'date': value.date,
|
|
115
96
|
'amount': value.amount,
|
|
116
97
|
'memo': value.memo,
|
|
117
|
-
'cleared': value.cleared,
|
|
98
|
+
'cleared': TransactionClearedStatusToJSON(value.cleared),
|
|
118
99
|
'approved': value.approved,
|
|
119
|
-
'flag_color': value.flag_color,
|
|
100
|
+
'flag_color': TransactionFlagColorToJSON(value.flag_color),
|
|
120
101
|
'account_id': value.account_id,
|
|
121
102
|
'payee_id': value.payee_id,
|
|
122
103
|
'category_id': value.category_id,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* YNAB API Endpoints
|
|
3
|
+
* 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
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { SaveCategory } from './SaveCategory';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface PatchCategoryWrapper
|
|
17
|
+
*/
|
|
18
|
+
export interface PatchCategoryWrapper {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {SaveCategory}
|
|
22
|
+
* @memberof PatchCategoryWrapper
|
|
23
|
+
*/
|
|
24
|
+
category: SaveCategory;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the PatchCategoryWrapper interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfPatchCategoryWrapper(value: object): boolean;
|
|
30
|
+
export declare function PatchCategoryWrapperFromJSON(json: any): PatchCategoryWrapper;
|
|
31
|
+
export declare function PatchCategoryWrapperFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchCategoryWrapper;
|
|
32
|
+
export declare function PatchCategoryWrapperToJSON(value?: PatchCategoryWrapper | null): any;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* YNAB API Endpoints
|
|
5
|
+
* 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
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { SaveCategoryFromJSON, SaveCategoryToJSON, } from './SaveCategory';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the PatchCategoryWrapper interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfPatchCategoryWrapper(value) {
|
|
19
|
+
var isInstance = true;
|
|
20
|
+
isInstance = isInstance && "category" in value;
|
|
21
|
+
return isInstance;
|
|
22
|
+
}
|
|
23
|
+
export function PatchCategoryWrapperFromJSON(json) {
|
|
24
|
+
return PatchCategoryWrapperFromJSONTyped(json, false);
|
|
25
|
+
}
|
|
26
|
+
export function PatchCategoryWrapperFromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if ((json === undefined) || (json === null)) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
'category': SaveCategoryFromJSON(json['category']),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function PatchCategoryWrapperToJSON(value) {
|
|
35
|
+
if (value === undefined) {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
if (value === null) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'category': SaveCategoryToJSON(value.category),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* YNAB API Endpoints
|
|
3
|
+
* 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
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface SaveCategory
|
|
16
|
+
*/
|
|
17
|
+
export interface SaveCategory {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof SaveCategory
|
|
22
|
+
*/
|
|
23
|
+
name?: string | null;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof SaveCategory
|
|
28
|
+
*/
|
|
29
|
+
note?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof SaveCategory
|
|
34
|
+
*/
|
|
35
|
+
category_group_id?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the SaveCategory interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfSaveCategory(value: object): boolean;
|
|
41
|
+
export declare function SaveCategoryFromJSON(json: any): SaveCategory;
|
|
42
|
+
export declare function SaveCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): SaveCategory;
|
|
43
|
+
export declare function SaveCategoryToJSON(value?: SaveCategory | null): any;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* YNAB API Endpoints
|
|
5
|
+
* 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
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { exists } from '../runtime';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the SaveCategory interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfSaveCategory(value) {
|
|
19
|
+
var isInstance = true;
|
|
20
|
+
return isInstance;
|
|
21
|
+
}
|
|
22
|
+
export function SaveCategoryFromJSON(json) {
|
|
23
|
+
return SaveCategoryFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function SaveCategoryFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if ((json === undefined) || (json === null)) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'name': !exists(json, 'name') ? undefined : json['name'],
|
|
31
|
+
'note': !exists(json, 'note') ? undefined : json['note'],
|
|
32
|
+
'category_group_id': !exists(json, 'category_group_id') ? undefined : json['category_group_id'],
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export function SaveCategoryToJSON(value) {
|
|
36
|
+
if (value === undefined) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
if (value === null) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'name': value.name,
|
|
44
|
+
'note': value.note,
|
|
45
|
+
'category_group_id': value.category_group_id,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { SaveSubTransaction } from './SaveSubTransaction';
|
|
13
|
+
import type { TransactionClearedStatus } from './TransactionClearedStatus';
|
|
14
|
+
import type { TransactionFlagColor } from './TransactionFlagColor';
|
|
13
15
|
/**
|
|
14
16
|
*
|
|
15
17
|
* @export
|
|
@@ -59,11 +61,11 @@ export interface SaveTransaction {
|
|
|
59
61
|
*/
|
|
60
62
|
memo?: string | null;
|
|
61
63
|
/**
|
|
62
|
-
*
|
|
63
|
-
* @type {
|
|
64
|
+
*
|
|
65
|
+
* @type {TransactionClearedStatus}
|
|
64
66
|
* @memberof SaveTransaction
|
|
65
67
|
*/
|
|
66
|
-
cleared?:
|
|
68
|
+
cleared?: TransactionClearedStatus;
|
|
67
69
|
/**
|
|
68
70
|
* Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default.
|
|
69
71
|
* @type {boolean}
|
|
@@ -71,11 +73,11 @@ export interface SaveTransaction {
|
|
|
71
73
|
*/
|
|
72
74
|
approved?: boolean;
|
|
73
75
|
/**
|
|
74
|
-
*
|
|
75
|
-
* @type {
|
|
76
|
+
*
|
|
77
|
+
* @type {TransactionFlagColor}
|
|
76
78
|
* @memberof SaveTransaction
|
|
77
79
|
*/
|
|
78
|
-
flag_color?:
|
|
80
|
+
flag_color?: TransactionFlagColor | null;
|
|
79
81
|
/**
|
|
80
82
|
* If specified, the new transaction will be assigned this `import_id` and considered "imported". We will also attempt to match this imported transaction to an existing "user-entered" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.<br><br>Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.<br><br>If import_id is omitted or specified as null, the transaction will be treated as a "user-entered" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API).
|
|
81
83
|
* @type {string}
|
|
@@ -89,28 +91,6 @@ export interface SaveTransaction {
|
|
|
89
91
|
*/
|
|
90
92
|
subtransactions?: Array<SaveSubTransaction>;
|
|
91
93
|
}
|
|
92
|
-
/**
|
|
93
|
-
* @export
|
|
94
|
-
*/
|
|
95
|
-
export declare const SaveTransactionClearedEnum: {
|
|
96
|
-
readonly Cleared: "cleared";
|
|
97
|
-
readonly Uncleared: "uncleared";
|
|
98
|
-
readonly Reconciled: "reconciled";
|
|
99
|
-
};
|
|
100
|
-
export declare type SaveTransactionClearedEnum = typeof SaveTransactionClearedEnum[keyof typeof SaveTransactionClearedEnum];
|
|
101
|
-
/**
|
|
102
|
-
* @export
|
|
103
|
-
*/
|
|
104
|
-
export declare const SaveTransactionFlagColorEnum: {
|
|
105
|
-
readonly Red: "red";
|
|
106
|
-
readonly Orange: "orange";
|
|
107
|
-
readonly Yellow: "yellow";
|
|
108
|
-
readonly Green: "green";
|
|
109
|
-
readonly Blue: "blue";
|
|
110
|
-
readonly Purple: "purple";
|
|
111
|
-
readonly Null: "null";
|
|
112
|
-
};
|
|
113
|
-
export declare type SaveTransactionFlagColorEnum = typeof SaveTransactionFlagColorEnum[keyof typeof SaveTransactionFlagColorEnum];
|
|
114
94
|
/**
|
|
115
95
|
* Check if a given object implements the SaveTransaction interface.
|
|
116
96
|
*/
|
|
@@ -13,26 +13,8 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { exists } from '../runtime';
|
|
15
15
|
import { SaveSubTransactionFromJSON, SaveSubTransactionToJSON, } from './SaveSubTransaction';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*/
|
|
19
|
-
export var SaveTransactionClearedEnum = {
|
|
20
|
-
Cleared: 'cleared',
|
|
21
|
-
Uncleared: 'uncleared',
|
|
22
|
-
Reconciled: 'reconciled'
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* @export
|
|
26
|
-
*/
|
|
27
|
-
export var SaveTransactionFlagColorEnum = {
|
|
28
|
-
Red: 'red',
|
|
29
|
-
Orange: 'orange',
|
|
30
|
-
Yellow: 'yellow',
|
|
31
|
-
Green: 'green',
|
|
32
|
-
Blue: 'blue',
|
|
33
|
-
Purple: 'purple',
|
|
34
|
-
Null: 'null'
|
|
35
|
-
};
|
|
16
|
+
import { TransactionClearedStatusFromJSON, TransactionClearedStatusToJSON, } from './TransactionClearedStatus';
|
|
17
|
+
import { TransactionFlagColorFromJSON, TransactionFlagColorToJSON, } from './TransactionFlagColor';
|
|
36
18
|
/**
|
|
37
19
|
* Check if a given object implements the SaveTransaction interface.
|
|
38
20
|
*/
|
|
@@ -55,9 +37,9 @@ export function SaveTransactionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
55
37
|
'payee_name': !exists(json, 'payee_name') ? undefined : json['payee_name'],
|
|
56
38
|
'category_id': !exists(json, 'category_id') ? undefined : json['category_id'],
|
|
57
39
|
'memo': !exists(json, 'memo') ? undefined : json['memo'],
|
|
58
|
-
'cleared': !exists(json, 'cleared') ? undefined : json['cleared'],
|
|
40
|
+
'cleared': !exists(json, 'cleared') ? undefined : TransactionClearedStatusFromJSON(json['cleared']),
|
|
59
41
|
'approved': !exists(json, 'approved') ? undefined : json['approved'],
|
|
60
|
-
'flag_color': !exists(json, 'flag_color') ? undefined : json['flag_color'],
|
|
42
|
+
'flag_color': !exists(json, 'flag_color') ? undefined : TransactionFlagColorFromJSON(json['flag_color']),
|
|
61
43
|
'import_id': !exists(json, 'import_id') ? undefined : json['import_id'],
|
|
62
44
|
'subtransactions': !exists(json, 'subtransactions') ? undefined : (json['subtransactions'].map(SaveSubTransactionFromJSON)),
|
|
63
45
|
};
|
|
@@ -77,9 +59,9 @@ export function SaveTransactionToJSON(value) {
|
|
|
77
59
|
'payee_name': value.payee_name,
|
|
78
60
|
'category_id': value.category_id,
|
|
79
61
|
'memo': value.memo,
|
|
80
|
-
'cleared': value.cleared,
|
|
62
|
+
'cleared': TransactionClearedStatusToJSON(value.cleared),
|
|
81
63
|
'approved': value.approved,
|
|
82
|
-
'flag_color': value.flag_color,
|
|
64
|
+
'flag_color': TransactionFlagColorToJSON(value.flag_color),
|
|
83
65
|
'import_id': value.import_id,
|
|
84
66
|
'subtransactions': value.subtransactions === undefined ? undefined : (value.subtransactions.map(SaveSubTransactionToJSON)),
|
|
85
67
|
};
|