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,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.BudgetSummaryToJSON = exports.BudgetSummaryFromJSONTyped = exports.BudgetSummaryFromJSON = exports.instanceOfBudgetSummary = void 0;
17
- const runtime_1 = require("../runtime");
18
12
  const Account_1 = require("./Account");
19
13
  const CurrencyFormat_1 = require("./CurrencyFormat");
20
14
  const DateFormat_1 = require("./DateFormat");
@@ -22,10 +16,11 @@ const DateFormat_1 = require("./DateFormat");
22
16
  * Check if a given object implements the BudgetSummary interface.
23
17
  */
24
18
  function instanceOfBudgetSummary(value) {
25
- let isInstance = true;
26
- isInstance = isInstance && "id" in value;
27
- isInstance = isInstance && "name" in value;
28
- return isInstance;
19
+ if (!('id' in value) || value['id'] === undefined)
20
+ return false;
21
+ if (!('name' in value) || value['name'] === undefined)
22
+ return false;
23
+ return true;
29
24
  }
30
25
  exports.instanceOfBudgetSummary = instanceOfBudgetSummary;
31
26
  function BudgetSummaryFromJSON(json) {
@@ -33,37 +28,34 @@ function BudgetSummaryFromJSON(json) {
33
28
  }
34
29
  exports.BudgetSummaryFromJSON = BudgetSummaryFromJSON;
35
30
  function BudgetSummaryFromJSONTyped(json, ignoreDiscriminator) {
36
- if ((json === undefined) || (json === null)) {
31
+ if (json == null) {
37
32
  return json;
38
33
  }
39
34
  return {
40
35
  'id': json['id'],
41
36
  'name': json['name'],
42
- 'last_modified_on': !(0, runtime_1.exists)(json, 'last_modified_on') ? undefined : json['last_modified_on'],
43
- 'first_month': !(0, runtime_1.exists)(json, 'first_month') ? undefined : json['first_month'],
44
- 'last_month': !(0, runtime_1.exists)(json, 'last_month') ? undefined : json['last_month'],
45
- 'date_format': !(0, runtime_1.exists)(json, 'date_format') ? undefined : (0, DateFormat_1.DateFormatFromJSON)(json['date_format']),
46
- 'currency_format': !(0, runtime_1.exists)(json, 'currency_format') ? undefined : (0, CurrencyFormat_1.CurrencyFormatFromJSON)(json['currency_format']),
47
- 'accounts': !(0, runtime_1.exists)(json, 'accounts') ? undefined : (json['accounts'].map(Account_1.AccountFromJSON)),
37
+ 'last_modified_on': json['last_modified_on'] == null ? undefined : json['last_modified_on'],
38
+ 'first_month': json['first_month'] == null ? undefined : json['first_month'],
39
+ 'last_month': json['last_month'] == null ? undefined : json['last_month'],
40
+ 'date_format': json['date_format'] == null ? undefined : (0, DateFormat_1.DateFormatFromJSON)(json['date_format']),
41
+ 'currency_format': json['currency_format'] == null ? undefined : (0, CurrencyFormat_1.CurrencyFormatFromJSON)(json['currency_format']),
42
+ 'accounts': json['accounts'] == null ? undefined : (json['accounts'].map(Account_1.AccountFromJSON)),
48
43
  };
49
44
  }
50
45
  exports.BudgetSummaryFromJSONTyped = BudgetSummaryFromJSONTyped;
51
46
  function BudgetSummaryToJSON(value) {
52
- if (value === undefined) {
53
- return undefined;
54
- }
55
- if (value === null) {
56
- return null;
47
+ if (value == null) {
48
+ return value;
57
49
  }
58
50
  return {
59
- 'id': value.id,
60
- 'name': value.name,
61
- 'last_modified_on': value.last_modified_on,
62
- 'first_month': value.first_month,
63
- 'last_month': value.last_month,
64
- 'date_format': (0, DateFormat_1.DateFormatToJSON)(value.date_format),
65
- 'currency_format': (0, CurrencyFormat_1.CurrencyFormatToJSON)(value.currency_format),
66
- 'accounts': value.accounts === undefined ? undefined : (value.accounts.map(Account_1.AccountToJSON)),
51
+ 'id': value['id'],
52
+ 'name': value['name'],
53
+ 'last_modified_on': value['last_modified_on'],
54
+ 'first_month': value['first_month'],
55
+ 'last_month': value['last_month'],
56
+ 'date_format': (0, DateFormat_1.DateFormatToJSON)(value['date_format']),
57
+ 'currency_format': (0, CurrencyFormat_1.CurrencyFormatToJSON)(value['currency_format']),
58
+ 'accounts': value['accounts'] == null ? undefined : (value['accounts'].map(Account_1.AccountToJSON)),
67
59
  };
68
60
  }
69
61
  exports.BudgetSummaryToJSON = BudgetSummaryToJSON;
@@ -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 { BudgetSummaryResponseData } from './BudgetSummaryResponseData';
13
8
  /**
@@ -26,7 +21,7 @@ export interface BudgetSummaryResponse {
26
21
  /**
27
22
  * Check if a given object implements the BudgetSummaryResponse interface.
28
23
  */
29
- export declare function instanceOfBudgetSummaryResponse(value: object): boolean;
24
+ export declare function instanceOfBudgetSummaryResponse(value: object): value is BudgetSummaryResponse;
30
25
  export declare function BudgetSummaryResponseFromJSON(json: any): BudgetSummaryResponse;
31
26
  export declare function BudgetSummaryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BudgetSummaryResponse;
32
27
  export declare function BudgetSummaryResponseToJSON(value?: BudgetSummaryResponse | 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.BudgetSummaryResponseToJSON = exports.BudgetSummaryResponseFromJSONTyped = exports.BudgetSummaryResponseFromJSON = exports.instanceOfBudgetSummaryResponse = void 0;
@@ -19,9 +14,9 @@ const BudgetSummaryResponseData_1 = require("./BudgetSummaryResponseData");
19
14
  * Check if a given object implements the BudgetSummaryResponse interface.
20
15
  */
21
16
  function instanceOfBudgetSummaryResponse(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.instanceOfBudgetSummaryResponse = instanceOfBudgetSummaryResponse;
27
22
  function BudgetSummaryResponseFromJSON(json) {
@@ -29,7 +24,7 @@ function BudgetSummaryResponseFromJSON(json) {
29
24
  }
30
25
  exports.BudgetSummaryResponseFromJSON = BudgetSummaryResponseFromJSON;
31
26
  function BudgetSummaryResponseFromJSONTyped(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 BudgetSummaryResponseFromJSONTyped(json, ignoreDiscriminator) {
38
33
  }
39
34
  exports.BudgetSummaryResponseFromJSONTyped = BudgetSummaryResponseFromJSONTyped;
40
35
  function BudgetSummaryResponseToJSON(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, BudgetSummaryResponseData_1.BudgetSummaryResponseDataToJSON)(value.data),
40
+ 'data': (0, BudgetSummaryResponseData_1.BudgetSummaryResponseDataToJSON)(value['data']),
49
41
  };
50
42
  }
51
43
  exports.BudgetSummaryResponseToJSON = BudgetSummaryResponseToJSON;
@@ -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 { BudgetSummary } from './BudgetSummary';
13
8
  /**
@@ -32,7 +27,7 @@ export interface BudgetSummaryResponseData {
32
27
  /**
33
28
  * Check if a given object implements the BudgetSummaryResponseData interface.
34
29
  */
35
- export declare function instanceOfBudgetSummaryResponseData(value: object): boolean;
30
+ export declare function instanceOfBudgetSummaryResponseData(value: object): value is BudgetSummaryResponseData;
36
31
  export declare function BudgetSummaryResponseDataFromJSON(json: any): BudgetSummaryResponseData;
37
32
  export declare function BudgetSummaryResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BudgetSummaryResponseData;
38
33
  export declare function BudgetSummaryResponseDataToJSON(value?: BudgetSummaryResponseData | null): any;
@@ -5,24 +5,18 @@
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.BudgetSummaryResponseDataToJSON = exports.BudgetSummaryResponseDataFromJSONTyped = exports.BudgetSummaryResponseDataFromJSON = exports.instanceOfBudgetSummaryResponseData = void 0;
17
- const runtime_1 = require("../runtime");
18
12
  const BudgetSummary_1 = require("./BudgetSummary");
19
13
  /**
20
14
  * Check if a given object implements the BudgetSummaryResponseData interface.
21
15
  */
22
16
  function instanceOfBudgetSummaryResponseData(value) {
23
- let isInstance = true;
24
- isInstance = isInstance && "budgets" in value;
25
- return isInstance;
17
+ if (!('budgets' in value) || value['budgets'] === undefined)
18
+ return false;
19
+ return true;
26
20
  }
27
21
  exports.instanceOfBudgetSummaryResponseData = instanceOfBudgetSummaryResponseData;
28
22
  function BudgetSummaryResponseDataFromJSON(json) {
@@ -30,25 +24,22 @@ function BudgetSummaryResponseDataFromJSON(json) {
30
24
  }
31
25
  exports.BudgetSummaryResponseDataFromJSON = BudgetSummaryResponseDataFromJSON;
32
26
  function BudgetSummaryResponseDataFromJSONTyped(json, ignoreDiscriminator) {
33
- if ((json === undefined) || (json === null)) {
27
+ if (json == null) {
34
28
  return json;
35
29
  }
36
30
  return {
37
31
  'budgets': (json['budgets'].map(BudgetSummary_1.BudgetSummaryFromJSON)),
38
- 'default_budget': !(0, runtime_1.exists)(json, 'default_budget') ? undefined : (0, BudgetSummary_1.BudgetSummaryFromJSON)(json['default_budget']),
32
+ 'default_budget': json['default_budget'] == null ? undefined : (0, BudgetSummary_1.BudgetSummaryFromJSON)(json['default_budget']),
39
33
  };
40
34
  }
41
35
  exports.BudgetSummaryResponseDataFromJSONTyped = BudgetSummaryResponseDataFromJSONTyped;
42
36
  function BudgetSummaryResponseDataToJSON(value) {
43
- if (value === undefined) {
44
- return undefined;
45
- }
46
- if (value === null) {
47
- return null;
37
+ if (value == null) {
38
+ return value;
48
39
  }
49
40
  return {
50
- 'budgets': (value.budgets.map(BudgetSummary_1.BudgetSummaryToJSON)),
51
- 'default_budget': (0, BudgetSummary_1.BudgetSummaryToJSON)(value.default_budget),
41
+ 'budgets': (value['budgets'].map(BudgetSummary_1.BudgetSummaryToJSON)),
42
+ 'default_budget': (0, BudgetSummary_1.BudgetSummaryToJSON)(value['default_budget']),
52
43
  };
53
44
  }
54
45
  exports.BudgetSummaryResponseDataToJSON = BudgetSummaryResponseDataToJSON;
@@ -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 { BulkResponseData } from './BulkResponseData';
13
8
  /**
@@ -26,7 +21,7 @@ export interface BulkResponse {
26
21
  /**
27
22
  * Check if a given object implements the BulkResponse interface.
28
23
  */
29
- export declare function instanceOfBulkResponse(value: object): boolean;
24
+ export declare function instanceOfBulkResponse(value: object): value is BulkResponse;
30
25
  export declare function BulkResponseFromJSON(json: any): BulkResponse;
31
26
  export declare function BulkResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkResponse;
32
27
  export declare function BulkResponseToJSON(value?: BulkResponse | 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.BulkResponseToJSON = exports.BulkResponseFromJSONTyped = exports.BulkResponseFromJSON = exports.instanceOfBulkResponse = void 0;
@@ -19,9 +14,9 @@ const BulkResponseData_1 = require("./BulkResponseData");
19
14
  * Check if a given object implements the BulkResponse interface.
20
15
  */
21
16
  function instanceOfBulkResponse(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.instanceOfBulkResponse = instanceOfBulkResponse;
27
22
  function BulkResponseFromJSON(json) {
@@ -29,7 +24,7 @@ function BulkResponseFromJSON(json) {
29
24
  }
30
25
  exports.BulkResponseFromJSON = BulkResponseFromJSON;
31
26
  function BulkResponseFromJSONTyped(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 BulkResponseFromJSONTyped(json, ignoreDiscriminator) {
38
33
  }
39
34
  exports.BulkResponseFromJSONTyped = BulkResponseFromJSONTyped;
40
35
  function BulkResponseToJSON(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, BulkResponseData_1.BulkResponseDataToJSON)(value.data),
40
+ 'data': (0, BulkResponseData_1.BulkResponseDataToJSON)(value['data']),
49
41
  };
50
42
  }
51
43
  exports.BulkResponseToJSON = BulkResponseToJSON;
@@ -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 { BulkResponseDataBulk } from './BulkResponseDataBulk';
13
8
  /**
@@ -26,7 +21,7 @@ export interface BulkResponseData {
26
21
  /**
27
22
  * Check if a given object implements the BulkResponseData interface.
28
23
  */
29
- export declare function instanceOfBulkResponseData(value: object): boolean;
24
+ export declare function instanceOfBulkResponseData(value: object): value is BulkResponseData;
30
25
  export declare function BulkResponseDataFromJSON(json: any): BulkResponseData;
31
26
  export declare function BulkResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkResponseData;
32
27
  export declare function BulkResponseDataToJSON(value?: BulkResponseData | 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.BulkResponseDataToJSON = exports.BulkResponseDataFromJSONTyped = exports.BulkResponseDataFromJSON = exports.instanceOfBulkResponseData = void 0;
@@ -19,9 +14,9 @@ const BulkResponseDataBulk_1 = require("./BulkResponseDataBulk");
19
14
  * Check if a given object implements the BulkResponseData interface.
20
15
  */
21
16
  function instanceOfBulkResponseData(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "bulk" in value;
24
- return isInstance;
17
+ if (!('bulk' in value) || value['bulk'] === undefined)
18
+ return false;
19
+ return true;
25
20
  }
26
21
  exports.instanceOfBulkResponseData = instanceOfBulkResponseData;
27
22
  function BulkResponseDataFromJSON(json) {
@@ -29,7 +24,7 @@ function BulkResponseDataFromJSON(json) {
29
24
  }
30
25
  exports.BulkResponseDataFromJSON = BulkResponseDataFromJSON;
31
26
  function BulkResponseDataFromJSONTyped(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 BulkResponseDataFromJSONTyped(json, ignoreDiscriminator) {
38
33
  }
39
34
  exports.BulkResponseDataFromJSONTyped = BulkResponseDataFromJSONTyped;
40
35
  function BulkResponseDataToJSON(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
- 'bulk': (0, BulkResponseDataBulk_1.BulkResponseDataBulkToJSON)(value.bulk),
40
+ 'bulk': (0, BulkResponseDataBulk_1.BulkResponseDataBulkToJSON)(value['bulk']),
49
41
  };
50
42
  }
51
43
  exports.BulkResponseDataToJSON = BulkResponseDataToJSON;
@@ -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
  *
@@ -31,7 +26,7 @@ export interface BulkResponseDataBulk {
31
26
  /**
32
27
  * Check if a given object implements the BulkResponseDataBulk interface.
33
28
  */
34
- export declare function instanceOfBulkResponseDataBulk(value: object): boolean;
29
+ export declare function instanceOfBulkResponseDataBulk(value: object): value is BulkResponseDataBulk;
35
30
  export declare function BulkResponseDataBulkFromJSON(json: any): BulkResponseDataBulk;
36
31
  export declare function BulkResponseDataBulkFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkResponseDataBulk;
37
32
  export declare function BulkResponseDataBulkToJSON(value?: BulkResponseDataBulk | 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.BulkResponseDataBulkToJSON = exports.BulkResponseDataBulkFromJSONTyped = exports.BulkResponseDataBulkFromJSON = exports.instanceOfBulkResponseDataBulk = void 0;
@@ -18,10 +13,11 @@ exports.BulkResponseDataBulkToJSON = exports.BulkResponseDataBulkFromJSONTyped =
18
13
  * Check if a given object implements the BulkResponseDataBulk interface.
19
14
  */
20
15
  function instanceOfBulkResponseDataBulk(value) {
21
- let isInstance = true;
22
- isInstance = isInstance && "transaction_ids" in value;
23
- isInstance = isInstance && "duplicate_import_ids" in value;
24
- return isInstance;
16
+ if (!('transaction_ids' in value) || value['transaction_ids'] === undefined)
17
+ return false;
18
+ if (!('duplicate_import_ids' in value) || value['duplicate_import_ids'] === undefined)
19
+ return false;
20
+ return true;
25
21
  }
26
22
  exports.instanceOfBulkResponseDataBulk = instanceOfBulkResponseDataBulk;
27
23
  function BulkResponseDataBulkFromJSON(json) {
@@ -29,7 +25,7 @@ function BulkResponseDataBulkFromJSON(json) {
29
25
  }
30
26
  exports.BulkResponseDataBulkFromJSON = BulkResponseDataBulkFromJSON;
31
27
  function BulkResponseDataBulkFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
28
+ if (json == null) {
33
29
  return json;
34
30
  }
35
31
  return {
@@ -39,15 +35,12 @@ function BulkResponseDataBulkFromJSONTyped(json, ignoreDiscriminator) {
39
35
  }
40
36
  exports.BulkResponseDataBulkFromJSONTyped = BulkResponseDataBulkFromJSONTyped;
41
37
  function BulkResponseDataBulkToJSON(value) {
42
- if (value === undefined) {
43
- return undefined;
44
- }
45
- if (value === null) {
46
- return null;
38
+ if (value == null) {
39
+ return value;
47
40
  }
48
41
  return {
49
- 'transaction_ids': value.transaction_ids,
50
- 'duplicate_import_ids': value.duplicate_import_ids,
42
+ 'transaction_ids': value['transaction_ids'],
43
+ 'duplicate_import_ids': value['duplicate_import_ids'],
51
44
  };
52
45
  }
53
46
  exports.BulkResponseDataBulkToJSON = BulkResponseDataBulkToJSON;
@@ -2,14 +2,9 @@
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 { SaveTransaction } from './SaveTransaction';
7
+ import type { SaveTransactionWithOptionalFields } from './SaveTransactionWithOptionalFields';
13
8
  /**
14
9
  *
15
10
  * @export
@@ -18,15 +13,15 @@ import type { SaveTransaction } from './SaveTransaction';
18
13
  export interface BulkTransactions {
19
14
  /**
20
15
  *
21
- * @type {Array<SaveTransaction>}
16
+ * @type {Array<SaveTransactionWithOptionalFields>}
22
17
  * @memberof BulkTransactions
23
18
  */
24
- transactions: Array<SaveTransaction>;
19
+ transactions: Array<SaveTransactionWithOptionalFields>;
25
20
  }
26
21
  /**
27
22
  * Check if a given object implements the BulkTransactions interface.
28
23
  */
29
- export declare function instanceOfBulkTransactions(value: object): boolean;
24
+ export declare function instanceOfBulkTransactions(value: object): value is BulkTransactions;
30
25
  export declare function BulkTransactionsFromJSON(json: any): BulkTransactions;
31
26
  export declare function BulkTransactionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkTransactions;
32
27
  export declare function BulkTransactionsToJSON(value?: BulkTransactions | null): any;
@@ -5,23 +5,18 @@
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.BulkTransactionsToJSON = exports.BulkTransactionsFromJSONTyped = exports.BulkTransactionsFromJSON = exports.instanceOfBulkTransactions = void 0;
17
- const SaveTransaction_1 = require("./SaveTransaction");
12
+ const SaveTransactionWithOptionalFields_1 = require("./SaveTransactionWithOptionalFields");
18
13
  /**
19
14
  * Check if a given object implements the BulkTransactions interface.
20
15
  */
21
16
  function instanceOfBulkTransactions(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "transactions" in value;
24
- return isInstance;
17
+ if (!('transactions' in value) || value['transactions'] === undefined)
18
+ return false;
19
+ return true;
25
20
  }
26
21
  exports.instanceOfBulkTransactions = instanceOfBulkTransactions;
27
22
  function BulkTransactionsFromJSON(json) {
@@ -29,23 +24,20 @@ function BulkTransactionsFromJSON(json) {
29
24
  }
30
25
  exports.BulkTransactionsFromJSON = BulkTransactionsFromJSON;
31
26
  function BulkTransactionsFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
27
+ if (json == null) {
33
28
  return json;
34
29
  }
35
30
  return {
36
- 'transactions': (json['transactions'].map(SaveTransaction_1.SaveTransactionFromJSON)),
31
+ 'transactions': (json['transactions'].map(SaveTransactionWithOptionalFields_1.SaveTransactionWithOptionalFieldsFromJSON)),
37
32
  };
38
33
  }
39
34
  exports.BulkTransactionsFromJSONTyped = BulkTransactionsFromJSONTyped;
40
35
  function BulkTransactionsToJSON(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
- 'transactions': (value.transactions.map(SaveTransaction_1.SaveTransactionToJSON)),
40
+ 'transactions': (value['transactions'].map(SaveTransactionWithOptionalFields_1.SaveTransactionWithOptionalFieldsToJSON)),
49
41
  };
50
42
  }
51
43
  exports.BulkTransactionsToJSON = BulkTransactionsToJSON;
@@ -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 { CategoriesResponseData } from './CategoriesResponseData';
13
8
  /**
@@ -26,7 +21,7 @@ export interface CategoriesResponse {
26
21
  /**
27
22
  * Check if a given object implements the CategoriesResponse interface.
28
23
  */
29
- export declare function instanceOfCategoriesResponse(value: object): boolean;
24
+ export declare function instanceOfCategoriesResponse(value: object): value is CategoriesResponse;
30
25
  export declare function CategoriesResponseFromJSON(json: any): CategoriesResponse;
31
26
  export declare function CategoriesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CategoriesResponse;
32
27
  export declare function CategoriesResponseToJSON(value?: CategoriesResponse | null): any;