ynab 1.54.0 → 2.0.0-rc.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 (432) hide show
  1. package/README.md +31 -38
  2. package/dist/apis/AccountsApi.d.ts +60 -0
  3. package/dist/apis/AccountsApi.js +137 -0
  4. package/dist/apis/BudgetsApi.d.ts +58 -0
  5. package/dist/apis/BudgetsApi.js +129 -0
  6. package/dist/apis/CategoriesApi.d.ts +77 -0
  7. package/dist/apis/CategoriesApi.js +183 -0
  8. package/dist/{esm/transactionsApi.d.ts → apis/CustomTransactionsApi.d.ts} +19 -19
  9. package/dist/{transactionsApi.js → apis/CustomTransactionsApi.js} +24 -19
  10. package/dist/apis/DeprecatedApi.d.ts +32 -0
  11. package/dist/apis/DeprecatedApi.js +63 -0
  12. package/dist/apis/MonthsApi.d.ts +46 -0
  13. package/dist/apis/MonthsApi.js +98 -0
  14. package/dist/apis/PayeeLocationsApi.d.ts +59 -0
  15. package/dist/apis/PayeeLocationsApi.js +132 -0
  16. package/dist/apis/PayeesApi.d.ts +46 -0
  17. package/dist/apis/PayeesApi.js +98 -0
  18. package/dist/apis/ScheduledTransactionsApi.d.ts +46 -0
  19. package/dist/apis/ScheduledTransactionsApi.js +98 -0
  20. package/dist/apis/TransactionsApi.d.ts +201 -0
  21. package/dist/apis/TransactionsApi.js +461 -0
  22. package/dist/apis/UserApi.d.ts +28 -0
  23. package/dist/apis/UserApi.js +55 -0
  24. package/dist/apis/index.d.ts +10 -0
  25. package/dist/apis/index.js +24 -0
  26. package/dist/browser/ynab.js +1 -1
  27. package/dist/esm/apis/AccountsApi.d.ts +60 -0
  28. package/dist/esm/apis/AccountsApi.js +256 -0
  29. package/dist/esm/apis/BudgetsApi.d.ts +58 -0
  30. package/dist/esm/apis/BudgetsApi.js +248 -0
  31. package/dist/esm/apis/CategoriesApi.d.ts +77 -0
  32. package/dist/esm/apis/CategoriesApi.js +324 -0
  33. package/dist/{transactionsApi.d.ts → esm/apis/CustomTransactionsApi.d.ts} +19 -19
  34. package/dist/esm/{transactionsApi.js → apis/CustomTransactionsApi.js} +27 -22
  35. package/dist/esm/apis/DeprecatedApi.d.ts +32 -0
  36. package/dist/esm/apis/DeprecatedApi.js +138 -0
  37. package/dist/esm/apis/MonthsApi.d.ts +46 -0
  38. package/dist/esm/apis/MonthsApi.js +195 -0
  39. package/dist/esm/apis/PayeeLocationsApi.d.ts +59 -0
  40. package/dist/esm/apis/PayeeLocationsApi.js +251 -0
  41. package/dist/esm/apis/PayeesApi.d.ts +46 -0
  42. package/dist/esm/apis/PayeesApi.js +195 -0
  43. package/dist/esm/apis/ScheduledTransactionsApi.d.ts +46 -0
  44. package/dist/esm/apis/ScheduledTransactionsApi.js +195 -0
  45. package/dist/esm/apis/TransactionsApi.d.ts +201 -0
  46. package/dist/esm/apis/TransactionsApi.js +734 -0
  47. package/dist/esm/apis/UserApi.d.ts +28 -0
  48. package/dist/esm/apis/UserApi.js +130 -0
  49. package/dist/esm/apis/index.d.ts +10 -0
  50. package/dist/esm/apis/index.js +12 -0
  51. package/dist/esm/index.d.ts +24 -36
  52. package/dist/esm/index.js +22 -30
  53. package/dist/esm/models/Account.d.ts +140 -0
  54. package/dist/esm/models/Account.js +88 -0
  55. package/dist/esm/models/AccountResponse.d.ts +32 -0
  56. package/dist/esm/models/AccountResponse.js +44 -0
  57. package/dist/esm/models/AccountResponseData.d.ts +32 -0
  58. package/dist/esm/models/AccountResponseData.js +44 -0
  59. package/dist/esm/models/AccountType.d.ts +34 -0
  60. package/dist/esm/models/AccountType.js +41 -0
  61. package/dist/esm/models/AccountsResponse.d.ts +32 -0
  62. package/dist/esm/models/AccountsResponse.js +44 -0
  63. package/dist/esm/models/AccountsResponseData.d.ts +38 -0
  64. package/dist/esm/models/AccountsResponseData.js +47 -0
  65. package/dist/esm/models/BudgetDetail.d.ts +139 -0
  66. package/dist/esm/models/BudgetDetail.js +89 -0
  67. package/dist/esm/models/BudgetDetailAllOf.d.ts +95 -0
  68. package/dist/esm/models/BudgetDetailAllOf.js +71 -0
  69. package/dist/esm/models/BudgetDetailResponse.d.ts +32 -0
  70. package/dist/esm/models/BudgetDetailResponse.js +44 -0
  71. package/dist/esm/models/BudgetDetailResponseData.d.ts +38 -0
  72. package/dist/esm/models/BudgetDetailResponseData.js +47 -0
  73. package/dist/esm/models/BudgetSettings.d.ts +39 -0
  74. package/dist/esm/models/BudgetSettings.js +48 -0
  75. package/dist/esm/models/BudgetSettingsResponse.d.ts +32 -0
  76. package/dist/esm/models/BudgetSettingsResponse.js +44 -0
  77. package/dist/esm/models/BudgetSettingsResponseData.d.ts +32 -0
  78. package/dist/esm/models/BudgetSettingsResponseData.js +44 -0
  79. package/dist/esm/models/BudgetSummary.d.ts +76 -0
  80. package/dist/esm/models/BudgetSummary.js +62 -0
  81. package/dist/esm/models/BudgetSummaryResponse.d.ts +32 -0
  82. package/dist/esm/models/BudgetSummaryResponse.js +44 -0
  83. package/dist/esm/models/BudgetSummaryResponseData.d.ts +38 -0
  84. package/dist/esm/models/BudgetSummaryResponseData.js +47 -0
  85. package/dist/esm/models/BulkResponse.d.ts +32 -0
  86. package/dist/esm/models/BulkResponse.js +44 -0
  87. package/dist/esm/models/BulkResponseData.d.ts +32 -0
  88. package/dist/esm/models/BulkResponseData.js +44 -0
  89. package/dist/esm/models/BulkResponseDataBulk.d.ts +37 -0
  90. package/dist/esm/models/BulkResponseDataBulk.js +46 -0
  91. package/dist/esm/models/BulkTransactions.d.ts +32 -0
  92. package/dist/esm/models/BulkTransactions.js +44 -0
  93. package/dist/esm/models/CategoriesResponse.d.ts +32 -0
  94. package/dist/esm/models/CategoriesResponse.js +44 -0
  95. package/dist/esm/models/CategoriesResponseData.d.ts +38 -0
  96. package/dist/esm/models/CategoriesResponseData.js +47 -0
  97. package/dist/esm/models/Category.d.ts +175 -0
  98. package/dist/esm/models/Category.js +106 -0
  99. package/dist/esm/models/CategoryGroup.d.ts +49 -0
  100. package/dist/esm/models/CategoryGroup.js +52 -0
  101. package/dist/esm/models/CategoryGroupWithCategories.d.ts +56 -0
  102. package/dist/esm/models/CategoryGroupWithCategories.js +56 -0
  103. package/dist/esm/models/CategoryGroupWithCategoriesAllOf.d.ts +32 -0
  104. package/dist/esm/models/CategoryGroupWithCategoriesAllOf.js +44 -0
  105. package/dist/esm/models/CategoryResponse.d.ts +32 -0
  106. package/dist/esm/models/CategoryResponse.js +44 -0
  107. package/dist/esm/models/CategoryResponseData.d.ts +32 -0
  108. package/dist/esm/models/CategoryResponseData.js +44 -0
  109. package/dist/esm/models/CurrencyFormat.d.ts +73 -0
  110. package/dist/esm/models/CurrencyFormat.js +64 -0
  111. package/dist/esm/models/DateFormat.d.ts +31 -0
  112. package/dist/esm/models/DateFormat.js +43 -0
  113. package/dist/esm/models/ErrorDetail.d.ts +43 -0
  114. package/dist/esm/models/ErrorDetail.js +49 -0
  115. package/dist/esm/models/ErrorResponse.d.ts +32 -0
  116. package/dist/esm/models/ErrorResponse.js +44 -0
  117. package/dist/esm/models/HybridTransaction.d.ts +208 -0
  118. package/dist/esm/models/HybridTransaction.js +137 -0
  119. package/dist/esm/models/HybridTransactionAllOf.d.ts +63 -0
  120. package/dist/esm/models/HybridTransactionAllOf.js +60 -0
  121. package/dist/esm/models/HybridTransactionsResponse.d.ts +32 -0
  122. package/dist/esm/models/HybridTransactionsResponse.js +44 -0
  123. package/dist/esm/models/HybridTransactionsResponseData.d.ts +38 -0
  124. package/dist/esm/models/HybridTransactionsResponseData.js +47 -0
  125. package/dist/esm/models/MonthDetail.d.ts +80 -0
  126. package/dist/esm/models/MonthDetail.js +67 -0
  127. package/dist/esm/models/MonthDetailAllOf.d.ts +32 -0
  128. package/dist/esm/models/MonthDetailAllOf.js +44 -0
  129. package/dist/esm/models/MonthDetailResponse.d.ts +32 -0
  130. package/dist/esm/models/MonthDetailResponse.js +44 -0
  131. package/dist/esm/models/MonthDetailResponseData.d.ts +32 -0
  132. package/dist/esm/models/MonthDetailResponseData.js +44 -0
  133. package/dist/esm/models/MonthSummariesResponse.d.ts +32 -0
  134. package/dist/esm/models/MonthSummariesResponse.js +44 -0
  135. package/dist/esm/models/MonthSummariesResponseData.d.ts +38 -0
  136. package/dist/esm/models/MonthSummariesResponseData.js +47 -0
  137. package/dist/esm/models/MonthSummary.d.ts +73 -0
  138. package/dist/esm/models/MonthSummary.js +63 -0
  139. package/dist/esm/models/PatchMonthCategoryWrapper.d.ts +32 -0
  140. package/dist/esm/models/PatchMonthCategoryWrapper.js +44 -0
  141. package/dist/esm/models/PatchTransactionsWrapper.d.ts +32 -0
  142. package/dist/esm/models/PatchTransactionsWrapper.js +44 -0
  143. package/dist/esm/models/Payee.d.ts +49 -0
  144. package/dist/esm/models/Payee.js +52 -0
  145. package/dist/esm/models/PayeeLocation.d.ts +55 -0
  146. package/dist/esm/models/PayeeLocation.js +55 -0
  147. package/dist/esm/models/PayeeLocationResponse.d.ts +32 -0
  148. package/dist/esm/models/PayeeLocationResponse.js +44 -0
  149. package/dist/esm/models/PayeeLocationResponseData.d.ts +32 -0
  150. package/dist/esm/models/PayeeLocationResponseData.js +44 -0
  151. package/dist/esm/models/PayeeLocationsResponse.d.ts +32 -0
  152. package/dist/esm/models/PayeeLocationsResponse.js +44 -0
  153. package/dist/esm/models/PayeeLocationsResponseData.d.ts +32 -0
  154. package/dist/esm/models/PayeeLocationsResponseData.js +44 -0
  155. package/dist/esm/models/PayeeResponse.d.ts +32 -0
  156. package/dist/esm/models/PayeeResponse.js +44 -0
  157. package/dist/esm/models/PayeeResponseData.d.ts +32 -0
  158. package/dist/esm/models/PayeeResponseData.js +44 -0
  159. package/dist/esm/models/PayeesResponse.d.ts +32 -0
  160. package/dist/esm/models/PayeesResponse.js +44 -0
  161. package/dist/esm/models/PayeesResponseData.d.ts +38 -0
  162. package/dist/esm/models/PayeesResponseData.js +47 -0
  163. package/dist/esm/models/PostAccountWrapper.d.ts +32 -0
  164. package/dist/esm/models/PostAccountWrapper.js +44 -0
  165. package/dist/esm/models/PostTransactionsWrapper.d.ts +38 -0
  166. package/dist/esm/models/PostTransactionsWrapper.js +46 -0
  167. package/dist/esm/models/PutTransactionWrapper.d.ts +32 -0
  168. package/dist/esm/models/PutTransactionWrapper.js +44 -0
  169. package/dist/esm/models/SaveAccount.d.ts +44 -0
  170. package/dist/esm/models/SaveAccount.js +50 -0
  171. package/dist/esm/models/SaveCategoryResponse.d.ts +32 -0
  172. package/dist/esm/models/SaveCategoryResponse.js +44 -0
  173. package/dist/esm/models/SaveCategoryResponseData.d.ts +38 -0
  174. package/dist/esm/models/SaveCategoryResponseData.js +47 -0
  175. package/dist/esm/models/SaveMonthCategory.d.ts +31 -0
  176. package/dist/esm/models/SaveMonthCategory.js +43 -0
  177. package/dist/esm/models/SaveSubTransaction.d.ts +55 -0
  178. package/dist/esm/models/SaveSubTransaction.js +52 -0
  179. package/dist/esm/models/SaveTransaction.d.ts +120 -0
  180. package/dist/esm/models/SaveTransaction.js +86 -0
  181. package/dist/esm/models/SaveTransactionWithId.d.ts +126 -0
  182. package/dist/esm/models/SaveTransactionWithId.js +88 -0
  183. package/dist/esm/models/SaveTransactionWithIdAllOf.d.ts +31 -0
  184. package/dist/esm/models/SaveTransactionWithIdAllOf.js +43 -0
  185. package/dist/esm/models/SaveTransactionWithOptionalFields.d.ts +120 -0
  186. package/dist/esm/models/SaveTransactionWithOptionalFields.js +86 -0
  187. package/dist/esm/models/SaveTransactionsResponse.d.ts +32 -0
  188. package/dist/esm/models/SaveTransactionsResponse.js +44 -0
  189. package/dist/esm/models/SaveTransactionsResponseData.d.ts +56 -0
  190. package/dist/esm/models/SaveTransactionsResponseData.js +54 -0
  191. package/dist/esm/models/ScheduledSubTransaction.d.ts +73 -0
  192. package/dist/esm/models/ScheduledSubTransaction.js +61 -0
  193. package/dist/esm/models/ScheduledTransactionDetail.d.ts +154 -0
  194. package/dist/esm/models/ScheduledTransactionDetail.js +113 -0
  195. package/dist/esm/models/ScheduledTransactionDetailAllOf.d.ts +50 -0
  196. package/dist/esm/models/ScheduledTransactionDetailAllOf.js +52 -0
  197. package/dist/esm/models/ScheduledTransactionResponse.d.ts +32 -0
  198. package/dist/esm/models/ScheduledTransactionResponse.js +44 -0
  199. package/dist/esm/models/ScheduledTransactionResponseData.d.ts +32 -0
  200. package/dist/esm/models/ScheduledTransactionResponseData.js +44 -0
  201. package/dist/esm/models/ScheduledTransactionSummary.d.ts +129 -0
  202. package/dist/esm/models/ScheduledTransactionSummary.js +102 -0
  203. package/dist/esm/models/ScheduledTransactionsResponse.d.ts +32 -0
  204. package/dist/esm/models/ScheduledTransactionsResponse.js +44 -0
  205. package/dist/esm/models/ScheduledTransactionsResponseData.d.ts +38 -0
  206. package/dist/esm/models/ScheduledTransactionsResponseData.js +47 -0
  207. package/dist/esm/models/SubTransaction.d.ts +91 -0
  208. package/dist/esm/models/SubTransaction.js +67 -0
  209. package/dist/esm/models/TransactionDetail.d.ts +195 -0
  210. package/dist/esm/models/TransactionDetail.js +129 -0
  211. package/dist/esm/models/TransactionDetailAllOf.d.ts +50 -0
  212. package/dist/esm/models/TransactionDetailAllOf.js +52 -0
  213. package/dist/esm/models/TransactionResponse.d.ts +32 -0
  214. package/dist/esm/models/TransactionResponse.js +44 -0
  215. package/dist/esm/models/TransactionResponseData.d.ts +32 -0
  216. package/dist/esm/models/TransactionResponseData.js +44 -0
  217. package/dist/esm/models/TransactionSummary.d.ts +170 -0
  218. package/dist/esm/models/TransactionSummary.js +118 -0
  219. package/dist/esm/models/TransactionsImportResponse.d.ts +32 -0
  220. package/dist/esm/models/TransactionsImportResponse.js +44 -0
  221. package/dist/esm/models/TransactionsImportResponseData.d.ts +31 -0
  222. package/dist/esm/models/TransactionsImportResponseData.js +43 -0
  223. package/dist/esm/models/TransactionsResponse.d.ts +32 -0
  224. package/dist/esm/models/TransactionsResponse.js +44 -0
  225. package/dist/esm/models/TransactionsResponseData.d.ts +38 -0
  226. package/dist/esm/models/TransactionsResponseData.js +47 -0
  227. package/dist/esm/models/User.d.ts +31 -0
  228. package/dist/esm/models/User.js +43 -0
  229. package/dist/esm/models/UserResponse.d.ts +32 -0
  230. package/dist/esm/models/UserResponse.js +44 -0
  231. package/dist/esm/models/UserResponseData.d.ts +32 -0
  232. package/dist/esm/models/UserResponseData.js +44 -0
  233. package/dist/esm/models/index.d.ts +90 -0
  234. package/dist/esm/models/index.js +92 -0
  235. package/dist/esm/runtime.d.ts +182 -0
  236. package/dist/esm/runtime.js +555 -0
  237. package/dist/index.d.ts +24 -36
  238. package/dist/index.js +22 -30
  239. package/dist/models/Account.d.ts +140 -0
  240. package/dist/models/Account.js +95 -0
  241. package/dist/models/AccountResponse.d.ts +32 -0
  242. package/dist/models/AccountResponse.js +51 -0
  243. package/dist/models/AccountResponseData.d.ts +32 -0
  244. package/dist/models/AccountResponseData.js +51 -0
  245. package/dist/models/AccountType.d.ts +34 -0
  246. package/dist/models/AccountType.js +47 -0
  247. package/dist/models/AccountsResponse.d.ts +32 -0
  248. package/dist/models/AccountsResponse.js +51 -0
  249. package/dist/models/AccountsResponseData.d.ts +38 -0
  250. package/dist/models/AccountsResponseData.js +54 -0
  251. package/dist/models/BudgetDetail.d.ts +139 -0
  252. package/dist/models/BudgetDetail.js +96 -0
  253. package/dist/models/BudgetDetailAllOf.d.ts +95 -0
  254. package/dist/models/BudgetDetailAllOf.js +78 -0
  255. package/dist/models/BudgetDetailResponse.d.ts +32 -0
  256. package/dist/models/BudgetDetailResponse.js +51 -0
  257. package/dist/models/BudgetDetailResponseData.d.ts +38 -0
  258. package/dist/models/BudgetDetailResponseData.js +54 -0
  259. package/dist/models/BudgetSettings.d.ts +39 -0
  260. package/dist/models/BudgetSettings.js +55 -0
  261. package/dist/models/BudgetSettingsResponse.d.ts +32 -0
  262. package/dist/models/BudgetSettingsResponse.js +51 -0
  263. package/dist/models/BudgetSettingsResponseData.d.ts +32 -0
  264. package/dist/models/BudgetSettingsResponseData.js +51 -0
  265. package/dist/models/BudgetSummary.d.ts +76 -0
  266. package/dist/models/BudgetSummary.js +69 -0
  267. package/dist/models/BudgetSummaryResponse.d.ts +32 -0
  268. package/dist/models/BudgetSummaryResponse.js +51 -0
  269. package/dist/models/BudgetSummaryResponseData.d.ts +38 -0
  270. package/dist/models/BudgetSummaryResponseData.js +54 -0
  271. package/dist/models/BulkResponse.d.ts +32 -0
  272. package/dist/models/BulkResponse.js +51 -0
  273. package/dist/models/BulkResponseData.d.ts +32 -0
  274. package/dist/models/BulkResponseData.js +51 -0
  275. package/dist/models/BulkResponseDataBulk.d.ts +37 -0
  276. package/dist/models/BulkResponseDataBulk.js +53 -0
  277. package/dist/models/BulkTransactions.d.ts +32 -0
  278. package/dist/models/BulkTransactions.js +51 -0
  279. package/dist/models/CategoriesResponse.d.ts +32 -0
  280. package/dist/models/CategoriesResponse.js +51 -0
  281. package/dist/models/CategoriesResponseData.d.ts +38 -0
  282. package/dist/models/CategoriesResponseData.js +54 -0
  283. package/dist/models/Category.d.ts +175 -0
  284. package/dist/models/Category.js +113 -0
  285. package/dist/models/CategoryGroup.d.ts +49 -0
  286. package/dist/models/CategoryGroup.js +59 -0
  287. package/dist/models/CategoryGroupWithCategories.d.ts +56 -0
  288. package/dist/models/CategoryGroupWithCategories.js +63 -0
  289. package/dist/models/CategoryGroupWithCategoriesAllOf.d.ts +32 -0
  290. package/dist/models/CategoryGroupWithCategoriesAllOf.js +51 -0
  291. package/dist/models/CategoryResponse.d.ts +32 -0
  292. package/dist/models/CategoryResponse.js +51 -0
  293. package/dist/models/CategoryResponseData.d.ts +32 -0
  294. package/dist/models/CategoryResponseData.js +51 -0
  295. package/dist/models/CurrencyFormat.d.ts +73 -0
  296. package/dist/models/CurrencyFormat.js +71 -0
  297. package/dist/models/DateFormat.d.ts +31 -0
  298. package/dist/models/DateFormat.js +50 -0
  299. package/dist/models/ErrorDetail.d.ts +43 -0
  300. package/dist/models/ErrorDetail.js +56 -0
  301. package/dist/models/ErrorResponse.d.ts +32 -0
  302. package/dist/models/ErrorResponse.js +51 -0
  303. package/dist/models/HybridTransaction.d.ts +208 -0
  304. package/dist/models/HybridTransaction.js +144 -0
  305. package/dist/models/HybridTransactionAllOf.d.ts +63 -0
  306. package/dist/models/HybridTransactionAllOf.js +67 -0
  307. package/dist/models/HybridTransactionsResponse.d.ts +32 -0
  308. package/dist/models/HybridTransactionsResponse.js +51 -0
  309. package/dist/models/HybridTransactionsResponseData.d.ts +38 -0
  310. package/dist/models/HybridTransactionsResponseData.js +54 -0
  311. package/dist/models/MonthDetail.d.ts +80 -0
  312. package/dist/models/MonthDetail.js +74 -0
  313. package/dist/models/MonthDetailAllOf.d.ts +32 -0
  314. package/dist/models/MonthDetailAllOf.js +51 -0
  315. package/dist/models/MonthDetailResponse.d.ts +32 -0
  316. package/dist/models/MonthDetailResponse.js +51 -0
  317. package/dist/models/MonthDetailResponseData.d.ts +32 -0
  318. package/dist/models/MonthDetailResponseData.js +51 -0
  319. package/dist/models/MonthSummariesResponse.d.ts +32 -0
  320. package/dist/models/MonthSummariesResponse.js +51 -0
  321. package/dist/models/MonthSummariesResponseData.d.ts +38 -0
  322. package/dist/models/MonthSummariesResponseData.js +54 -0
  323. package/dist/models/MonthSummary.d.ts +73 -0
  324. package/dist/models/MonthSummary.js +70 -0
  325. package/dist/models/PatchMonthCategoryWrapper.d.ts +32 -0
  326. package/dist/models/PatchMonthCategoryWrapper.js +51 -0
  327. package/dist/models/PatchTransactionsWrapper.d.ts +32 -0
  328. package/dist/models/PatchTransactionsWrapper.js +51 -0
  329. package/dist/models/Payee.d.ts +49 -0
  330. package/dist/models/Payee.js +59 -0
  331. package/dist/models/PayeeLocation.d.ts +55 -0
  332. package/dist/models/PayeeLocation.js +62 -0
  333. package/dist/models/PayeeLocationResponse.d.ts +32 -0
  334. package/dist/models/PayeeLocationResponse.js +51 -0
  335. package/dist/models/PayeeLocationResponseData.d.ts +32 -0
  336. package/dist/models/PayeeLocationResponseData.js +51 -0
  337. package/dist/models/PayeeLocationsResponse.d.ts +32 -0
  338. package/dist/models/PayeeLocationsResponse.js +51 -0
  339. package/dist/models/PayeeLocationsResponseData.d.ts +32 -0
  340. package/dist/models/PayeeLocationsResponseData.js +51 -0
  341. package/dist/models/PayeeResponse.d.ts +32 -0
  342. package/dist/models/PayeeResponse.js +51 -0
  343. package/dist/models/PayeeResponseData.d.ts +32 -0
  344. package/dist/models/PayeeResponseData.js +51 -0
  345. package/dist/models/PayeesResponse.d.ts +32 -0
  346. package/dist/models/PayeesResponse.js +51 -0
  347. package/dist/models/PayeesResponseData.d.ts +38 -0
  348. package/dist/models/PayeesResponseData.js +54 -0
  349. package/dist/models/PostAccountWrapper.d.ts +32 -0
  350. package/dist/models/PostAccountWrapper.js +51 -0
  351. package/dist/models/PostTransactionsWrapper.d.ts +38 -0
  352. package/dist/models/PostTransactionsWrapper.js +53 -0
  353. package/dist/models/PutTransactionWrapper.d.ts +32 -0
  354. package/dist/models/PutTransactionWrapper.js +51 -0
  355. package/dist/models/SaveAccount.d.ts +44 -0
  356. package/dist/models/SaveAccount.js +57 -0
  357. package/dist/models/SaveCategoryResponse.d.ts +32 -0
  358. package/dist/models/SaveCategoryResponse.js +51 -0
  359. package/dist/models/SaveCategoryResponseData.d.ts +38 -0
  360. package/dist/models/SaveCategoryResponseData.js +54 -0
  361. package/dist/models/SaveMonthCategory.d.ts +31 -0
  362. package/dist/models/SaveMonthCategory.js +50 -0
  363. package/dist/models/SaveSubTransaction.d.ts +55 -0
  364. package/dist/models/SaveSubTransaction.js +59 -0
  365. package/dist/models/SaveTransaction.d.ts +120 -0
  366. package/dist/models/SaveTransaction.js +93 -0
  367. package/dist/models/SaveTransactionWithId.d.ts +126 -0
  368. package/dist/models/SaveTransactionWithId.js +95 -0
  369. package/dist/models/SaveTransactionWithIdAllOf.d.ts +31 -0
  370. package/dist/models/SaveTransactionWithIdAllOf.js +50 -0
  371. package/dist/models/SaveTransactionWithOptionalFields.d.ts +120 -0
  372. package/dist/models/SaveTransactionWithOptionalFields.js +93 -0
  373. package/dist/models/SaveTransactionsResponse.d.ts +32 -0
  374. package/dist/models/SaveTransactionsResponse.js +51 -0
  375. package/dist/models/SaveTransactionsResponseData.d.ts +56 -0
  376. package/dist/models/SaveTransactionsResponseData.js +61 -0
  377. package/dist/models/ScheduledSubTransaction.d.ts +73 -0
  378. package/dist/models/ScheduledSubTransaction.js +68 -0
  379. package/dist/models/ScheduledTransactionDetail.d.ts +154 -0
  380. package/dist/models/ScheduledTransactionDetail.js +120 -0
  381. package/dist/models/ScheduledTransactionDetailAllOf.d.ts +50 -0
  382. package/dist/models/ScheduledTransactionDetailAllOf.js +59 -0
  383. package/dist/models/ScheduledTransactionResponse.d.ts +32 -0
  384. package/dist/models/ScheduledTransactionResponse.js +51 -0
  385. package/dist/models/ScheduledTransactionResponseData.d.ts +32 -0
  386. package/dist/models/ScheduledTransactionResponseData.js +51 -0
  387. package/dist/models/ScheduledTransactionSummary.d.ts +129 -0
  388. package/dist/models/ScheduledTransactionSummary.js +109 -0
  389. package/dist/models/ScheduledTransactionsResponse.d.ts +32 -0
  390. package/dist/models/ScheduledTransactionsResponse.js +51 -0
  391. package/dist/models/ScheduledTransactionsResponseData.d.ts +38 -0
  392. package/dist/models/ScheduledTransactionsResponseData.js +54 -0
  393. package/dist/models/SubTransaction.d.ts +91 -0
  394. package/dist/models/SubTransaction.js +74 -0
  395. package/dist/models/TransactionDetail.d.ts +195 -0
  396. package/dist/models/TransactionDetail.js +136 -0
  397. package/dist/models/TransactionDetailAllOf.d.ts +50 -0
  398. package/dist/models/TransactionDetailAllOf.js +59 -0
  399. package/dist/models/TransactionResponse.d.ts +32 -0
  400. package/dist/models/TransactionResponse.js +51 -0
  401. package/dist/models/TransactionResponseData.d.ts +32 -0
  402. package/dist/models/TransactionResponseData.js +51 -0
  403. package/dist/models/TransactionSummary.d.ts +170 -0
  404. package/dist/models/TransactionSummary.js +125 -0
  405. package/dist/models/TransactionsImportResponse.d.ts +32 -0
  406. package/dist/models/TransactionsImportResponse.js +51 -0
  407. package/dist/models/TransactionsImportResponseData.d.ts +31 -0
  408. package/dist/models/TransactionsImportResponseData.js +50 -0
  409. package/dist/models/TransactionsResponse.d.ts +32 -0
  410. package/dist/models/TransactionsResponse.js +51 -0
  411. package/dist/models/TransactionsResponseData.d.ts +38 -0
  412. package/dist/models/TransactionsResponseData.js +54 -0
  413. package/dist/models/User.d.ts +31 -0
  414. package/dist/models/User.js +50 -0
  415. package/dist/models/UserResponse.d.ts +32 -0
  416. package/dist/models/UserResponse.js +51 -0
  417. package/dist/models/UserResponseData.d.ts +32 -0
  418. package/dist/models/UserResponseData.js +51 -0
  419. package/dist/models/index.d.ts +90 -0
  420. package/dist/models/index.js +104 -0
  421. package/dist/runtime.d.ts +182 -0
  422. package/dist/runtime.js +336 -0
  423. package/package.json +5 -6
  424. package/dist/api.d.ts +0 -4639
  425. package/dist/api.js +0 -3757
  426. package/dist/browser/ynab.js.LICENSE.txt +0 -1
  427. package/dist/configuration.d.ts +0 -26
  428. package/dist/configuration.js +0 -22
  429. package/dist/esm/api.d.ts +0 -4639
  430. package/dist/esm/api.js +0 -4067
  431. package/dist/esm/configuration.d.ts +0 -26
  432. package/dist/esm/configuration.js +0 -20
