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.CategoryResponseDataToJSON = exports.CategoryResponseDataFromJSONTyped = exports.CategoryResponseDataFromJSON = exports.instanceOfCategoryResponseData = void 0;
@@ -19,9 +14,9 @@ const Category_1 = require("./Category");
19
14
  * Check if a given object implements the CategoryResponseData interface.
20
15
  */
21
16
  function instanceOfCategoryResponseData(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "category" in value;
24
- return isInstance;
17
+ if (!('category' in value) || value['category'] === undefined)
18
+ return false;
19
+ return true;
25
20
  }
26
21
  exports.instanceOfCategoryResponseData = instanceOfCategoryResponseData;
27
22
  function CategoryResponseDataFromJSON(json) {
@@ -29,7 +24,7 @@ function CategoryResponseDataFromJSON(json) {
29
24
  }
30
25
  exports.CategoryResponseDataFromJSON = CategoryResponseDataFromJSON;
31
26
  function CategoryResponseDataFromJSONTyped(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 CategoryResponseDataFromJSONTyped(json, ignoreDiscriminator) {
38
33
  }
39
34
  exports.CategoryResponseDataFromJSONTyped = CategoryResponseDataFromJSONTyped;
40
35
  function CategoryResponseDataToJSON(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
- 'category': (0, Category_1.CategoryToJSON)(value.category),
40
+ 'category': (0, Category_1.CategoryToJSON)(value['category']),
49
41
  };
50
42
  }
51
43
  exports.CategoryResponseDataToJSON = CategoryResponseDataToJSON;
@@ -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 currency format setting for the budget. In some cases the format will not be available and will be specified as null.
@@ -67,7 +62,7 @@ export interface CurrencyFormat {
67
62
  /**
68
63
  * Check if a given object implements the CurrencyFormat interface.
69
64
  */
70
- export declare function instanceOfCurrencyFormat(value: object): boolean;
65
+ export declare function instanceOfCurrencyFormat(value: object): value is CurrencyFormat;
71
66
  export declare function CurrencyFormatFromJSON(json: any): CurrencyFormat;
72
67
  export declare function CurrencyFormatFromJSONTyped(json: any, ignoreDiscriminator: boolean): CurrencyFormat;
73
68
  export declare function CurrencyFormatToJSON(value?: CurrencyFormat | 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.CurrencyFormatToJSON = exports.CurrencyFormatFromJSONTyped = exports.CurrencyFormatFromJSON = exports.instanceOfCurrencyFormat = void 0;
@@ -18,16 +13,23 @@ exports.CurrencyFormatToJSON = exports.CurrencyFormatFromJSONTyped = exports.Cur
18
13
  * Check if a given object implements the CurrencyFormat interface.
19
14
  */
20
15
  function instanceOfCurrencyFormat(value) {
21
- let isInstance = true;
22
- isInstance = isInstance && "iso_code" in value;
23
- isInstance = isInstance && "example_format" in value;
24
- isInstance = isInstance && "decimal_digits" in value;
25
- isInstance = isInstance && "decimal_separator" in value;
26
- isInstance = isInstance && "symbol_first" in value;
27
- isInstance = isInstance && "group_separator" in value;
28
- isInstance = isInstance && "currency_symbol" in value;
29
- isInstance = isInstance && "display_symbol" in value;
30
- return isInstance;
16
+ if (!('iso_code' in value) || value['iso_code'] === undefined)
17
+ return false;
18
+ if (!('example_format' in value) || value['example_format'] === undefined)
19
+ return false;
20
+ if (!('decimal_digits' in value) || value['decimal_digits'] === undefined)
21
+ return false;
22
+ if (!('decimal_separator' in value) || value['decimal_separator'] === undefined)
23
+ return false;
24
+ if (!('symbol_first' in value) || value['symbol_first'] === undefined)
25
+ return false;
26
+ if (!('group_separator' in value) || value['group_separator'] === undefined)
27
+ return false;
28
+ if (!('currency_symbol' in value) || value['currency_symbol'] === undefined)
29
+ return false;
30
+ if (!('display_symbol' in value) || value['display_symbol'] === undefined)
31
+ return false;
32
+ return true;
31
33
  }
32
34
  exports.instanceOfCurrencyFormat = instanceOfCurrencyFormat;
33
35
  function CurrencyFormatFromJSON(json) {
@@ -35,7 +37,7 @@ function CurrencyFormatFromJSON(json) {
35
37
  }
36
38
  exports.CurrencyFormatFromJSON = CurrencyFormatFromJSON;
37
39
  function CurrencyFormatFromJSONTyped(json, ignoreDiscriminator) {
38
- if ((json === undefined) || (json === null)) {
40
+ if (json == null) {
39
41
  return json;
40
42
  }
41
43
  return {
@@ -51,21 +53,18 @@ function CurrencyFormatFromJSONTyped(json, ignoreDiscriminator) {
51
53
  }
52
54
  exports.CurrencyFormatFromJSONTyped = CurrencyFormatFromJSONTyped;
53
55
  function CurrencyFormatToJSON(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
- 'iso_code': value.iso_code,
62
- 'example_format': value.example_format,
63
- 'decimal_digits': value.decimal_digits,
64
- 'decimal_separator': value.decimal_separator,
65
- 'symbol_first': value.symbol_first,
66
- 'group_separator': value.group_separator,
67
- 'currency_symbol': value.currency_symbol,
68
- 'display_symbol': value.display_symbol,
60
+ 'iso_code': value['iso_code'],
61
+ 'example_format': value['example_format'],
62
+ 'decimal_digits': value['decimal_digits'],
63
+ 'decimal_separator': value['decimal_separator'],
64
+ 'symbol_first': value['symbol_first'],
65
+ 'group_separator': value['group_separator'],
66
+ 'currency_symbol': value['currency_symbol'],
67
+ 'display_symbol': value['display_symbol'],
69
68
  };
70
69
  }
71
70
  exports.CurrencyFormatToJSON = CurrencyFormatToJSON;
@@ -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 date format setting for the budget. In some cases the format will not be available and will be specified as null.
@@ -25,7 +20,7 @@ export interface DateFormat {
25
20
  /**
26
21
  * Check if a given object implements the DateFormat interface.
27
22
  */
28
- export declare function instanceOfDateFormat(value: object): boolean;
23
+ export declare function instanceOfDateFormat(value: object): value is DateFormat;
29
24
  export declare function DateFormatFromJSON(json: any): DateFormat;
30
25
  export declare function DateFormatFromJSONTyped(json: any, ignoreDiscriminator: boolean): DateFormat;
31
26
  export declare function DateFormatToJSON(value?: DateFormat | 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.DateFormatToJSON = exports.DateFormatFromJSONTyped = exports.DateFormatFromJSON = exports.instanceOfDateFormat = void 0;
@@ -18,9 +13,9 @@ exports.DateFormatToJSON = exports.DateFormatFromJSONTyped = exports.DateFormatF
18
13
  * Check if a given object implements the DateFormat interface.
19
14
  */
20
15
  function instanceOfDateFormat(value) {
21
- let isInstance = true;
22
- isInstance = isInstance && "format" in value;
23
- return isInstance;
16
+ if (!('format' in value) || value['format'] === undefined)
17
+ return false;
18
+ return true;
24
19
  }
25
20
  exports.instanceOfDateFormat = instanceOfDateFormat;
26
21
  function DateFormatFromJSON(json) {
@@ -28,7 +23,7 @@ function DateFormatFromJSON(json) {
28
23
  }
29
24
  exports.DateFormatFromJSON = DateFormatFromJSON;
30
25
  function DateFormatFromJSONTyped(json, ignoreDiscriminator) {
31
- if ((json === undefined) || (json === null)) {
26
+ if (json == null) {
32
27
  return json;
33
28
  }
34
29
  return {
@@ -37,14 +32,11 @@ function DateFormatFromJSONTyped(json, ignoreDiscriminator) {
37
32
  }
38
33
  exports.DateFormatFromJSONTyped = DateFormatFromJSONTyped;
39
34
  function DateFormatToJSON(value) {
40
- if (value === undefined) {
41
- return undefined;
42
- }
43
- if (value === null) {
44
- return null;
35
+ if (value == null) {
36
+ return value;
45
37
  }
46
38
  return {
47
- 'format': value.format,
39
+ 'format': value['format'],
48
40
  };
49
41
  }
50
42
  exports.DateFormatToJSON = DateFormatToJSON;
@@ -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
  *
@@ -37,7 +32,7 @@ export interface ErrorDetail {
37
32
  /**
38
33
  * Check if a given object implements the ErrorDetail interface.
39
34
  */
40
- export declare function instanceOfErrorDetail(value: object): boolean;
35
+ export declare function instanceOfErrorDetail(value: object): value is ErrorDetail;
41
36
  export declare function ErrorDetailFromJSON(json: any): ErrorDetail;
42
37
  export declare function ErrorDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorDetail;
43
38
  export declare function ErrorDetailToJSON(value?: ErrorDetail | 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.ErrorDetailToJSON = exports.ErrorDetailFromJSONTyped = exports.ErrorDetailFromJSON = exports.instanceOfErrorDetail = void 0;
@@ -18,11 +13,13 @@ exports.ErrorDetailToJSON = exports.ErrorDetailFromJSONTyped = exports.ErrorDeta
18
13
  * Check if a given object implements the ErrorDetail interface.
19
14
  */
20
15
  function instanceOfErrorDetail(value) {
21
- let isInstance = true;
22
- isInstance = isInstance && "id" in value;
23
- isInstance = isInstance && "name" in value;
24
- isInstance = isInstance && "detail" in value;
25
- return isInstance;
16
+ if (!('id' in value) || value['id'] === undefined)
17
+ return false;
18
+ if (!('name' in value) || value['name'] === undefined)
19
+ return false;
20
+ if (!('detail' in value) || value['detail'] === undefined)
21
+ return false;
22
+ return true;
26
23
  }
27
24
  exports.instanceOfErrorDetail = instanceOfErrorDetail;
28
25
  function ErrorDetailFromJSON(json) {
@@ -30,7 +27,7 @@ function ErrorDetailFromJSON(json) {
30
27
  }
31
28
  exports.ErrorDetailFromJSON = ErrorDetailFromJSON;
32
29
  function ErrorDetailFromJSONTyped(json, ignoreDiscriminator) {
33
- if ((json === undefined) || (json === null)) {
30
+ if (json == null) {
34
31
  return json;
35
32
  }
36
33
  return {
@@ -41,16 +38,13 @@ function ErrorDetailFromJSONTyped(json, ignoreDiscriminator) {
41
38
  }
42
39
  exports.ErrorDetailFromJSONTyped = ErrorDetailFromJSONTyped;
43
40
  function ErrorDetailToJSON(value) {
44
- if (value === undefined) {
45
- return undefined;
46
- }
47
- if (value === null) {
48
- return null;
41
+ if (value == null) {
42
+ return value;
49
43
  }
50
44
  return {
51
- 'id': value.id,
52
- 'name': value.name,
53
- 'detail': value.detail,
45
+ 'id': value['id'],
46
+ 'name': value['name'],
47
+ 'detail': value['detail'],
54
48
  };
55
49
  }
56
50
  exports.ErrorDetailToJSON = ErrorDetailToJSON;
@@ -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 { ErrorDetail } from './ErrorDetail';
13
8
  /**
@@ -26,7 +21,7 @@ export interface ErrorResponse {
26
21
  /**
27
22
  * Check if a given object implements the ErrorResponse interface.
28
23
  */
29
- export declare function instanceOfErrorResponse(value: object): boolean;
24
+ export declare function instanceOfErrorResponse(value: object): value is ErrorResponse;
30
25
  export declare function ErrorResponseFromJSON(json: any): ErrorResponse;
31
26
  export declare function ErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorResponse;
32
27
  export declare function ErrorResponseToJSON(value?: ErrorResponse | 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.ErrorResponseToJSON = exports.ErrorResponseFromJSONTyped = exports.ErrorResponseFromJSON = exports.instanceOfErrorResponse = void 0;
@@ -19,9 +14,9 @@ const ErrorDetail_1 = require("./ErrorDetail");
19
14
  * Check if a given object implements the ErrorResponse interface.
20
15
  */
21
16
  function instanceOfErrorResponse(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "error" in value;
24
- return isInstance;
17
+ if (!('error' in value) || value['error'] === undefined)
18
+ return false;
19
+ return true;
25
20
  }
26
21
  exports.instanceOfErrorResponse = instanceOfErrorResponse;
27
22
  function ErrorResponseFromJSON(json) {
@@ -29,7 +24,7 @@ function ErrorResponseFromJSON(json) {
29
24
  }
30
25
  exports.ErrorResponseFromJSON = ErrorResponseFromJSON;
31
26
  function ErrorResponseFromJSONTyped(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 ErrorResponseFromJSONTyped(json, ignoreDiscriminator) {
38
33
  }
39
34
  exports.ErrorResponseFromJSONTyped = ErrorResponseFromJSONTyped;
40
35
  function ErrorResponseToJSON(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
- 'error': (0, ErrorDetail_1.ErrorDetailToJSON)(value.error),
40
+ 'error': (0, ErrorDetail_1.ErrorDetailToJSON)(value['error']),
49
41
  };
50
42
  }
51
43
  exports.ErrorResponseToJSON = ErrorResponseToJSON;
@@ -0,0 +1,89 @@
1
+ /**
2
+ * YNAB API Endpoints
3
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
4
+ *
5
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
6
+ */
7
+ import type { TransactionFlagColor } from './TransactionFlagColor';
8
+ import type { TransactionClearedStatus } from './TransactionClearedStatus';
9
+ import type { SaveSubTransaction } from './SaveSubTransaction';
10
+ /**
11
+ *
12
+ * @export
13
+ * @interface ExistingTransaction
14
+ */
15
+ export interface ExistingTransaction {
16
+ /**
17
+ *
18
+ * @type {string}
19
+ * @memberof ExistingTransaction
20
+ */
21
+ account_id?: string;
22
+ /**
23
+ * The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored.
24
+ * @type {string}
25
+ * @memberof ExistingTransaction
26
+ */
27
+ date?: string;
28
+ /**
29
+ * The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored.
30
+ * @type {number}
31
+ * @memberof ExistingTransaction
32
+ */
33
+ amount?: number;
34
+ /**
35
+ * The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `transfer_payee_id` on the account resource.
36
+ * @type {string}
37
+ * @memberof ExistingTransaction
38
+ */
39
+ payee_id?: string | null;
40
+ /**
41
+ * The payee name. If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if `import_id` is also specified) or (2) a payee with the same name or (3) creation of a new payee.
42
+ * @type {string}
43
+ * @memberof ExistingTransaction
44
+ */
45
+ payee_name?: string | null;
46
+ /**
47
+ * The category for the transaction. To configure a split transaction, you can specify null for `category_id` and provide a `subtransactions` array as part of the transaction object. If an existing transaction is a split, the `category_id` cannot be changed. Credit Card Payment categories are not permitted and will be ignored if supplied.
48
+ * @type {string}
49
+ * @memberof ExistingTransaction
50
+ */
51
+ category_id?: string | null;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof ExistingTransaction
56
+ */
57
+ memo?: string | null;
58
+ /**
59
+ *
60
+ * @type {TransactionClearedStatus}
61
+ * @memberof ExistingTransaction
62
+ */
63
+ cleared?: TransactionClearedStatus;
64
+ /**
65
+ * Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default.
66
+ * @type {boolean}
67
+ * @memberof ExistingTransaction
68
+ */
69
+ approved?: boolean;
70
+ /**
71
+ *
72
+ * @type {TransactionFlagColor}
73
+ * @memberof ExistingTransaction
74
+ */
75
+ flag_color?: TransactionFlagColor | null;
76
+ /**
77
+ * An array of subtransactions to configure a transaction as a split. Updating `subtransactions` on an existing split transaction is not supported.
78
+ * @type {Array<SaveSubTransaction>}
79
+ * @memberof ExistingTransaction
80
+ */
81
+ subtransactions?: Array<SaveSubTransaction>;
82
+ }
83
+ /**
84
+ * Check if a given object implements the ExistingTransaction interface.
85
+ */
86
+ export declare function instanceOfExistingTransaction(value: object): value is ExistingTransaction;
87
+ export declare function ExistingTransactionFromJSON(json: any): ExistingTransaction;
88
+ export declare function ExistingTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExistingTransaction;
89
+ export declare function ExistingTransactionToJSON(value?: ExistingTransaction | null): any;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * YNAB API Endpoints
6
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
7
+ *
8
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.ExistingTransactionToJSON = exports.ExistingTransactionFromJSONTyped = exports.ExistingTransactionFromJSON = exports.instanceOfExistingTransaction = void 0;
12
+ const TransactionFlagColor_1 = require("./TransactionFlagColor");
13
+ const TransactionClearedStatus_1 = require("./TransactionClearedStatus");
14
+ const SaveSubTransaction_1 = require("./SaveSubTransaction");
15
+ /**
16
+ * Check if a given object implements the ExistingTransaction interface.
17
+ */
18
+ function instanceOfExistingTransaction(value) {
19
+ return true;
20
+ }
21
+ exports.instanceOfExistingTransaction = instanceOfExistingTransaction;
22
+ function ExistingTransactionFromJSON(json) {
23
+ return ExistingTransactionFromJSONTyped(json, false);
24
+ }
25
+ exports.ExistingTransactionFromJSON = ExistingTransactionFromJSON;
26
+ function ExistingTransactionFromJSONTyped(json, ignoreDiscriminator) {
27
+ if (json == null) {
28
+ return json;
29
+ }
30
+ return {
31
+ 'account_id': json['account_id'] == null ? undefined : json['account_id'],
32
+ 'date': json['date'] == null ? undefined : json['date'],
33
+ 'amount': json['amount'] == null ? undefined : json['amount'],
34
+ 'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
35
+ 'payee_name': json['payee_name'] == null ? undefined : json['payee_name'],
36
+ 'category_id': json['category_id'] == null ? undefined : json['category_id'],
37
+ 'memo': json['memo'] == null ? undefined : json['memo'],
38
+ 'cleared': json['cleared'] == null ? undefined : (0, TransactionClearedStatus_1.TransactionClearedStatusFromJSON)(json['cleared']),
39
+ 'approved': json['approved'] == null ? undefined : json['approved'],
40
+ 'flag_color': json['flag_color'] == null ? undefined : (0, TransactionFlagColor_1.TransactionFlagColorFromJSON)(json['flag_color']),
41
+ 'subtransactions': json['subtransactions'] == null ? undefined : (json['subtransactions'].map(SaveSubTransaction_1.SaveSubTransactionFromJSON)),
42
+ };
43
+ }
44
+ exports.ExistingTransactionFromJSONTyped = ExistingTransactionFromJSONTyped;
45
+ function ExistingTransactionToJSON(value) {
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'account_id': value['account_id'],
51
+ 'date': value['date'],
52
+ 'amount': value['amount'],
53
+ 'payee_id': value['payee_id'],
54
+ 'payee_name': value['payee_name'],
55
+ 'category_id': value['category_id'],
56
+ 'memo': value['memo'],
57
+ 'cleared': (0, TransactionClearedStatus_1.TransactionClearedStatusToJSON)(value['cleared']),
58
+ 'approved': value['approved'],
59
+ 'flag_color': (0, TransactionFlagColor_1.TransactionFlagColorToJSON)(value['flag_color']),
60
+ 'subtransactions': value['subtransactions'] == null ? undefined : (value['subtransactions'].map(SaveSubTransaction_1.SaveSubTransactionToJSON)),
61
+ };
62
+ }
63
+ exports.ExistingTransactionToJSON = ExistingTransactionToJSON;
@@ -2,15 +2,10 @@
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 { TransactionClearedStatus } from './TransactionClearedStatus';
13
7
  import type { TransactionFlagColor } from './TransactionFlagColor';
8
+ import type { TransactionClearedStatus } from './TransactionClearedStatus';
14
9
  /**
15
10
  *
16
11
  * @export
@@ -59,6 +54,12 @@ export interface HybridTransaction {
59
54
  * @memberof HybridTransaction
60
55
  */
61
56
  flag_color?: TransactionFlagColor | null;
57
+ /**
58
+ * The customized name of a transaction flag
59
+ * @type {string}
60
+ * @memberof HybridTransaction
61
+ */
62
+ flag_name?: string | null;
62
63
  /**
63
64
  *
64
65
  * @type {string}
@@ -118,7 +119,7 @@ export interface HybridTransaction {
118
119
  * @type {string}
119
120
  * @memberof HybridTransaction
120
121
  */
121
- debt_transaction_type?: HybridTransactionDebtTransactionTypeEnum;
122
+ debt_transaction_type?: HybridTransactionDebtTransactionTypeEnum | null;
122
123
  /**
123
124
  * Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
124
125
  * @type {boolean}
@@ -181,7 +182,7 @@ export type HybridTransactionTypeEnum = typeof HybridTransactionTypeEnum[keyof t
181
182
  /**
182
183
  * Check if a given object implements the HybridTransaction interface.
183
184
  */
184
- export declare function instanceOfHybridTransaction(value: object): boolean;
185
+ export declare function instanceOfHybridTransaction(value: object): value is HybridTransaction;
185
186
  export declare function HybridTransactionFromJSON(json: any): HybridTransaction;
186
187
  export declare function HybridTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): HybridTransaction;
187
188
  export declare function HybridTransactionToJSON(value?: HybridTransaction | null): any;