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
|
@@ -72,6 +72,20 @@ export function CategoryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
72
72
|
'goal_overall_left': json['goal_overall_left'] == null ? undefined : json['goal_overall_left'],
|
|
73
73
|
'goal_snoozed_at': json['goal_snoozed_at'] == null ? undefined : json['goal_snoozed_at'],
|
|
74
74
|
'deleted': json['deleted'],
|
|
75
|
+
'balance_formatted': json['balance_formatted'] == null ? undefined : json['balance_formatted'],
|
|
76
|
+
'balance_currency': json['balance_currency'] == null ? undefined : json['balance_currency'],
|
|
77
|
+
'activity_formatted': json['activity_formatted'] == null ? undefined : json['activity_formatted'],
|
|
78
|
+
'activity_currency': json['activity_currency'] == null ? undefined : json['activity_currency'],
|
|
79
|
+
'budgeted_formatted': json['budgeted_formatted'] == null ? undefined : json['budgeted_formatted'],
|
|
80
|
+
'budgeted_currency': json['budgeted_currency'] == null ? undefined : json['budgeted_currency'],
|
|
81
|
+
'goal_target_formatted': json['goal_target_formatted'] == null ? undefined : json['goal_target_formatted'],
|
|
82
|
+
'goal_target_currency': json['goal_target_currency'] == null ? undefined : json['goal_target_currency'],
|
|
83
|
+
'goal_under_funded_formatted': json['goal_under_funded_formatted'] == null ? undefined : json['goal_under_funded_formatted'],
|
|
84
|
+
'goal_under_funded_currency': json['goal_under_funded_currency'] == null ? undefined : json['goal_under_funded_currency'],
|
|
85
|
+
'goal_overall_funded_formatted': json['goal_overall_funded_formatted'] == null ? undefined : json['goal_overall_funded_formatted'],
|
|
86
|
+
'goal_overall_funded_currency': json['goal_overall_funded_currency'] == null ? undefined : json['goal_overall_funded_currency'],
|
|
87
|
+
'goal_overall_left_formatted': json['goal_overall_left_formatted'] == null ? undefined : json['goal_overall_left_formatted'],
|
|
88
|
+
'goal_overall_left_currency': json['goal_overall_left_currency'] == null ? undefined : json['goal_overall_left_currency'],
|
|
75
89
|
};
|
|
76
90
|
}
|
|
77
91
|
export function CategoryToJSON(json) {
|
|
@@ -109,5 +123,19 @@ export function CategoryToJSONTyped(value, ignoreDiscriminator) {
|
|
|
109
123
|
'goal_overall_left': value['goal_overall_left'],
|
|
110
124
|
'goal_snoozed_at': value['goal_snoozed_at'],
|
|
111
125
|
'deleted': value['deleted'],
|
|
126
|
+
'balance_formatted': value['balance_formatted'],
|
|
127
|
+
'balance_currency': value['balance_currency'],
|
|
128
|
+
'activity_formatted': value['activity_formatted'],
|
|
129
|
+
'activity_currency': value['activity_currency'],
|
|
130
|
+
'budgeted_formatted': value['budgeted_formatted'],
|
|
131
|
+
'budgeted_currency': value['budgeted_currency'],
|
|
132
|
+
'goal_target_formatted': value['goal_target_formatted'],
|
|
133
|
+
'goal_target_currency': value['goal_target_currency'],
|
|
134
|
+
'goal_under_funded_formatted': value['goal_under_funded_formatted'],
|
|
135
|
+
'goal_under_funded_currency': value['goal_under_funded_currency'],
|
|
136
|
+
'goal_overall_funded_formatted': value['goal_overall_funded_formatted'],
|
|
137
|
+
'goal_overall_funded_currency': value['goal_overall_funded_currency'],
|
|
138
|
+
'goal_overall_left_formatted': value['goal_overall_left_formatted'],
|
|
139
|
+
'goal_overall_left_currency': value['goal_overall_left_currency'],
|
|
112
140
|
};
|
|
113
141
|
}
|
|
@@ -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,113 @@
|
|
|
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
|
+
/**
|
|
10
|
+
* @export
|
|
11
|
+
*/
|
|
12
|
+
export var CategoryBaseGoalTypeEnum = {
|
|
13
|
+
Tb: 'TB',
|
|
14
|
+
Tbd: 'TBD',
|
|
15
|
+
Mf: 'MF',
|
|
16
|
+
Need: 'NEED',
|
|
17
|
+
Debt: 'DEBT'
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Check if a given object implements the CategoryBase interface.
|
|
21
|
+
*/
|
|
22
|
+
export function instanceOfCategoryBase(value) {
|
|
23
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if (!('category_group_id' in value) || value['category_group_id'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('hidden' in value) || value['hidden'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('budgeted' in value) || value['budgeted'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('activity' in value) || value['activity'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('balance' in value) || value['balance'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('deleted' in value) || value['deleted'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
export function CategoryBaseFromJSON(json) {
|
|
42
|
+
return CategoryBaseFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
export function CategoryBaseFromJSONTyped(json, ignoreDiscriminator) {
|
|
45
|
+
if (json == null) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'id': json['id'],
|
|
50
|
+
'category_group_id': json['category_group_id'],
|
|
51
|
+
'category_group_name': json['category_group_name'] == null ? undefined : json['category_group_name'],
|
|
52
|
+
'name': json['name'],
|
|
53
|
+
'hidden': json['hidden'],
|
|
54
|
+
'original_category_group_id': json['original_category_group_id'] == null ? undefined : json['original_category_group_id'],
|
|
55
|
+
'note': json['note'] == null ? undefined : json['note'],
|
|
56
|
+
'budgeted': json['budgeted'],
|
|
57
|
+
'activity': json['activity'],
|
|
58
|
+
'balance': json['balance'],
|
|
59
|
+
'goal_type': json['goal_type'] == null ? undefined : json['goal_type'],
|
|
60
|
+
'goal_needs_whole_amount': json['goal_needs_whole_amount'] == null ? undefined : json['goal_needs_whole_amount'],
|
|
61
|
+
'goal_day': json['goal_day'] == null ? undefined : json['goal_day'],
|
|
62
|
+
'goal_cadence': json['goal_cadence'] == null ? undefined : json['goal_cadence'],
|
|
63
|
+
'goal_cadence_frequency': json['goal_cadence_frequency'] == null ? undefined : json['goal_cadence_frequency'],
|
|
64
|
+
'goal_creation_month': json['goal_creation_month'] == null ? undefined : json['goal_creation_month'],
|
|
65
|
+
'goal_target': json['goal_target'] == null ? undefined : json['goal_target'],
|
|
66
|
+
'goal_target_month': json['goal_target_month'] == null ? undefined : json['goal_target_month'],
|
|
67
|
+
'goal_target_date': json['goal_target_date'] == null ? undefined : json['goal_target_date'],
|
|
68
|
+
'goal_percentage_complete': json['goal_percentage_complete'] == null ? undefined : json['goal_percentage_complete'],
|
|
69
|
+
'goal_months_to_budget': json['goal_months_to_budget'] == null ? undefined : json['goal_months_to_budget'],
|
|
70
|
+
'goal_under_funded': json['goal_under_funded'] == null ? undefined : json['goal_under_funded'],
|
|
71
|
+
'goal_overall_funded': json['goal_overall_funded'] == null ? undefined : json['goal_overall_funded'],
|
|
72
|
+
'goal_overall_left': json['goal_overall_left'] == null ? undefined : json['goal_overall_left'],
|
|
73
|
+
'goal_snoozed_at': json['goal_snoozed_at'] == null ? undefined : json['goal_snoozed_at'],
|
|
74
|
+
'deleted': json['deleted'],
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export function CategoryBaseToJSON(json) {
|
|
78
|
+
return CategoryBaseToJSONTyped(json, false);
|
|
79
|
+
}
|
|
80
|
+
export function CategoryBaseToJSONTyped(value, ignoreDiscriminator) {
|
|
81
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
82
|
+
if (value == null) {
|
|
83
|
+
return value;
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
'id': value['id'],
|
|
87
|
+
'category_group_id': value['category_group_id'],
|
|
88
|
+
'category_group_name': value['category_group_name'],
|
|
89
|
+
'name': value['name'],
|
|
90
|
+
'hidden': value['hidden'],
|
|
91
|
+
'original_category_group_id': value['original_category_group_id'],
|
|
92
|
+
'note': value['note'],
|
|
93
|
+
'budgeted': value['budgeted'],
|
|
94
|
+
'activity': value['activity'],
|
|
95
|
+
'balance': value['balance'],
|
|
96
|
+
'goal_type': value['goal_type'],
|
|
97
|
+
'goal_needs_whole_amount': value['goal_needs_whole_amount'],
|
|
98
|
+
'goal_day': value['goal_day'],
|
|
99
|
+
'goal_cadence': value['goal_cadence'],
|
|
100
|
+
'goal_cadence_frequency': value['goal_cadence_frequency'],
|
|
101
|
+
'goal_creation_month': value['goal_creation_month'],
|
|
102
|
+
'goal_target': value['goal_target'],
|
|
103
|
+
'goal_target_month': value['goal_target_month'],
|
|
104
|
+
'goal_target_date': value['goal_target_date'],
|
|
105
|
+
'goal_percentage_complete': value['goal_percentage_complete'],
|
|
106
|
+
'goal_months_to_budget': value['goal_months_to_budget'],
|
|
107
|
+
'goal_under_funded': value['goal_under_funded'],
|
|
108
|
+
'goal_overall_funded': value['goal_overall_funded'],
|
|
109
|
+
'goal_overall_left': value['goal_overall_left'],
|
|
110
|
+
'goal_snoozed_at': value['goal_snoozed_at'],
|
|
111
|
+
'deleted': value['deleted'],
|
|
112
|
+
};
|
|
113
|
+
}
|
|
@@ -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.
|
|
@@ -25,6 +25,7 @@ export function ExistingCategoryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
25
25
|
'category_group_id': json['category_group_id'] == null ? undefined : json['category_group_id'],
|
|
26
26
|
'goal_target': json['goal_target'] == null ? undefined : json['goal_target'],
|
|
27
27
|
'goal_target_date': json['goal_target_date'] == null ? undefined : json['goal_target_date'],
|
|
28
|
+
'goal_needs_whole_amount': json['goal_needs_whole_amount'] == null ? undefined : json['goal_needs_whole_amount'],
|
|
28
29
|
};
|
|
29
30
|
}
|
|
30
31
|
export function ExistingCategoryToJSON(json) {
|
|
@@ -41,5 +42,6 @@ export function ExistingCategoryToJSONTyped(value, ignoreDiscriminator) {
|
|
|
41
42
|
'category_group_id': value['category_group_id'],
|
|
42
43
|
'goal_target': value['goal_target'],
|
|
43
44
|
'goal_target_date': value['goal_target_date'],
|
|
45
|
+
'goal_needs_whole_amount': value['goal_needs_whole_amount'],
|
|
44
46
|
};
|
|
45
47
|
}
|
|
@@ -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}
|
|
@@ -79,6 +79,8 @@ export function HybridTransactionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
79
79
|
'import_payee_name_original': json['import_payee_name_original'] == null ? undefined : json['import_payee_name_original'],
|
|
80
80
|
'debt_transaction_type': json['debt_transaction_type'] == null ? undefined : json['debt_transaction_type'],
|
|
81
81
|
'deleted': json['deleted'],
|
|
82
|
+
'amount_formatted': json['amount_formatted'] == null ? undefined : json['amount_formatted'],
|
|
83
|
+
'amount_currency': json['amount_currency'] == null ? undefined : json['amount_currency'],
|
|
82
84
|
'type': json['type'],
|
|
83
85
|
'parent_transaction_id': json['parent_transaction_id'] == null ? undefined : json['parent_transaction_id'],
|
|
84
86
|
'account_name': json['account_name'],
|
|
@@ -114,6 +116,8 @@ export function HybridTransactionToJSONTyped(value, ignoreDiscriminator) {
|
|
|
114
116
|
'import_payee_name_original': value['import_payee_name_original'],
|
|
115
117
|
'debt_transaction_type': value['debt_transaction_type'],
|
|
116
118
|
'deleted': value['deleted'],
|
|
119
|
+
'amount_formatted': value['amount_formatted'],
|
|
120
|
+
'amount_currency': value['amount_currency'],
|
|
117
121
|
'type': value['type'],
|
|
118
122
|
'parent_transaction_id': value['parent_transaction_id'],
|
|
119
123
|
'account_name': value['account_name'],
|
|
@@ -21,49 +21,61 @@ export interface MoneyMovement {
|
|
|
21
21
|
* @type {string}
|
|
22
22
|
* @memberof MoneyMovement
|
|
23
23
|
*/
|
|
24
|
-
month?: string
|
|
24
|
+
month?: string;
|
|
25
25
|
/**
|
|
26
26
|
* The date/time the money movement was processed on the server in ISO format (e.g. 2024-01-01T12:00:00Z)
|
|
27
27
|
* @type {string}
|
|
28
28
|
* @memberof MoneyMovement
|
|
29
29
|
*/
|
|
30
|
-
moved_at?: string
|
|
30
|
+
moved_at?: string;
|
|
31
31
|
/**
|
|
32
32
|
*
|
|
33
33
|
* @type {string}
|
|
34
34
|
* @memberof MoneyMovement
|
|
35
35
|
*/
|
|
36
|
-
note?: string
|
|
36
|
+
note?: string;
|
|
37
37
|
/**
|
|
38
38
|
* The id of the money movement group this movement belongs to
|
|
39
39
|
* @type {string}
|
|
40
40
|
* @memberof MoneyMovement
|
|
41
41
|
*/
|
|
42
|
-
money_movement_group_id?: string
|
|
42
|
+
money_movement_group_id?: string;
|
|
43
43
|
/**
|
|
44
44
|
* The id of the user who performed the money movement
|
|
45
45
|
* @type {string}
|
|
46
46
|
* @memberof MoneyMovement
|
|
47
47
|
*/
|
|
48
|
-
performed_by_user_id?: string
|
|
48
|
+
performed_by_user_id?: string;
|
|
49
49
|
/**
|
|
50
50
|
* The id of the category the money was moved from
|
|
51
51
|
* @type {string}
|
|
52
52
|
* @memberof MoneyMovement
|
|
53
53
|
*/
|
|
54
|
-
from_category_id?: string
|
|
54
|
+
from_category_id?: string;
|
|
55
55
|
/**
|
|
56
56
|
* The id of the category the money was moved to
|
|
57
57
|
* @type {string}
|
|
58
58
|
* @memberof MoneyMovement
|
|
59
59
|
*/
|
|
60
|
-
to_category_id?: string
|
|
60
|
+
to_category_id?: string;
|
|
61
61
|
/**
|
|
62
62
|
* The amount of the money movement in milliunits format
|
|
63
63
|
* @type {number}
|
|
64
64
|
* @memberof MoneyMovement
|
|
65
65
|
*/
|
|
66
66
|
amount: number;
|
|
67
|
+
/**
|
|
68
|
+
* The money movement amount formatted in the plan's currency format
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof MoneyMovement
|
|
71
|
+
*/
|
|
72
|
+
amount_formatted?: string;
|
|
73
|
+
/**
|
|
74
|
+
* The money movement amount as a decimal currency amount
|
|
75
|
+
* @type {number}
|
|
76
|
+
* @memberof MoneyMovement
|
|
77
|
+
*/
|
|
78
|
+
amount_currency?: number;
|
|
67
79
|
}
|
|
68
80
|
/**
|
|
69
81
|
* Check if a given object implements the MoneyMovement interface.
|
|
@@ -33,6 +33,8 @@ export function MoneyMovementFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
33
33
|
'from_category_id': json['from_category_id'] == null ? undefined : json['from_category_id'],
|
|
34
34
|
'to_category_id': json['to_category_id'] == null ? undefined : json['to_category_id'],
|
|
35
35
|
'amount': json['amount'],
|
|
36
|
+
'amount_formatted': json['amount_formatted'] == null ? undefined : json['amount_formatted'],
|
|
37
|
+
'amount_currency': json['amount_currency'] == null ? undefined : json['amount_currency'],
|
|
36
38
|
};
|
|
37
39
|
}
|
|
38
40
|
export function MoneyMovementToJSON(json) {
|
|
@@ -53,5 +55,7 @@ export function MoneyMovementToJSONTyped(value, ignoreDiscriminator) {
|
|
|
53
55
|
'from_category_id': value['from_category_id'],
|
|
54
56
|
'to_category_id': value['to_category_id'],
|
|
55
57
|
'amount': value['amount'],
|
|
58
|
+
'amount_formatted': value['amount_formatted'],
|
|
59
|
+
'amount_currency': value['amount_currency'],
|
|
56
60
|
};
|
|
57
61
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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 MoneyMovementBase
|
|
11
|
+
*/
|
|
12
|
+
export interface MoneyMovementBase {
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof MoneyMovementBase
|
|
17
|
+
*/
|
|
18
|
+
id: string;
|
|
19
|
+
/**
|
|
20
|
+
* The month of the money movement in ISO format (e.g. 2024-01-01)
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof MoneyMovementBase
|
|
23
|
+
*/
|
|
24
|
+
month?: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* The date/time the money movement was processed on the server in ISO format (e.g. 2024-01-01T12:00:00Z)
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof MoneyMovementBase
|
|
29
|
+
*/
|
|
30
|
+
moved_at?: string | null;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof MoneyMovementBase
|
|
35
|
+
*/
|
|
36
|
+
note?: string | null;
|
|
37
|
+
/**
|
|
38
|
+
* The id of the money movement group this movement belongs to
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof MoneyMovementBase
|
|
41
|
+
*/
|
|
42
|
+
money_movement_group_id?: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* The id of the user who performed the money movement
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof MoneyMovementBase
|
|
47
|
+
*/
|
|
48
|
+
performed_by_user_id?: string | null;
|
|
49
|
+
/**
|
|
50
|
+
* The id of the category the money was moved from
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof MoneyMovementBase
|
|
53
|
+
*/
|
|
54
|
+
from_category_id?: string | null;
|
|
55
|
+
/**
|
|
56
|
+
* The id of the category the money was moved to
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof MoneyMovementBase
|
|
59
|
+
*/
|
|
60
|
+
to_category_id?: string | null;
|
|
61
|
+
/**
|
|
62
|
+
* The amount of the money movement in milliunits format
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @memberof MoneyMovementBase
|
|
65
|
+
*/
|
|
66
|
+
amount: number;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Check if a given object implements the MoneyMovementBase interface.
|
|
70
|
+
*/
|
|
71
|
+
export declare function instanceOfMoneyMovementBase(value: object): value is MoneyMovementBase;
|
|
72
|
+
export declare function MoneyMovementBaseFromJSON(json: any): MoneyMovementBase;
|
|
73
|
+
export declare function MoneyMovementBaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MoneyMovementBase;
|
|
74
|
+
export declare function MoneyMovementBaseToJSON(json: any): MoneyMovementBase;
|
|
75
|
+
export declare function MoneyMovementBaseToJSONTyped(value?: MoneyMovementBase | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
/**
|
|
10
|
+
* Check if a given object implements the MoneyMovementBase interface.
|
|
11
|
+
*/
|
|
12
|
+
export function instanceOfMoneyMovementBase(value) {
|
|
13
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
14
|
+
return false;
|
|
15
|
+
if (!('amount' in value) || value['amount'] === undefined)
|
|
16
|
+
return false;
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
export function MoneyMovementBaseFromJSON(json) {
|
|
20
|
+
return MoneyMovementBaseFromJSONTyped(json, false);
|
|
21
|
+
}
|
|
22
|
+
export function MoneyMovementBaseFromJSONTyped(json, ignoreDiscriminator) {
|
|
23
|
+
if (json == null) {
|
|
24
|
+
return json;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
'id': json['id'],
|
|
28
|
+
'month': json['month'] == null ? undefined : json['month'],
|
|
29
|
+
'moved_at': json['moved_at'] == null ? undefined : json['moved_at'],
|
|
30
|
+
'note': json['note'] == null ? undefined : json['note'],
|
|
31
|
+
'money_movement_group_id': json['money_movement_group_id'] == null ? undefined : json['money_movement_group_id'],
|
|
32
|
+
'performed_by_user_id': json['performed_by_user_id'] == null ? undefined : json['performed_by_user_id'],
|
|
33
|
+
'from_category_id': json['from_category_id'] == null ? undefined : json['from_category_id'],
|
|
34
|
+
'to_category_id': json['to_category_id'] == null ? undefined : json['to_category_id'],
|
|
35
|
+
'amount': json['amount'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function MoneyMovementBaseToJSON(json) {
|
|
39
|
+
return MoneyMovementBaseToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
export function MoneyMovementBaseToJSONTyped(value, ignoreDiscriminator) {
|
|
42
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'id': value['id'],
|
|
48
|
+
'month': value['month'],
|
|
49
|
+
'moved_at': value['moved_at'],
|
|
50
|
+
'note': value['note'],
|
|
51
|
+
'money_movement_group_id': value['money_movement_group_id'],
|
|
52
|
+
'performed_by_user_id': value['performed_by_user_id'],
|
|
53
|
+
'from_category_id': value['from_category_id'],
|
|
54
|
+
'to_category_id': value['to_category_id'],
|
|
55
|
+
'amount': value['amount'],
|
|
56
|
+
};
|
|
57
|
+
}
|