ynab 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/dist/apis/AccountsApi.d.ts +1 -1
  2. package/dist/apis/AccountsApi.js +1 -1
  3. package/dist/apis/BudgetsApi.d.ts +1 -1
  4. package/dist/apis/BudgetsApi.js +1 -1
  5. package/dist/apis/CategoriesApi.d.ts +1 -1
  6. package/dist/apis/CategoriesApi.js +1 -1
  7. package/dist/apis/MonthsApi.d.ts +1 -1
  8. package/dist/apis/MonthsApi.js +1 -1
  9. package/dist/apis/PayeeLocationsApi.d.ts +1 -1
  10. package/dist/apis/PayeeLocationsApi.js +1 -1
  11. package/dist/apis/PayeesApi.d.ts +17 -2
  12. package/dist/apis/PayeesApi.js +43 -1
  13. package/dist/apis/ScheduledTransactionsApi.d.ts +1 -1
  14. package/dist/apis/ScheduledTransactionsApi.js +1 -1
  15. package/dist/apis/TransactionsApi.d.ts +9 -9
  16. package/dist/apis/TransactionsApi.js +9 -9
  17. package/dist/apis/UserApi.d.ts +1 -1
  18. package/dist/apis/UserApi.js +1 -1
  19. package/dist/browser/ynab.js +1 -1
  20. package/dist/models/Account.d.ts +8 -8
  21. package/dist/models/Account.js +51 -46
  22. package/dist/models/AccountResponse.d.ts +2 -2
  23. package/dist/models/AccountResponse.js +8 -11
  24. package/dist/models/AccountResponseData.d.ts +2 -2
  25. package/dist/models/AccountResponseData.js +8 -11
  26. package/dist/models/AccountType.d.ts +2 -1
  27. package/dist/models/AccountType.js +13 -2
  28. package/dist/models/AccountsResponse.d.ts +2 -2
  29. package/dist/models/AccountsResponse.js +8 -11
  30. package/dist/models/AccountsResponseData.d.ts +2 -2
  31. package/dist/models/AccountsResponseData.js +11 -13
  32. package/dist/models/BudgetDetail.d.ts +8 -8
  33. package/dist/models/BudgetDetail.js +45 -48
  34. package/dist/models/BudgetDetailResponse.d.ts +2 -2
  35. package/dist/models/BudgetDetailResponse.js +8 -11
  36. package/dist/models/BudgetDetailResponseData.d.ts +2 -2
  37. package/dist/models/BudgetDetailResponseData.js +11 -13
  38. package/dist/models/BudgetSettings.d.ts +2 -2
  39. package/dist/models/BudgetSettings.js +11 -13
  40. package/dist/models/BudgetSettingsResponse.d.ts +2 -2
  41. package/dist/models/BudgetSettingsResponse.js +8 -11
  42. package/dist/models/BudgetSettingsResponseData.d.ts +2 -2
  43. package/dist/models/BudgetSettingsResponseData.js +8 -11
  44. package/dist/models/BudgetSummary.d.ts +4 -4
  45. package/dist/models/BudgetSummary.js +23 -26
  46. package/dist/models/BudgetSummaryResponse.d.ts +2 -2
  47. package/dist/models/BudgetSummaryResponse.js +8 -11
  48. package/dist/models/BudgetSummaryResponseData.d.ts +2 -2
  49. package/dist/models/BudgetSummaryResponseData.js +10 -14
  50. package/dist/models/BulkResponse.d.ts +2 -2
  51. package/dist/models/BulkResponse.js +8 -11
  52. package/dist/models/BulkResponseData.d.ts +2 -2
  53. package/dist/models/BulkResponseData.js +8 -11
  54. package/dist/models/BulkResponseDataBulk.d.ts +2 -2
  55. package/dist/models/BulkResponseDataBulk.js +11 -13
  56. package/dist/models/BulkTransactions.d.ts +5 -5
  57. package/dist/models/BulkTransactions.js +10 -13
  58. package/dist/models/CategoriesResponse.d.ts +2 -2
  59. package/dist/models/CategoriesResponse.js +8 -11
  60. package/dist/models/CategoriesResponseData.d.ts +2 -2
  61. package/dist/models/CategoriesResponseData.js +11 -13
  62. package/dist/models/Category.d.ts +21 -15
  63. package/dist/models/Category.js +61 -56
  64. package/dist/models/CategoryGroup.d.ts +2 -2
  65. package/dist/models/CategoryGroup.js +17 -17
  66. package/dist/models/CategoryGroupWithCategories.d.ts +2 -2
  67. package/dist/models/CategoryGroupWithCategories.js +20 -19
  68. package/dist/models/CategoryResponse.d.ts +2 -2
  69. package/dist/models/CategoryResponse.js +8 -11
  70. package/dist/models/CategoryResponseData.d.ts +2 -2
  71. package/dist/models/CategoryResponseData.js +8 -11
  72. package/dist/models/CurrencyFormat.d.ts +2 -2
  73. package/dist/models/CurrencyFormat.js +29 -25
  74. package/dist/models/DateFormat.d.ts +2 -2
  75. package/dist/models/DateFormat.js +8 -11
  76. package/dist/models/ErrorDetail.d.ts +2 -2
  77. package/dist/models/ErrorDetail.js +14 -15
  78. package/dist/models/ErrorResponse.d.ts +2 -2
  79. package/dist/models/ErrorResponse.js +8 -11
  80. package/dist/models/ExistingTransaction.d.ts +94 -0
  81. package/dist/models/ExistingTransaction.js +68 -0
  82. package/dist/models/HybridTransaction.d.ts +21 -15
  83. package/dist/models/HybridTransaction.js +63 -57
  84. package/dist/models/HybridTransactionsResponse.d.ts +2 -2
  85. package/dist/models/HybridTransactionsResponse.js +8 -11
  86. package/dist/models/HybridTransactionsResponseData.d.ts +2 -2
  87. package/dist/models/HybridTransactionsResponseData.js +10 -14
  88. package/dist/models/MonthDetail.d.ts +4 -4
  89. package/dist/models/MonthDetail.js +30 -28
  90. package/dist/models/MonthDetailResponse.d.ts +2 -2
  91. package/dist/models/MonthDetailResponse.js +8 -11
  92. package/dist/models/MonthDetailResponseData.d.ts +2 -2
  93. package/dist/models/MonthDetailResponseData.js +8 -11
  94. package/dist/models/MonthSummariesResponse.d.ts +2 -2
  95. package/dist/models/MonthSummariesResponse.js +8 -11
  96. package/dist/models/MonthSummariesResponseData.d.ts +2 -2
  97. package/dist/models/MonthSummariesResponseData.js +11 -13
  98. package/dist/models/MonthSummary.d.ts +4 -4
  99. package/dist/models/MonthSummary.js +27 -26
  100. package/dist/models/NewTransaction.d.ts +100 -0
  101. package/dist/models/NewTransaction.js +70 -0
  102. package/dist/models/PatchCategoryWrapper.d.ts +2 -2
  103. package/dist/models/PatchCategoryWrapper.js +8 -11
  104. package/dist/models/PatchMonthCategoryWrapper.d.ts +2 -2
  105. package/dist/models/PatchMonthCategoryWrapper.js +8 -11
  106. package/dist/models/PatchPayeeWrapper.d.ts +32 -0
  107. package/dist/models/PatchPayeeWrapper.js +48 -0
  108. package/dist/models/PatchTransactionsWrapper.d.ts +5 -5
  109. package/dist/models/PatchTransactionsWrapper.js +10 -13
  110. package/dist/models/Payee.d.ts +3 -3
  111. package/dist/models/Payee.js +16 -18
  112. package/dist/models/PayeeLocation.d.ts +2 -2
  113. package/dist/models/PayeeLocation.js +20 -19
  114. package/dist/models/PayeeLocationResponse.d.ts +2 -2
  115. package/dist/models/PayeeLocationResponse.js +8 -11
  116. package/dist/models/PayeeLocationResponseData.d.ts +2 -2
  117. package/dist/models/PayeeLocationResponseData.js +8 -11
  118. package/dist/models/PayeeLocationsResponse.d.ts +2 -2
  119. package/dist/models/PayeeLocationsResponse.js +8 -11
  120. package/dist/models/PayeeLocationsResponseData.d.ts +2 -2
  121. package/dist/models/PayeeLocationsResponseData.js +8 -11
  122. package/dist/models/PayeeResponse.d.ts +2 -2
  123. package/dist/models/PayeeResponse.js +8 -11
  124. package/dist/models/PayeeResponseData.d.ts +2 -2
  125. package/dist/models/PayeeResponseData.js +8 -11
  126. package/dist/models/PayeesResponse.d.ts +2 -2
  127. package/dist/models/PayeesResponse.js +8 -11
  128. package/dist/models/PayeesResponseData.d.ts +2 -2
  129. package/dist/models/PayeesResponseData.js +11 -13
  130. package/dist/models/PostAccountWrapper.d.ts +2 -2
  131. package/dist/models/PostAccountWrapper.js +8 -11
  132. package/dist/models/PostTransactionsWrapper.d.ts +7 -7
  133. package/dist/models/PostTransactionsWrapper.js +10 -15
  134. package/dist/models/PutTransactionWrapper.d.ts +5 -5
  135. package/dist/models/PutTransactionWrapper.js +10 -13
  136. package/dist/models/SaveAccount.d.ts +2 -2
  137. package/dist/models/SaveAccount.js +14 -15
  138. package/dist/models/SaveCategory.d.ts +4 -4
  139. package/dist/models/SaveCategory.js +11 -16
  140. package/dist/models/SaveCategoryResponse.d.ts +2 -2
  141. package/dist/models/SaveCategoryResponse.js +8 -11
  142. package/dist/models/SaveCategoryResponseData.d.ts +2 -2
  143. package/dist/models/SaveCategoryResponseData.js +11 -13
  144. package/dist/models/SaveMonthCategory.d.ts +2 -2
  145. package/dist/models/SaveMonthCategory.js +8 -11
  146. package/dist/models/SavePayee.d.ts +31 -0
  147. package/dist/models/SavePayee.js +45 -0
  148. package/dist/models/SavePayeeResponse.d.ts +32 -0
  149. package/dist/models/SavePayeeResponse.js +48 -0
  150. package/dist/models/SavePayeeResponseData.d.ts +38 -0
  151. package/dist/models/SavePayeeResponseData.js +52 -0
  152. package/dist/models/SaveSubTransaction.d.ts +6 -6
  153. package/dist/models/SaveSubTransaction.js +16 -20
  154. package/dist/models/SaveTransactionWithIdOrImportId.d.ts +106 -0
  155. package/dist/models/SaveTransactionWithIdOrImportId.js +72 -0
  156. package/dist/models/SaveTransactionWithOptionalFields.d.ts +9 -15
  157. package/dist/models/SaveTransactionWithOptionalFields.js +29 -36
  158. package/dist/models/SaveTransactionsResponse.d.ts +2 -2
  159. package/dist/models/SaveTransactionsResponse.js +8 -11
  160. package/dist/models/SaveTransactionsResponseData.d.ts +2 -2
  161. package/dist/models/SaveTransactionsResponseData.js +17 -20
  162. package/dist/models/ScheduledSubTransaction.d.ts +6 -6
  163. package/dist/models/ScheduledSubTransaction.js +25 -26
  164. package/dist/models/ScheduledTransactionDetail.d.ts +16 -10
  165. package/dist/models/ScheduledTransactionDetail.js +49 -43
  166. package/dist/models/ScheduledTransactionResponse.d.ts +2 -2
  167. package/dist/models/ScheduledTransactionResponse.js +8 -11
  168. package/dist/models/ScheduledTransactionResponseData.d.ts +2 -2
  169. package/dist/models/ScheduledTransactionResponseData.js +8 -11
  170. package/dist/models/ScheduledTransactionSummary.d.ts +13 -7
  171. package/dist/models/ScheduledTransactionSummary.js +38 -34
  172. package/dist/models/ScheduledTransactionsResponse.d.ts +2 -2
  173. package/dist/models/ScheduledTransactionsResponse.js +8 -11
  174. package/dist/models/ScheduledTransactionsResponseData.d.ts +2 -2
  175. package/dist/models/ScheduledTransactionsResponseData.js +11 -13
  176. package/dist/models/SubTransaction.d.ts +9 -9
  177. package/dist/models/SubTransaction.js +31 -32
  178. package/dist/models/TransactionClearedStatus.d.ts +2 -1
  179. package/dist/models/TransactionClearedStatus.js +13 -2
  180. package/dist/models/TransactionDetail.d.ts +22 -16
  181. package/dist/models/TransactionDetail.js +62 -56
  182. package/dist/models/TransactionFlagColor.d.ts +2 -1
  183. package/dist/models/TransactionFlagColor.js +13 -2
  184. package/dist/models/TransactionResponse.d.ts +2 -2
  185. package/dist/models/TransactionResponse.js +8 -11
  186. package/dist/models/TransactionResponseData.d.ts +2 -2
  187. package/dist/models/TransactionResponseData.js +8 -11
  188. package/dist/models/TransactionSummary.d.ts +19 -13
  189. package/dist/models/TransactionSummary.js +51 -47
  190. package/dist/models/TransactionsImportResponse.d.ts +2 -2
  191. package/dist/models/TransactionsImportResponse.js +8 -11
  192. package/dist/models/TransactionsImportResponseData.d.ts +2 -2
  193. package/dist/models/TransactionsImportResponseData.js +8 -11
  194. package/dist/models/TransactionsResponse.d.ts +2 -2
  195. package/dist/models/TransactionsResponse.js +8 -11
  196. package/dist/models/TransactionsResponseData.d.ts +2 -2
  197. package/dist/models/TransactionsResponseData.js +11 -13
  198. package/dist/models/User.d.ts +2 -2
  199. package/dist/models/User.js +8 -11
  200. package/dist/models/UserResponse.d.ts +2 -2
  201. package/dist/models/UserResponse.js +8 -11
  202. package/dist/models/UserResponseData.d.ts +2 -2
  203. package/dist/models/UserResponseData.js +8 -11
  204. package/dist/models/index.d.ts +7 -9
  205. package/dist/models/index.js +7 -9
  206. package/dist/runtime.d.ts +1 -1
  207. package/dist/runtime.js +1 -1
  208. package/package.json +1 -1
