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
|
@@ -0,0 +1,87 @@
|
|
|
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 SubTransactionBase
|
|
11
|
+
*/
|
|
12
|
+
export interface SubTransactionBase {
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof SubTransactionBase
|
|
17
|
+
*/
|
|
18
|
+
id: string;
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof SubTransactionBase
|
|
23
|
+
*/
|
|
24
|
+
transaction_id: string;
|
|
25
|
+
/**
|
|
26
|
+
* The subtransaction amount in milliunits format
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof SubTransactionBase
|
|
29
|
+
*/
|
|
30
|
+
amount: number;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof SubTransactionBase
|
|
35
|
+
*/
|
|
36
|
+
memo?: string | null;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof SubTransactionBase
|
|
41
|
+
*/
|
|
42
|
+
payee_id?: string | null;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof SubTransactionBase
|
|
47
|
+
*/
|
|
48
|
+
payee_name?: string | null;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof SubTransactionBase
|
|
53
|
+
*/
|
|
54
|
+
category_id?: string | null;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof SubTransactionBase
|
|
59
|
+
*/
|
|
60
|
+
category_name?: string | null;
|
|
61
|
+
/**
|
|
62
|
+
* If a transfer, the account_id which the subtransaction transfers to
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof SubTransactionBase
|
|
65
|
+
*/
|
|
66
|
+
transfer_account_id?: string | null;
|
|
67
|
+
/**
|
|
68
|
+
* If a transfer, the id of transaction on the other side of the transfer
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof SubTransactionBase
|
|
71
|
+
*/
|
|
72
|
+
transfer_transaction_id?: string | null;
|
|
73
|
+
/**
|
|
74
|
+
* Whether or not the subtransaction has been deleted. Deleted subtransactions will only be included in delta requests.
|
|
75
|
+
* @type {boolean}
|
|
76
|
+
* @memberof SubTransactionBase
|
|
77
|
+
*/
|
|
78
|
+
deleted: boolean;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Check if a given object implements the SubTransactionBase interface.
|
|
82
|
+
*/
|
|
83
|
+
export declare function instanceOfSubTransactionBase(value: object): value is SubTransactionBase;
|
|
84
|
+
export declare function SubTransactionBaseFromJSON(json: any): SubTransactionBase;
|
|
85
|
+
export declare function SubTransactionBaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubTransactionBase;
|
|
86
|
+
export declare function SubTransactionBaseToJSON(json: any): SubTransactionBase;
|
|
87
|
+
export declare function SubTransactionBaseToJSONTyped(value?: SubTransactionBase | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,71 @@
|
|
|
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.instanceOfSubTransactionBase = instanceOfSubTransactionBase;
|
|
12
|
+
exports.SubTransactionBaseFromJSON = SubTransactionBaseFromJSON;
|
|
13
|
+
exports.SubTransactionBaseFromJSONTyped = SubTransactionBaseFromJSONTyped;
|
|
14
|
+
exports.SubTransactionBaseToJSON = SubTransactionBaseToJSON;
|
|
15
|
+
exports.SubTransactionBaseToJSONTyped = SubTransactionBaseToJSONTyped;
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the SubTransactionBase interface.
|
|
18
|
+
*/
|
|
19
|
+
function instanceOfSubTransactionBase(value) {
|
|
20
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('transaction_id' in value) || value['transaction_id'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('amount' in value) || value['amount'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('deleted' in value) || value['deleted'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
function SubTransactionBaseFromJSON(json) {
|
|
31
|
+
return SubTransactionBaseFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
function SubTransactionBaseFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'id': json['id'],
|
|
39
|
+
'transaction_id': json['transaction_id'],
|
|
40
|
+
'amount': json['amount'],
|
|
41
|
+
'memo': json['memo'] == null ? undefined : json['memo'],
|
|
42
|
+
'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
|
|
43
|
+
'payee_name': json['payee_name'] == null ? undefined : json['payee_name'],
|
|
44
|
+
'category_id': json['category_id'] == null ? undefined : json['category_id'],
|
|
45
|
+
'category_name': json['category_name'] == null ? undefined : json['category_name'],
|
|
46
|
+
'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
|
|
47
|
+
'transfer_transaction_id': json['transfer_transaction_id'] == null ? undefined : json['transfer_transaction_id'],
|
|
48
|
+
'deleted': json['deleted'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function SubTransactionBaseToJSON(json) {
|
|
52
|
+
return SubTransactionBaseToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
function SubTransactionBaseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
55
|
+
if (value == null) {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
'id': value['id'],
|
|
60
|
+
'transaction_id': value['transaction_id'],
|
|
61
|
+
'amount': value['amount'],
|
|
62
|
+
'memo': value['memo'],
|
|
63
|
+
'payee_id': value['payee_id'],
|
|
64
|
+
'payee_name': value['payee_name'],
|
|
65
|
+
'category_id': value['category_id'],
|
|
66
|
+
'category_name': value['category_name'],
|
|
67
|
+
'transfer_account_id': value['transfer_account_id'],
|
|
68
|
+
'transfer_transaction_id': value['transfer_transaction_id'],
|
|
69
|
+
'deleted': value['deleted'],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
@@ -127,6 +127,18 @@ export interface TransactionDetail {
|
|
|
127
127
|
* @memberof TransactionDetail
|
|
128
128
|
*/
|
|
129
129
|
deleted: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* The transaction amount formatted in the plan's currency format
|
|
132
|
+
* @type {string}
|
|
133
|
+
* @memberof TransactionDetail
|
|
134
|
+
*/
|
|
135
|
+
amount_formatted?: string;
|
|
136
|
+
/**
|
|
137
|
+
* The transaction amount as a decimal currency amount
|
|
138
|
+
* @type {number}
|
|
139
|
+
* @memberof TransactionDetail
|
|
140
|
+
*/
|
|
141
|
+
amount_currency?: number;
|
|
130
142
|
/**
|
|
131
143
|
*
|
|
132
144
|
* @type {string}
|
|
@@ -81,6 +81,8 @@ function TransactionDetailFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
81
81
|
'import_payee_name_original': json['import_payee_name_original'] == null ? undefined : json['import_payee_name_original'],
|
|
82
82
|
'debt_transaction_type': json['debt_transaction_type'] == null ? undefined : json['debt_transaction_type'],
|
|
83
83
|
'deleted': json['deleted'],
|
|
84
|
+
'amount_formatted': json['amount_formatted'] == null ? undefined : json['amount_formatted'],
|
|
85
|
+
'amount_currency': json['amount_currency'] == null ? undefined : json['amount_currency'],
|
|
84
86
|
'account_name': json['account_name'],
|
|
85
87
|
'payee_name': json['payee_name'] == null ? undefined : json['payee_name'],
|
|
86
88
|
'category_name': json['category_name'] == null ? undefined : json['category_name'],
|
|
@@ -114,6 +116,8 @@ function TransactionDetailToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
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
|
'account_name': value['account_name'],
|
|
118
122
|
'payee_name': value['payee_name'],
|
|
119
123
|
'category_name': value['category_name'],
|
|
@@ -35,7 +35,7 @@ export interface TransactionSummary {
|
|
|
35
35
|
* @type {string}
|
|
36
36
|
* @memberof TransactionSummary
|
|
37
37
|
*/
|
|
38
|
-
memo?: string
|
|
38
|
+
memo?: string;
|
|
39
39
|
/**
|
|
40
40
|
*
|
|
41
41
|
* @type {TransactionClearedStatus}
|
|
@@ -59,7 +59,7 @@ export interface TransactionSummary {
|
|
|
59
59
|
* @type {string}
|
|
60
60
|
* @memberof TransactionSummary
|
|
61
61
|
*/
|
|
62
|
-
flag_name?: string
|
|
62
|
+
flag_name?: string;
|
|
63
63
|
/**
|
|
64
64
|
*
|
|
65
65
|
* @type {string}
|
|
@@ -71,49 +71,49 @@ export interface TransactionSummary {
|
|
|
71
71
|
* @type {string}
|
|
72
72
|
* @memberof TransactionSummary
|
|
73
73
|
*/
|
|
74
|
-
payee_id?: string
|
|
74
|
+
payee_id?: string;
|
|
75
75
|
/**
|
|
76
76
|
*
|
|
77
77
|
* @type {string}
|
|
78
78
|
* @memberof TransactionSummary
|
|
79
79
|
*/
|
|
80
|
-
category_id?: string
|
|
80
|
+
category_id?: string;
|
|
81
81
|
/**
|
|
82
82
|
* If a transfer transaction, the account to which it transfers
|
|
83
83
|
* @type {string}
|
|
84
84
|
* @memberof TransactionSummary
|
|
85
85
|
*/
|
|
86
|
-
transfer_account_id?: string
|
|
86
|
+
transfer_account_id?: string;
|
|
87
87
|
/**
|
|
88
88
|
* If a transfer transaction, the id of transaction on the other side of the transfer
|
|
89
89
|
* @type {string}
|
|
90
90
|
* @memberof TransactionSummary
|
|
91
91
|
*/
|
|
92
|
-
transfer_transaction_id?: string
|
|
92
|
+
transfer_transaction_id?: string;
|
|
93
93
|
/**
|
|
94
94
|
* If transaction is matched, the id of the matched transaction
|
|
95
95
|
* @type {string}
|
|
96
96
|
* @memberof TransactionSummary
|
|
97
97
|
*/
|
|
98
|
-
matched_transaction_id?: string
|
|
98
|
+
matched_transaction_id?: string;
|
|
99
99
|
/**
|
|
100
100
|
* If the transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'.
|
|
101
101
|
* @type {string}
|
|
102
102
|
* @memberof TransactionSummary
|
|
103
103
|
*/
|
|
104
|
-
import_id?: string
|
|
104
|
+
import_id?: string;
|
|
105
105
|
/**
|
|
106
106
|
* If the transaction was imported, the payee name that was used when importing and before applying any payee rename rules
|
|
107
107
|
* @type {string}
|
|
108
108
|
* @memberof TransactionSummary
|
|
109
109
|
*/
|
|
110
|
-
import_payee_name?: string
|
|
110
|
+
import_payee_name?: string;
|
|
111
111
|
/**
|
|
112
112
|
* If the transaction was imported, the original payee name as it appeared on the statement
|
|
113
113
|
* @type {string}
|
|
114
114
|
* @memberof TransactionSummary
|
|
115
115
|
*/
|
|
116
|
-
import_payee_name_original?: string
|
|
116
|
+
import_payee_name_original?: string;
|
|
117
117
|
/**
|
|
118
118
|
* If the transaction is a debt/loan account transaction, the type of transaction
|
|
119
119
|
* @type {TransactionSummaryDebtTransactionTypeEnum}
|
|
@@ -126,6 +126,18 @@ export interface TransactionSummary {
|
|
|
126
126
|
* @memberof TransactionSummary
|
|
127
127
|
*/
|
|
128
128
|
deleted: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* The transaction amount formatted in the plan's currency format
|
|
131
|
+
* @type {string}
|
|
132
|
+
* @memberof TransactionSummary
|
|
133
|
+
*/
|
|
134
|
+
amount_formatted?: string;
|
|
135
|
+
/**
|
|
136
|
+
* The transaction amount as a decimal currency amount
|
|
137
|
+
* @type {number}
|
|
138
|
+
* @memberof TransactionSummary
|
|
139
|
+
*/
|
|
140
|
+
amount_currency?: number;
|
|
129
141
|
}
|
|
130
142
|
/**
|
|
131
143
|
* @export
|
|
@@ -76,6 +76,8 @@ function TransactionSummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
76
76
|
'import_payee_name_original': json['import_payee_name_original'] == null ? undefined : json['import_payee_name_original'],
|
|
77
77
|
'debt_transaction_type': json['debt_transaction_type'] == null ? undefined : json['debt_transaction_type'],
|
|
78
78
|
'deleted': json['deleted'],
|
|
79
|
+
'amount_formatted': json['amount_formatted'] == null ? undefined : json['amount_formatted'],
|
|
80
|
+
'amount_currency': json['amount_currency'] == null ? undefined : json['amount_currency'],
|
|
79
81
|
};
|
|
80
82
|
}
|
|
81
83
|
function TransactionSummaryToJSON(json) {
|
|
@@ -105,5 +107,7 @@ function TransactionSummaryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
105
107
|
'import_payee_name_original': value['import_payee_name_original'],
|
|
106
108
|
'debt_transaction_type': value['debt_transaction_type'],
|
|
107
109
|
'deleted': value['deleted'],
|
|
110
|
+
'amount_formatted': value['amount_formatted'],
|
|
111
|
+
'amount_currency': value['amount_currency'],
|
|
108
112
|
};
|
|
109
113
|
}
|
|
@@ -0,0 +1,151 @@
|
|
|
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 { TransactionFlagColor } from './TransactionFlagColor';
|
|
8
|
+
import type { TransactionClearedStatus } from './TransactionClearedStatus';
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @export
|
|
12
|
+
* @interface TransactionSummaryBase
|
|
13
|
+
*/
|
|
14
|
+
export interface TransactionSummaryBase {
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @type {string}
|
|
18
|
+
* @memberof TransactionSummaryBase
|
|
19
|
+
*/
|
|
20
|
+
id: string;
|
|
21
|
+
/**
|
|
22
|
+
* The transaction date in ISO format (e.g. 2016-12-01)
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof TransactionSummaryBase
|
|
25
|
+
*/
|
|
26
|
+
date: string;
|
|
27
|
+
/**
|
|
28
|
+
* The transaction amount in milliunits format
|
|
29
|
+
* @type {number}
|
|
30
|
+
* @memberof TransactionSummaryBase
|
|
31
|
+
*/
|
|
32
|
+
amount: number;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof TransactionSummaryBase
|
|
37
|
+
*/
|
|
38
|
+
memo?: string | null;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @type {TransactionClearedStatus}
|
|
42
|
+
* @memberof TransactionSummaryBase
|
|
43
|
+
*/
|
|
44
|
+
cleared: TransactionClearedStatus;
|
|
45
|
+
/**
|
|
46
|
+
* Whether or not the transaction is approved
|
|
47
|
+
* @type {boolean}
|
|
48
|
+
* @memberof TransactionSummaryBase
|
|
49
|
+
*/
|
|
50
|
+
approved: boolean;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {TransactionFlagColor}
|
|
54
|
+
* @memberof TransactionSummaryBase
|
|
55
|
+
*/
|
|
56
|
+
flag_color?: TransactionFlagColor | null;
|
|
57
|
+
/**
|
|
58
|
+
* The customized name of a transaction flag
|
|
59
|
+
* @type {string}
|
|
60
|
+
* @memberof TransactionSummaryBase
|
|
61
|
+
*/
|
|
62
|
+
flag_name?: string | null;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @type {string}
|
|
66
|
+
* @memberof TransactionSummaryBase
|
|
67
|
+
*/
|
|
68
|
+
account_id: string;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @type {string}
|
|
72
|
+
* @memberof TransactionSummaryBase
|
|
73
|
+
*/
|
|
74
|
+
payee_id?: string | null;
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @type {string}
|
|
78
|
+
* @memberof TransactionSummaryBase
|
|
79
|
+
*/
|
|
80
|
+
category_id?: string | null;
|
|
81
|
+
/**
|
|
82
|
+
* If a transfer transaction, the account to which it transfers
|
|
83
|
+
* @type {string}
|
|
84
|
+
* @memberof TransactionSummaryBase
|
|
85
|
+
*/
|
|
86
|
+
transfer_account_id?: string | null;
|
|
87
|
+
/**
|
|
88
|
+
* If a transfer transaction, the id of transaction on the other side of the transfer
|
|
89
|
+
* @type {string}
|
|
90
|
+
* @memberof TransactionSummaryBase
|
|
91
|
+
*/
|
|
92
|
+
transfer_transaction_id?: string | null;
|
|
93
|
+
/**
|
|
94
|
+
* If transaction is matched, the id of the matched transaction
|
|
95
|
+
* @type {string}
|
|
96
|
+
* @memberof TransactionSummaryBase
|
|
97
|
+
*/
|
|
98
|
+
matched_transaction_id?: string | null;
|
|
99
|
+
/**
|
|
100
|
+
* If the transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'.
|
|
101
|
+
* @type {string}
|
|
102
|
+
* @memberof TransactionSummaryBase
|
|
103
|
+
*/
|
|
104
|
+
import_id?: string | null;
|
|
105
|
+
/**
|
|
106
|
+
* If the transaction was imported, the payee name that was used when importing and before applying any payee rename rules
|
|
107
|
+
* @type {string}
|
|
108
|
+
* @memberof TransactionSummaryBase
|
|
109
|
+
*/
|
|
110
|
+
import_payee_name?: string | null;
|
|
111
|
+
/**
|
|
112
|
+
* If the transaction was imported, the original payee name as it appeared on the statement
|
|
113
|
+
* @type {string}
|
|
114
|
+
* @memberof TransactionSummaryBase
|
|
115
|
+
*/
|
|
116
|
+
import_payee_name_original?: string | null;
|
|
117
|
+
/**
|
|
118
|
+
* If the transaction is a debt/loan account transaction, the type of transaction
|
|
119
|
+
* @type {TransactionSummaryBaseDebtTransactionTypeEnum}
|
|
120
|
+
* @memberof TransactionSummaryBase
|
|
121
|
+
*/
|
|
122
|
+
debt_transaction_type?: TransactionSummaryBaseDebtTransactionTypeEnum | null;
|
|
123
|
+
/**
|
|
124
|
+
* Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
|
|
125
|
+
* @type {boolean}
|
|
126
|
+
* @memberof TransactionSummaryBase
|
|
127
|
+
*/
|
|
128
|
+
deleted: boolean;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* @export
|
|
132
|
+
*/
|
|
133
|
+
export declare const TransactionSummaryBaseDebtTransactionTypeEnum: {
|
|
134
|
+
readonly Payment: "payment";
|
|
135
|
+
readonly Refund: "refund";
|
|
136
|
+
readonly Fee: "fee";
|
|
137
|
+
readonly Interest: "interest";
|
|
138
|
+
readonly Escrow: "escrow";
|
|
139
|
+
readonly BalanceAdjustment: "balanceAdjustment";
|
|
140
|
+
readonly Credit: "credit";
|
|
141
|
+
readonly Charge: "charge";
|
|
142
|
+
};
|
|
143
|
+
export type TransactionSummaryBaseDebtTransactionTypeEnum = typeof TransactionSummaryBaseDebtTransactionTypeEnum[keyof typeof TransactionSummaryBaseDebtTransactionTypeEnum];
|
|
144
|
+
/**
|
|
145
|
+
* Check if a given object implements the TransactionSummaryBase interface.
|
|
146
|
+
*/
|
|
147
|
+
export declare function instanceOfTransactionSummaryBase(value: object): value is TransactionSummaryBase;
|
|
148
|
+
export declare function TransactionSummaryBaseFromJSON(json: any): TransactionSummaryBase;
|
|
149
|
+
export declare function TransactionSummaryBaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionSummaryBase;
|
|
150
|
+
export declare function TransactionSummaryBaseToJSON(json: any): TransactionSummaryBase;
|
|
151
|
+
export declare function TransactionSummaryBaseToJSONTyped(value?: TransactionSummaryBase | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,109 @@
|
|
|
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.TransactionSummaryBaseDebtTransactionTypeEnum = void 0;
|
|
12
|
+
exports.instanceOfTransactionSummaryBase = instanceOfTransactionSummaryBase;
|
|
13
|
+
exports.TransactionSummaryBaseFromJSON = TransactionSummaryBaseFromJSON;
|
|
14
|
+
exports.TransactionSummaryBaseFromJSONTyped = TransactionSummaryBaseFromJSONTyped;
|
|
15
|
+
exports.TransactionSummaryBaseToJSON = TransactionSummaryBaseToJSON;
|
|
16
|
+
exports.TransactionSummaryBaseToJSONTyped = TransactionSummaryBaseToJSONTyped;
|
|
17
|
+
const TransactionFlagColor_1 = require("./TransactionFlagColor");
|
|
18
|
+
const TransactionClearedStatus_1 = require("./TransactionClearedStatus");
|
|
19
|
+
/**
|
|
20
|
+
* @export
|
|
21
|
+
*/
|
|
22
|
+
exports.TransactionSummaryBaseDebtTransactionTypeEnum = {
|
|
23
|
+
Payment: 'payment',
|
|
24
|
+
Refund: 'refund',
|
|
25
|
+
Fee: 'fee',
|
|
26
|
+
Interest: 'interest',
|
|
27
|
+
Escrow: 'escrow',
|
|
28
|
+
BalanceAdjustment: 'balanceAdjustment',
|
|
29
|
+
Credit: 'credit',
|
|
30
|
+
Charge: 'charge'
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the TransactionSummaryBase interface.
|
|
34
|
+
*/
|
|
35
|
+
function instanceOfTransactionSummaryBase(value) {
|
|
36
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('date' in value) || value['date'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('amount' in value) || value['amount'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('cleared' in value) || value['cleared'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
if (!('approved' in value) || value['approved'] === undefined)
|
|
45
|
+
return false;
|
|
46
|
+
if (!('account_id' in value) || value['account_id'] === undefined)
|
|
47
|
+
return false;
|
|
48
|
+
if (!('deleted' in value) || value['deleted'] === undefined)
|
|
49
|
+
return false;
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
function TransactionSummaryBaseFromJSON(json) {
|
|
53
|
+
return TransactionSummaryBaseFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
function TransactionSummaryBaseFromJSONTyped(json, ignoreDiscriminator) {
|
|
56
|
+
if (json == null) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
'id': json['id'],
|
|
61
|
+
'date': json['date'],
|
|
62
|
+
'amount': json['amount'],
|
|
63
|
+
'memo': json['memo'] == null ? undefined : json['memo'],
|
|
64
|
+
'cleared': (0, TransactionClearedStatus_1.TransactionClearedStatusFromJSON)(json['cleared']),
|
|
65
|
+
'approved': json['approved'],
|
|
66
|
+
'flag_color': json['flag_color'] == null ? undefined : (0, TransactionFlagColor_1.TransactionFlagColorFromJSON)(json['flag_color']),
|
|
67
|
+
'flag_name': json['flag_name'] == null ? undefined : json['flag_name'],
|
|
68
|
+
'account_id': json['account_id'],
|
|
69
|
+
'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
|
|
70
|
+
'category_id': json['category_id'] == null ? undefined : json['category_id'],
|
|
71
|
+
'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
|
|
72
|
+
'transfer_transaction_id': json['transfer_transaction_id'] == null ? undefined : json['transfer_transaction_id'],
|
|
73
|
+
'matched_transaction_id': json['matched_transaction_id'] == null ? undefined : json['matched_transaction_id'],
|
|
74
|
+
'import_id': json['import_id'] == null ? undefined : json['import_id'],
|
|
75
|
+
'import_payee_name': json['import_payee_name'] == null ? undefined : json['import_payee_name'],
|
|
76
|
+
'import_payee_name_original': json['import_payee_name_original'] == null ? undefined : json['import_payee_name_original'],
|
|
77
|
+
'debt_transaction_type': json['debt_transaction_type'] == null ? undefined : json['debt_transaction_type'],
|
|
78
|
+
'deleted': json['deleted'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function TransactionSummaryBaseToJSON(json) {
|
|
82
|
+
return TransactionSummaryBaseToJSONTyped(json, false);
|
|
83
|
+
}
|
|
84
|
+
function TransactionSummaryBaseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
85
|
+
if (value == null) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
'id': value['id'],
|
|
90
|
+
'date': value['date'],
|
|
91
|
+
'amount': value['amount'],
|
|
92
|
+
'memo': value['memo'],
|
|
93
|
+
'cleared': (0, TransactionClearedStatus_1.TransactionClearedStatusToJSON)(value['cleared']),
|
|
94
|
+
'approved': value['approved'],
|
|
95
|
+
'flag_color': (0, TransactionFlagColor_1.TransactionFlagColorToJSON)(value['flag_color']),
|
|
96
|
+
'flag_name': value['flag_name'],
|
|
97
|
+
'account_id': value['account_id'],
|
|
98
|
+
'payee_id': value['payee_id'],
|
|
99
|
+
'category_id': value['category_id'],
|
|
100
|
+
'transfer_account_id': value['transfer_account_id'],
|
|
101
|
+
'transfer_transaction_id': value['transfer_transaction_id'],
|
|
102
|
+
'matched_transaction_id': value['matched_transaction_id'],
|
|
103
|
+
'import_id': value['import_id'],
|
|
104
|
+
'import_payee_name': value['import_payee_name'],
|
|
105
|
+
'import_payee_name_original': value['import_payee_name_original'],
|
|
106
|
+
'debt_transaction_type': value['debt_transaction_type'],
|
|
107
|
+
'deleted': value['deleted'],
|
|
108
|
+
};
|
|
109
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './Account';
|
|
2
|
+
export * from './AccountBase';
|
|
2
3
|
export * from './AccountResponse';
|
|
3
4
|
export * from './AccountResponseData';
|
|
4
5
|
export * from './AccountType';
|
|
@@ -11,6 +12,7 @@ export * from './BulkTransactions';
|
|
|
11
12
|
export * from './CategoriesResponse';
|
|
12
13
|
export * from './CategoriesResponseData';
|
|
13
14
|
export * from './Category';
|
|
15
|
+
export * from './CategoryBase';
|
|
14
16
|
export * from './CategoryGroup';
|
|
15
17
|
export * from './CategoryGroupWithCategories';
|
|
16
18
|
export * from './CategoryResponse';
|
|
@@ -25,17 +27,20 @@ export * from './HybridTransaction';
|
|
|
25
27
|
export * from './HybridTransactionsResponse';
|
|
26
28
|
export * from './HybridTransactionsResponseData';
|
|
27
29
|
export * from './MoneyMovement';
|
|
30
|
+
export * from './MoneyMovementBase';
|
|
28
31
|
export * from './MoneyMovementGroup';
|
|
29
32
|
export * from './MoneyMovementGroupsResponse';
|
|
30
33
|
export * from './MoneyMovementGroupsResponseData';
|
|
31
34
|
export * from './MoneyMovementsResponse';
|
|
32
35
|
export * from './MoneyMovementsResponseData';
|
|
33
36
|
export * from './MonthDetail';
|
|
37
|
+
export * from './MonthDetailBase';
|
|
34
38
|
export * from './MonthDetailResponse';
|
|
35
39
|
export * from './MonthDetailResponseData';
|
|
36
40
|
export * from './MonthSummariesResponse';
|
|
37
41
|
export * from './MonthSummariesResponseData';
|
|
38
42
|
export * from './MonthSummary';
|
|
43
|
+
export * from './MonthSummaryBase';
|
|
39
44
|
export * from './NewCategory';
|
|
40
45
|
export * from './NewTransaction';
|
|
41
46
|
export * from './PatchCategoryGroupWrapper';
|
|
@@ -65,11 +70,14 @@ export * from './PlanSummaryResponseData';
|
|
|
65
70
|
export * from './PostAccountWrapper';
|
|
66
71
|
export * from './PostCategoryGroupWrapper';
|
|
67
72
|
export * from './PostCategoryWrapper';
|
|
73
|
+
export * from './PostPayee';
|
|
74
|
+
export * from './PostPayeeWrapper';
|
|
68
75
|
export * from './PostScheduledTransactionWrapper';
|
|
69
76
|
export * from './PostTransactionsWrapper';
|
|
70
77
|
export * from './PutScheduledTransactionWrapper';
|
|
71
78
|
export * from './PutTransactionWrapper';
|
|
72
79
|
export * from './SaveAccount';
|
|
80
|
+
export * from './SaveAccountType';
|
|
73
81
|
export * from './SaveCategory';
|
|
74
82
|
export * from './SaveCategoryGroup';
|
|
75
83
|
export * from './SaveCategoryGroupResponse';
|
|
@@ -87,20 +95,24 @@ export * from './SaveTransactionWithOptionalFields';
|
|
|
87
95
|
export * from './SaveTransactionsResponse';
|
|
88
96
|
export * from './SaveTransactionsResponseData';
|
|
89
97
|
export * from './ScheduledSubTransaction';
|
|
98
|
+
export * from './ScheduledSubTransactionBase';
|
|
90
99
|
export * from './ScheduledTransactionDetail';
|
|
91
100
|
export * from './ScheduledTransactionFrequency';
|
|
92
101
|
export * from './ScheduledTransactionResponse';
|
|
93
102
|
export * from './ScheduledTransactionResponseData';
|
|
94
103
|
export * from './ScheduledTransactionSummary';
|
|
104
|
+
export * from './ScheduledTransactionSummaryBase';
|
|
95
105
|
export * from './ScheduledTransactionsResponse';
|
|
96
106
|
export * from './ScheduledTransactionsResponseData';
|
|
97
107
|
export * from './SubTransaction';
|
|
108
|
+
export * from './SubTransactionBase';
|
|
98
109
|
export * from './TransactionClearedStatus';
|
|
99
110
|
export * from './TransactionDetail';
|
|
100
111
|
export * from './TransactionFlagColor';
|
|
101
112
|
export * from './TransactionResponse';
|
|
102
113
|
export * from './TransactionResponseData';
|
|
103
114
|
export * from './TransactionSummary';
|
|
115
|
+
export * from './TransactionSummaryBase';
|
|
104
116
|
export * from './TransactionsImportResponse';
|
|
105
117
|
export * from './TransactionsImportResponseData';
|
|
106
118
|
export * from './TransactionsResponse';
|