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).
@@ -38,43 +38,43 @@ export interface SubTransaction {
38
38
  * @type {string}
39
39
  * @memberof SubTransaction
40
40
  */
41
- memo?: string | null;
41
+ memo?: string;
42
42
  /**
43
43
  *
44
44
  * @type {string}
45
45
  * @memberof SubTransaction
46
46
  */
47
- payee_id?: string | null;
47
+ payee_id?: string;
48
48
  /**
49
49
  *
50
50
  * @type {string}
51
51
  * @memberof SubTransaction
52
52
  */
53
- payee_name?: string | null;
53
+ payee_name?: string;
54
54
  /**
55
55
  *
56
56
  * @type {string}
57
57
  * @memberof SubTransaction
58
58
  */
59
- category_id?: string | null;
59
+ category_id?: string;
60
60
  /**
61
61
  *
62
62
  * @type {string}
63
63
  * @memberof SubTransaction
64
64
  */
65
- category_name?: string | null;
65
+ category_name?: string;
66
66
  /**
67
67
  * If a transfer, the account_id which the subtransaction transfers to
68
68
  * @type {string}
69
69
  * @memberof SubTransaction
70
70
  */
71
- transfer_account_id?: string | null;
71
+ transfer_account_id?: string;
72
72
  /**
73
73
  * If a transfer, the id of transaction on the other side of the transfer
74
74
  * @type {string}
75
75
  * @memberof SubTransaction
76
76
  */
77
- transfer_transaction_id?: string | null;
77
+ transfer_transaction_id?: string;
78
78
  /**
79
79
  * Whether or not the subtransaction has been deleted. Deleted subtransactions will only be included in delta requests.
80
80
  * @type {boolean}
@@ -85,7 +85,7 @@ export interface SubTransaction {
85
85
  /**
86
86
  * Check if a given object implements the SubTransaction interface.
87
87
  */
88
- export declare function instanceOfSubTransaction(value: object): boolean;
88
+ export declare function instanceOfSubTransaction(value: object): value is SubTransaction;
89
89
  export declare function SubTransactionFromJSON(json: any): SubTransaction;
90
90
  export declare function SubTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubTransaction;
91
91
  export declare function SubTransactionToJSON(value?: SubTransaction | 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,17 +14,19 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.SubTransactionToJSON = exports.SubTransactionFromJSONTyped = exports.SubTransactionFromJSON = exports.instanceOfSubTransaction = void 0;
17
- const runtime_1 = require("../runtime");
18
17
  /**
19
18
  * Check if a given object implements the SubTransaction interface.
20
19
  */
21
20
  function instanceOfSubTransaction(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "id" in value;
24
- isInstance = isInstance && "transaction_id" in value;
25
- isInstance = isInstance && "amount" in value;
26
- isInstance = isInstance && "deleted" in value;
27
- return isInstance;
21
+ if (!('id' in value) || value['id'] === undefined)
22
+ return false;
23
+ if (!('transaction_id' in value) || value['transaction_id'] === undefined)
24
+ return false;
25
+ if (!('amount' in value) || value['amount'] === undefined)
26
+ return false;
27
+ if (!('deleted' in value) || value['deleted'] === undefined)
28
+ return false;
29
+ return true;
28
30
  }
29
31
  exports.instanceOfSubTransaction = instanceOfSubTransaction;
30
32
  function SubTransactionFromJSON(json) {
@@ -32,43 +34,40 @@ function SubTransactionFromJSON(json) {
32
34
  }
33
35
  exports.SubTransactionFromJSON = SubTransactionFromJSON;
34
36
  function SubTransactionFromJSONTyped(json, ignoreDiscriminator) {
35
- if ((json === undefined) || (json === null)) {
37
+ if (json == null) {
36
38
  return json;
37
39
  }
38
40
  return {
39
41
  'id': json['id'],
40
42
  'transaction_id': json['transaction_id'],
41
43
  'amount': json['amount'],
42
- 'memo': !(0, runtime_1.exists)(json, 'memo') ? undefined : json['memo'],
43
- 'payee_id': !(0, runtime_1.exists)(json, 'payee_id') ? undefined : json['payee_id'],
44
- 'payee_name': !(0, runtime_1.exists)(json, 'payee_name') ? undefined : json['payee_name'],
45
- 'category_id': !(0, runtime_1.exists)(json, 'category_id') ? undefined : json['category_id'],
46
- 'category_name': !(0, runtime_1.exists)(json, 'category_name') ? undefined : json['category_name'],
47
- 'transfer_account_id': !(0, runtime_1.exists)(json, 'transfer_account_id') ? undefined : json['transfer_account_id'],
48
- 'transfer_transaction_id': !(0, runtime_1.exists)(json, 'transfer_transaction_id') ? undefined : json['transfer_transaction_id'],
44
+ 'memo': json['memo'] == null ? undefined : json['memo'],
45
+ 'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
46
+ 'payee_name': json['payee_name'] == null ? undefined : json['payee_name'],
47
+ 'category_id': json['category_id'] == null ? undefined : json['category_id'],
48
+ 'category_name': json['category_name'] == null ? undefined : json['category_name'],
49
+ 'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
50
+ 'transfer_transaction_id': json['transfer_transaction_id'] == null ? undefined : json['transfer_transaction_id'],
49
51
  'deleted': json['deleted'],
50
52
  };
51
53
  }
52
54
  exports.SubTransactionFromJSONTyped = SubTransactionFromJSONTyped;
53
55
  function SubTransactionToJSON(value) {
54
- if (value === undefined) {
55
- return undefined;
56
- }
57
- if (value === null) {
58
- return null;
56
+ if (value == null) {
57
+ return value;
59
58
  }
60
59
  return {
61
- 'id': value.id,
62
- 'transaction_id': value.transaction_id,
63
- 'amount': value.amount,
64
- 'memo': value.memo,
65
- 'payee_id': value.payee_id,
66
- 'payee_name': value.payee_name,
67
- 'category_id': value.category_id,
68
- 'category_name': value.category_name,
69
- 'transfer_account_id': value.transfer_account_id,
70
- 'transfer_transaction_id': value.transfer_transaction_id,
71
- 'deleted': value.deleted,
60
+ 'id': value['id'],
61
+ 'transaction_id': value['transaction_id'],
62
+ 'amount': value['amount'],
63
+ 'memo': value['memo'],
64
+ 'payee_id': value['payee_id'],
65
+ 'payee_name': value['payee_name'],
66
+ 'category_id': value['category_id'],
67
+ 'category_name': value['category_name'],
68
+ 'transfer_account_id': value['transfer_account_id'],
69
+ 'transfer_transaction_id': value['transfer_transaction_id'],
70
+ 'deleted': value['deleted'],
72
71
  };
73
72
  }
74
73
  exports.SubTransactionToJSON = SubTransactionToJSON;
@@ -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).
@@ -19,6 +19,7 @@ export declare const TransactionClearedStatus: {
19
19
  readonly Reconciled: "reconciled";
20
20
  };
21
21
  export type TransactionClearedStatus = typeof TransactionClearedStatus[keyof typeof TransactionClearedStatus];
22
+ export declare function instanceOfTransactionClearedStatus(value: any): boolean;
22
23
  export declare function TransactionClearedStatusFromJSON(json: any): TransactionClearedStatus;
23
24
  export declare function TransactionClearedStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionClearedStatus;
24
25
  export declare function TransactionClearedStatusToJSON(value?: TransactionClearedStatus | 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).
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.TransactionClearedStatusToJSON = exports.TransactionClearedStatusFromJSONTyped = exports.TransactionClearedStatusFromJSON = exports.TransactionClearedStatus = void 0;
16
+ exports.TransactionClearedStatusToJSON = exports.TransactionClearedStatusFromJSONTyped = exports.TransactionClearedStatusFromJSON = exports.instanceOfTransactionClearedStatus = exports.TransactionClearedStatus = void 0;
17
17
  /**
18
18
  * The cleared status of the transaction
19
19
  * @export
@@ -23,6 +23,17 @@ exports.TransactionClearedStatus = {
23
23
  Uncleared: 'uncleared',
24
24
  Reconciled: 'reconciled'
25
25
  };
26
+ function instanceOfTransactionClearedStatus(value) {
27
+ for (const key in exports.TransactionClearedStatus) {
28
+ if (Object.prototype.hasOwnProperty.call(exports.TransactionClearedStatus, key)) {
29
+ if (exports.TransactionClearedStatus[key] === value) {
30
+ return true;
31
+ }
32
+ }
33
+ }
34
+ return false;
35
+ }
36
+ exports.instanceOfTransactionClearedStatus = instanceOfTransactionClearedStatus;
26
37
  function TransactionClearedStatusFromJSON(json) {
27
38
  return TransactionClearedStatusFromJSONTyped(json, false);
28
39
  }
@@ -2,16 +2,16 @@
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 { SubTransaction } from './SubTransaction';
13
- import type { TransactionClearedStatus } from './TransactionClearedStatus';
14
12
  import type { TransactionFlagColor } from './TransactionFlagColor';
13
+ import type { TransactionClearedStatus } from './TransactionClearedStatus';
14
+ import type { SubTransaction } from './SubTransaction';
15
15
  /**
16
16
  *
17
17
  * @export
@@ -41,7 +41,7 @@ export interface TransactionDetail {
41
41
  * @type {string}
42
42
  * @memberof TransactionDetail
43
43
  */
44
- memo?: string | null;
44
+ memo?: string;
45
45
  /**
46
46
  *
47
47
  * @type {TransactionClearedStatus}
@@ -59,7 +59,13 @@ export interface TransactionDetail {
59
59
  * @type {TransactionFlagColor}
60
60
  * @memberof TransactionDetail
61
61
  */
62
- flag_color?: TransactionFlagColor | null;
62
+ flag_color?: TransactionFlagColor;
63
+ /**
64
+ * The customized name of a transaction flag
65
+ * @type {string}
66
+ * @memberof TransactionDetail
67
+ */
68
+ flag_name?: string;
63
69
  /**
64
70
  *
65
71
  * @type {string}
@@ -71,49 +77,49 @@ export interface TransactionDetail {
71
77
  * @type {string}
72
78
  * @memberof TransactionDetail
73
79
  */
74
- payee_id?: string | null;
80
+ payee_id?: string;
75
81
  /**
76
82
  *
77
83
  * @type {string}
78
84
  * @memberof TransactionDetail
79
85
  */
80
- category_id?: string | null;
86
+ category_id?: string;
81
87
  /**
82
88
  * If a transfer transaction, the account to which it transfers
83
89
  * @type {string}
84
90
  * @memberof TransactionDetail
85
91
  */
86
- transfer_account_id?: string | null;
92
+ transfer_account_id?: string;
87
93
  /**
88
94
  * If a transfer transaction, the id of transaction on the other side of the transfer
89
95
  * @type {string}
90
96
  * @memberof TransactionDetail
91
97
  */
92
- transfer_transaction_id?: string | null;
98
+ transfer_transaction_id?: string;
93
99
  /**
94
100
  * If transaction is matched, the id of the matched transaction
95
101
  * @type {string}
96
102
  * @memberof TransactionDetail
97
103
  */
98
- matched_transaction_id?: string | null;
104
+ matched_transaction_id?: string;
99
105
  /**
100
106
  * 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
107
  * @type {string}
102
108
  * @memberof TransactionDetail
103
109
  */
104
- import_id?: string | null;
110
+ import_id?: string;
105
111
  /**
106
112
  * If the transaction was imported, the payee name that was used when importing and before applying any payee rename rules
107
113
  * @type {string}
108
114
  * @memberof TransactionDetail
109
115
  */
110
- import_payee_name?: string | null;
116
+ import_payee_name?: string;
111
117
  /**
112
118
  * If the transaction was imported, the original payee name as it appeared on the statement
113
119
  * @type {string}
114
120
  * @memberof TransactionDetail
115
121
  */
116
- import_payee_name_original?: string | null;
122
+ import_payee_name_original?: string;
117
123
  /**
118
124
  * If the transaction is a debt/loan account transaction, the type of transaction
119
125
  * @type {string}
@@ -137,13 +143,13 @@ export interface TransactionDetail {
137
143
  * @type {string}
138
144
  * @memberof TransactionDetail
139
145
  */
140
- payee_name?: string | null;
146
+ payee_name?: string;
141
147
  /**
142
148
  * The name of the category. If a split transaction, this will be 'Split'.
143
149
  * @type {string}
144
150
  * @memberof TransactionDetail
145
151
  */
146
- category_name?: string | null;
152
+ category_name?: string;
147
153
  /**
148
154
  * If a split transaction, the subtransactions.
149
155
  * @type {Array<SubTransaction>}
@@ -168,7 +174,7 @@ export type TransactionDetailDebtTransactionTypeEnum = typeof TransactionDetailD
168
174
  /**
169
175
  * Check if a given object implements the TransactionDetail interface.
170
176
  */
171
- export declare function instanceOfTransactionDetail(value: object): boolean;
177
+ export declare function instanceOfTransactionDetail(value: object): value is TransactionDetail;
172
178
  export declare function TransactionDetailFromJSON(json: any): TransactionDetail;
173
179
  export declare function TransactionDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionDetail;
174
180
  export declare function TransactionDetailToJSON(value?: TransactionDetail | 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,10 +14,9 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.TransactionDetailToJSON = exports.TransactionDetailFromJSONTyped = exports.TransactionDetailFromJSON = exports.instanceOfTransactionDetail = exports.TransactionDetailDebtTransactionTypeEnum = void 0;
17
- const runtime_1 = require("../runtime");
18
- const SubTransaction_1 = require("./SubTransaction");
19
- const TransactionClearedStatus_1 = require("./TransactionClearedStatus");
20
17
  const TransactionFlagColor_1 = require("./TransactionFlagColor");
18
+ const TransactionClearedStatus_1 = require("./TransactionClearedStatus");
19
+ const SubTransaction_1 = require("./SubTransaction");
21
20
  /**
22
21
  * @export
23
22
  */
@@ -35,17 +34,25 @@ exports.TransactionDetailDebtTransactionTypeEnum = {
35
34
  * Check if a given object implements the TransactionDetail interface.
36
35
  */
37
36
  function instanceOfTransactionDetail(value) {
38
- let isInstance = true;
39
- isInstance = isInstance && "id" in value;
40
- isInstance = isInstance && "date" in value;
41
- isInstance = isInstance && "amount" in value;
42
- isInstance = isInstance && "cleared" in value;
43
- isInstance = isInstance && "approved" in value;
44
- isInstance = isInstance && "account_id" in value;
45
- isInstance = isInstance && "deleted" in value;
46
- isInstance = isInstance && "account_name" in value;
47
- isInstance = isInstance && "subtransactions" in value;
48
- return isInstance;
37
+ if (!('id' in value) || value['id'] === undefined)
38
+ return false;
39
+ if (!('date' in value) || value['date'] === undefined)
40
+ return false;
41
+ if (!('amount' in value) || value['amount'] === undefined)
42
+ return false;
43
+ if (!('cleared' in value) || value['cleared'] === undefined)
44
+ return false;
45
+ if (!('approved' in value) || value['approved'] === undefined)
46
+ return false;
47
+ if (!('account_id' in value) || value['account_id'] === undefined)
48
+ return false;
49
+ if (!('deleted' in value) || value['deleted'] === undefined)
50
+ return false;
51
+ if (!('account_name' in value) || value['account_name'] === undefined)
52
+ return false;
53
+ if (!('subtransactions' in value) || value['subtransactions'] === undefined)
54
+ return false;
55
+ return true;
49
56
  }
50
57
  exports.instanceOfTransactionDetail = instanceOfTransactionDetail;
51
58
  function TransactionDetailFromJSON(json) {
@@ -53,65 +60,64 @@ function TransactionDetailFromJSON(json) {
53
60
  }
54
61
  exports.TransactionDetailFromJSON = TransactionDetailFromJSON;
55
62
  function TransactionDetailFromJSONTyped(json, ignoreDiscriminator) {
56
- if ((json === undefined) || (json === null)) {
63
+ if (json == null) {
57
64
  return json;
58
65
  }
59
66
  return {
60
67
  'id': json['id'],
61
68
  'date': json['date'],
62
69
  'amount': json['amount'],
63
- 'memo': !(0, runtime_1.exists)(json, 'memo') ? undefined : json['memo'],
70
+ 'memo': json['memo'] == null ? undefined : json['memo'],
64
71
  'cleared': (0, TransactionClearedStatus_1.TransactionClearedStatusFromJSON)(json['cleared']),
65
72
  'approved': json['approved'],
66
- 'flag_color': !(0, runtime_1.exists)(json, 'flag_color') ? undefined : (0, TransactionFlagColor_1.TransactionFlagColorFromJSON)(json['flag_color']),
73
+ 'flag_color': json['flag_color'] == null ? undefined : (0, TransactionFlagColor_1.TransactionFlagColorFromJSON)(json['flag_color']),
74
+ 'flag_name': json['flag_name'] == null ? undefined : json['flag_name'],
67
75
  'account_id': json['account_id'],
68
- 'payee_id': !(0, runtime_1.exists)(json, 'payee_id') ? undefined : json['payee_id'],
69
- 'category_id': !(0, runtime_1.exists)(json, 'category_id') ? undefined : json['category_id'],
70
- 'transfer_account_id': !(0, runtime_1.exists)(json, 'transfer_account_id') ? undefined : json['transfer_account_id'],
71
- 'transfer_transaction_id': !(0, runtime_1.exists)(json, 'transfer_transaction_id') ? undefined : json['transfer_transaction_id'],
72
- 'matched_transaction_id': !(0, runtime_1.exists)(json, 'matched_transaction_id') ? undefined : json['matched_transaction_id'],
73
- 'import_id': !(0, runtime_1.exists)(json, 'import_id') ? undefined : json['import_id'],
74
- 'import_payee_name': !(0, runtime_1.exists)(json, 'import_payee_name') ? undefined : json['import_payee_name'],
75
- 'import_payee_name_original': !(0, runtime_1.exists)(json, 'import_payee_name_original') ? undefined : json['import_payee_name_original'],
76
- 'debt_transaction_type': !(0, runtime_1.exists)(json, 'debt_transaction_type') ? undefined : json['debt_transaction_type'],
76
+ 'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
77
+ 'category_id': json['category_id'] == null ? undefined : json['category_id'],
78
+ 'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
79
+ 'transfer_transaction_id': json['transfer_transaction_id'] == null ? undefined : json['transfer_transaction_id'],
80
+ 'matched_transaction_id': json['matched_transaction_id'] == null ? undefined : json['matched_transaction_id'],
81
+ 'import_id': json['import_id'] == null ? undefined : json['import_id'],
82
+ 'import_payee_name': json['import_payee_name'] == null ? undefined : json['import_payee_name'],
83
+ 'import_payee_name_original': json['import_payee_name_original'] == null ? undefined : json['import_payee_name_original'],
84
+ 'debt_transaction_type': json['debt_transaction_type'] == null ? undefined : json['debt_transaction_type'],
77
85
  'deleted': json['deleted'],
78
86
  'account_name': json['account_name'],
79
- 'payee_name': !(0, runtime_1.exists)(json, 'payee_name') ? undefined : json['payee_name'],
80
- 'category_name': !(0, runtime_1.exists)(json, 'category_name') ? undefined : json['category_name'],
87
+ 'payee_name': json['payee_name'] == null ? undefined : json['payee_name'],
88
+ 'category_name': json['category_name'] == null ? undefined : json['category_name'],
81
89
  'subtransactions': (json['subtransactions'].map(SubTransaction_1.SubTransactionFromJSON)),
82
90
  };
83
91
  }
84
92
  exports.TransactionDetailFromJSONTyped = TransactionDetailFromJSONTyped;
85
93
  function TransactionDetailToJSON(value) {
86
- if (value === undefined) {
87
- return undefined;
88
- }
89
- if (value === null) {
90
- return null;
94
+ if (value == null) {
95
+ return value;
91
96
  }
92
97
  return {
93
- 'id': value.id,
94
- 'date': value.date,
95
- 'amount': value.amount,
96
- 'memo': value.memo,
97
- 'cleared': (0, TransactionClearedStatus_1.TransactionClearedStatusToJSON)(value.cleared),
98
- 'approved': value.approved,
99
- 'flag_color': (0, TransactionFlagColor_1.TransactionFlagColorToJSON)(value.flag_color),
100
- 'account_id': value.account_id,
101
- 'payee_id': value.payee_id,
102
- 'category_id': value.category_id,
103
- 'transfer_account_id': value.transfer_account_id,
104
- 'transfer_transaction_id': value.transfer_transaction_id,
105
- 'matched_transaction_id': value.matched_transaction_id,
106
- 'import_id': value.import_id,
107
- 'import_payee_name': value.import_payee_name,
108
- 'import_payee_name_original': value.import_payee_name_original,
109
- 'debt_transaction_type': value.debt_transaction_type,
110
- 'deleted': value.deleted,
111
- 'account_name': value.account_name,
112
- 'payee_name': value.payee_name,
113
- 'category_name': value.category_name,
114
- 'subtransactions': (value.subtransactions.map(SubTransaction_1.SubTransactionToJSON)),
98
+ 'id': value['id'],
99
+ 'date': value['date'],
100
+ 'amount': value['amount'],
101
+ 'memo': value['memo'],
102
+ 'cleared': (0, TransactionClearedStatus_1.TransactionClearedStatusToJSON)(value['cleared']),
103
+ 'approved': value['approved'],
104
+ 'flag_color': (0, TransactionFlagColor_1.TransactionFlagColorToJSON)(value['flag_color']),
105
+ 'flag_name': value['flag_name'],
106
+ 'account_id': value['account_id'],
107
+ 'payee_id': value['payee_id'],
108
+ 'category_id': value['category_id'],
109
+ 'transfer_account_id': value['transfer_account_id'],
110
+ 'transfer_transaction_id': value['transfer_transaction_id'],
111
+ 'matched_transaction_id': value['matched_transaction_id'],
112
+ 'import_id': value['import_id'],
113
+ 'import_payee_name': value['import_payee_name'],
114
+ 'import_payee_name_original': value['import_payee_name_original'],
115
+ 'debt_transaction_type': value['debt_transaction_type'],
116
+ 'deleted': value['deleted'],
117
+ 'account_name': value['account_name'],
118
+ 'payee_name': value['payee_name'],
119
+ 'category_name': value['category_name'],
120
+ 'subtransactions': (value['subtransactions'].map(SubTransaction_1.SubTransactionToJSON)),
115
121
  };
116
122
  }
117
123
  exports.TransactionDetailToJSON = TransactionDetailToJSON;
@@ -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).
@@ -22,6 +22,7 @@ export declare const TransactionFlagColor: {
22
22
  readonly Purple: "purple";
23
23
  };
24
24
  export type TransactionFlagColor = typeof TransactionFlagColor[keyof typeof TransactionFlagColor];
25
+ export declare function instanceOfTransactionFlagColor(value: any): boolean;
25
26
  export declare function TransactionFlagColorFromJSON(json: any): TransactionFlagColor;
26
27
  export declare function TransactionFlagColorFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionFlagColor;
27
28
  export declare function TransactionFlagColorToJSON(value?: TransactionFlagColor | 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).
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.TransactionFlagColorToJSON = exports.TransactionFlagColorFromJSONTyped = exports.TransactionFlagColorFromJSON = exports.TransactionFlagColor = void 0;
16
+ exports.TransactionFlagColorToJSON = exports.TransactionFlagColorFromJSONTyped = exports.TransactionFlagColorFromJSON = exports.instanceOfTransactionFlagColor = exports.TransactionFlagColor = void 0;
17
17
  /**
18
18
  * The transaction flag
19
19
  * @export
@@ -26,6 +26,17 @@ exports.TransactionFlagColor = {
26
26
  Blue: 'blue',
27
27
  Purple: 'purple',
28
28
  };
29
+ function instanceOfTransactionFlagColor(value) {
30
+ for (const key in exports.TransactionFlagColor) {
31
+ if (Object.prototype.hasOwnProperty.call(exports.TransactionFlagColor, key)) {
32
+ if (exports.TransactionFlagColor[key] === value) {
33
+ return true;
34
+ }
35
+ }
36
+ }
37
+ return false;
38
+ }
39
+ exports.instanceOfTransactionFlagColor = instanceOfTransactionFlagColor;
29
40
  function TransactionFlagColorFromJSON(json) {
30
41
  return TransactionFlagColorFromJSONTyped(json, false);
31
42
  }
@@ -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 TransactionResponse {
26
26
  /**
27
27
  * Check if a given object implements the TransactionResponse interface.
28
28
  */
29
- export declare function instanceOfTransactionResponse(value: object): boolean;
29
+ export declare function instanceOfTransactionResponse(value: object): value is TransactionResponse;
30
30
  export declare function TransactionResponseFromJSON(json: any): TransactionResponse;
31
31
  export declare function TransactionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionResponse;
32
32
  export declare function TransactionResponseToJSON(value?: TransactionResponse | 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 TransactionResponseData_1 = require("./TransactionResponseData");
19
19
  * Check if a given object implements the TransactionResponse interface.
20
20
  */
21
21
  function instanceOfTransactionResponse(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.instanceOfTransactionResponse = instanceOfTransactionResponse;
27
27
  function TransactionResponseFromJSON(json) {
@@ -29,7 +29,7 @@ function TransactionResponseFromJSON(json) {
29
29
  }
30
30
  exports.TransactionResponseFromJSON = TransactionResponseFromJSON;
31
31
  function TransactionResponseFromJSONTyped(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 TransactionResponseFromJSONTyped(json, ignoreDiscriminator) {
38
38
  }
39
39
  exports.TransactionResponseFromJSONTyped = TransactionResponseFromJSONTyped;
40
40
  function TransactionResponseToJSON(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, TransactionResponseData_1.TransactionResponseDataToJSON)(value.data),
45
+ 'data': (0, TransactionResponseData_1.TransactionResponseDataToJSON)(value['data']),
49
46
  };
50
47
  }
51
48
  exports.TransactionResponseToJSON = TransactionResponseToJSON;