@@ -2,7 +2,7 @@
2
2
  * YNAB API Endpoints
3
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
4
  *
5
- * The version of the OpenAPI document: 1.0.0
5
+ * The version of the OpenAPI document: 1.70.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -26,7 +26,7 @@ export interface TransactionResponseData {
26
26
  /**
27
27
  * Check if a given object implements the TransactionResponseData interface.
28
28
  */
29
- export declare function instanceOfTransactionResponseData(value: object): boolean;
29
+ export declare function instanceOfTransactionResponseData(value: object): value is TransactionResponseData;
30
30
  export declare function TransactionResponseDataFromJSON(json: any): TransactionResponseData;
31
31
  export declare function TransactionResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionResponseData;
32
32
  export declare function TransactionResponseDataToJSON(value?: TransactionResponseData | null): any;
@@ -5,7 +5,7 @@
5
5
  * YNAB API Endpoints
6
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
7
  *
8
- * The version of the OpenAPI document: 1.0.0
8
+ * The version of the OpenAPI document: 1.70.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -19,9 +19,9 @@ const TransactionDetail_1 = require("./TransactionDetail");
19
19
  * Check if a given object implements the TransactionResponseData interface.
20
20
  */
21
21
  function instanceOfTransactionResponseData(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "transaction" in value;
24
- return isInstance;
22
+ if (!('transaction' in value) || value['transaction'] === undefined)
23
+ return false;
24
+ return true;
25
25
  }
26
26
  exports.instanceOfTransactionResponseData = instanceOfTransactionResponseData;
27
27
  function TransactionResponseDataFromJSON(json) {
@@ -29,7 +29,7 @@ function TransactionResponseDataFromJSON(json) {
29
29
  }
30
30
  exports.TransactionResponseDataFromJSON = TransactionResponseDataFromJSON;
31
31
  function TransactionResponseDataFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
32
+ if (json == null) {
33
33
  return json;
34
34
  }
35
35
  return {
@@ -38,14 +38,11 @@ function TransactionResponseDataFromJSONTyped(json, ignoreDiscriminator) {
38
38
  }
39
39
  exports.TransactionResponseDataFromJSONTyped = TransactionResponseDataFromJSONTyped;
40
40
  function TransactionResponseDataToJSON(value) {
41
- if (value === undefined) {
42
- return undefined;
43
- }
44
- if (value === null) {
45
- return null;
41
+ if (value == null) {
42
+ return value;
46
43
  }
47
44
  return {
48
- 'transaction': (0, TransactionDetail_1.TransactionDetailToJSON)(value.transaction),
45
+ 'transaction': (0, TransactionDetail_1.TransactionDetailToJSON)(value['transaction']),
49
46
  };
50
47
  }
51
48
  exports.TransactionResponseDataToJSON = TransactionResponseDataToJSON;
@@ -2,15 +2,15 @@
2
2
  * YNAB API Endpoints
3
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
4
  *
5
- * The version of the OpenAPI document: 1.0.0
5
+ * The version of the OpenAPI document: 1.70.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { TransactionClearedStatus } from './TransactionClearedStatus';
13
12
  import type { TransactionFlagColor } from './TransactionFlagColor';
13
+ import type { TransactionClearedStatus } from './TransactionClearedStatus';
14
14
  /**
15
15
  *
16
16
  * @export
@@ -40,7 +40,7 @@ export interface TransactionSummary {
40
40
  * @type {string}
41
41
  * @memberof TransactionSummary
42
42
  */
43
- memo?: string | null;
43
+ memo?: string;
44
44
  /**
45
45
  *
46
46
  * @type {TransactionClearedStatus}
@@ -58,7 +58,13 @@ export interface TransactionSummary {
58
58
  * @type {TransactionFlagColor}
59
59
  * @memberof TransactionSummary
60
60
  */
61
- flag_color?: TransactionFlagColor | null;
61
+ flag_color?: TransactionFlagColor;
62
+ /**
63
+ * The customized name of a transaction flag
64
+ * @type {string}
65
+ * @memberof TransactionSummary
66
+ */
67
+ flag_name?: string;
62
68
  /**
63
69
  *
64
70
  * @type {string}
@@ -70,49 +76,49 @@ export interface TransactionSummary {
70
76
  * @type {string}
71
77
  * @memberof TransactionSummary
72
78
  */
73
- payee_id?: string | null;
79
+ payee_id?: string;
74
80
  /**
75
81
  *
76
82
  * @type {string}
77
83
  * @memberof TransactionSummary
78
84
  */
79
- category_id?: string | null;
85
+ category_id?: string;
80
86
  /**
81
87
  * If a transfer transaction, the account to which it transfers
82
88
  * @type {string}
83
89
  * @memberof TransactionSummary
84
90
  */
85
- transfer_account_id?: string | null;
91
+ transfer_account_id?: string;
86
92
  /**
87
93
  * If a transfer transaction, the id of transaction on the other side of the transfer
88
94
  * @type {string}
89
95
  * @memberof TransactionSummary
90
96
  */
91
- transfer_transaction_id?: string | null;
97
+ transfer_transaction_id?: string;
92
98
  /**
93
99
  * If transaction is matched, the id of the matched transaction
94
100
  * @type {string}
95
101
  * @memberof TransactionSummary
96
102
  */
97
- matched_transaction_id?: string | null;
103
+ matched_transaction_id?: string;
98
104
  /**
99
105
  * 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'.
100
106
  * @type {string}
101
107
  * @memberof TransactionSummary
102
108
  */
103
- import_id?: string | null;
109
+ import_id?: string;
104
110
  /**
105
111
  * If the transaction was imported, the payee name that was used when importing and before applying any payee rename rules
106
112
  * @type {string}
107
113
  * @memberof TransactionSummary
108
114
  */
109
- import_payee_name?: string | null;
115
+ import_payee_name?: string;
110
116
  /**
111
117
  * If the transaction was imported, the original payee name as it appeared on the statement
112
118
  * @type {string}
113
119
  * @memberof TransactionSummary
114
120
  */
115
- import_payee_name_original?: string | null;
121
+ import_payee_name_original?: string;
116
122
  /**
117
123
  * If the transaction is a debt/loan account transaction, the type of transaction
118
124
  * @type {string}
@@ -143,7 +149,7 @@ export type TransactionSummaryDebtTransactionTypeEnum = typeof TransactionSummar
143
149
  /**
144
150
  * Check if a given object implements the TransactionSummary interface.
145
151
  */
146
- export declare function instanceOfTransactionSummary(value: object): boolean;
152
+ export declare function instanceOfTransactionSummary(value: object): value is TransactionSummary;
147
153
  export declare function TransactionSummaryFromJSON(json: any): TransactionSummary;
148
154
  export declare function TransactionSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionSummary;
149
155
  export declare function TransactionSummaryToJSON(value?: TransactionSummary | null): any;
@@ -5,7 +5,7 @@
5
5
  * YNAB API Endpoints
6
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
7
  *
8
- * The version of the OpenAPI document: 1.0.0
8
+ * The version of the OpenAPI document: 1.70.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,9 +14,8 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.TransactionSummaryToJSON = exports.TransactionSummaryFromJSONTyped = exports.TransactionSummaryFromJSON = exports.instanceOfTransactionSummary = exports.TransactionSummaryDebtTransactionTypeEnum = void 0;
17
- const runtime_1 = require("../runtime");
18
- const TransactionClearedStatus_1 = require("./TransactionClearedStatus");
19
17
  const TransactionFlagColor_1 = require("./TransactionFlagColor");
18
+ const TransactionClearedStatus_1 = require("./TransactionClearedStatus");
20
19
  /**
21
20
  * @export
22
21
  */
@@ -34,15 +33,21 @@ exports.TransactionSummaryDebtTransactionTypeEnum = {
34
33
  * Check if a given object implements the TransactionSummary interface.
35
34
  */
36
35
  function instanceOfTransactionSummary(value) {
37
- let isInstance = true;
38
- isInstance = isInstance && "id" in value;
39
- isInstance = isInstance && "date" in value;
40
- isInstance = isInstance && "amount" in value;
41
- isInstance = isInstance && "cleared" in value;
42
- isInstance = isInstance && "approved" in value;
43
- isInstance = isInstance && "account_id" in value;
44
- isInstance = isInstance && "deleted" in value;
45
- return isInstance;
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;
46
51
  }
47
52
  exports.instanceOfTransactionSummary = instanceOfTransactionSummary;
48
53
  function TransactionSummaryFromJSON(json) {
@@ -50,57 +55,56 @@ function TransactionSummaryFromJSON(json) {
50
55
  }
51
56
  exports.TransactionSummaryFromJSON = TransactionSummaryFromJSON;
52
57
  function TransactionSummaryFromJSONTyped(json, ignoreDiscriminator) {
53
- if ((json === undefined) || (json === null)) {
58
+ if (json == null) {
54
59
  return json;
55
60
  }
56
61
  return {
57
62
  'id': json['id'],
58
63
  'date': json['date'],
59
64
  'amount': json['amount'],
60
- 'memo': !(0, runtime_1.exists)(json, 'memo') ? undefined : json['memo'],
65
+ 'memo': json['memo'] == null ? undefined : json['memo'],
61
66
  'cleared': (0, TransactionClearedStatus_1.TransactionClearedStatusFromJSON)(json['cleared']),
62
67
  'approved': json['approved'],
63
- 'flag_color': !(0, runtime_1.exists)(json, 'flag_color') ? undefined : (0, TransactionFlagColor_1.TransactionFlagColorFromJSON)(json['flag_color']),
68
+ 'flag_color': json['flag_color'] == null ? undefined : (0, TransactionFlagColor_1.TransactionFlagColorFromJSON)(json['flag_color']),
69
+ 'flag_name': json['flag_name'] == null ? undefined : json['flag_name'],
64
70
  'account_id': json['account_id'],
65
- 'payee_id': !(0, runtime_1.exists)(json, 'payee_id') ? undefined : json['payee_id'],
66
- 'category_id': !(0, runtime_1.exists)(json, 'category_id') ? undefined : json['category_id'],
67
- 'transfer_account_id': !(0, runtime_1.exists)(json, 'transfer_account_id') ? undefined : json['transfer_account_id'],
68
- 'transfer_transaction_id': !(0, runtime_1.exists)(json, 'transfer_transaction_id') ? undefined : json['transfer_transaction_id'],
69
- 'matched_transaction_id': !(0, runtime_1.exists)(json, 'matched_transaction_id') ? undefined : json['matched_transaction_id'],
70
- 'import_id': !(0, runtime_1.exists)(json, 'import_id') ? undefined : json['import_id'],
71
- 'import_payee_name': !(0, runtime_1.exists)(json, 'import_payee_name') ? undefined : json['import_payee_name'],
72
- 'import_payee_name_original': !(0, runtime_1.exists)(json, 'import_payee_name_original') ? undefined : json['import_payee_name_original'],
73
- 'debt_transaction_type': !(0, runtime_1.exists)(json, 'debt_transaction_type') ? undefined : json['debt_transaction_type'],
71
+ 'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
72
+ 'category_id': json['category_id'] == null ? undefined : json['category_id'],
73
+ 'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
74
+ 'transfer_transaction_id': json['transfer_transaction_id'] == null ? undefined : json['transfer_transaction_id'],
75
+ 'matched_transaction_id': json['matched_transaction_id'] == null ? undefined : json['matched_transaction_id'],
76
+ 'import_id': json['import_id'] == null ? undefined : json['import_id'],
77
+ 'import_payee_name': json['import_payee_name'] == null ? undefined : json['import_payee_name'],
78
+ 'import_payee_name_original': json['import_payee_name_original'] == null ? undefined : json['import_payee_name_original'],
79
+ 'debt_transaction_type': json['debt_transaction_type'] == null ? undefined : json['debt_transaction_type'],
74
80
  'deleted': json['deleted'],
75
81
  };
76
82
  }
77
83
  exports.TransactionSummaryFromJSONTyped = TransactionSummaryFromJSONTyped;
78
84
  function TransactionSummaryToJSON(value) {
79
- if (value === undefined) {
80
- return undefined;
81
- }
82
- if (value === null) {
83
- return null;
85
+ if (value == null) {
86
+ return value;
84
87
  }
85
88
  return {
86
- 'id': value.id,
87
- 'date': value.date,
88
- 'amount': value.amount,
89
- 'memo': value.memo,
90
- 'cleared': (0, TransactionClearedStatus_1.TransactionClearedStatusToJSON)(value.cleared),
91
- 'approved': value.approved,
92
- 'flag_color': (0, TransactionFlagColor_1.TransactionFlagColorToJSON)(value.flag_color),
93
- 'account_id': value.account_id,
94
- 'payee_id': value.payee_id,
95
- 'category_id': value.category_id,
96
- 'transfer_account_id': value.transfer_account_id,
97
- 'transfer_transaction_id': value.transfer_transaction_id,
98
- 'matched_transaction_id': value.matched_transaction_id,
99
- 'import_id': value.import_id,
100
- 'import_payee_name': value.import_payee_name,
101
- 'import_payee_name_original': value.import_payee_name_original,
102
- 'debt_transaction_type': value.debt_transaction_type,
103
- 'deleted': value.deleted,
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'],
104
108
  };
105
109
  }
106
110
  exports.TransactionSummaryToJSON = TransactionSummaryToJSON;
@@ -2,7 +2,7 @@
2
2
  * YNAB API Endpoints
3
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
4
  *
5
- * The version of the OpenAPI document: 1.0.0
5
+ * The version of the OpenAPI document: 1.70.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -26,7 +26,7 @@ export interface TransactionsImportResponse {
26
26
  /**
27
27
  * Check if a given object implements the TransactionsImportResponse interface.
28
28
  */
29
- export declare function instanceOfTransactionsImportResponse(value: object): boolean;
29
+ export declare function instanceOfTransactionsImportResponse(value: object): value is TransactionsImportResponse;
30
30
  export declare function TransactionsImportResponseFromJSON(json: any): TransactionsImportResponse;
31
31
  export declare function TransactionsImportResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionsImportResponse;
32
32
  export declare function TransactionsImportResponseToJSON(value?: TransactionsImportResponse | null): any;
@@ -5,7 +5,7 @@
5
5
  * YNAB API Endpoints
6
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
7
  *
8
- * The version of the OpenAPI document: 1.0.0
8
+ * The version of the OpenAPI document: 1.70.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -19,9 +19,9 @@ const TransactionsImportResponseData_1 = require("./TransactionsImportResponseDa
19
19
  * Check if a given object implements the TransactionsImportResponse interface.
20
20
  */
21
21
  function instanceOfTransactionsImportResponse(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "data" in value;
24
- return isInstance;
22
+ if (!('data' in value) || value['data'] === undefined)
23
+ return false;
24
+ return true;
25
25
  }
26
26
  exports.instanceOfTransactionsImportResponse = instanceOfTransactionsImportResponse;
27
27
  function TransactionsImportResponseFromJSON(json) {
@@ -29,7 +29,7 @@ function TransactionsImportResponseFromJSON(json) {
29
29
  }
30
30
  exports.TransactionsImportResponseFromJSON = TransactionsImportResponseFromJSON;
31
31
  function TransactionsImportResponseFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
32
+ if (json == null) {
33
33
  return json;
34
34
  }
35
35
  return {
@@ -38,14 +38,11 @@ function TransactionsImportResponseFromJSONTyped(json, ignoreDiscriminator) {
38
38
  }
39
39
  exports.TransactionsImportResponseFromJSONTyped = TransactionsImportResponseFromJSONTyped;
40
40
  function TransactionsImportResponseToJSON(value) {
41
- if (value === undefined) {
42
- return undefined;
43
- }
44
- if (value === null) {
45
- return null;
41
+ if (value == null) {
42
+ return value;
46
43
  }
47
44
  return {
48
- 'data': (0, TransactionsImportResponseData_1.TransactionsImportResponseDataToJSON)(value.data),
45
+ 'data': (0, TransactionsImportResponseData_1.TransactionsImportResponseDataToJSON)(value['data']),
49
46
  };
50
47
  }
51
48
  exports.TransactionsImportResponseToJSON = TransactionsImportResponseToJSON;
@@ -2,7 +2,7 @@
2
2
  * YNAB API Endpoints
3
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
4
  *
5
- * The version of the OpenAPI document: 1.0.0
5
+ * The version of the OpenAPI document: 1.70.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -25,7 +25,7 @@ export interface TransactionsImportResponseData {
25
25
  /**
26
26
  * Check if a given object implements the TransactionsImportResponseData interface.
27
27
  */
28
- export declare function instanceOfTransactionsImportResponseData(value: object): boolean;
28
+ export declare function instanceOfTransactionsImportResponseData(value: object): value is TransactionsImportResponseData;
29
29
  export declare function TransactionsImportResponseDataFromJSON(json: any): TransactionsImportResponseData;
30
30
  export declare function TransactionsImportResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionsImportResponseData;
31
31
  export declare function TransactionsImportResponseDataToJSON(value?: TransactionsImportResponseData | null): any;
@@ -5,7 +5,7 @@
5
5
  * YNAB API Endpoints
6
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
7
  *
8
- * The version of the OpenAPI document: 1.0.0
8
+ * The version of the OpenAPI document: 1.70.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -18,9 +18,9 @@ exports.TransactionsImportResponseDataToJSON = exports.TransactionsImportRespons
18
18
  * Check if a given object implements the TransactionsImportResponseData interface.
19
19
  */
20
20
  function instanceOfTransactionsImportResponseData(value) {
21
- let isInstance = true;
22
- isInstance = isInstance && "transaction_ids" in value;
23
- return isInstance;
21
+ if (!('transaction_ids' in value) || value['transaction_ids'] === undefined)
22
+ return false;
23
+ return true;
24
24
  }
25
25
  exports.instanceOfTransactionsImportResponseData = instanceOfTransactionsImportResponseData;
26
26
  function TransactionsImportResponseDataFromJSON(json) {
@@ -28,7 +28,7 @@ function TransactionsImportResponseDataFromJSON(json) {
28
28
  }
29
29
  exports.TransactionsImportResponseDataFromJSON = TransactionsImportResponseDataFromJSON;
30
30
  function TransactionsImportResponseDataFromJSONTyped(json, ignoreDiscriminator) {
31
- if ((json === undefined) || (json === null)) {
31
+ if (json == null) {
32
32
  return json;
33
33
  }
34
34
  return {
@@ -37,14 +37,11 @@ function TransactionsImportResponseDataFromJSONTyped(json, ignoreDiscriminator)
37
37
  }
38
38
  exports.TransactionsImportResponseDataFromJSONTyped = TransactionsImportResponseDataFromJSONTyped;
39
39
  function TransactionsImportResponseDataToJSON(value) {
40
- if (value === undefined) {
41
- return undefined;
42
- }
43
- if (value === null) {
44
- return null;
40
+ if (value == null) {
41
+ return value;
45
42
  }
46
43
  return {
47
- 'transaction_ids': value.transaction_ids,
44
+ 'transaction_ids': value['transaction_ids'],
48
45
  };
49
46
  }
50
47
  exports.TransactionsImportResponseDataToJSON = TransactionsImportResponseDataToJSON;
@@ -2,7 +2,7 @@
2
2
  * YNAB API Endpoints
3
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
4
  *
5
- * The version of the OpenAPI document: 1.0.0
5
+ * The version of the OpenAPI document: 1.70.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -26,7 +26,7 @@ export interface TransactionsResponse {
26
26
  /**
27
27
  * Check if a given object implements the TransactionsResponse interface.
28
28
  */
29
- export declare function instanceOfTransactionsResponse(value: object): boolean;
29
+ export declare function instanceOfTransactionsResponse(value: object): value is TransactionsResponse;
30
30
  export declare function TransactionsResponseFromJSON(json: any): TransactionsResponse;
31
31
  export declare function TransactionsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionsResponse;
32
32
  export declare function TransactionsResponseToJSON(value?: TransactionsResponse | null): any;
@@ -5,7 +5,7 @@
5
5
  * YNAB API Endpoints
6
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
7
  *
8
- * The version of the OpenAPI document: 1.0.0
8
+ * The version of the OpenAPI document: 1.70.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -19,9 +19,9 @@ const TransactionsResponseData_1 = require("./TransactionsResponseData");
19
19
  * Check if a given object implements the TransactionsResponse interface.
20
20
  */
21
21
  function instanceOfTransactionsResponse(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "data" in value;
24
- return isInstance;
22
+ if (!('data' in value) || value['data'] === undefined)
23
+ return false;
24
+ return true;
25
25
  }
26
26
  exports.instanceOfTransactionsResponse = instanceOfTransactionsResponse;
27
27
  function TransactionsResponseFromJSON(json) {
@@ -29,7 +29,7 @@ function TransactionsResponseFromJSON(json) {
29
29
  }
30
30
  exports.TransactionsResponseFromJSON = TransactionsResponseFromJSON;
31
31
  function TransactionsResponseFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
32
+ if (json == null) {
33
33
  return json;
34
34
  }
35
35
  return {
@@ -38,14 +38,11 @@ function TransactionsResponseFromJSONTyped(json, ignoreDiscriminator) {
38
38
  }
39
39
  exports.TransactionsResponseFromJSONTyped = TransactionsResponseFromJSONTyped;
40
40
  function TransactionsResponseToJSON(value) {
41
- if (value === undefined) {
42
- return undefined;
43
- }
44
- if (value === null) {
45
- return null;
41
+ if (value == null) {
42
+ return value;
46
43
  }
47
44
  return {
48
- 'data': (0, TransactionsResponseData_1.TransactionsResponseDataToJSON)(value.data),
45
+ 'data': (0, TransactionsResponseData_1.TransactionsResponseDataToJSON)(value['data']),
49
46
  };
50
47
  }
51
48
  exports.TransactionsResponseToJSON = TransactionsResponseToJSON;
@@ -2,7 +2,7 @@
2
2
  * YNAB API Endpoints
3
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
4
  *
5
- * The version of the OpenAPI document: 1.0.0
5
+ * The version of the OpenAPI document: 1.70.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -32,7 +32,7 @@ export interface TransactionsResponseData {
32
32
  /**
33
33
  * Check if a given object implements the TransactionsResponseData interface.
34
34
  */
35
- export declare function instanceOfTransactionsResponseData(value: object): boolean;
35
+ export declare function instanceOfTransactionsResponseData(value: object): value is TransactionsResponseData;
36
36
  export declare function TransactionsResponseDataFromJSON(json: any): TransactionsResponseData;
37
37
  export declare function TransactionsResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionsResponseData;
38
38
  export declare function TransactionsResponseDataToJSON(value?: TransactionsResponseData | null): any;
@@ -5,7 +5,7 @@
5
5
  * YNAB API Endpoints
6
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
7
  *
8
- * The version of the OpenAPI document: 1.0.0
8
+ * The version of the OpenAPI document: 1.70.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -19,10 +19,11 @@ const TransactionDetail_1 = require("./TransactionDetail");
19
19
  * Check if a given object implements the TransactionsResponseData interface.
20
20
  */
21
21
  function instanceOfTransactionsResponseData(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "transactions" in value;
24
- isInstance = isInstance && "server_knowledge" in value;
25
- return isInstance;
22
+ if (!('transactions' in value) || value['transactions'] === undefined)
23
+ return false;
24
+ if (!('server_knowledge' in value) || value['server_knowledge'] === undefined)
25
+ return false;
26
+ return true;
26
27
  }
27
28
  exports.instanceOfTransactionsResponseData = instanceOfTransactionsResponseData;
28
29
  function TransactionsResponseDataFromJSON(json) {
@@ -30,7 +31,7 @@ function TransactionsResponseDataFromJSON(json) {
30
31
  }
31
32
  exports.TransactionsResponseDataFromJSON = TransactionsResponseDataFromJSON;
32
33
  function TransactionsResponseDataFromJSONTyped(json, ignoreDiscriminator) {
33
- if ((json === undefined) || (json === null)) {
34
+ if (json == null) {
34
35
  return json;
35
36
  }
36
37
  return {
@@ -40,15 +41,12 @@ function TransactionsResponseDataFromJSONTyped(json, ignoreDiscriminator) {
40
41
  }
41
42
  exports.TransactionsResponseDataFromJSONTyped = TransactionsResponseDataFromJSONTyped;
42
43
  function TransactionsResponseDataToJSON(value) {
43
- if (value === undefined) {
44
- return undefined;
45
- }
46
- if (value === null) {
47
- return null;
44
+ if (value == null) {
45
+ return value;
48
46
  }
49
47
  return {
50
- 'transactions': (value.transactions.map(TransactionDetail_1.TransactionDetailToJSON)),
51
- 'server_knowledge': value.server_knowledge,
48
+ 'transactions': (value['transactions'].map(TransactionDetail_1.TransactionDetailToJSON)),
49
+ 'server_knowledge': value['server_knowledge'],
52
50
  };
53
51
  }
54
52
  exports.TransactionsResponseDataToJSON = TransactionsResponseDataToJSON;
@@ -2,7 +2,7 @@
2
2
  * YNAB API Endpoints
3
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
4
  *
5
- * The version of the OpenAPI document: 1.0.0
5
+ * The version of the OpenAPI document: 1.70.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -25,7 +25,7 @@ export interface User {
25
25
  /**
26
26
  * Check if a given object implements the User interface.
27
27
  */
28
- export declare function instanceOfUser(value: object): boolean;
28
+ export declare function instanceOfUser(value: object): value is User;
29
29
  export declare function UserFromJSON(json: any): User;
30
30
  export declare function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User;
31
31
  export declare function UserToJSON(value?: User | null): any;