ynab 2.2.0 → 2.4.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 (215) hide show
  1. package/README.md +2 -0
  2. package/dist/apis/AccountsApi.d.ts +1 -6
  3. package/dist/apis/AccountsApi.js +1 -6
  4. package/dist/apis/BudgetsApi.d.ts +1 -6
  5. package/dist/apis/BudgetsApi.js +1 -6
  6. package/dist/apis/CategoriesApi.d.ts +1 -6
  7. package/dist/apis/CategoriesApi.js +1 -6
  8. package/dist/apis/MonthsApi.d.ts +1 -6
  9. package/dist/apis/MonthsApi.js +1 -6
  10. package/dist/apis/PayeeLocationsApi.d.ts +1 -6
  11. package/dist/apis/PayeeLocationsApi.js +1 -6
  12. package/dist/apis/PayeesApi.d.ts +17 -7
  13. package/dist/apis/PayeesApi.js +43 -6
  14. package/dist/apis/ScheduledTransactionsApi.d.ts +16 -7
  15. package/dist/apis/ScheduledTransactionsApi.js +40 -6
  16. package/dist/apis/TransactionsApi.d.ts +36 -16
  17. package/dist/apis/TransactionsApi.js +65 -17
  18. package/dist/apis/UserApi.d.ts +1 -6
  19. package/dist/apis/UserApi.js +1 -6
  20. package/dist/browser/ynab.js +1 -1
  21. package/dist/models/Account.d.ts +2 -7
  22. package/dist/models/Account.js +51 -51
  23. package/dist/models/AccountResponse.d.ts +2 -7
  24. package/dist/models/AccountResponse.js +8 -16
  25. package/dist/models/AccountResponseData.d.ts +2 -7
  26. package/dist/models/AccountResponseData.js +8 -16
  27. package/dist/models/AccountType.d.ts +2 -6
  28. package/dist/models/AccountType.js +13 -7
  29. package/dist/models/AccountsResponse.d.ts +2 -7
  30. package/dist/models/AccountsResponse.js +8 -16
  31. package/dist/models/AccountsResponseData.d.ts +2 -7
  32. package/dist/models/AccountsResponseData.js +11 -18
  33. package/dist/models/BudgetDetail.d.ts +6 -11
  34. package/dist/models/BudgetDetail.js +45 -53
  35. package/dist/models/BudgetDetailResponse.d.ts +2 -7
  36. package/dist/models/BudgetDetailResponse.js +8 -16
  37. package/dist/models/BudgetDetailResponseData.d.ts +2 -7
  38. package/dist/models/BudgetDetailResponseData.js +11 -18
  39. package/dist/models/BudgetSettings.d.ts +2 -7
  40. package/dist/models/BudgetSettings.js +11 -18
  41. package/dist/models/BudgetSettingsResponse.d.ts +2 -7
  42. package/dist/models/BudgetSettingsResponse.js +8 -16
  43. package/dist/models/BudgetSettingsResponseData.d.ts +2 -7
  44. package/dist/models/BudgetSettingsResponseData.js +8 -16
  45. package/dist/models/BudgetSummary.d.ts +2 -7
  46. package/dist/models/BudgetSummary.js +23 -31
  47. package/dist/models/BudgetSummaryResponse.d.ts +2 -7
  48. package/dist/models/BudgetSummaryResponse.js +8 -16
  49. package/dist/models/BudgetSummaryResponseData.d.ts +2 -7
  50. package/dist/models/BudgetSummaryResponseData.js +10 -19
  51. package/dist/models/BulkResponse.d.ts +2 -7
  52. package/dist/models/BulkResponse.js +8 -16
  53. package/dist/models/BulkResponseData.d.ts +2 -7
  54. package/dist/models/BulkResponseData.js +8 -16
  55. package/dist/models/BulkResponseDataBulk.d.ts +2 -7
  56. package/dist/models/BulkResponseDataBulk.js +11 -18
  57. package/dist/models/BulkTransactions.d.ts +5 -10
  58. package/dist/models/BulkTransactions.js +10 -18
  59. package/dist/models/CategoriesResponse.d.ts +2 -7
  60. package/dist/models/CategoriesResponse.js +8 -16
  61. package/dist/models/CategoriesResponseData.d.ts +2 -7
  62. package/dist/models/CategoriesResponseData.js +11 -18
  63. package/dist/models/Category.d.ts +9 -8
  64. package/dist/models/Category.js +61 -61
  65. package/dist/models/CategoryGroup.d.ts +2 -7
  66. package/dist/models/CategoryGroup.js +17 -22
  67. package/dist/models/CategoryGroupWithCategories.d.ts +2 -7
  68. package/dist/models/CategoryGroupWithCategories.js +20 -24
  69. package/dist/models/CategoryResponse.d.ts +2 -7
  70. package/dist/models/CategoryResponse.js +8 -16
  71. package/dist/models/CategoryResponseData.d.ts +2 -7
  72. package/dist/models/CategoryResponseData.js +8 -16
  73. package/dist/models/CurrencyFormat.d.ts +2 -7
  74. package/dist/models/CurrencyFormat.js +29 -30
  75. package/dist/models/DateFormat.d.ts +2 -7
  76. package/dist/models/DateFormat.js +8 -16
  77. package/dist/models/ErrorDetail.d.ts +2 -7
  78. package/dist/models/ErrorDetail.js +14 -20
  79. package/dist/models/ErrorResponse.d.ts +2 -7
  80. package/dist/models/ErrorResponse.js +8 -16
  81. package/dist/models/ExistingTransaction.d.ts +89 -0
  82. package/dist/models/ExistingTransaction.js +63 -0
  83. package/dist/models/HybridTransaction.d.ts +10 -9
  84. package/dist/models/HybridTransaction.js +63 -62
  85. package/dist/models/HybridTransactionsResponse.d.ts +2 -7
  86. package/dist/models/HybridTransactionsResponse.js +8 -16
  87. package/dist/models/HybridTransactionsResponseData.d.ts +2 -7
  88. package/dist/models/HybridTransactionsResponseData.js +10 -19
  89. package/dist/models/MonthDetail.d.ts +2 -7
  90. package/dist/models/MonthDetail.js +30 -33
  91. package/dist/models/MonthDetailResponse.d.ts +2 -7
  92. package/dist/models/MonthDetailResponse.js +8 -16
  93. package/dist/models/MonthDetailResponseData.d.ts +2 -7
  94. package/dist/models/MonthDetailResponseData.js +8 -16
  95. package/dist/models/MonthSummariesResponse.d.ts +2 -7
  96. package/dist/models/MonthSummariesResponse.js +8 -16
  97. package/dist/models/MonthSummariesResponseData.d.ts +2 -7
  98. package/dist/models/MonthSummariesResponseData.js +11 -18
  99. package/dist/models/MonthSummary.d.ts +2 -7
  100. package/dist/models/MonthSummary.js +27 -31
  101. package/dist/models/NewTransaction.d.ts +95 -0
  102. package/dist/models/NewTransaction.js +65 -0
  103. package/dist/models/PatchCategoryWrapper.d.ts +2 -7
  104. package/dist/models/PatchCategoryWrapper.js +8 -16
  105. package/dist/models/PatchMonthCategoryWrapper.d.ts +2 -7
  106. package/dist/models/PatchMonthCategoryWrapper.js +8 -16
  107. package/dist/models/PatchPayeeWrapper.d.ts +27 -0
  108. package/dist/models/PatchPayeeWrapper.js +43 -0
  109. package/dist/models/PatchTransactionsWrapper.d.ts +5 -10
  110. package/dist/models/PatchTransactionsWrapper.js +10 -18
  111. package/dist/models/Payee.d.ts +2 -7
  112. package/dist/models/Payee.js +16 -23
  113. package/dist/models/PayeeLocation.d.ts +2 -7
  114. package/dist/models/PayeeLocation.js +20 -24
  115. package/dist/models/PayeeLocationResponse.d.ts +2 -7
  116. package/dist/models/PayeeLocationResponse.js +8 -16
  117. package/dist/models/PayeeLocationResponseData.d.ts +2 -7
  118. package/dist/models/PayeeLocationResponseData.js +8 -16
  119. package/dist/models/PayeeLocationsResponse.d.ts +2 -7
  120. package/dist/models/PayeeLocationsResponse.js +8 -16
  121. package/dist/models/PayeeLocationsResponseData.d.ts +2 -7
  122. package/dist/models/PayeeLocationsResponseData.js +8 -16
  123. package/dist/models/PayeeResponse.d.ts +2 -7
  124. package/dist/models/PayeeResponse.js +8 -16
  125. package/dist/models/PayeeResponseData.d.ts +2 -7
  126. package/dist/models/PayeeResponseData.js +8 -16
  127. package/dist/models/PayeesResponse.d.ts +2 -7
  128. package/dist/models/PayeesResponse.js +8 -16
  129. package/dist/models/PayeesResponseData.d.ts +2 -7
  130. package/dist/models/PayeesResponseData.js +11 -18
  131. package/dist/models/PostAccountWrapper.d.ts +2 -7
  132. package/dist/models/PostAccountWrapper.js +8 -16
  133. package/dist/models/PostScheduledTransactionWrapper.d.ts +27 -0
  134. package/dist/models/PostScheduledTransactionWrapper.js +43 -0
  135. package/dist/models/PostTransactionsWrapper.d.ts +7 -12
  136. package/dist/models/PostTransactionsWrapper.js +10 -20
  137. package/dist/models/PutTransactionWrapper.d.ts +5 -10
  138. package/dist/models/PutTransactionWrapper.js +10 -18
  139. package/dist/models/SaveAccount.d.ts +2 -7
  140. package/dist/models/SaveAccount.js +14 -20
  141. package/dist/models/SaveCategory.d.ts +2 -7
  142. package/dist/models/SaveCategory.js +11 -21
  143. package/dist/models/SaveCategoryResponse.d.ts +2 -7
  144. package/dist/models/SaveCategoryResponse.js +8 -16
  145. package/dist/models/SaveCategoryResponseData.d.ts +2 -7
  146. package/dist/models/SaveCategoryResponseData.js +11 -18
  147. package/dist/models/SaveMonthCategory.d.ts +2 -7
  148. package/dist/models/SaveMonthCategory.js +8 -16
  149. package/dist/models/SavePayee.d.ts +26 -0
  150. package/dist/models/SavePayee.js +40 -0
  151. package/dist/models/SavePayeeResponse.d.ts +27 -0
  152. package/dist/models/SavePayeeResponse.js +43 -0
  153. package/dist/models/SavePayeeResponseData.d.ts +33 -0
  154. package/dist/models/SavePayeeResponseData.js +47 -0
  155. package/dist/models/SaveScheduledTransaction.d.ts +76 -0
  156. package/dist/models/SaveScheduledTransaction.js +62 -0
  157. package/dist/models/SaveSubTransaction.d.ts +2 -7
  158. package/dist/models/SaveSubTransaction.js +16 -25
  159. package/dist/models/SaveTransactionWithIdOrImportId.d.ts +101 -0
  160. package/dist/models/SaveTransactionWithIdOrImportId.js +67 -0
  161. package/dist/models/SaveTransactionWithOptionalFields.d.ts +5 -16
  162. package/dist/models/SaveTransactionWithOptionalFields.js +29 -41
  163. package/dist/models/SaveTransactionsResponse.d.ts +2 -7
  164. package/dist/models/SaveTransactionsResponse.js +8 -16
  165. package/dist/models/SaveTransactionsResponseData.d.ts +2 -7
  166. package/dist/models/SaveTransactionsResponseData.js +17 -25
  167. package/dist/models/ScheduledSubTransaction.d.ts +2 -7
  168. package/dist/models/ScheduledSubTransaction.js +25 -31
  169. package/dist/models/ScheduledTransactionDetail.d.ts +9 -8
  170. package/dist/models/ScheduledTransactionDetail.js +49 -48
  171. package/dist/models/ScheduledTransactionFrequency.d.ts +30 -0
  172. package/dist/models/ScheduledTransactionFrequency.js +53 -0
  173. package/dist/models/ScheduledTransactionResponse.d.ts +2 -7
  174. package/dist/models/ScheduledTransactionResponse.js +8 -16
  175. package/dist/models/ScheduledTransactionResponseData.d.ts +2 -7
  176. package/dist/models/ScheduledTransactionResponseData.js +8 -16
  177. package/dist/models/ScheduledTransactionSummary.d.ts +8 -7
  178. package/dist/models/ScheduledTransactionSummary.js +38 -39
  179. package/dist/models/ScheduledTransactionsResponse.d.ts +2 -7
  180. package/dist/models/ScheduledTransactionsResponse.js +8 -16
  181. package/dist/models/ScheduledTransactionsResponseData.d.ts +2 -7
  182. package/dist/models/ScheduledTransactionsResponseData.js +11 -18
  183. package/dist/models/SubTransaction.d.ts +2 -7
  184. package/dist/models/SubTransaction.js +31 -37
  185. package/dist/models/TransactionClearedStatus.d.ts +2 -6
  186. package/dist/models/TransactionClearedStatus.js +13 -7
  187. package/dist/models/TransactionDetail.d.ts +11 -10
  188. package/dist/models/TransactionDetail.js +62 -61
  189. package/dist/models/TransactionFlagColor.d.ts +2 -6
  190. package/dist/models/TransactionFlagColor.js +13 -7
  191. package/dist/models/TransactionResponse.d.ts +2 -7
  192. package/dist/models/TransactionResponse.js +8 -16
  193. package/dist/models/TransactionResponseData.d.ts +2 -7
  194. package/dist/models/TransactionResponseData.js +8 -16
  195. package/dist/models/TransactionSummary.d.ts +10 -9
  196. package/dist/models/TransactionSummary.js +51 -52
  197. package/dist/models/TransactionsImportResponse.d.ts +2 -7
  198. package/dist/models/TransactionsImportResponse.js +8 -16
  199. package/dist/models/TransactionsImportResponseData.d.ts +2 -7
  200. package/dist/models/TransactionsImportResponseData.js +8 -16
  201. package/dist/models/TransactionsResponse.d.ts +2 -7
  202. package/dist/models/TransactionsResponse.js +8 -16
  203. package/dist/models/TransactionsResponseData.d.ts +2 -7
  204. package/dist/models/TransactionsResponseData.js +11 -18
  205. package/dist/models/User.d.ts +2 -7
  206. package/dist/models/User.js +8 -16
  207. package/dist/models/UserResponse.d.ts +2 -7
  208. package/dist/models/UserResponse.js +8 -16
  209. package/dist/models/UserResponseData.d.ts +2 -7
  210. package/dist/models/UserResponseData.js +8 -16
  211. package/dist/models/index.d.ts +10 -9
  212. package/dist/models/index.js +10 -9
  213. package/dist/runtime.d.ts +1 -6
  214. package/dist/runtime.js +1 -6
  215. package/package.json +1 -1
