ynab 3.1.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/README.md +1 -1
- package/dist/apis/AccountsApi.js +3 -3
- package/dist/apis/CategoriesApi.js +8 -8
- package/dist/apis/MoneyMovementsApi.js +4 -4
- package/dist/apis/MonthsApi.js +2 -2
- package/dist/apis/PayeeLocationsApi.js +3 -3
- package/dist/apis/PayeesApi.d.ts +15 -1
- package/dist/apis/PayeesApi.js +42 -3
- package/dist/apis/PlansApi.js +3 -3
- package/dist/apis/ScheduledTransactionsApi.js +5 -5
- package/dist/apis/TransactionsApi.js +11 -11
- package/dist/browser/ynab.js +1 -1
- package/dist/esm/apis/AccountsApi.js +3 -3
- package/dist/esm/apis/CategoriesApi.js +8 -8
- package/dist/esm/apis/MoneyMovementsApi.js +4 -4
- package/dist/esm/apis/MonthsApi.js +2 -2
- package/dist/esm/apis/PayeeLocationsApi.js +3 -3
- package/dist/esm/apis/PayeesApi.d.ts +15 -1
- package/dist/esm/apis/PayeesApi.js +65 -4
- package/dist/esm/apis/PlansApi.js +3 -3
- package/dist/esm/apis/ScheduledTransactionsApi.js +5 -5
- package/dist/esm/apis/TransactionsApi.js +11 -11
- 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/PlanDetailResponseData.d.ts +1 -1
- package/dist/esm/models/PlanDetailResponseData.js +3 -3
- package/dist/esm/models/PlanSummaryResponseData.d.ts +2 -2
- package/dist/esm/models/PlanSummaryResponseData.js +5 -5
- 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/PlanDetailResponseData.d.ts +1 -1
- package/dist/models/PlanDetailResponseData.js +3 -3
- package/dist/models/PlanSummaryResponseData.d.ts +2 -2
- package/dist/models/PlanSummaryResponseData.js +5 -5
- 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
|
@@ -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
|
package/dist/models/Category.js
CHANGED
|
@@ -80,6 +80,20 @@ function CategoryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
80
80
|
'goal_overall_left': json['goal_overall_left'] == null ? undefined : json['goal_overall_left'],
|
|
81
81
|
'goal_snoozed_at': json['goal_snoozed_at'] == null ? undefined : json['goal_snoozed_at'],
|
|
82
82
|
'deleted': json['deleted'],
|
|
83
|
+
'balance_formatted': json['balance_formatted'] == null ? undefined : json['balance_formatted'],
|
|
84
|
+
'balance_currency': json['balance_currency'] == null ? undefined : json['balance_currency'],
|
|
85
|
+
'activity_formatted': json['activity_formatted'] == null ? undefined : json['activity_formatted'],
|
|
86
|
+
'activity_currency': json['activity_currency'] == null ? undefined : json['activity_currency'],
|
|
87
|
+
'budgeted_formatted': json['budgeted_formatted'] == null ? undefined : json['budgeted_formatted'],
|
|
88
|
+
'budgeted_currency': json['budgeted_currency'] == null ? undefined : json['budgeted_currency'],
|
|
89
|
+
'goal_target_formatted': json['goal_target_formatted'] == null ? undefined : json['goal_target_formatted'],
|
|
90
|
+
'goal_target_currency': json['goal_target_currency'] == null ? undefined : json['goal_target_currency'],
|
|
91
|
+
'goal_under_funded_formatted': json['goal_under_funded_formatted'] == null ? undefined : json['goal_under_funded_formatted'],
|
|
92
|
+
'goal_under_funded_currency': json['goal_under_funded_currency'] == null ? undefined : json['goal_under_funded_currency'],
|
|
93
|
+
'goal_overall_funded_formatted': json['goal_overall_funded_formatted'] == null ? undefined : json['goal_overall_funded_formatted'],
|
|
94
|
+
'goal_overall_funded_currency': json['goal_overall_funded_currency'] == null ? undefined : json['goal_overall_funded_currency'],
|
|
95
|
+
'goal_overall_left_formatted': json['goal_overall_left_formatted'] == null ? undefined : json['goal_overall_left_formatted'],
|
|
96
|
+
'goal_overall_left_currency': json['goal_overall_left_currency'] == null ? undefined : json['goal_overall_left_currency'],
|
|
83
97
|
};
|
|
84
98
|
}
|
|
85
99
|
function CategoryToJSON(json) {
|
|
@@ -116,5 +130,19 @@ function CategoryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
116
130
|
'goal_overall_left': value['goal_overall_left'],
|
|
117
131
|
'goal_snoozed_at': value['goal_snoozed_at'],
|
|
118
132
|
'deleted': value['deleted'],
|
|
133
|
+
'balance_formatted': value['balance_formatted'],
|
|
134
|
+
'balance_currency': value['balance_currency'],
|
|
135
|
+
'activity_formatted': value['activity_formatted'],
|
|
136
|
+
'activity_currency': value['activity_currency'],
|
|
137
|
+
'budgeted_formatted': value['budgeted_formatted'],
|
|
138
|
+
'budgeted_currency': value['budgeted_currency'],
|
|
139
|
+
'goal_target_formatted': value['goal_target_formatted'],
|
|
140
|
+
'goal_target_currency': value['goal_target_currency'],
|
|
141
|
+
'goal_under_funded_formatted': value['goal_under_funded_formatted'],
|
|
142
|
+
'goal_under_funded_currency': value['goal_under_funded_currency'],
|
|
143
|
+
'goal_overall_funded_formatted': value['goal_overall_funded_formatted'],
|
|
144
|
+
'goal_overall_funded_currency': value['goal_overall_funded_currency'],
|
|
145
|
+
'goal_overall_left_formatted': value['goal_overall_left_formatted'],
|
|
146
|
+
'goal_overall_left_currency': value['goal_overall_left_currency'],
|
|
119
147
|
};
|
|
120
148
|
}
|
|
@@ -0,0 +1,188 @@
|
|
|
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
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @export
|
|
10
|
+
* @interface CategoryBase
|
|
11
|
+
*/
|
|
12
|
+
export interface CategoryBase {
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof CategoryBase
|
|
17
|
+
*/
|
|
18
|
+
id: string;
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof CategoryBase
|
|
23
|
+
*/
|
|
24
|
+
category_group_id: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof CategoryBase
|
|
29
|
+
*/
|
|
30
|
+
category_group_name?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof CategoryBase
|
|
35
|
+
*/
|
|
36
|
+
name: string;
|
|
37
|
+
/**
|
|
38
|
+
* Whether or not the category is hidden
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
* @memberof CategoryBase
|
|
41
|
+
*/
|
|
42
|
+
hidden: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* DEPRECATED: No longer used. Value will always be null.
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof CategoryBase
|
|
47
|
+
*/
|
|
48
|
+
original_category_group_id?: string | null;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof CategoryBase
|
|
53
|
+
*/
|
|
54
|
+
note?: string | null;
|
|
55
|
+
/**
|
|
56
|
+
* Assigned (budgeted) amount in milliunits format
|
|
57
|
+
* @type {number}
|
|
58
|
+
* @memberof CategoryBase
|
|
59
|
+
*/
|
|
60
|
+
budgeted: number;
|
|
61
|
+
/**
|
|
62
|
+
* Activity amount in milliunits format
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @memberof CategoryBase
|
|
65
|
+
*/
|
|
66
|
+
activity: number;
|
|
67
|
+
/**
|
|
68
|
+
* Available balance in milliunits format
|
|
69
|
+
* @type {number}
|
|
70
|
+
* @memberof CategoryBase
|
|
71
|
+
*/
|
|
72
|
+
balance: number;
|
|
73
|
+
/**
|
|
74
|
+
* 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')
|
|
75
|
+
* @type {CategoryBaseGoalTypeEnum}
|
|
76
|
+
* @memberof CategoryBase
|
|
77
|
+
*/
|
|
78
|
+
goal_type?: CategoryBaseGoalTypeEnum | null;
|
|
79
|
+
/**
|
|
80
|
+
* Indicates the monthly rollover behavior for "NEED"-type goals. When "true", the goal will always ask for the target amount in the new month ("Set Aside"). When "false", previous month category funding is used ("Refill"). For other goal types, this field will be null.
|
|
81
|
+
* @type {boolean}
|
|
82
|
+
* @memberof CategoryBase
|
|
83
|
+
*/
|
|
84
|
+
goal_needs_whole_amount?: boolean | null;
|
|
85
|
+
/**
|
|
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
|
+
* @type {number}
|
|
88
|
+
* @memberof CategoryBase
|
|
89
|
+
*/
|
|
90
|
+
goal_day?: number | null;
|
|
91
|
+
/**
|
|
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
|
+
* @type {number}
|
|
94
|
+
* @memberof CategoryBase
|
|
95
|
+
*/
|
|
96
|
+
goal_cadence?: number | null;
|
|
97
|
+
/**
|
|
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
|
+
* @type {number}
|
|
100
|
+
* @memberof CategoryBase
|
|
101
|
+
*/
|
|
102
|
+
goal_cadence_frequency?: number | null;
|
|
103
|
+
/**
|
|
104
|
+
* The month a goal was created
|
|
105
|
+
* @type {string}
|
|
106
|
+
* @memberof CategoryBase
|
|
107
|
+
*/
|
|
108
|
+
goal_creation_month?: string | null;
|
|
109
|
+
/**
|
|
110
|
+
* The goal target amount in milliunits
|
|
111
|
+
* @type {number}
|
|
112
|
+
* @memberof CategoryBase
|
|
113
|
+
*/
|
|
114
|
+
goal_target?: number | null;
|
|
115
|
+
/**
|
|
116
|
+
* DEPRECATED: No longer used. Use `goal_target_date` instead.
|
|
117
|
+
* @type {string}
|
|
118
|
+
* @memberof CategoryBase
|
|
119
|
+
*/
|
|
120
|
+
goal_target_month?: string | null;
|
|
121
|
+
/**
|
|
122
|
+
* The target date for the goal to be completed. Only some goal types specify this date.
|
|
123
|
+
* @type {string}
|
|
124
|
+
* @memberof CategoryBase
|
|
125
|
+
*/
|
|
126
|
+
goal_target_date?: string | null;
|
|
127
|
+
/**
|
|
128
|
+
* The percentage completion of the goal
|
|
129
|
+
* @type {number}
|
|
130
|
+
* @memberof CategoryBase
|
|
131
|
+
*/
|
|
132
|
+
goal_percentage_complete?: number | null;
|
|
133
|
+
/**
|
|
134
|
+
* The number of months, including the current month, left in the current goal period.
|
|
135
|
+
* @type {number}
|
|
136
|
+
* @memberof CategoryBase
|
|
137
|
+
*/
|
|
138
|
+
goal_months_to_budget?: number | null;
|
|
139
|
+
/**
|
|
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
|
+
* @type {number}
|
|
142
|
+
* @memberof CategoryBase
|
|
143
|
+
*/
|
|
144
|
+
goal_under_funded?: number | null;
|
|
145
|
+
/**
|
|
146
|
+
* The total amount funded towards the goal within the current goal period.
|
|
147
|
+
* @type {number}
|
|
148
|
+
* @memberof CategoryBase
|
|
149
|
+
*/
|
|
150
|
+
goal_overall_funded?: number | null;
|
|
151
|
+
/**
|
|
152
|
+
* The amount of funding still needed to complete the goal within the current goal period.
|
|
153
|
+
* @type {number}
|
|
154
|
+
* @memberof CategoryBase
|
|
155
|
+
*/
|
|
156
|
+
goal_overall_left?: number | null;
|
|
157
|
+
/**
|
|
158
|
+
* The date/time the goal was snoozed. If the goal is not snoozed, this will be null.
|
|
159
|
+
* @type {string}
|
|
160
|
+
* @memberof CategoryBase
|
|
161
|
+
*/
|
|
162
|
+
goal_snoozed_at?: string | null;
|
|
163
|
+
/**
|
|
164
|
+
* Whether or not the category has been deleted. Deleted categories will only be included in delta requests.
|
|
165
|
+
* @type {boolean}
|
|
166
|
+
* @memberof CategoryBase
|
|
167
|
+
*/
|
|
168
|
+
deleted: boolean;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* @export
|
|
172
|
+
*/
|
|
173
|
+
export declare const CategoryBaseGoalTypeEnum: {
|
|
174
|
+
readonly Tb: "TB";
|
|
175
|
+
readonly Tbd: "TBD";
|
|
176
|
+
readonly Mf: "MF";
|
|
177
|
+
readonly Need: "NEED";
|
|
178
|
+
readonly Debt: "DEBT";
|
|
179
|
+
};
|
|
180
|
+
export type CategoryBaseGoalTypeEnum = typeof CategoryBaseGoalTypeEnum[keyof typeof CategoryBaseGoalTypeEnum];
|
|
181
|
+
/**
|
|
182
|
+
* Check if a given object implements the CategoryBase interface.
|
|
183
|
+
*/
|
|
184
|
+
export declare function instanceOfCategoryBase(value: object): value is CategoryBase;
|
|
185
|
+
export declare function CategoryBaseFromJSON(json: any): CategoryBase;
|
|
186
|
+
export declare function CategoryBaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CategoryBase;
|
|
187
|
+
export declare function CategoryBaseToJSON(json: any): CategoryBase;
|
|
188
|
+
export declare function CategoryBaseToJSONTyped(value?: CategoryBase | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* YNAB API Endpoints
|
|
6
|
+
* 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
|
|
7
|
+
*
|
|
8
|
+
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.CategoryBaseGoalTypeEnum = void 0;
|
|
12
|
+
exports.instanceOfCategoryBase = instanceOfCategoryBase;
|
|
13
|
+
exports.CategoryBaseFromJSON = CategoryBaseFromJSON;
|
|
14
|
+
exports.CategoryBaseFromJSONTyped = CategoryBaseFromJSONTyped;
|
|
15
|
+
exports.CategoryBaseToJSON = CategoryBaseToJSON;
|
|
16
|
+
exports.CategoryBaseToJSONTyped = CategoryBaseToJSONTyped;
|
|
17
|
+
/**
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
exports.CategoryBaseGoalTypeEnum = {
|
|
21
|
+
Tb: 'TB',
|
|
22
|
+
Tbd: 'TBD',
|
|
23
|
+
Mf: 'MF',
|
|
24
|
+
Need: 'NEED',
|
|
25
|
+
Debt: 'DEBT'
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Check if a given object implements the CategoryBase interface.
|
|
29
|
+
*/
|
|
30
|
+
function instanceOfCategoryBase(value) {
|
|
31
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('category_group_id' in value) || value['category_group_id'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('hidden' in value) || value['hidden'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('budgeted' in value) || value['budgeted'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('activity' in value) || value['activity'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
if (!('balance' in value) || value['balance'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
if (!('deleted' in value) || value['deleted'] === undefined)
|
|
46
|
+
return false;
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
function CategoryBaseFromJSON(json) {
|
|
50
|
+
return CategoryBaseFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
function CategoryBaseFromJSONTyped(json, ignoreDiscriminator) {
|
|
53
|
+
if (json == null) {
|
|
54
|
+
return json;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'id': json['id'],
|
|
58
|
+
'category_group_id': json['category_group_id'],
|
|
59
|
+
'category_group_name': json['category_group_name'] == null ? undefined : json['category_group_name'],
|
|
60
|
+
'name': json['name'],
|
|
61
|
+
'hidden': json['hidden'],
|
|
62
|
+
'original_category_group_id': json['original_category_group_id'] == null ? undefined : json['original_category_group_id'],
|
|
63
|
+
'note': json['note'] == null ? undefined : json['note'],
|
|
64
|
+
'budgeted': json['budgeted'],
|
|
65
|
+
'activity': json['activity'],
|
|
66
|
+
'balance': json['balance'],
|
|
67
|
+
'goal_type': json['goal_type'] == null ? undefined : json['goal_type'],
|
|
68
|
+
'goal_needs_whole_amount': json['goal_needs_whole_amount'] == null ? undefined : json['goal_needs_whole_amount'],
|
|
69
|
+
'goal_day': json['goal_day'] == null ? undefined : json['goal_day'],
|
|
70
|
+
'goal_cadence': json['goal_cadence'] == null ? undefined : json['goal_cadence'],
|
|
71
|
+
'goal_cadence_frequency': json['goal_cadence_frequency'] == null ? undefined : json['goal_cadence_frequency'],
|
|
72
|
+
'goal_creation_month': json['goal_creation_month'] == null ? undefined : json['goal_creation_month'],
|
|
73
|
+
'goal_target': json['goal_target'] == null ? undefined : json['goal_target'],
|
|
74
|
+
'goal_target_month': json['goal_target_month'] == null ? undefined : json['goal_target_month'],
|
|
75
|
+
'goal_target_date': json['goal_target_date'] == null ? undefined : json['goal_target_date'],
|
|
76
|
+
'goal_percentage_complete': json['goal_percentage_complete'] == null ? undefined : json['goal_percentage_complete'],
|
|
77
|
+
'goal_months_to_budget': json['goal_months_to_budget'] == null ? undefined : json['goal_months_to_budget'],
|
|
78
|
+
'goal_under_funded': json['goal_under_funded'] == null ? undefined : json['goal_under_funded'],
|
|
79
|
+
'goal_overall_funded': json['goal_overall_funded'] == null ? undefined : json['goal_overall_funded'],
|
|
80
|
+
'goal_overall_left': json['goal_overall_left'] == null ? undefined : json['goal_overall_left'],
|
|
81
|
+
'goal_snoozed_at': json['goal_snoozed_at'] == null ? undefined : json['goal_snoozed_at'],
|
|
82
|
+
'deleted': json['deleted'],
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function CategoryBaseToJSON(json) {
|
|
86
|
+
return CategoryBaseToJSONTyped(json, false);
|
|
87
|
+
}
|
|
88
|
+
function CategoryBaseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
'id': value['id'],
|
|
94
|
+
'category_group_id': value['category_group_id'],
|
|
95
|
+
'category_group_name': value['category_group_name'],
|
|
96
|
+
'name': value['name'],
|
|
97
|
+
'hidden': value['hidden'],
|
|
98
|
+
'original_category_group_id': value['original_category_group_id'],
|
|
99
|
+
'note': value['note'],
|
|
100
|
+
'budgeted': value['budgeted'],
|
|
101
|
+
'activity': value['activity'],
|
|
102
|
+
'balance': value['balance'],
|
|
103
|
+
'goal_type': value['goal_type'],
|
|
104
|
+
'goal_needs_whole_amount': value['goal_needs_whole_amount'],
|
|
105
|
+
'goal_day': value['goal_day'],
|
|
106
|
+
'goal_cadence': value['goal_cadence'],
|
|
107
|
+
'goal_cadence_frequency': value['goal_cadence_frequency'],
|
|
108
|
+
'goal_creation_month': value['goal_creation_month'],
|
|
109
|
+
'goal_target': value['goal_target'],
|
|
110
|
+
'goal_target_month': value['goal_target_month'],
|
|
111
|
+
'goal_target_date': value['goal_target_date'],
|
|
112
|
+
'goal_percentage_complete': value['goal_percentage_complete'],
|
|
113
|
+
'goal_months_to_budget': value['goal_months_to_budget'],
|
|
114
|
+
'goal_under_funded': value['goal_under_funded'],
|
|
115
|
+
'goal_overall_funded': value['goal_overall_funded'],
|
|
116
|
+
'goal_overall_left': value['goal_overall_left'],
|
|
117
|
+
'goal_snoozed_at': value['goal_snoozed_at'],
|
|
118
|
+
'deleted': value['deleted'],
|
|
119
|
+
};
|
|
120
|
+
}
|
|
@@ -29,7 +29,7 @@ export interface ExistingCategory {
|
|
|
29
29
|
*/
|
|
30
30
|
category_group_id?: string;
|
|
31
31
|
/**
|
|
32
|
-
* The goal target amount in milliunits format. If value is specified and goal has not already been configured for category, a monthly
|
|
32
|
+
* The goal target amount in milliunits format. If value is specified and goal has not already been configured for category, a monthly goal will be created for the category with this target amount. If goal_type is not specified, it will default to 'NEED' or 'MF' for Credit Card Payment categories.
|
|
33
33
|
* @type {number}
|
|
34
34
|
* @memberof ExistingCategory
|
|
35
35
|
*/
|
|
@@ -40,6 +40,12 @@ export interface ExistingCategory {
|
|
|
40
40
|
* @memberof ExistingCategory
|
|
41
41
|
*/
|
|
42
42
|
goal_target_date?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Whether the goal requires the full target amount each period. Only supported for 'NEED' goals. When true, the goal is configured as 'Set aside another...'. When false, the goal is configured as 'Refill up to...'.
|
|
45
|
+
* @type {boolean}
|
|
46
|
+
* @memberof ExistingCategory
|
|
47
|
+
*/
|
|
48
|
+
goal_needs_whole_amount?: boolean;
|
|
43
49
|
}
|
|
44
50
|
/**
|
|
45
51
|
* Check if a given object implements the ExistingCategory interface.
|
|
@@ -32,6 +32,7 @@ function ExistingCategoryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
32
32
|
'category_group_id': json['category_group_id'] == null ? undefined : json['category_group_id'],
|
|
33
33
|
'goal_target': json['goal_target'] == null ? undefined : json['goal_target'],
|
|
34
34
|
'goal_target_date': json['goal_target_date'] == null ? undefined : json['goal_target_date'],
|
|
35
|
+
'goal_needs_whole_amount': json['goal_needs_whole_amount'] == null ? undefined : json['goal_needs_whole_amount'],
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
function ExistingCategoryToJSON(json) {
|
|
@@ -47,5 +48,6 @@ function ExistingCategoryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
47
48
|
'category_group_id': value['category_group_id'],
|
|
48
49
|
'goal_target': value['goal_target'],
|
|
49
50
|
'goal_target_date': value['goal_target_date'],
|
|
51
|
+
'goal_needs_whole_amount': value['goal_needs_whole_amount'],
|
|
50
52
|
};
|
|
51
53
|
}
|
|
@@ -126,6 +126,18 @@ export interface HybridTransaction {
|
|
|
126
126
|
* @memberof HybridTransaction
|
|
127
127
|
*/
|
|
128
128
|
deleted: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* The transaction amount formatted in the plan's currency format
|
|
131
|
+
* @type {string}
|
|
132
|
+
* @memberof HybridTransaction
|
|
133
|
+
*/
|
|
134
|
+
amount_formatted?: string;
|
|
135
|
+
/**
|
|
136
|
+
* The transaction amount as a decimal currency amount
|
|
137
|
+
* @type {number}
|
|
138
|
+
* @memberof HybridTransaction
|
|
139
|
+
*/
|
|
140
|
+
amount_currency?: number;
|
|
129
141
|
/**
|
|
130
142
|
* Whether the hybrid transaction represents a regular transaction or a subtransaction
|
|
131
143
|
* @type {HybridTransactionTypeEnum}
|
|
@@ -87,6 +87,8 @@ function HybridTransactionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
87
87
|
'import_payee_name_original': json['import_payee_name_original'] == null ? undefined : json['import_payee_name_original'],
|
|
88
88
|
'debt_transaction_type': json['debt_transaction_type'] == null ? undefined : json['debt_transaction_type'],
|
|
89
89
|
'deleted': json['deleted'],
|
|
90
|
+
'amount_formatted': json['amount_formatted'] == null ? undefined : json['amount_formatted'],
|
|
91
|
+
'amount_currency': json['amount_currency'] == null ? undefined : json['amount_currency'],
|
|
90
92
|
'type': json['type'],
|
|
91
93
|
'parent_transaction_id': json['parent_transaction_id'] == null ? undefined : json['parent_transaction_id'],
|
|
92
94
|
'account_name': json['account_name'],
|
|
@@ -121,6 +123,8 @@ function HybridTransactionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
121
123
|
'import_payee_name_original': value['import_payee_name_original'],
|
|
122
124
|
'debt_transaction_type': value['debt_transaction_type'],
|
|
123
125
|
'deleted': value['deleted'],
|
|
126
|
+
'amount_formatted': value['amount_formatted'],
|
|
127
|
+
'amount_currency': value['amount_currency'],
|
|
124
128
|
'type': value['type'],
|
|
125
129
|
'parent_transaction_id': value['parent_transaction_id'],
|
|
126
130
|
'account_name': value['account_name'],
|