ynab 4.0.0 → 4.1.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/dist/apis/PayeesApi.d.ts +15 -1
- package/dist/apis/PayeesApi.js +39 -0
- package/dist/browser/ynab.js +1 -1
- package/dist/esm/apis/PayeesApi.d.ts +15 -1
- package/dist/esm/apis/PayeesApi.js +62 -1
- package/dist/esm/models/Account.d.ts +40 -4
- package/dist/esm/models/Account.js +12 -0
- package/dist/esm/models/AccountBase.d.ts +136 -0
- package/dist/esm/models/AccountBase.js +92 -0
- package/dist/esm/models/Category.d.ts +100 -16
- package/dist/esm/models/Category.js +28 -0
- package/dist/esm/models/CategoryBase.d.ts +188 -0
- package/dist/esm/models/CategoryBase.js +113 -0
- package/dist/esm/models/ExistingCategory.d.ts +7 -1
- package/dist/esm/models/ExistingCategory.js +2 -0
- package/dist/esm/models/HybridTransaction.d.ts +12 -0
- package/dist/esm/models/HybridTransaction.js +4 -0
- package/dist/esm/models/MoneyMovement.d.ts +19 -7
- package/dist/esm/models/MoneyMovement.js +4 -0
- package/dist/esm/models/MoneyMovementBase.d.ts +75 -0
- package/dist/esm/models/MoneyMovementBase.js +57 -0
- package/dist/esm/models/MonthDetail.d.ts +48 -0
- package/dist/esm/models/MonthDetail.js +16 -0
- package/dist/esm/models/MonthDetailBase.d.ts +76 -0
- package/dist/esm/models/MonthDetailBase.js +68 -0
- package/dist/esm/models/MonthSummary.d.ts +50 -2
- package/dist/esm/models/MonthSummary.js +16 -0
- package/dist/esm/models/MonthSummaryBase.d.ts +69 -0
- package/dist/esm/models/MonthSummaryBase.js +63 -0
- package/dist/esm/models/NewCategory.d.ts +7 -1
- package/dist/esm/models/NewCategory.js +2 -0
- package/dist/esm/models/PlanDetail.d.ts +21 -21
- package/dist/esm/models/PlanDetail.js +21 -21
- package/dist/esm/models/PostPayee.d.ts +27 -0
- package/dist/esm/models/PostPayee.js +39 -0
- package/dist/esm/models/PostPayeeWrapper.d.ts +28 -0
- package/dist/esm/models/PostPayeeWrapper.js +40 -0
- package/dist/esm/models/SaveAccount.d.ts +3 -3
- package/dist/esm/models/SaveAccount.js +3 -3
- package/dist/esm/models/SaveAccountType.d.ts +24 -0
- package/dist/esm/models/SaveAccountType.js +42 -0
- package/dist/esm/models/SaveCategory.d.ts +7 -1
- package/dist/esm/models/SaveCategory.js +2 -0
- package/dist/esm/models/SavePayee.d.ts +1 -1
- package/dist/esm/models/ScheduledSubTransaction.d.ts +18 -6
- package/dist/esm/models/ScheduledSubTransaction.js +4 -0
- package/dist/esm/models/ScheduledSubTransactionBase.d.ts +81 -0
- package/dist/esm/models/ScheduledSubTransactionBase.js +63 -0
- package/dist/esm/models/ScheduledTransactionDetail.d.ts +12 -0
- package/dist/esm/models/ScheduledTransactionDetail.js +4 -0
- package/dist/esm/models/ScheduledTransactionSummary.d.ts +17 -5
- package/dist/esm/models/ScheduledTransactionSummary.js +4 -0
- package/dist/esm/models/ScheduledTransactionSummaryBase.d.ts +119 -0
- package/dist/esm/models/ScheduledTransactionSummaryBase.js +94 -0
- package/dist/esm/models/SubTransaction.d.ts +19 -7
- package/dist/esm/models/SubTransaction.js +4 -0
- package/dist/esm/models/SubTransactionBase.d.ts +87 -0
- package/dist/esm/models/SubTransactionBase.js +65 -0
- package/dist/esm/models/TransactionDetail.d.ts +12 -0
- package/dist/esm/models/TransactionDetail.js +4 -0
- package/dist/esm/models/TransactionSummary.d.ts +22 -10
- package/dist/esm/models/TransactionSummary.js +4 -0
- package/dist/esm/models/TransactionSummaryBase.d.ts +151 -0
- package/dist/esm/models/TransactionSummaryBase.js +102 -0
- package/dist/esm/models/index.d.ts +12 -0
- package/dist/esm/models/index.js +12 -0
- package/dist/models/Account.d.ts +40 -4
- package/dist/models/Account.js +12 -0
- package/dist/models/AccountBase.d.ts +136 -0
- package/dist/models/AccountBase.js +98 -0
- package/dist/models/Category.d.ts +100 -16
- package/dist/models/Category.js +28 -0
- package/dist/models/CategoryBase.d.ts +188 -0
- package/dist/models/CategoryBase.js +120 -0
- package/dist/models/ExistingCategory.d.ts +7 -1
- package/dist/models/ExistingCategory.js +2 -0
- package/dist/models/HybridTransaction.d.ts +12 -0
- package/dist/models/HybridTransaction.js +4 -0
- package/dist/models/MoneyMovement.d.ts +19 -7
- package/dist/models/MoneyMovement.js +4 -0
- package/dist/models/MoneyMovementBase.d.ts +75 -0
- package/dist/models/MoneyMovementBase.js +63 -0
- package/dist/models/MonthDetail.d.ts +48 -0
- package/dist/models/MonthDetail.js +16 -0
- package/dist/models/MonthDetailBase.d.ts +76 -0
- package/dist/models/MonthDetailBase.js +74 -0
- package/dist/models/MonthSummary.d.ts +50 -2
- package/dist/models/MonthSummary.js +16 -0
- package/dist/models/MonthSummaryBase.d.ts +69 -0
- package/dist/models/MonthSummaryBase.js +69 -0
- package/dist/models/NewCategory.d.ts +7 -1
- package/dist/models/NewCategory.js +2 -0
- package/dist/models/PlanDetail.d.ts +21 -21
- package/dist/models/PlanDetail.js +21 -21
- package/dist/models/PostPayee.d.ts +27 -0
- package/dist/models/PostPayee.js +45 -0
- package/dist/models/PostPayeeWrapper.d.ts +28 -0
- package/dist/models/PostPayeeWrapper.js +46 -0
- package/dist/models/SaveAccount.d.ts +3 -3
- package/dist/models/SaveAccount.js +3 -3
- package/dist/models/SaveAccountType.d.ts +24 -0
- package/dist/models/SaveAccountType.js +50 -0
- package/dist/models/SaveCategory.d.ts +7 -1
- package/dist/models/SaveCategory.js +2 -0
- package/dist/models/SavePayee.d.ts +1 -1
- package/dist/models/ScheduledSubTransaction.d.ts +18 -6
- package/dist/models/ScheduledSubTransaction.js +4 -0
- package/dist/models/ScheduledSubTransactionBase.d.ts +81 -0
- package/dist/models/ScheduledSubTransactionBase.js +69 -0
- package/dist/models/ScheduledTransactionDetail.d.ts +12 -0
- package/dist/models/ScheduledTransactionDetail.js +4 -0
- package/dist/models/ScheduledTransactionSummary.d.ts +17 -5
- package/dist/models/ScheduledTransactionSummary.js +4 -0
- package/dist/models/ScheduledTransactionSummaryBase.d.ts +119 -0
- package/dist/models/ScheduledTransactionSummaryBase.js +101 -0
- package/dist/models/SubTransaction.d.ts +19 -7
- package/dist/models/SubTransaction.js +4 -0
- package/dist/models/SubTransactionBase.d.ts +87 -0
- package/dist/models/SubTransactionBase.js +71 -0
- package/dist/models/TransactionDetail.d.ts +12 -0
- package/dist/models/TransactionDetail.js +4 -0
- package/dist/models/TransactionSummary.d.ts +22 -10
- package/dist/models/TransactionSummary.js +4 -0
- package/dist/models/TransactionSummaryBase.d.ts +151 -0
- package/dist/models/TransactionSummaryBase.js +109 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -0
- package/package.json +2 -2
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
6
6
|
*/
|
|
7
7
|
import * as runtime from '../runtime';
|
|
8
|
-
import type { PatchPayeeWrapper, PayeeResponse, PayeesResponse, SavePayeeResponse } from '../models/index';
|
|
8
|
+
import type { PatchPayeeWrapper, PayeeResponse, PayeesResponse, PostPayeeWrapper, SavePayeeResponse } from '../models/index';
|
|
9
|
+
export interface CreatePayeeRequest {
|
|
10
|
+
planId: string;
|
|
11
|
+
data: PostPayeeWrapper;
|
|
12
|
+
}
|
|
9
13
|
export interface GetPayeeByIdRequest {
|
|
10
14
|
planId: string;
|
|
11
15
|
payeeId: string;
|
|
@@ -23,6 +27,16 @@ export interface UpdatePayeeRequest {
|
|
|
23
27
|
*
|
|
24
28
|
*/
|
|
25
29
|
export declare class PayeesApi extends runtime.BaseAPI {
|
|
30
|
+
/**
|
|
31
|
+
* Creates a new payee
|
|
32
|
+
* Create a payee
|
|
33
|
+
*/
|
|
34
|
+
createPayeeRaw(requestParameters: CreatePayeeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SavePayeeResponse>>;
|
|
35
|
+
/**
|
|
36
|
+
* Creates a new payee
|
|
37
|
+
* Create a payee
|
|
38
|
+
*/
|
|
39
|
+
createPayee(planId: string, data: PostPayeeWrapper, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SavePayeeResponse>;
|
|
26
40
|
/**
|
|
27
41
|
* Returns a single payee
|
|
28
42
|
* Get a payee
|
|
@@ -58,7 +58,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
import * as runtime from '../runtime';
|
|
61
|
-
import { PatchPayeeWrapperToJSON, PayeeResponseFromJSON, PayeesResponseFromJSON, SavePayeeResponseFromJSON, } from '../models/index';
|
|
61
|
+
import { PatchPayeeWrapperToJSON, PayeeResponseFromJSON, PayeesResponseFromJSON, PostPayeeWrapperToJSON, SavePayeeResponseFromJSON, } from '../models/index';
|
|
62
62
|
/**
|
|
63
63
|
*
|
|
64
64
|
*/
|
|
@@ -67,6 +67,67 @@ var PayeesApi = /** @class */ (function (_super) {
|
|
|
67
67
|
function PayeesApi() {
|
|
68
68
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
69
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Creates a new payee
|
|
72
|
+
* Create a payee
|
|
73
|
+
*/
|
|
74
|
+
PayeesApi.prototype.createPayeeRaw = function (requestParameters, initOverrides) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
76
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
77
|
+
return __generator(this, function (_a) {
|
|
78
|
+
switch (_a.label) {
|
|
79
|
+
case 0:
|
|
80
|
+
if (requestParameters.planId === null || requestParameters.planId === undefined) {
|
|
81
|
+
throw new runtime.RequiredError('planId', 'Required parameter requestParameters.planId was null or undefined when calling createPayee.');
|
|
82
|
+
}
|
|
83
|
+
if (requestParameters.data === null || requestParameters.data === undefined) {
|
|
84
|
+
throw new runtime.RequiredError('data', 'Required parameter requestParameters.data was null or undefined when calling createPayee.');
|
|
85
|
+
}
|
|
86
|
+
queryParameters = {};
|
|
87
|
+
headerParameters = {};
|
|
88
|
+
headerParameters['Accept'] = 'application/json';
|
|
89
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
90
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
91
|
+
token = this.configuration.accessToken;
|
|
92
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
93
|
+
case 1:
|
|
94
|
+
tokenString = _a.sent();
|
|
95
|
+
if (tokenString) {
|
|
96
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
97
|
+
}
|
|
98
|
+
_a.label = 2;
|
|
99
|
+
case 2: return [4 /*yield*/, this.request({
|
|
100
|
+
path: "/plans/{plan_id}/payees".replace("{".concat("plan_id", "}"), encodeURIComponent(String(requestParameters.planId))),
|
|
101
|
+
method: 'POST',
|
|
102
|
+
headers: headerParameters,
|
|
103
|
+
query: queryParameters,
|
|
104
|
+
body: PostPayeeWrapperToJSON(requestParameters.data),
|
|
105
|
+
}, initOverrides)];
|
|
106
|
+
case 3:
|
|
107
|
+
response = _a.sent();
|
|
108
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return SavePayeeResponseFromJSON(jsonValue); })];
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Creates a new payee
|
|
115
|
+
* Create a payee
|
|
116
|
+
*/
|
|
117
|
+
PayeesApi.prototype.createPayee = function (planId, data, initOverrides) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
119
|
+
var response;
|
|
120
|
+
return __generator(this, function (_a) {
|
|
121
|
+
switch (_a.label) {
|
|
122
|
+
case 0: return [4 /*yield*/, this.createPayeeRaw({ planId: planId, data: data }, initOverrides)];
|
|
123
|
+
case 1:
|
|
124
|
+
response = _a.sent();
|
|
125
|
+
return [4 /*yield*/, response.value()];
|
|
126
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
};
|
|
70
131
|
/**
|
|
71
132
|
* Returns a single payee
|
|
72
133
|
* Get a payee
|
|
@@ -46,7 +46,7 @@ export interface Account {
|
|
|
46
46
|
* @type {string}
|
|
47
47
|
* @memberof Account
|
|
48
48
|
*/
|
|
49
|
-
note?: string
|
|
49
|
+
note?: string;
|
|
50
50
|
/**
|
|
51
51
|
* The current available balance of the account in milliunits format
|
|
52
52
|
* @type {number}
|
|
@@ -70,7 +70,7 @@ export interface Account {
|
|
|
70
70
|
* @type {string}
|
|
71
71
|
* @memberof Account
|
|
72
72
|
*/
|
|
73
|
-
transfer_payee_id: string
|
|
73
|
+
transfer_payee_id: string;
|
|
74
74
|
/**
|
|
75
75
|
* Whether or not the account is linked to a financial institution for automatic transaction import.
|
|
76
76
|
* @type {boolean}
|
|
@@ -88,13 +88,13 @@ export interface Account {
|
|
|
88
88
|
* @type {string}
|
|
89
89
|
* @memberof Account
|
|
90
90
|
*/
|
|
91
|
-
last_reconciled_at?: string
|
|
91
|
+
last_reconciled_at?: string;
|
|
92
92
|
/**
|
|
93
93
|
* This field is deprecated and will always be null.
|
|
94
94
|
* @type {number}
|
|
95
95
|
* @memberof Account
|
|
96
96
|
*/
|
|
97
|
-
debt_original_balance?: number
|
|
97
|
+
debt_original_balance?: number;
|
|
98
98
|
/**
|
|
99
99
|
*
|
|
100
100
|
* @type {{ [key: string]: number; }}
|
|
@@ -125,6 +125,42 @@ export interface Account {
|
|
|
125
125
|
* @memberof Account
|
|
126
126
|
*/
|
|
127
127
|
deleted: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* The current available balance of the account formatted in the plan's currency format
|
|
130
|
+
* @type {string}
|
|
131
|
+
* @memberof Account
|
|
132
|
+
*/
|
|
133
|
+
balance_formatted?: string;
|
|
134
|
+
/**
|
|
135
|
+
* The current available balance of the account as a decimal currency amount
|
|
136
|
+
* @type {number}
|
|
137
|
+
* @memberof Account
|
|
138
|
+
*/
|
|
139
|
+
balance_currency?: number;
|
|
140
|
+
/**
|
|
141
|
+
* The current cleared balance of the account formatted in the plan's currency format
|
|
142
|
+
* @type {string}
|
|
143
|
+
* @memberof Account
|
|
144
|
+
*/
|
|
145
|
+
cleared_balance_formatted?: string;
|
|
146
|
+
/**
|
|
147
|
+
* The current cleared balance of the account as a decimal currency amount
|
|
148
|
+
* @type {number}
|
|
149
|
+
* @memberof Account
|
|
150
|
+
*/
|
|
151
|
+
cleared_balance_currency?: number;
|
|
152
|
+
/**
|
|
153
|
+
* The current uncleared balance of the account formatted in the plan's currency format
|
|
154
|
+
* @type {string}
|
|
155
|
+
* @memberof Account
|
|
156
|
+
*/
|
|
157
|
+
uncleared_balance_formatted?: string;
|
|
158
|
+
/**
|
|
159
|
+
* The current uncleared balance of the account as a decimal currency amount
|
|
160
|
+
* @type {number}
|
|
161
|
+
* @memberof Account
|
|
162
|
+
*/
|
|
163
|
+
uncleared_balance_currency?: number;
|
|
128
164
|
}
|
|
129
165
|
/**
|
|
130
166
|
* Check if a given object implements the Account interface.
|
|
@@ -59,6 +59,12 @@ export function AccountFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
59
59
|
'debt_minimum_payments': json['debt_minimum_payments'] == null ? undefined : json['debt_minimum_payments'],
|
|
60
60
|
'debt_escrow_amounts': json['debt_escrow_amounts'] == null ? undefined : json['debt_escrow_amounts'],
|
|
61
61
|
'deleted': json['deleted'],
|
|
62
|
+
'balance_formatted': json['balance_formatted'] == null ? undefined : json['balance_formatted'],
|
|
63
|
+
'balance_currency': json['balance_currency'] == null ? undefined : json['balance_currency'],
|
|
64
|
+
'cleared_balance_formatted': json['cleared_balance_formatted'] == null ? undefined : json['cleared_balance_formatted'],
|
|
65
|
+
'cleared_balance_currency': json['cleared_balance_currency'] == null ? undefined : json['cleared_balance_currency'],
|
|
66
|
+
'uncleared_balance_formatted': json['uncleared_balance_formatted'] == null ? undefined : json['uncleared_balance_formatted'],
|
|
67
|
+
'uncleared_balance_currency': json['uncleared_balance_currency'] == null ? undefined : json['uncleared_balance_currency'],
|
|
62
68
|
};
|
|
63
69
|
}
|
|
64
70
|
export function AccountToJSON(json) {
|
|
@@ -88,5 +94,11 @@ export function AccountToJSONTyped(value, ignoreDiscriminator) {
|
|
|
88
94
|
'debt_minimum_payments': value['debt_minimum_payments'],
|
|
89
95
|
'debt_escrow_amounts': value['debt_escrow_amounts'],
|
|
90
96
|
'deleted': value['deleted'],
|
|
97
|
+
'balance_formatted': value['balance_formatted'],
|
|
98
|
+
'balance_currency': value['balance_currency'],
|
|
99
|
+
'cleared_balance_formatted': value['cleared_balance_formatted'],
|
|
100
|
+
'cleared_balance_currency': value['cleared_balance_currency'],
|
|
101
|
+
'uncleared_balance_formatted': value['uncleared_balance_formatted'],
|
|
102
|
+
'uncleared_balance_currency': value['uncleared_balance_currency'],
|
|
91
103
|
};
|
|
92
104
|
}
|
|
@@ -0,0 +1,136 @@
|
|
|
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
|
+
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
6
|
+
*/
|
|
7
|
+
import type { AccountType } from './AccountType';
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @export
|
|
11
|
+
* @interface AccountBase
|
|
12
|
+
*/
|
|
13
|
+
export interface AccountBase {
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @type {string}
|
|
17
|
+
* @memberof AccountBase
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof AccountBase
|
|
24
|
+
*/
|
|
25
|
+
name: string;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {AccountType}
|
|
29
|
+
* @memberof AccountBase
|
|
30
|
+
*/
|
|
31
|
+
type: AccountType;
|
|
32
|
+
/**
|
|
33
|
+
* Whether this account is "on budget" or not
|
|
34
|
+
* @type {boolean}
|
|
35
|
+
* @memberof AccountBase
|
|
36
|
+
*/
|
|
37
|
+
on_budget: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether this account is closed or not
|
|
40
|
+
* @type {boolean}
|
|
41
|
+
* @memberof AccountBase
|
|
42
|
+
*/
|
|
43
|
+
closed: boolean;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof AccountBase
|
|
48
|
+
*/
|
|
49
|
+
note?: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* The current available balance of the account in milliunits format
|
|
52
|
+
* @type {number}
|
|
53
|
+
* @memberof AccountBase
|
|
54
|
+
*/
|
|
55
|
+
balance: number;
|
|
56
|
+
/**
|
|
57
|
+
* The current cleared balance of the account in milliunits format
|
|
58
|
+
* @type {number}
|
|
59
|
+
* @memberof AccountBase
|
|
60
|
+
*/
|
|
61
|
+
cleared_balance: number;
|
|
62
|
+
/**
|
|
63
|
+
* The current uncleared balance of the account in milliunits format
|
|
64
|
+
* @type {number}
|
|
65
|
+
* @memberof AccountBase
|
|
66
|
+
*/
|
|
67
|
+
uncleared_balance: number;
|
|
68
|
+
/**
|
|
69
|
+
* The payee id which should be used when transferring to this account
|
|
70
|
+
* @type {string}
|
|
71
|
+
* @memberof AccountBase
|
|
72
|
+
*/
|
|
73
|
+
transfer_payee_id: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* Whether or not the account is linked to a financial institution for automatic transaction import.
|
|
76
|
+
* @type {boolean}
|
|
77
|
+
* @memberof AccountBase
|
|
78
|
+
*/
|
|
79
|
+
direct_import_linked?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* If an account linked to a financial institution (direct_import_linked=true) and the linked connection is not in a healthy state, this will be true.
|
|
82
|
+
* @type {boolean}
|
|
83
|
+
* @memberof AccountBase
|
|
84
|
+
*/
|
|
85
|
+
direct_import_in_error?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* A date/time specifying when the account was last reconciled.
|
|
88
|
+
* @type {string}
|
|
89
|
+
* @memberof AccountBase
|
|
90
|
+
*/
|
|
91
|
+
last_reconciled_at?: string | null;
|
|
92
|
+
/**
|
|
93
|
+
* This field is deprecated and will always be null.
|
|
94
|
+
* @type {number}
|
|
95
|
+
* @memberof AccountBase
|
|
96
|
+
*/
|
|
97
|
+
debt_original_balance?: number | null;
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @type {{ [key: string]: number; }}
|
|
101
|
+
* @memberof AccountBase
|
|
102
|
+
*/
|
|
103
|
+
debt_interest_rates?: {
|
|
104
|
+
[key: string]: number;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @type {{ [key: string]: number; }}
|
|
109
|
+
* @memberof AccountBase
|
|
110
|
+
*/
|
|
111
|
+
debt_minimum_payments?: {
|
|
112
|
+
[key: string]: number;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @type {{ [key: string]: number; }}
|
|
117
|
+
* @memberof AccountBase
|
|
118
|
+
*/
|
|
119
|
+
debt_escrow_amounts?: {
|
|
120
|
+
[key: string]: number;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Whether or not the account has been deleted. Deleted accounts will only be included in delta requests.
|
|
124
|
+
* @type {boolean}
|
|
125
|
+
* @memberof AccountBase
|
|
126
|
+
*/
|
|
127
|
+
deleted: boolean;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Check if a given object implements the AccountBase interface.
|
|
131
|
+
*/
|
|
132
|
+
export declare function instanceOfAccountBase(value: object): value is AccountBase;
|
|
133
|
+
export declare function AccountBaseFromJSON(json: any): AccountBase;
|
|
134
|
+
export declare function AccountBaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountBase;
|
|
135
|
+
export declare function AccountBaseToJSON(json: any): AccountBase;
|
|
136
|
+
export declare function AccountBaseToJSONTyped(value?: AccountBase | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,92 @@
|
|
|
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
|
+
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
8
|
+
*/
|
|
9
|
+
import { AccountTypeFromJSON, AccountTypeToJSON, } from './AccountType';
|
|
10
|
+
/**
|
|
11
|
+
* Check if a given object implements the AccountBase interface.
|
|
12
|
+
*/
|
|
13
|
+
export function instanceOfAccountBase(value) {
|
|
14
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
15
|
+
return false;
|
|
16
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
17
|
+
return false;
|
|
18
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('on_budget' in value) || value['on_budget'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('closed' in value) || value['closed'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('balance' in value) || value['balance'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('cleared_balance' in value) || value['cleared_balance'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('uncleared_balance' in value) || value['uncleared_balance'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('transfer_payee_id' in value) || value['transfer_payee_id'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('deleted' in value) || value['deleted'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
export function AccountBaseFromJSON(json) {
|
|
37
|
+
return AccountBaseFromJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function AccountBaseFromJSONTyped(json, ignoreDiscriminator) {
|
|
40
|
+
if (json == null) {
|
|
41
|
+
return json;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'id': json['id'],
|
|
45
|
+
'name': json['name'],
|
|
46
|
+
'type': AccountTypeFromJSON(json['type']),
|
|
47
|
+
'on_budget': json['on_budget'],
|
|
48
|
+
'closed': json['closed'],
|
|
49
|
+
'note': json['note'] == null ? undefined : json['note'],
|
|
50
|
+
'balance': json['balance'],
|
|
51
|
+
'cleared_balance': json['cleared_balance'],
|
|
52
|
+
'uncleared_balance': json['uncleared_balance'],
|
|
53
|
+
'transfer_payee_id': json['transfer_payee_id'],
|
|
54
|
+
'direct_import_linked': json['direct_import_linked'] == null ? undefined : json['direct_import_linked'],
|
|
55
|
+
'direct_import_in_error': json['direct_import_in_error'] == null ? undefined : json['direct_import_in_error'],
|
|
56
|
+
'last_reconciled_at': json['last_reconciled_at'] == null ? undefined : json['last_reconciled_at'],
|
|
57
|
+
'debt_original_balance': json['debt_original_balance'] == null ? undefined : json['debt_original_balance'],
|
|
58
|
+
'debt_interest_rates': json['debt_interest_rates'] == null ? undefined : json['debt_interest_rates'],
|
|
59
|
+
'debt_minimum_payments': json['debt_minimum_payments'] == null ? undefined : json['debt_minimum_payments'],
|
|
60
|
+
'debt_escrow_amounts': json['debt_escrow_amounts'] == null ? undefined : json['debt_escrow_amounts'],
|
|
61
|
+
'deleted': json['deleted'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export function AccountBaseToJSON(json) {
|
|
65
|
+
return AccountBaseToJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
export function AccountBaseToJSONTyped(value, ignoreDiscriminator) {
|
|
68
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
69
|
+
if (value == null) {
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
'id': value['id'],
|
|
74
|
+
'name': value['name'],
|
|
75
|
+
'type': AccountTypeToJSON(value['type']),
|
|
76
|
+
'on_budget': value['on_budget'],
|
|
77
|
+
'closed': value['closed'],
|
|
78
|
+
'note': value['note'],
|
|
79
|
+
'balance': value['balance'],
|
|
80
|
+
'cleared_balance': value['cleared_balance'],
|
|
81
|
+
'uncleared_balance': value['uncleared_balance'],
|
|
82
|
+
'transfer_payee_id': value['transfer_payee_id'],
|
|
83
|
+
'direct_import_linked': value['direct_import_linked'],
|
|
84
|
+
'direct_import_in_error': value['direct_import_in_error'],
|
|
85
|
+
'last_reconciled_at': value['last_reconciled_at'],
|
|
86
|
+
'debt_original_balance': value['debt_original_balance'],
|
|
87
|
+
'debt_interest_rates': value['debt_interest_rates'],
|
|
88
|
+
'debt_minimum_payments': value['debt_minimum_payments'],
|
|
89
|
+
'debt_escrow_amounts': value['debt_escrow_amounts'],
|
|
90
|
+
'deleted': value['deleted'],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
@@ -45,13 +45,13 @@ export interface Category {
|
|
|
45
45
|
* @type {string}
|
|
46
46
|
* @memberof Category
|
|
47
47
|
*/
|
|
48
|
-
original_category_group_id?: string
|
|
48
|
+
original_category_group_id?: string;
|
|
49
49
|
/**
|
|
50
50
|
*
|
|
51
51
|
* @type {string}
|
|
52
52
|
* @memberof Category
|
|
53
53
|
*/
|
|
54
|
-
note?: string
|
|
54
|
+
note?: string;
|
|
55
55
|
/**
|
|
56
56
|
* Assigned (budgeted) amount in milliunits format
|
|
57
57
|
* @type {number}
|
|
@@ -81,91 +81,175 @@ export interface Category {
|
|
|
81
81
|
* @type {boolean}
|
|
82
82
|
* @memberof Category
|
|
83
83
|
*/
|
|
84
|
-
goal_needs_whole_amount?: boolean
|
|
84
|
+
goal_needs_whole_amount?: boolean;
|
|
85
85
|
/**
|
|
86
86
|
* A day offset modifier for the goal's due date. When goal_cadence is 2 (Weekly), this value specifies which day of the week the goal is due (0 = Sunday, 6 = Saturday). Otherwise, this value specifies which day of the month the goal is due (1 = 1st, 31 = 31st, null = Last day of Month).
|
|
87
87
|
* @type {number}
|
|
88
88
|
* @memberof Category
|
|
89
89
|
*/
|
|
90
|
-
goal_day?: number
|
|
90
|
+
goal_day?: number;
|
|
91
91
|
/**
|
|
92
92
|
* The goal cadence. Value in range 0-14. There are two subsets of these values which behave differently. For values 0, 1, 2, and 13, the goal's due date repeats every goal_cadence * goal_cadence_frequency, where 0 = None, 1 = Monthly, 2 = Weekly, and 13 = Yearly. For example, goal_cadence 1 with goal_cadence_frequency 2 means the goal is due every other month. For values 3-12 and 14, goal_cadence_frequency is ignored and the goal's due date repeats every goal_cadence, where 3 = Every 2 Months, 4 = Every 3 Months, ..., 12 = Every 11 Months, and 14 = Every 2 Years.
|
|
93
93
|
* @type {number}
|
|
94
94
|
* @memberof Category
|
|
95
95
|
*/
|
|
96
|
-
goal_cadence?: number
|
|
96
|
+
goal_cadence?: number;
|
|
97
97
|
/**
|
|
98
98
|
* The goal cadence frequency. When goal_cadence is 0, 1, 2, or 13, a goal's due date repeats every goal_cadence * goal_cadence_frequency. For example, goal_cadence 1 with goal_cadence_frequency 2 means the goal is due every other month. When goal_cadence is 3-12 or 14, goal_cadence_frequency is ignored.
|
|
99
99
|
* @type {number}
|
|
100
100
|
* @memberof Category
|
|
101
101
|
*/
|
|
102
|
-
goal_cadence_frequency?: number
|
|
102
|
+
goal_cadence_frequency?: number;
|
|
103
103
|
/**
|
|
104
104
|
* The month a goal was created
|
|
105
105
|
* @type {string}
|
|
106
106
|
* @memberof Category
|
|
107
107
|
*/
|
|
108
|
-
goal_creation_month?: string
|
|
108
|
+
goal_creation_month?: string;
|
|
109
109
|
/**
|
|
110
110
|
* The goal target amount in milliunits
|
|
111
111
|
* @type {number}
|
|
112
112
|
* @memberof Category
|
|
113
113
|
*/
|
|
114
|
-
goal_target?: number
|
|
114
|
+
goal_target?: number;
|
|
115
115
|
/**
|
|
116
116
|
* DEPRECATED: No longer used. Use `goal_target_date` instead.
|
|
117
117
|
* @type {string}
|
|
118
118
|
* @memberof Category
|
|
119
119
|
*/
|
|
120
|
-
goal_target_month?: string
|
|
120
|
+
goal_target_month?: string;
|
|
121
121
|
/**
|
|
122
122
|
* The target date for the goal to be completed. Only some goal types specify this date.
|
|
123
123
|
* @type {string}
|
|
124
124
|
* @memberof Category
|
|
125
125
|
*/
|
|
126
|
-
goal_target_date?: string
|
|
126
|
+
goal_target_date?: string;
|
|
127
127
|
/**
|
|
128
128
|
* The percentage completion of the goal
|
|
129
129
|
* @type {number}
|
|
130
130
|
* @memberof Category
|
|
131
131
|
*/
|
|
132
|
-
goal_percentage_complete?: number
|
|
132
|
+
goal_percentage_complete?: number;
|
|
133
133
|
/**
|
|
134
134
|
* The number of months, including the current month, left in the current goal period.
|
|
135
135
|
* @type {number}
|
|
136
136
|
* @memberof Category
|
|
137
137
|
*/
|
|
138
|
-
goal_months_to_budget?: number
|
|
138
|
+
goal_months_to_budget?: number;
|
|
139
139
|
/**
|
|
140
140
|
* The amount of funding still needed in the current month to stay on track towards completing the goal within the current goal period. This amount will generally correspond to the 'Underfunded' amount in the web and mobile clients except when viewing a category with a Needed for Spending Goal in a future month. The web and mobile clients will ignore any funding from a prior goal period when viewing category with a Needed for Spending Goal in a future month.
|
|
141
141
|
* @type {number}
|
|
142
142
|
* @memberof Category
|
|
143
143
|
*/
|
|
144
|
-
goal_under_funded?: number
|
|
144
|
+
goal_under_funded?: number;
|
|
145
145
|
/**
|
|
146
146
|
* The total amount funded towards the goal within the current goal period.
|
|
147
147
|
* @type {number}
|
|
148
148
|
* @memberof Category
|
|
149
149
|
*/
|
|
150
|
-
goal_overall_funded?: number
|
|
150
|
+
goal_overall_funded?: number;
|
|
151
151
|
/**
|
|
152
152
|
* The amount of funding still needed to complete the goal within the current goal period.
|
|
153
153
|
* @type {number}
|
|
154
154
|
* @memberof Category
|
|
155
155
|
*/
|
|
156
|
-
goal_overall_left?: number
|
|
156
|
+
goal_overall_left?: number;
|
|
157
157
|
/**
|
|
158
158
|
* The date/time the goal was snoozed. If the goal is not snoozed, this will be null.
|
|
159
159
|
* @type {string}
|
|
160
160
|
* @memberof Category
|
|
161
161
|
*/
|
|
162
|
-
goal_snoozed_at?: string
|
|
162
|
+
goal_snoozed_at?: string;
|
|
163
163
|
/**
|
|
164
164
|
* Whether or not the category has been deleted. Deleted categories will only be included in delta requests.
|
|
165
165
|
* @type {boolean}
|
|
166
166
|
* @memberof Category
|
|
167
167
|
*/
|
|
168
168
|
deleted: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Available balance of the category formatted in the plan's currency format
|
|
171
|
+
* @type {string}
|
|
172
|
+
* @memberof Category
|
|
173
|
+
*/
|
|
174
|
+
balance_formatted?: string;
|
|
175
|
+
/**
|
|
176
|
+
* Available balance of the category as a decimal currency amount
|
|
177
|
+
* @type {number}
|
|
178
|
+
* @memberof Category
|
|
179
|
+
*/
|
|
180
|
+
balance_currency?: number;
|
|
181
|
+
/**
|
|
182
|
+
* Activity of the category formatted in the plan's currency format
|
|
183
|
+
* @type {string}
|
|
184
|
+
* @memberof Category
|
|
185
|
+
*/
|
|
186
|
+
activity_formatted?: string;
|
|
187
|
+
/**
|
|
188
|
+
* Activity of the category as a decimal currency amount
|
|
189
|
+
* @type {number}
|
|
190
|
+
* @memberof Category
|
|
191
|
+
*/
|
|
192
|
+
activity_currency?: number;
|
|
193
|
+
/**
|
|
194
|
+
* Assigned (budgeted) amount of the category formatted in the plan's currency format
|
|
195
|
+
* @type {string}
|
|
196
|
+
* @memberof Category
|
|
197
|
+
*/
|
|
198
|
+
budgeted_formatted?: string;
|
|
199
|
+
/**
|
|
200
|
+
* Assigned (budgeted) amount of the category as a decimal currency amount
|
|
201
|
+
* @type {number}
|
|
202
|
+
* @memberof Category
|
|
203
|
+
*/
|
|
204
|
+
budgeted_currency?: number;
|
|
205
|
+
/**
|
|
206
|
+
* The goal target amount formatted in the plan's currency format
|
|
207
|
+
* @type {string}
|
|
208
|
+
* @memberof Category
|
|
209
|
+
*/
|
|
210
|
+
goal_target_formatted?: string | null;
|
|
211
|
+
/**
|
|
212
|
+
* The goal target amount as a decimal currency amount
|
|
213
|
+
* @type {number}
|
|
214
|
+
* @memberof Category
|
|
215
|
+
*/
|
|
216
|
+
goal_target_currency?: number | null;
|
|
217
|
+
/**
|
|
218
|
+
* The goal underfunded amount formatted in the plan's currency format
|
|
219
|
+
* @type {string}
|
|
220
|
+
* @memberof Category
|
|
221
|
+
*/
|
|
222
|
+
goal_under_funded_formatted?: string | null;
|
|
223
|
+
/**
|
|
224
|
+
* The goal underfunded amount as a decimal currency amount
|
|
225
|
+
* @type {number}
|
|
226
|
+
* @memberof Category
|
|
227
|
+
*/
|
|
228
|
+
goal_under_funded_currency?: number | null;
|
|
229
|
+
/**
|
|
230
|
+
* The total amount funded towards the goal formatted in the plan's currency format
|
|
231
|
+
* @type {string}
|
|
232
|
+
* @memberof Category
|
|
233
|
+
*/
|
|
234
|
+
goal_overall_funded_formatted?: string | null;
|
|
235
|
+
/**
|
|
236
|
+
* The total amount funded towards the goal as a decimal currency amount
|
|
237
|
+
* @type {number}
|
|
238
|
+
* @memberof Category
|
|
239
|
+
*/
|
|
240
|
+
goal_overall_funded_currency?: number | null;
|
|
241
|
+
/**
|
|
242
|
+
* The amount of funding still needed to complete the goal formatted in the plan's currency format
|
|
243
|
+
* @type {string}
|
|
244
|
+
* @memberof Category
|
|
245
|
+
*/
|
|
246
|
+
goal_overall_left_formatted?: string | null;
|
|
247
|
+
/**
|
|
248
|
+
* The amount of funding still needed to complete the goal as a decimal currency amount
|
|
249
|
+
* @type {number}
|
|
250
|
+
* @memberof Category
|
|
251
|
+
*/
|
|
252
|
+
goal_overall_left_currency?: number | null;
|
|
169
253
|
}
|
|
170
254
|
/**
|
|
171
255
|
* @export
|