@@ -5,12 +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
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
8
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
14
9
  */
15
10
  Object.defineProperty(exports, "__esModule", { value: true });
16
11
  exports.ScheduledTransactionResponseDataToJSON = exports.ScheduledTransactionResponseDataFromJSONTyped = exports.ScheduledTransactionResponseDataFromJSON = exports.instanceOfScheduledTransactionResponseData = void 0;
@@ -19,9 +14,9 @@ const ScheduledTransactionDetail_1 = require("./ScheduledTransactionDetail");
19
14
  * Check if a given object implements the ScheduledTransactionResponseData interface.
20
15
  */
21
16
  function instanceOfScheduledTransactionResponseData(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "scheduled_transaction" in value;
24
- return isInstance;
17
+ if (!('scheduled_transaction' in value) || value['scheduled_transaction'] === undefined)
18
+ return false;
19
+ return true;
25
20
  }
26
21
  exports.instanceOfScheduledTransactionResponseData = instanceOfScheduledTransactionResponseData;
27
22
  function ScheduledTransactionResponseDataFromJSON(json) {
@@ -29,7 +24,7 @@ function ScheduledTransactionResponseDataFromJSON(json) {
29
24
  }
30
25
  exports.ScheduledTransactionResponseDataFromJSON = ScheduledTransactionResponseDataFromJSON;
31
26
  function ScheduledTransactionResponseDataFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
27
+ if (json == null) {
33
28
  return json;
34
29
  }
35
30
  return {
@@ -38,14 +33,11 @@ function ScheduledTransactionResponseDataFromJSONTyped(json, ignoreDiscriminator
38
33
  }
39
34
  exports.ScheduledTransactionResponseDataFromJSONTyped = ScheduledTransactionResponseDataFromJSONTyped;
40
35
  function ScheduledTransactionResponseDataToJSON(value) {
41
- if (value === undefined) {
42
- return undefined;
43
- }
44
- if (value === null) {
45
- return null;
36
+ if (value == null) {
37
+ return value;
46
38
  }
47
39
  return {
48
- 'scheduled_transaction': (0, ScheduledTransactionDetail_1.ScheduledTransactionDetailToJSON)(value.scheduled_transaction),
40
+ 'scheduled_transaction': (0, ScheduledTransactionDetail_1.ScheduledTransactionDetailToJSON)(value['scheduled_transaction']),
49
41
  };
50
42
  }
51
43
  exports.ScheduledTransactionResponseDataToJSON = ScheduledTransactionResponseDataToJSON;
@@ -2,12 +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
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
5
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
11
6
  */
12
7
  import type { TransactionFlagColor } from './TransactionFlagColor';
13
8
  /**
@@ -58,6 +53,12 @@ export interface ScheduledTransactionSummary {
58
53
  * @memberof ScheduledTransactionSummary
59
54
  */
60
55
  flag_color?: TransactionFlagColor | null;
56
+ /**
57
+ * The customized name of a transaction flag
58
+ * @type {string}
59
+ * @memberof ScheduledTransactionSummary
60
+ */
61
+ flag_name?: string | null;
61
62
  /**
62
63
  *
63
64
  * @type {string}
@@ -111,7 +112,7 @@ export type ScheduledTransactionSummaryFrequencyEnum = typeof ScheduledTransacti
111
112
  /**
112
113
  * Check if a given object implements the ScheduledTransactionSummary interface.
113
114
  */
114
- export declare function instanceOfScheduledTransactionSummary(value: object): boolean;
115
+ export declare function instanceOfScheduledTransactionSummary(value: object): value is ScheduledTransactionSummary;
115
116
  export declare function ScheduledTransactionSummaryFromJSON(json: any): ScheduledTransactionSummary;
116
117
  export declare function ScheduledTransactionSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScheduledTransactionSummary;
117
118
  export declare function ScheduledTransactionSummaryToJSON(value?: ScheduledTransactionSummary | null): any;
@@ -5,16 +5,10 @@
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
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
8
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
14
9
  */
15
10
  Object.defineProperty(exports, "__esModule", { value: true });
16
11
  exports.ScheduledTransactionSummaryToJSON = exports.ScheduledTransactionSummaryFromJSONTyped = exports.ScheduledTransactionSummaryFromJSON = exports.instanceOfScheduledTransactionSummary = exports.ScheduledTransactionSummaryFrequencyEnum = void 0;
17
- const runtime_1 = require("../runtime");
18
12
  const TransactionFlagColor_1 = require("./TransactionFlagColor");
19
13
  /**
20
14
  * @export
@@ -38,15 +32,21 @@ exports.ScheduledTransactionSummaryFrequencyEnum = {
38
32
  * Check if a given object implements the ScheduledTransactionSummary interface.
39
33
  */
40
34
  function instanceOfScheduledTransactionSummary(value) {
41
- let isInstance = true;
42
- isInstance = isInstance && "id" in value;
43
- isInstance = isInstance && "date_first" in value;
44
- isInstance = isInstance && "date_next" in value;
45
- isInstance = isInstance && "frequency" in value;
46
- isInstance = isInstance && "amount" in value;
47
- isInstance = isInstance && "account_id" in value;
48
- isInstance = isInstance && "deleted" in value;
49
- return isInstance;
35
+ if (!('id' in value) || value['id'] === undefined)
36
+ return false;
37
+ if (!('date_first' in value) || value['date_first'] === undefined)
38
+ return false;
39
+ if (!('date_next' in value) || value['date_next'] === undefined)
40
+ return false;
41
+ if (!('frequency' in value) || value['frequency'] === undefined)
42
+ return false;
43
+ if (!('amount' in value) || value['amount'] === undefined)
44
+ return false;
45
+ if (!('account_id' in value) || value['account_id'] === undefined)
46
+ return false;
47
+ if (!('deleted' in value) || value['deleted'] === undefined)
48
+ return false;
49
+ return true;
50
50
  }
51
51
  exports.instanceOfScheduledTransactionSummary = instanceOfScheduledTransactionSummary;
52
52
  function ScheduledTransactionSummaryFromJSON(json) {
@@ -54,7 +54,7 @@ function ScheduledTransactionSummaryFromJSON(json) {
54
54
  }
55
55
  exports.ScheduledTransactionSummaryFromJSON = ScheduledTransactionSummaryFromJSON;
56
56
  function ScheduledTransactionSummaryFromJSONTyped(json, ignoreDiscriminator) {
57
- if ((json === undefined) || (json === null)) {
57
+ if (json == null) {
58
58
  return json;
59
59
  }
60
60
  return {
@@ -63,36 +63,35 @@ function ScheduledTransactionSummaryFromJSONTyped(json, ignoreDiscriminator) {
63
63
  'date_next': json['date_next'],
64
64
  'frequency': json['frequency'],
65
65
  'amount': json['amount'],
66
- 'memo': !(0, runtime_1.exists)(json, 'memo') ? undefined : json['memo'],
67
- 'flag_color': !(0, runtime_1.exists)(json, 'flag_color') ? undefined : (0, TransactionFlagColor_1.TransactionFlagColorFromJSON)(json['flag_color']),
66
+ 'memo': json['memo'] == null ? undefined : json['memo'],
67
+ 'flag_color': json['flag_color'] == null ? undefined : (0, TransactionFlagColor_1.TransactionFlagColorFromJSON)(json['flag_color']),
68
+ 'flag_name': json['flag_name'] == null ? undefined : json['flag_name'],
68
69
  'account_id': json['account_id'],
69
- 'payee_id': !(0, runtime_1.exists)(json, 'payee_id') ? undefined : json['payee_id'],
70
- 'category_id': !(0, runtime_1.exists)(json, 'category_id') ? undefined : json['category_id'],
71
- 'transfer_account_id': !(0, runtime_1.exists)(json, 'transfer_account_id') ? undefined : json['transfer_account_id'],
70
+ 'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
71
+ 'category_id': json['category_id'] == null ? undefined : json['category_id'],
72
+ 'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
72
73
  'deleted': json['deleted'],
73
74
  };
74
75
  }
75
76
  exports.ScheduledTransactionSummaryFromJSONTyped = ScheduledTransactionSummaryFromJSONTyped;
76
77
  function ScheduledTransactionSummaryToJSON(value) {
77
- if (value === undefined) {
78
- return undefined;
79
- }
80
- if (value === null) {
81
- return null;
78
+ if (value == null) {
79
+ return value;
82
80
  }
83
81
  return {
84
- 'id': value.id,
85
- 'date_first': value.date_first,
86
- 'date_next': value.date_next,
87
- 'frequency': value.frequency,
88
- 'amount': value.amount,
89
- 'memo': value.memo,
90
- 'flag_color': (0, TransactionFlagColor_1.TransactionFlagColorToJSON)(value.flag_color),
91
- 'account_id': value.account_id,
92
- 'payee_id': value.payee_id,
93
- 'category_id': value.category_id,
94
- 'transfer_account_id': value.transfer_account_id,
95
- 'deleted': value.deleted,
82
+ 'id': value['id'],
83
+ 'date_first': value['date_first'],
84
+ 'date_next': value['date_next'],
85
+ 'frequency': value['frequency'],
86
+ 'amount': value['amount'],
87
+ 'memo': value['memo'],
88
+ 'flag_color': (0, TransactionFlagColor_1.TransactionFlagColorToJSON)(value['flag_color']),
89
+ 'flag_name': value['flag_name'],
90
+ 'account_id': value['account_id'],
91
+ 'payee_id': value['payee_id'],
92
+ 'category_id': value['category_id'],
93
+ 'transfer_account_id': value['transfer_account_id'],
94
+ 'deleted': value['deleted'],
96
95
  };
97
96
  }
98
97
  exports.ScheduledTransactionSummaryToJSON = ScheduledTransactionSummaryToJSON;
@@ -2,12 +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
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
5
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
11
6
  */
12
7
  import type { ScheduledTransactionsResponseData } from './ScheduledTransactionsResponseData';
13
8
  /**
@@ -26,7 +21,7 @@ export interface ScheduledTransactionsResponse {
26
21
  /**
27
22
  * Check if a given object implements the ScheduledTransactionsResponse interface.
28
23
  */
29
- export declare function instanceOfScheduledTransactionsResponse(value: object): boolean;
24
+ export declare function instanceOfScheduledTransactionsResponse(value: object): value is ScheduledTransactionsResponse;
30
25
  export declare function ScheduledTransactionsResponseFromJSON(json: any): ScheduledTransactionsResponse;
31
26
  export declare function ScheduledTransactionsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScheduledTransactionsResponse;
32
27
  export declare function ScheduledTransactionsResponseToJSON(value?: ScheduledTransactionsResponse | null): any;
@@ -5,12 +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
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
8
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
14
9
  */
15
10
  Object.defineProperty(exports, "__esModule", { value: true });
16
11
  exports.ScheduledTransactionsResponseToJSON = exports.ScheduledTransactionsResponseFromJSONTyped = exports.ScheduledTransactionsResponseFromJSON = exports.instanceOfScheduledTransactionsResponse = void 0;
@@ -19,9 +14,9 @@ const ScheduledTransactionsResponseData_1 = require("./ScheduledTransactionsResp
19
14
  * Check if a given object implements the ScheduledTransactionsResponse interface.
20
15
  */
21
16
  function instanceOfScheduledTransactionsResponse(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "data" in value;
24
- return isInstance;
17
+ if (!('data' in value) || value['data'] === undefined)
18
+ return false;
19
+ return true;
25
20
  }
26
21
  exports.instanceOfScheduledTransactionsResponse = instanceOfScheduledTransactionsResponse;
27
22
  function ScheduledTransactionsResponseFromJSON(json) {
@@ -29,7 +24,7 @@ function ScheduledTransactionsResponseFromJSON(json) {
29
24
  }
30
25
  exports.ScheduledTransactionsResponseFromJSON = ScheduledTransactionsResponseFromJSON;
31
26
  function ScheduledTransactionsResponseFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
27
+ if (json == null) {
33
28
  return json;
34
29
  }
35
30
  return {
@@ -38,14 +33,11 @@ function ScheduledTransactionsResponseFromJSONTyped(json, ignoreDiscriminator) {
38
33
  }
39
34
  exports.ScheduledTransactionsResponseFromJSONTyped = ScheduledTransactionsResponseFromJSONTyped;
40
35
  function ScheduledTransactionsResponseToJSON(value) {
41
- if (value === undefined) {
42
- return undefined;
43
- }
44
- if (value === null) {
45
- return null;
36
+ if (value == null) {
37
+ return value;
46
38
  }
47
39
  return {
48
- 'data': (0, ScheduledTransactionsResponseData_1.ScheduledTransactionsResponseDataToJSON)(value.data),
40
+ 'data': (0, ScheduledTransactionsResponseData_1.ScheduledTransactionsResponseDataToJSON)(value['data']),
49
41
  };
50
42
  }
51
43
  exports.ScheduledTransactionsResponseToJSON = ScheduledTransactionsResponseToJSON;
@@ -2,12 +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
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
5
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
11
6
  */
12
7
  import type { ScheduledTransactionDetail } from './ScheduledTransactionDetail';
13
8
  /**
@@ -32,7 +27,7 @@ export interface ScheduledTransactionsResponseData {
32
27
  /**
33
28
  * Check if a given object implements the ScheduledTransactionsResponseData interface.
34
29
  */
35
- export declare function instanceOfScheduledTransactionsResponseData(value: object): boolean;
30
+ export declare function instanceOfScheduledTransactionsResponseData(value: object): value is ScheduledTransactionsResponseData;
36
31
  export declare function ScheduledTransactionsResponseDataFromJSON(json: any): ScheduledTransactionsResponseData;
37
32
  export declare function ScheduledTransactionsResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScheduledTransactionsResponseData;
38
33
  export declare function ScheduledTransactionsResponseDataToJSON(value?: ScheduledTransactionsResponseData | null): any;
@@ -5,12 +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
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
8
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
14
9
  */
15
10
  Object.defineProperty(exports, "__esModule", { value: true });
16
11
  exports.ScheduledTransactionsResponseDataToJSON = exports.ScheduledTransactionsResponseDataFromJSONTyped = exports.ScheduledTransactionsResponseDataFromJSON = exports.instanceOfScheduledTransactionsResponseData = void 0;
@@ -19,10 +14,11 @@ const ScheduledTransactionDetail_1 = require("./ScheduledTransactionDetail");
19
14
  * Check if a given object implements the ScheduledTransactionsResponseData interface.
20
15
  */
21
16
  function instanceOfScheduledTransactionsResponseData(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "scheduled_transactions" in value;
24
- isInstance = isInstance && "server_knowledge" in value;
25
- return isInstance;
17
+ if (!('scheduled_transactions' in value) || value['scheduled_transactions'] === undefined)
18
+ return false;
19
+ if (!('server_knowledge' in value) || value['server_knowledge'] === undefined)
20
+ return false;
21
+ return true;
26
22
  }
27
23
  exports.instanceOfScheduledTransactionsResponseData = instanceOfScheduledTransactionsResponseData;
28
24
  function ScheduledTransactionsResponseDataFromJSON(json) {
@@ -30,7 +26,7 @@ function ScheduledTransactionsResponseDataFromJSON(json) {
30
26
  }
31
27
  exports.ScheduledTransactionsResponseDataFromJSON = ScheduledTransactionsResponseDataFromJSON;
32
28
  function ScheduledTransactionsResponseDataFromJSONTyped(json, ignoreDiscriminator) {
33
- if ((json === undefined) || (json === null)) {
29
+ if (json == null) {
34
30
  return json;
35
31
  }
36
32
  return {
@@ -40,15 +36,12 @@ function ScheduledTransactionsResponseDataFromJSONTyped(json, ignoreDiscriminato
40
36
  }
41
37
  exports.ScheduledTransactionsResponseDataFromJSONTyped = ScheduledTransactionsResponseDataFromJSONTyped;
42
38
  function ScheduledTransactionsResponseDataToJSON(value) {
43
- if (value === undefined) {
44
- return undefined;
45
- }
46
- if (value === null) {
47
- return null;
39
+ if (value == null) {
40
+ return value;
48
41
  }
49
42
  return {
50
- 'scheduled_transactions': (value.scheduled_transactions.map(ScheduledTransactionDetail_1.ScheduledTransactionDetailToJSON)),
51
- 'server_knowledge': value.server_knowledge,
43
+ 'scheduled_transactions': (value['scheduled_transactions'].map(ScheduledTransactionDetail_1.ScheduledTransactionDetailToJSON)),
44
+ 'server_knowledge': value['server_knowledge'],
52
45
  };
53
46
  }
54
47
  exports.ScheduledTransactionsResponseDataToJSON = ScheduledTransactionsResponseDataToJSON;
@@ -2,12 +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
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
5
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
11
6
  */
12
7
  /**
13
8
  *
@@ -85,7 +80,7 @@ export interface SubTransaction {
85
80
  /**
86
81
  * Check if a given object implements the SubTransaction interface.
87
82
  */
88
- export declare function instanceOfSubTransaction(value: object): boolean;
83
+ export declare function instanceOfSubTransaction(value: object): value is SubTransaction;
89
84
  export declare function SubTransactionFromJSON(json: any): SubTransaction;
90
85
  export declare function SubTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubTransaction;
91
86
  export declare function SubTransactionToJSON(value?: SubTransaction | null): any;
@@ -5,26 +5,23 @@
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
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
8
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
14
9
  */
15
10
  Object.defineProperty(exports, "__esModule", { value: true });
16
11
  exports.SubTransactionToJSON = exports.SubTransactionFromJSONTyped = exports.SubTransactionFromJSON = exports.instanceOfSubTransaction = void 0;
17
- const runtime_1 = require("../runtime");
18
12
  /**
19
13
  * Check if a given object implements the SubTransaction interface.
20
14
  */
21
15
  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;
16
+ if (!('id' in value) || value['id'] === undefined)
17
+ return false;
18
+ if (!('transaction_id' in value) || value['transaction_id'] === undefined)
19
+ return false;
20
+ if (!('amount' in value) || value['amount'] === undefined)
21
+ return false;
22
+ if (!('deleted' in value) || value['deleted'] === undefined)
23
+ return false;
24
+ return true;
28
25
  }
29
26
  exports.instanceOfSubTransaction = instanceOfSubTransaction;
30
27
  function SubTransactionFromJSON(json) {
@@ -32,43 +29,40 @@ function SubTransactionFromJSON(json) {
32
29
  }
33
30
  exports.SubTransactionFromJSON = SubTransactionFromJSON;
34
31
  function SubTransactionFromJSONTyped(json, ignoreDiscriminator) {
35
- if ((json === undefined) || (json === null)) {
32
+ if (json == null) {
36
33
  return json;
37
34
  }
38
35
  return {
39
36
  'id': json['id'],
40
37
  'transaction_id': json['transaction_id'],
41
38
  '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'],
39
+ 'memo': json['memo'] == null ? undefined : json['memo'],
40
+ 'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
41
+ 'payee_name': json['payee_name'] == null ? undefined : json['payee_name'],
42
+ 'category_id': json['category_id'] == null ? undefined : json['category_id'],
43
+ 'category_name': json['category_name'] == null ? undefined : json['category_name'],
44
+ 'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
45
+ 'transfer_transaction_id': json['transfer_transaction_id'] == null ? undefined : json['transfer_transaction_id'],
49
46
  'deleted': json['deleted'],
50
47
  };
51
48
  }
52
49
  exports.SubTransactionFromJSONTyped = SubTransactionFromJSONTyped;
53
50
  function SubTransactionToJSON(value) {
54
- if (value === undefined) {
55
- return undefined;
56
- }
57
- if (value === null) {
58
- return null;
51
+ if (value == null) {
52
+ return value;
59
53
  }
60
54
  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,
55
+ 'id': value['id'],
56
+ 'transaction_id': value['transaction_id'],
57
+ 'amount': value['amount'],
58
+ 'memo': value['memo'],
59
+ 'payee_id': value['payee_id'],
60
+ 'payee_name': value['payee_name'],
61
+ 'category_id': value['category_id'],
62
+ 'category_name': value['category_name'],
63
+ 'transfer_account_id': value['transfer_account_id'],
64
+ 'transfer_transaction_id': value['transfer_transaction_id'],
65
+ 'deleted': value['deleted'],
72
66
  };
73
67
  }
74
68
  exports.SubTransactionToJSON = SubTransactionToJSON;
@@ -2,12 +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
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
5
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
11
6
  */
12
7
  /**
13
8
  * The cleared status of the transaction
@@ -19,6 +14,7 @@ export declare const TransactionClearedStatus: {
19
14
  readonly Reconciled: "reconciled";
20
15
  };
21
16
  export type TransactionClearedStatus = typeof TransactionClearedStatus[keyof typeof TransactionClearedStatus];
17
+ export declare function instanceOfTransactionClearedStatus(value: any): boolean;
22
18
  export declare function TransactionClearedStatusFromJSON(json: any): TransactionClearedStatus;
23
19
  export declare function TransactionClearedStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionClearedStatus;
24
20
  export declare function TransactionClearedStatusToJSON(value?: TransactionClearedStatus | null): any;
@@ -5,15 +5,10 @@
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
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
8
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
14
9
  */
15
10
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.TransactionClearedStatusToJSON = exports.TransactionClearedStatusFromJSONTyped = exports.TransactionClearedStatusFromJSON = exports.TransactionClearedStatus = void 0;
11
+ exports.TransactionClearedStatusToJSON = exports.TransactionClearedStatusFromJSONTyped = exports.TransactionClearedStatusFromJSON = exports.instanceOfTransactionClearedStatus = exports.TransactionClearedStatus = void 0;
17
12
  /**
18
13
  * The cleared status of the transaction
19
14
  * @export
@@ -23,6 +18,17 @@ exports.TransactionClearedStatus = {
23
18
  Uncleared: 'uncleared',
24
19
  Reconciled: 'reconciled'
25
20
  };
21
+ function instanceOfTransactionClearedStatus(value) {
22
+ for (const key in exports.TransactionClearedStatus) {
23
+ if (Object.prototype.hasOwnProperty.call(exports.TransactionClearedStatus, key)) {
24
+ if (exports.TransactionClearedStatus[key] === value) {
25
+ return true;
26
+ }
27
+ }
28
+ }
29
+ return false;
30
+ }
31
+ exports.instanceOfTransactionClearedStatus = instanceOfTransactionClearedStatus;
26
32
  function TransactionClearedStatusFromJSON(json) {
27
33
  return TransactionClearedStatusFromJSONTyped(json, false);
28
34
  }
@@ -2,16 +2,11 @@
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
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
5
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
11
6
  */
12
- import type { SubTransaction } from './SubTransaction';
13
- import type { TransactionClearedStatus } from './TransactionClearedStatus';
14
7
  import type { TransactionFlagColor } from './TransactionFlagColor';
8
+ import type { TransactionClearedStatus } from './TransactionClearedStatus';
9
+ import type { SubTransaction } from './SubTransaction';
15
10
  /**
16
11
  *
17
12
  * @export
@@ -60,6 +55,12 @@ export interface TransactionDetail {
60
55
  * @memberof TransactionDetail
61
56
  */
62
57
  flag_color?: TransactionFlagColor | null;
58
+ /**
59
+ * The customized name of a transaction flag
60
+ * @type {string}
61
+ * @memberof TransactionDetail
62
+ */
63
+ flag_name?: string | null;
63
64
  /**
64
65
  *
65
66
  * @type {string}
@@ -119,7 +120,7 @@ export interface TransactionDetail {
119
120
  * @type {string}
120
121
  * @memberof TransactionDetail
121
122
  */
122
- debt_transaction_type?: TransactionDetailDebtTransactionTypeEnum;
123
+ debt_transaction_type?: TransactionDetailDebtTransactionTypeEnum | null;
123
124
  /**
124
125
  * Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
125
126
  * @type {boolean}
@@ -168,7 +169,7 @@ export type TransactionDetailDebtTransactionTypeEnum = typeof TransactionDetailD
168
169
  /**
169
170
  * Check if a given object implements the TransactionDetail interface.
170
171
  */
171
- export declare function instanceOfTransactionDetail(value: object): boolean;
172
+ export declare function instanceOfTransactionDetail(value: object): value is TransactionDetail;
172
173
  export declare function TransactionDetailFromJSON(json: any): TransactionDetail;
173
174
  export declare function TransactionDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionDetail;
174
175
  export declare function TransactionDetailToJSON(value?: TransactionDetail | null): any;