@@ -0,0 +1,132 @@
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
+ * 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.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PayeeLocationsApi = void 0;
17
+ const runtime = require("../runtime");
18
+ const index_1 = require("../models/index");
19
+ /**
20
+ *
21
+ */
22
+ class PayeeLocationsApi extends runtime.BaseAPI {
23
+ /**
24
+ * Returns a single payee location
25
+ * Single payee location
26
+ */
27
+ async getPayeeLocationByIdRaw(requestParameters, initOverrides) {
28
+ if (requestParameters.budgetId === null || requestParameters.budgetId === undefined) {
29
+ throw new runtime.RequiredError('budgetId', 'Required parameter requestParameters.budgetId was null or undefined when calling getPayeeLocationById.');
30
+ }
31
+ if (requestParameters.payeeLocationId === null || requestParameters.payeeLocationId === undefined) {
32
+ throw new runtime.RequiredError('payeeLocationId', 'Required parameter requestParameters.payeeLocationId was null or undefined when calling getPayeeLocationById.');
33
+ }
34
+ const queryParameters = {};
35
+ const headerParameters = {};
36
+ headerParameters['Accept'] = 'application/json';
37
+ if (this.configuration && this.configuration.accessToken) {
38
+ const token = this.configuration.accessToken;
39
+ const tokenString = await token("bearer", []);
40
+ if (tokenString) {
41
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
42
+ }
43
+ }
44
+ const response = await this.request({
45
+ path: `/budgets/{budget_id}/payee_locations/{payee_location_id}`.replace(`{${"budget_id"}}`, encodeURIComponent(String(requestParameters.budgetId))).replace(`{${"payee_location_id"}}`, encodeURIComponent(String(requestParameters.payeeLocationId))),
46
+ method: 'GET',
47
+ headers: headerParameters,
48
+ query: queryParameters,
49
+ }, initOverrides);
50
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PayeeLocationResponseFromJSON)(jsonValue));
51
+ }
52
+ /**
53
+ * Returns a single payee location
54
+ * Single payee location
55
+ */
56
+ async getPayeeLocationById(budgetId, payeeLocationId, initOverrides) {
57
+ const response = await this.getPayeeLocationByIdRaw({ budgetId: budgetId, payeeLocationId: payeeLocationId }, initOverrides);
58
+ return await response.value();
59
+ }
60
+ /**
61
+ * Returns all payee locations
62
+ * List payee locations
63
+ */
64
+ async getPayeeLocationsRaw(requestParameters, initOverrides) {
65
+ if (requestParameters.budgetId === null || requestParameters.budgetId === undefined) {
66
+ throw new runtime.RequiredError('budgetId', 'Required parameter requestParameters.budgetId was null or undefined when calling getPayeeLocations.');
67
+ }
68
+ const queryParameters = {};
69
+ const headerParameters = {};
70
+ headerParameters['Accept'] = 'application/json';
71
+ if (this.configuration && this.configuration.accessToken) {
72
+ const token = this.configuration.accessToken;
73
+ const tokenString = await token("bearer", []);
74
+ if (tokenString) {
75
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
76
+ }
77
+ }
78
+ const response = await this.request({
79
+ path: `/budgets/{budget_id}/payee_locations`.replace(`{${"budget_id"}}`, encodeURIComponent(String(requestParameters.budgetId))),
80
+ method: 'GET',
81
+ headers: headerParameters,
82
+ query: queryParameters,
83
+ }, initOverrides);
84
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PayeeLocationsResponseFromJSON)(jsonValue));
85
+ }
86
+ /**
87
+ * Returns all payee locations
88
+ * List payee locations
89
+ */
90
+ async getPayeeLocations(budgetId, initOverrides) {
91
+ const response = await this.getPayeeLocationsRaw({ budgetId: budgetId }, initOverrides);
92
+ return await response.value();
93
+ }
94
+ /**
95
+ * Returns all payee locations for a specified payee
96
+ * List locations for a payee
97
+ */
98
+ async getPayeeLocationsByPayeeRaw(requestParameters, initOverrides) {
99
+ if (requestParameters.budgetId === null || requestParameters.budgetId === undefined) {
100
+ throw new runtime.RequiredError('budgetId', 'Required parameter requestParameters.budgetId was null or undefined when calling getPayeeLocationsByPayee.');
101
+ }
102
+ if (requestParameters.payeeId === null || requestParameters.payeeId === undefined) {
103
+ throw new runtime.RequiredError('payeeId', 'Required parameter requestParameters.payeeId was null or undefined when calling getPayeeLocationsByPayee.');
104
+ }
105
+ const queryParameters = {};
106
+ const headerParameters = {};
107
+ headerParameters['Accept'] = 'application/json';
108
+ if (this.configuration && this.configuration.accessToken) {
109
+ const token = this.configuration.accessToken;
110
+ const tokenString = await token("bearer", []);
111
+ if (tokenString) {
112
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
113
+ }
114
+ }
115
+ const response = await this.request({
116
+ path: `/budgets/{budget_id}/payees/{payee_id}/payee_locations`.replace(`{${"budget_id"}}`, encodeURIComponent(String(requestParameters.budgetId))).replace(`{${"payee_id"}}`, encodeURIComponent(String(requestParameters.payeeId))),
117
+ method: 'GET',
118
+ headers: headerParameters,
119
+ query: queryParameters,
120
+ }, initOverrides);
121
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PayeeLocationsResponseFromJSON)(jsonValue));
122
+ }
123
+ /**
124
+ * Returns all payee locations for a specified payee
125
+ * List locations for a payee
126
+ */
127
+ async getPayeeLocationsByPayee(budgetId, payeeId, initOverrides) {
128
+ const response = await this.getPayeeLocationsByPayeeRaw({ budgetId: budgetId, payeeId: payeeId }, initOverrides);
129
+ return await response.value();
130
+ }
131
+ }
132
+ exports.PayeeLocationsApi = PayeeLocationsApi;
@@ -0,0 +1,46 @@
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
+ * 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.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { PayeeResponse, PayeesResponse } from '../models/index';
14
+ export interface GetPayeeByIdRequest {
15
+ budgetId: string;
16
+ payeeId: string;
17
+ }
18
+ export interface GetPayeesRequest {
19
+ budgetId: string;
20
+ lastKnowledgeOfServer?: number;
21
+ }
22
+ /**
23
+ *
24
+ */
25
+ export declare class PayeesApi extends runtime.BaseAPI {
26
+ /**
27
+ * Returns a single payee
28
+ * Single payee
29
+ */
30
+ getPayeeByIdRaw(requestParameters: GetPayeeByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PayeeResponse>>;
31
+ /**
32
+ * Returns a single payee
33
+ * Single payee
34
+ */
35
+ getPayeeById(budgetId: string, payeeId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PayeeResponse>;
36
+ /**
37
+ * Returns all payees
38
+ * List payees
39
+ */
40
+ getPayeesRaw(requestParameters: GetPayeesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PayeesResponse>>;
41
+ /**
42
+ * Returns all payees
43
+ * List payees
44
+ */
45
+ getPayees(budgetId: string, lastKnowledgeOfServer?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PayeesResponse>;
46
+ }
@@ -0,0 +1,98 @@
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
+ * 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.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PayeesApi = void 0;
17
+ const runtime = require("../runtime");
18
+ const index_1 = require("../models/index");
19
+ /**
20
+ *
21
+ */
22
+ class PayeesApi extends runtime.BaseAPI {
23
+ /**
24
+ * Returns a single payee
25
+ * Single payee
26
+ */
27
+ async getPayeeByIdRaw(requestParameters, initOverrides) {
28
+ if (requestParameters.budgetId === null || requestParameters.budgetId === undefined) {
29
+ throw new runtime.RequiredError('budgetId', 'Required parameter requestParameters.budgetId was null or undefined when calling getPayeeById.');
30
+ }
31
+ if (requestParameters.payeeId === null || requestParameters.payeeId === undefined) {
32
+ throw new runtime.RequiredError('payeeId', 'Required parameter requestParameters.payeeId was null or undefined when calling getPayeeById.');
33
+ }
34
+ const queryParameters = {};
35
+ const headerParameters = {};
36
+ headerParameters['Accept'] = 'application/json';
37
+ if (this.configuration && this.configuration.accessToken) {
38
+ const token = this.configuration.accessToken;
39
+ const tokenString = await token("bearer", []);
40
+ if (tokenString) {
41
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
42
+ }
43
+ }
44
+ const response = await this.request({
45
+ path: `/budgets/{budget_id}/payees/{payee_id}`.replace(`{${"budget_id"}}`, encodeURIComponent(String(requestParameters.budgetId))).replace(`{${"payee_id"}}`, encodeURIComponent(String(requestParameters.payeeId))),
46
+ method: 'GET',
47
+ headers: headerParameters,
48
+ query: queryParameters,
49
+ }, initOverrides);
50
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PayeeResponseFromJSON)(jsonValue));
51
+ }
52
+ /**
53
+ * Returns a single payee
54
+ * Single payee
55
+ */
56
+ async getPayeeById(budgetId, payeeId, initOverrides) {
57
+ const response = await this.getPayeeByIdRaw({ budgetId: budgetId, payeeId: payeeId }, initOverrides);
58
+ return await response.value();
59
+ }
60
+ /**
61
+ * Returns all payees
62
+ * List payees
63
+ */
64
+ async getPayeesRaw(requestParameters, initOverrides) {
65
+ if (requestParameters.budgetId === null || requestParameters.budgetId === undefined) {
66
+ throw new runtime.RequiredError('budgetId', 'Required parameter requestParameters.budgetId was null or undefined when calling getPayees.');
67
+ }
68
+ const queryParameters = {};
69
+ if (requestParameters.lastKnowledgeOfServer !== undefined) {
70
+ queryParameters['last_knowledge_of_server'] = requestParameters.lastKnowledgeOfServer;
71
+ }
72
+ const headerParameters = {};
73
+ headerParameters['Accept'] = 'application/json';
74
+ if (this.configuration && this.configuration.accessToken) {
75
+ const token = this.configuration.accessToken;
76
+ const tokenString = await token("bearer", []);
77
+ if (tokenString) {
78
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
79
+ }
80
+ }
81
+ const response = await this.request({
82
+ path: `/budgets/{budget_id}/payees`.replace(`{${"budget_id"}}`, encodeURIComponent(String(requestParameters.budgetId))),
83
+ method: 'GET',
84
+ headers: headerParameters,
85
+ query: queryParameters,
86
+ }, initOverrides);
87
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PayeesResponseFromJSON)(jsonValue));
88
+ }
89
+ /**
90
+ * Returns all payees
91
+ * List payees
92
+ */
93
+ async getPayees(budgetId, lastKnowledgeOfServer, initOverrides) {
94
+ const response = await this.getPayeesRaw({ budgetId: budgetId, lastKnowledgeOfServer: lastKnowledgeOfServer }, initOverrides);
95
+ return await response.value();
96
+ }
97
+ }
98
+ exports.PayeesApi = PayeesApi;
@@ -0,0 +1,46 @@
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
+ * 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.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { ScheduledTransactionResponse, ScheduledTransactionsResponse } from '../models/index';
14
+ export interface GetScheduledTransactionByIdRequest {
15
+ budgetId: string;
16
+ scheduledTransactionId: string;
17
+ }
18
+ export interface GetScheduledTransactionsRequest {
19
+ budgetId: string;
20
+ lastKnowledgeOfServer?: number;
21
+ }
22
+ /**
23
+ *
24
+ */
25
+ export declare class ScheduledTransactionsApi extends runtime.BaseAPI {
26
+ /**
27
+ * Returns a single scheduled transaction
28
+ * Single scheduled transaction
29
+ */
30
+ getScheduledTransactionByIdRaw(requestParameters: GetScheduledTransactionByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScheduledTransactionResponse>>;
31
+ /**
32
+ * Returns a single scheduled transaction
33
+ * Single scheduled transaction
34
+ */
35
+ getScheduledTransactionById(budgetId: string, scheduledTransactionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScheduledTransactionResponse>;
36
+ /**
37
+ * Returns all scheduled transactions
38
+ * List scheduled transactions
39
+ */
40
+ getScheduledTransactionsRaw(requestParameters: GetScheduledTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScheduledTransactionsResponse>>;
41
+ /**
42
+ * Returns all scheduled transactions
43
+ * List scheduled transactions
44
+ */
45
+ getScheduledTransactions(budgetId: string, lastKnowledgeOfServer?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScheduledTransactionsResponse>;
46
+ }
@@ -0,0 +1,98 @@
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
+ * 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.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ScheduledTransactionsApi = void 0;
17
+ const runtime = require("../runtime");
18
+ const index_1 = require("../models/index");
19
+ /**
20
+ *
21
+ */
22
+ class ScheduledTransactionsApi extends runtime.BaseAPI {
23
+ /**
24
+ * Returns a single scheduled transaction
25
+ * Single scheduled transaction
26
+ */
27
+ async getScheduledTransactionByIdRaw(requestParameters, initOverrides) {
28
+ if (requestParameters.budgetId === null || requestParameters.budgetId === undefined) {
29
+ throw new runtime.RequiredError('budgetId', 'Required parameter requestParameters.budgetId was null or undefined when calling getScheduledTransactionById.');
30
+ }
31
+ if (requestParameters.scheduledTransactionId === null || requestParameters.scheduledTransactionId === undefined) {
32
+ throw new runtime.RequiredError('scheduledTransactionId', 'Required parameter requestParameters.scheduledTransactionId was null or undefined when calling getScheduledTransactionById.');
33
+ }
34
+ const queryParameters = {};
35
+ const headerParameters = {};
36
+ headerParameters['Accept'] = 'application/json';
37
+ if (this.configuration && this.configuration.accessToken) {
38
+ const token = this.configuration.accessToken;
39
+ const tokenString = await token("bearer", []);
40
+ if (tokenString) {
41
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
42
+ }
43
+ }
44
+ const response = await this.request({
45
+ path: `/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}`.replace(`{${"budget_id"}}`, encodeURIComponent(String(requestParameters.budgetId))).replace(`{${"scheduled_transaction_id"}}`, encodeURIComponent(String(requestParameters.scheduledTransactionId))),
46
+ method: 'GET',
47
+ headers: headerParameters,
48
+ query: queryParameters,
49
+ }, initOverrides);
50
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ScheduledTransactionResponseFromJSON)(jsonValue));
51
+ }
52
+ /**
53
+ * Returns a single scheduled transaction
54
+ * Single scheduled transaction
55
+ */
56
+ async getScheduledTransactionById(budgetId, scheduledTransactionId, initOverrides) {
57
+ const response = await this.getScheduledTransactionByIdRaw({ budgetId: budgetId, scheduledTransactionId: scheduledTransactionId }, initOverrides);
58
+ return await response.value();
59
+ }
60
+ /**
61
+ * Returns all scheduled transactions
62
+ * List scheduled transactions
63
+ */
64
+ async getScheduledTransactionsRaw(requestParameters, initOverrides) {
65
+ if (requestParameters.budgetId === null || requestParameters.budgetId === undefined) {
66
+ throw new runtime.RequiredError('budgetId', 'Required parameter requestParameters.budgetId was null or undefined when calling getScheduledTransactions.');
67
+ }
68
+ const queryParameters = {};
69
+ if (requestParameters.lastKnowledgeOfServer !== undefined) {
70
+ queryParameters['last_knowledge_of_server'] = requestParameters.lastKnowledgeOfServer;
71
+ }
72
+ const headerParameters = {};
73
+ headerParameters['Accept'] = 'application/json';
74
+ if (this.configuration && this.configuration.accessToken) {
75
+ const token = this.configuration.accessToken;
76
+ const tokenString = await token("bearer", []);
77
+ if (tokenString) {
78
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
79
+ }
80
+ }
81
+ const response = await this.request({
82
+ path: `/budgets/{budget_id}/scheduled_transactions`.replace(`{${"budget_id"}}`, encodeURIComponent(String(requestParameters.budgetId))),
83
+ method: 'GET',
84
+ headers: headerParameters,
85
+ query: queryParameters,
86
+ }, initOverrides);
87
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ScheduledTransactionsResponseFromJSON)(jsonValue));
88
+ }
89
+ /**
90
+ * Returns all scheduled transactions
91
+ * List scheduled transactions
92
+ */
93
+ async getScheduledTransactions(budgetId, lastKnowledgeOfServer, initOverrides) {
94
+ const response = await this.getScheduledTransactionsRaw({ budgetId: budgetId, lastKnowledgeOfServer: lastKnowledgeOfServer }, initOverrides);
95
+ return await response.value();
96
+ }
97
+ }
98
+ exports.ScheduledTransactionsApi = ScheduledTransactionsApi;
@@ -0,0 +1,201 @@
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
+ * 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.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { HybridTransactionsResponse, PatchTransactionsWrapper, PostTransactionsWrapper, PutTransactionWrapper, SaveTransactionsResponse, TransactionResponse, TransactionsImportResponse, TransactionsResponse } from '../models/index';
14
+ export interface CreateTransactionRequest {
15
+ budgetId: string;
16
+ data: PostTransactionsWrapper;
17
+ }
18
+ export interface DeleteTransactionRequest {
19
+ budgetId: string;
20
+ transactionId: string;
21
+ }
22
+ export interface GetTransactionByIdRequest {
23
+ budgetId: string;
24
+ transactionId: string;
25
+ }
26
+ export interface GetTransactionsRequest {
27
+ budgetId: string;
28
+ sinceDate?: string;
29
+ type?: GetTransactionsTypeEnum;
30
+ lastKnowledgeOfServer?: number;
31
+ }
32
+ export interface GetTransactionsByAccountRequest {
33
+ budgetId: string;
34
+ accountId: string;
35
+ sinceDate?: string;
36
+ type?: GetTransactionsByAccountTypeEnum;
37
+ lastKnowledgeOfServer?: number;
38
+ }
39
+ export interface GetTransactionsByCategoryRequest {
40
+ budgetId: string;
41
+ categoryId: string;
42
+ sinceDate?: string;
43
+ type?: GetTransactionsByCategoryTypeEnum;
44
+ lastKnowledgeOfServer?: number;
45
+ }
46
+ export interface GetTransactionsByPayeeRequest {
47
+ budgetId: string;
48
+ payeeId: string;
49
+ sinceDate?: string;
50
+ type?: GetTransactionsByPayeeTypeEnum;
51
+ lastKnowledgeOfServer?: number;
52
+ }
53
+ export interface ImportTransactionsRequest {
54
+ budgetId: string;
55
+ }
56
+ export interface UpdateTransactionRequest {
57
+ budgetId: string;
58
+ transactionId: string;
59
+ data: PutTransactionWrapper;
60
+ }
61
+ export interface UpdateTransactionsRequest {
62
+ budgetId: string;
63
+ data: PatchTransactionsWrapper;
64
+ }
65
+ /**
66
+ *
67
+ */
68
+ export declare class TransactionsApi extends runtime.BaseAPI {
69
+ /**
70
+ * Creates a single transaction or multiple transactions. If you provide a body containing a `transaction` object, a single transaction will be created and if you provide a body containing a `transactions` array, multiple transactions will be created. Scheduled transactions cannot be created on this endpoint.
71
+ * Create a single transaction or multiple transactions
72
+ */
73
+ createTransactionRaw(requestParameters: CreateTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SaveTransactionsResponse>>;
74
+ /**
75
+ * Creates a single transaction or multiple transactions. If you provide a body containing a `transaction` object, a single transaction will be created and if you provide a body containing a `transactions` array, multiple transactions will be created. Scheduled transactions cannot be created on this endpoint.
76
+ * Create a single transaction or multiple transactions
77
+ */
78
+ createTransaction(budgetId: string, data: PostTransactionsWrapper, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SaveTransactionsResponse>;
79
+ /**
80
+ * Deletes a transaction
81
+ * Deletes an existing transaction
82
+ */
83
+ deleteTransactionRaw(requestParameters: DeleteTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TransactionResponse>>;
84
+ /**
85
+ * Deletes a transaction
86
+ * Deletes an existing transaction
87
+ */
88
+ deleteTransaction(budgetId: string, transactionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TransactionResponse>;
89
+ /**
90
+ * Returns a single transaction
91
+ * Single transaction
92
+ */
93
+ getTransactionByIdRaw(requestParameters: GetTransactionByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TransactionResponse>>;
94
+ /**
95
+ * Returns a single transaction
96
+ * Single transaction
97
+ */
98
+ getTransactionById(budgetId: string, transactionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TransactionResponse>;
99
+ /**
100
+ * Returns budget transactions
101
+ * List transactions
102
+ */
103
+ getTransactionsRaw(requestParameters: GetTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TransactionsResponse>>;
104
+ /**
105
+ * Returns budget transactions
106
+ * List transactions
107
+ */
108
+ getTransactions(budgetId: string, sinceDate?: string, type?: GetTransactionsTypeEnum, lastKnowledgeOfServer?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TransactionsResponse>;
109
+ /**
110
+ * Returns all transactions for a specified account
111
+ * List account transactions
112
+ */
113
+ getTransactionsByAccountRaw(requestParameters: GetTransactionsByAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TransactionsResponse>>;
114
+ /**
115
+ * Returns all transactions for a specified account
116
+ * List account transactions
117
+ */
118
+ getTransactionsByAccount(budgetId: string, accountId: string, sinceDate?: string, type?: GetTransactionsByAccountTypeEnum, lastKnowledgeOfServer?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TransactionsResponse>;
119
+ /**
120
+ * Returns all transactions for a specified category
121
+ * List category transactions
122
+ */
123
+ getTransactionsByCategoryRaw(requestParameters: GetTransactionsByCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HybridTransactionsResponse>>;
124
+ /**
125
+ * Returns all transactions for a specified category
126
+ * List category transactions
127
+ */
128
+ getTransactionsByCategory(budgetId: string, categoryId: string, sinceDate?: string, type?: GetTransactionsByCategoryTypeEnum, lastKnowledgeOfServer?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HybridTransactionsResponse>;
129
+ /**
130
+ * Returns all transactions for a specified payee
131
+ * List payee transactions
132
+ */
133
+ getTransactionsByPayeeRaw(requestParameters: GetTransactionsByPayeeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HybridTransactionsResponse>>;
134
+ /**
135
+ * Returns all transactions for a specified payee
136
+ * List payee transactions
137
+ */
138
+ getTransactionsByPayee(budgetId: string, payeeId: string, sinceDate?: string, type?: GetTransactionsByPayeeTypeEnum, lastKnowledgeOfServer?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HybridTransactionsResponse>;
139
+ /**
140
+ * Imports available transactions on all linked accounts for the given budget. Linked accounts allow transactions to be imported directly from a specified financial institution and this endpoint initiates that import. Sending a request to this endpoint is the equivalent of clicking \"Import\" on each account in the web application or tapping the \"New Transactions\" banner in the mobile applications. The response for this endpoint contains the transaction ids that have been imported.
141
+ * Import transactions
142
+ */
143
+ importTransactionsRaw(requestParameters: ImportTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TransactionsImportResponse>>;
144
+ /**
145
+ * Imports available transactions on all linked accounts for the given budget. Linked accounts allow transactions to be imported directly from a specified financial institution and this endpoint initiates that import. Sending a request to this endpoint is the equivalent of clicking \"Import\" on each account in the web application or tapping the \"New Transactions\" banner in the mobile applications. The response for this endpoint contains the transaction ids that have been imported.
146
+ * Import transactions
147
+ */
148
+ importTransactions(budgetId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TransactionsImportResponse>;
149
+ /**
150
+ * Updates a single transaction
151
+ * Updates an existing transaction
152
+ */
153
+ updateTransactionRaw(requestParameters: UpdateTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TransactionResponse>>;
154
+ /**
155
+ * Updates a single transaction
156
+ * Updates an existing transaction
157
+ */
158
+ updateTransaction(budgetId: string, transactionId: string, data: PutTransactionWrapper, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TransactionResponse>;
159
+ /**
160
+ * Updates multiple transactions, by `id` or `import_id`.
161
+ * Update multiple transactions
162
+ */
163
+ updateTransactionsRaw(requestParameters: UpdateTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SaveTransactionsResponse>>;
164
+ /**
165
+ * Updates multiple transactions, by `id` or `import_id`.
166
+ * Update multiple transactions
167
+ */
168
+ updateTransactions(budgetId: string, data: PatchTransactionsWrapper, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SaveTransactionsResponse>;
169
+ }
170
+ /**
171
+ * @export
172
+ */
173
+ export declare const GetTransactionsTypeEnum: {
174
+ readonly Uncategorized: "uncategorized";
175
+ readonly Unapproved: "unapproved";
176
+ };
177
+ export declare type GetTransactionsTypeEnum = typeof GetTransactionsTypeEnum[keyof typeof GetTransactionsTypeEnum];
178
+ /**
179
+ * @export
180
+ */
181
+ export declare const GetTransactionsByAccountTypeEnum: {
182
+ readonly Uncategorized: "uncategorized";
183
+ readonly Unapproved: "unapproved";
184
+ };
185
+ export declare type GetTransactionsByAccountTypeEnum = typeof GetTransactionsByAccountTypeEnum[keyof typeof GetTransactionsByAccountTypeEnum];
186
+ /**
187
+ * @export
188
+ */
189
+ export declare const GetTransactionsByCategoryTypeEnum: {
190
+ readonly Uncategorized: "uncategorized";
191
+ readonly Unapproved: "unapproved";
192
+ };
193
+ export declare type GetTransactionsByCategoryTypeEnum = typeof GetTransactionsByCategoryTypeEnum[keyof typeof GetTransactionsByCategoryTypeEnum];
194
+ /**
195
+ * @export
196
+ */
197
+ export declare const GetTransactionsByPayeeTypeEnum: {
198
+ readonly Uncategorized: "uncategorized";
199
+ readonly Unapproved: "unapproved";
200
+ };
201
+ export declare type GetTransactionsByPayeeTypeEnum = typeof GetTransactionsByPayeeTypeEnum[keyof typeof GetTransactionsByPayeeTypeEnum];