ynab 1.55.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.
- package/README.md +31 -38
- package/dist/apis/AccountsApi.d.ts +60 -0
- package/dist/apis/AccountsApi.js +137 -0
- package/dist/apis/BudgetsApi.d.ts +58 -0
- package/dist/apis/BudgetsApi.js +129 -0
- package/dist/apis/CategoriesApi.d.ts +77 -0
- package/dist/apis/CategoriesApi.js +183 -0
- package/dist/{esm/transactionsApi.d.ts → apis/CustomTransactionsApi.d.ts} +19 -19
- package/dist/{transactionsApi.js → apis/CustomTransactionsApi.js} +24 -19
- package/dist/apis/DeprecatedApi.d.ts +32 -0
- package/dist/apis/DeprecatedApi.js +63 -0
- package/dist/apis/MonthsApi.d.ts +46 -0
- package/dist/apis/MonthsApi.js +98 -0
- package/dist/apis/PayeeLocationsApi.d.ts +59 -0
- package/dist/apis/PayeeLocationsApi.js +132 -0
- package/dist/apis/PayeesApi.d.ts +46 -0
- package/dist/apis/PayeesApi.js +98 -0
- package/dist/apis/ScheduledTransactionsApi.d.ts +46 -0
- package/dist/apis/ScheduledTransactionsApi.js +98 -0
- package/dist/apis/TransactionsApi.d.ts +201 -0
- package/dist/apis/TransactionsApi.js +461 -0
- package/dist/apis/UserApi.d.ts +28 -0
- package/dist/apis/UserApi.js +55 -0
- package/dist/apis/index.d.ts +10 -0
- package/dist/apis/index.js +24 -0
- package/dist/browser/ynab.js +1 -1
- package/dist/esm/apis/AccountsApi.d.ts +60 -0
- package/dist/esm/apis/AccountsApi.js +256 -0
- package/dist/esm/apis/BudgetsApi.d.ts +58 -0
- package/dist/esm/apis/BudgetsApi.js +248 -0
- package/dist/esm/apis/CategoriesApi.d.ts +77 -0
- package/dist/esm/apis/CategoriesApi.js +324 -0
- package/dist/{transactionsApi.d.ts → esm/apis/CustomTransactionsApi.d.ts} +19 -19
- package/dist/esm/{transactionsApi.js → apis/CustomTransactionsApi.js} +27 -22
- package/dist/esm/apis/DeprecatedApi.d.ts +32 -0
- package/dist/esm/apis/DeprecatedApi.js +138 -0
- package/dist/esm/apis/MonthsApi.d.ts +46 -0
- package/dist/esm/apis/MonthsApi.js +195 -0
- package/dist/esm/apis/PayeeLocationsApi.d.ts +59 -0
- package/dist/esm/apis/PayeeLocationsApi.js +251 -0
- package/dist/esm/apis/PayeesApi.d.ts +46 -0
- package/dist/esm/apis/PayeesApi.js +195 -0
- package/dist/esm/apis/ScheduledTransactionsApi.d.ts +46 -0
- package/dist/esm/apis/ScheduledTransactionsApi.js +195 -0
- package/dist/esm/apis/TransactionsApi.d.ts +201 -0
- package/dist/esm/apis/TransactionsApi.js +734 -0
- package/dist/esm/apis/UserApi.d.ts +28 -0
- package/dist/esm/apis/UserApi.js +130 -0
- package/dist/esm/apis/index.d.ts +10 -0
- package/dist/esm/apis/index.js +12 -0
- package/dist/esm/index.d.ts +24 -36
- package/dist/esm/index.js +22 -30
- package/dist/esm/models/Account.d.ts +140 -0
- package/dist/esm/models/Account.js +88 -0
- package/dist/esm/models/AccountResponse.d.ts +32 -0
- package/dist/esm/models/AccountResponse.js +44 -0
- package/dist/esm/models/AccountResponseData.d.ts +32 -0
- package/dist/esm/models/AccountResponseData.js +44 -0
- package/dist/esm/models/AccountType.d.ts +34 -0
- package/dist/esm/models/AccountType.js +41 -0
- package/dist/esm/models/AccountsResponse.d.ts +32 -0
- package/dist/esm/models/AccountsResponse.js +44 -0
- package/dist/esm/models/AccountsResponseData.d.ts +38 -0
- package/dist/esm/models/AccountsResponseData.js +47 -0
- package/dist/esm/models/BudgetDetail.d.ts +139 -0
- package/dist/esm/models/BudgetDetail.js +89 -0
- package/dist/esm/models/BudgetDetailAllOf.d.ts +95 -0
- package/dist/esm/models/BudgetDetailAllOf.js +71 -0
- package/dist/esm/models/BudgetDetailResponse.d.ts +32 -0
- package/dist/esm/models/BudgetDetailResponse.js +44 -0
- package/dist/esm/models/BudgetDetailResponseData.d.ts +38 -0
- package/dist/esm/models/BudgetDetailResponseData.js +47 -0
- package/dist/esm/models/BudgetSettings.d.ts +39 -0
- package/dist/esm/models/BudgetSettings.js +48 -0
- package/dist/esm/models/BudgetSettingsResponse.d.ts +32 -0
- package/dist/esm/models/BudgetSettingsResponse.js +44 -0
- package/dist/esm/models/BudgetSettingsResponseData.d.ts +32 -0
- package/dist/esm/models/BudgetSettingsResponseData.js +44 -0
- package/dist/esm/models/BudgetSummary.d.ts +76 -0
- package/dist/esm/models/BudgetSummary.js +62 -0
- package/dist/esm/models/BudgetSummaryResponse.d.ts +32 -0
- package/dist/esm/models/BudgetSummaryResponse.js +44 -0
- package/dist/esm/models/BudgetSummaryResponseData.d.ts +38 -0
- package/dist/esm/models/BudgetSummaryResponseData.js +47 -0
- package/dist/esm/models/BulkResponse.d.ts +32 -0
- package/dist/esm/models/BulkResponse.js +44 -0
- package/dist/esm/models/BulkResponseData.d.ts +32 -0
- package/dist/esm/models/BulkResponseData.js +44 -0
- package/dist/esm/models/BulkResponseDataBulk.d.ts +37 -0
- package/dist/esm/models/BulkResponseDataBulk.js +46 -0
- package/dist/esm/models/BulkTransactions.d.ts +32 -0
- package/dist/esm/models/BulkTransactions.js +44 -0
- package/dist/esm/models/CategoriesResponse.d.ts +32 -0
- package/dist/esm/models/CategoriesResponse.js +44 -0
- package/dist/esm/models/CategoriesResponseData.d.ts +38 -0
- package/dist/esm/models/CategoriesResponseData.js +47 -0
- package/dist/esm/models/Category.d.ts +175 -0
- package/dist/esm/models/Category.js +106 -0
- package/dist/esm/models/CategoryGroup.d.ts +49 -0
- package/dist/esm/models/CategoryGroup.js +52 -0
- package/dist/esm/models/CategoryGroupWithCategories.d.ts +56 -0
- package/dist/esm/models/CategoryGroupWithCategories.js +56 -0
- package/dist/esm/models/CategoryGroupWithCategoriesAllOf.d.ts +32 -0
- package/dist/esm/models/CategoryGroupWithCategoriesAllOf.js +44 -0
- package/dist/esm/models/CategoryResponse.d.ts +32 -0
- package/dist/esm/models/CategoryResponse.js +44 -0
- package/dist/esm/models/CategoryResponseData.d.ts +32 -0
- package/dist/esm/models/CategoryResponseData.js +44 -0
- package/dist/esm/models/CurrencyFormat.d.ts +73 -0
- package/dist/esm/models/CurrencyFormat.js +64 -0
- package/dist/esm/models/DateFormat.d.ts +31 -0
- package/dist/esm/models/DateFormat.js +43 -0
- package/dist/esm/models/ErrorDetail.d.ts +43 -0
- package/dist/esm/models/ErrorDetail.js +49 -0
- package/dist/esm/models/ErrorResponse.d.ts +32 -0
- package/dist/esm/models/ErrorResponse.js +44 -0
- package/dist/esm/models/HybridTransaction.d.ts +208 -0
- package/dist/esm/models/HybridTransaction.js +137 -0
- package/dist/esm/models/HybridTransactionAllOf.d.ts +63 -0
- package/dist/esm/models/HybridTransactionAllOf.js +60 -0
- package/dist/esm/models/HybridTransactionsResponse.d.ts +32 -0
- package/dist/esm/models/HybridTransactionsResponse.js +44 -0
- package/dist/esm/models/HybridTransactionsResponseData.d.ts +38 -0
- package/dist/esm/models/HybridTransactionsResponseData.js +47 -0
- package/dist/esm/models/MonthDetail.d.ts +80 -0
- package/dist/esm/models/MonthDetail.js +67 -0
- package/dist/esm/models/MonthDetailAllOf.d.ts +32 -0
- package/dist/esm/models/MonthDetailAllOf.js +44 -0
- package/dist/esm/models/MonthDetailResponse.d.ts +32 -0
- package/dist/esm/models/MonthDetailResponse.js +44 -0
- package/dist/esm/models/MonthDetailResponseData.d.ts +32 -0
- package/dist/esm/models/MonthDetailResponseData.js +44 -0
- package/dist/esm/models/MonthSummariesResponse.d.ts +32 -0
- package/dist/esm/models/MonthSummariesResponse.js +44 -0
- package/dist/esm/models/MonthSummariesResponseData.d.ts +38 -0
- package/dist/esm/models/MonthSummariesResponseData.js +47 -0
- package/dist/esm/models/MonthSummary.d.ts +73 -0
- package/dist/esm/models/MonthSummary.js +63 -0
- package/dist/esm/models/PatchMonthCategoryWrapper.d.ts +32 -0
- package/dist/esm/models/PatchMonthCategoryWrapper.js +44 -0
- package/dist/esm/models/PatchTransactionsWrapper.d.ts +32 -0
- package/dist/esm/models/PatchTransactionsWrapper.js +44 -0
- package/dist/esm/models/Payee.d.ts +49 -0
- package/dist/esm/models/Payee.js +52 -0
- package/dist/esm/models/PayeeLocation.d.ts +55 -0
- package/dist/esm/models/PayeeLocation.js +55 -0
- package/dist/esm/models/PayeeLocationResponse.d.ts +32 -0
- package/dist/esm/models/PayeeLocationResponse.js +44 -0
- package/dist/esm/models/PayeeLocationResponseData.d.ts +32 -0
- package/dist/esm/models/PayeeLocationResponseData.js +44 -0
- package/dist/esm/models/PayeeLocationsResponse.d.ts +32 -0
- package/dist/esm/models/PayeeLocationsResponse.js +44 -0
- package/dist/esm/models/PayeeLocationsResponseData.d.ts +32 -0
- package/dist/esm/models/PayeeLocationsResponseData.js +44 -0
- package/dist/esm/models/PayeeResponse.d.ts +32 -0
- package/dist/esm/models/PayeeResponse.js +44 -0
- package/dist/esm/models/PayeeResponseData.d.ts +32 -0
- package/dist/esm/models/PayeeResponseData.js +44 -0
- package/dist/esm/models/PayeesResponse.d.ts +32 -0
- package/dist/esm/models/PayeesResponse.js +44 -0
- package/dist/esm/models/PayeesResponseData.d.ts +38 -0
- package/dist/esm/models/PayeesResponseData.js +47 -0
- package/dist/esm/models/PostAccountWrapper.d.ts +32 -0
- package/dist/esm/models/PostAccountWrapper.js +44 -0
- package/dist/esm/models/PostTransactionsWrapper.d.ts +38 -0
- package/dist/esm/models/PostTransactionsWrapper.js +46 -0
- package/dist/esm/models/PutTransactionWrapper.d.ts +32 -0
- package/dist/esm/models/PutTransactionWrapper.js +44 -0
- package/dist/esm/models/SaveAccount.d.ts +44 -0
- package/dist/esm/models/SaveAccount.js +50 -0
- package/dist/esm/models/SaveCategoryResponse.d.ts +32 -0
- package/dist/esm/models/SaveCategoryResponse.js +44 -0
- package/dist/esm/models/SaveCategoryResponseData.d.ts +38 -0
- package/dist/esm/models/SaveCategoryResponseData.js +47 -0
- package/dist/esm/models/SaveMonthCategory.d.ts +31 -0
- package/dist/esm/models/SaveMonthCategory.js +43 -0
- package/dist/esm/models/SaveSubTransaction.d.ts +55 -0
- package/dist/esm/models/SaveSubTransaction.js +52 -0
- package/dist/esm/models/SaveTransaction.d.ts +120 -0
- package/dist/esm/models/SaveTransaction.js +86 -0
- package/dist/esm/models/SaveTransactionWithId.d.ts +126 -0
- package/dist/esm/models/SaveTransactionWithId.js +88 -0
- package/dist/esm/models/SaveTransactionWithIdAllOf.d.ts +31 -0
- package/dist/esm/models/SaveTransactionWithIdAllOf.js +43 -0
- package/dist/esm/models/SaveTransactionWithOptionalFields.d.ts +120 -0
- package/dist/esm/models/SaveTransactionWithOptionalFields.js +86 -0
- package/dist/esm/models/SaveTransactionsResponse.d.ts +32 -0
- package/dist/esm/models/SaveTransactionsResponse.js +44 -0
- package/dist/esm/models/SaveTransactionsResponseData.d.ts +56 -0
- package/dist/esm/models/SaveTransactionsResponseData.js +54 -0
- package/dist/esm/models/ScheduledSubTransaction.d.ts +73 -0
- package/dist/esm/models/ScheduledSubTransaction.js +61 -0
- package/dist/esm/models/ScheduledTransactionDetail.d.ts +154 -0
- package/dist/esm/models/ScheduledTransactionDetail.js +113 -0
- package/dist/esm/models/ScheduledTransactionDetailAllOf.d.ts +50 -0
- package/dist/esm/models/ScheduledTransactionDetailAllOf.js +52 -0
- package/dist/esm/models/ScheduledTransactionResponse.d.ts +32 -0
- package/dist/esm/models/ScheduledTransactionResponse.js +44 -0
- package/dist/esm/models/ScheduledTransactionResponseData.d.ts +32 -0
- package/dist/esm/models/ScheduledTransactionResponseData.js +44 -0
- package/dist/esm/models/ScheduledTransactionSummary.d.ts +129 -0
- package/dist/esm/models/ScheduledTransactionSummary.js +102 -0
- package/dist/esm/models/ScheduledTransactionsResponse.d.ts +32 -0
- package/dist/esm/models/ScheduledTransactionsResponse.js +44 -0
- package/dist/esm/models/ScheduledTransactionsResponseData.d.ts +38 -0
- package/dist/esm/models/ScheduledTransactionsResponseData.js +47 -0
- package/dist/esm/models/SubTransaction.d.ts +91 -0
- package/dist/esm/models/SubTransaction.js +67 -0
- package/dist/esm/models/TransactionDetail.d.ts +195 -0
- package/dist/esm/models/TransactionDetail.js +129 -0
- package/dist/esm/models/TransactionDetailAllOf.d.ts +50 -0
- package/dist/esm/models/TransactionDetailAllOf.js +52 -0
- package/dist/esm/models/TransactionResponse.d.ts +32 -0
- package/dist/esm/models/TransactionResponse.js +44 -0
- package/dist/esm/models/TransactionResponseData.d.ts +32 -0
- package/dist/esm/models/TransactionResponseData.js +44 -0
- package/dist/esm/models/TransactionSummary.d.ts +170 -0
- package/dist/esm/models/TransactionSummary.js +118 -0
- package/dist/esm/models/TransactionsImportResponse.d.ts +32 -0
- package/dist/esm/models/TransactionsImportResponse.js +44 -0
- package/dist/esm/models/TransactionsImportResponseData.d.ts +31 -0
- package/dist/esm/models/TransactionsImportResponseData.js +43 -0
- package/dist/esm/models/TransactionsResponse.d.ts +32 -0
- package/dist/esm/models/TransactionsResponse.js +44 -0
- package/dist/esm/models/TransactionsResponseData.d.ts +38 -0
- package/dist/esm/models/TransactionsResponseData.js +47 -0
- package/dist/esm/models/User.d.ts +31 -0
- package/dist/esm/models/User.js +43 -0
- package/dist/esm/models/UserResponse.d.ts +32 -0
- package/dist/esm/models/UserResponse.js +44 -0
- package/dist/esm/models/UserResponseData.d.ts +32 -0
- package/dist/esm/models/UserResponseData.js +44 -0
- package/dist/esm/models/index.d.ts +90 -0
- package/dist/esm/models/index.js +92 -0
- package/dist/esm/runtime.d.ts +182 -0
- package/dist/esm/runtime.js +555 -0
- package/dist/index.d.ts +24 -36
- package/dist/index.js +22 -30
- package/dist/models/Account.d.ts +140 -0
- package/dist/models/Account.js +95 -0
- package/dist/models/AccountResponse.d.ts +32 -0
- package/dist/models/AccountResponse.js +51 -0
- package/dist/models/AccountResponseData.d.ts +32 -0
- package/dist/models/AccountResponseData.js +51 -0
- package/dist/models/AccountType.d.ts +34 -0
- package/dist/models/AccountType.js +47 -0
- package/dist/models/AccountsResponse.d.ts +32 -0
- package/dist/models/AccountsResponse.js +51 -0
- package/dist/models/AccountsResponseData.d.ts +38 -0
- package/dist/models/AccountsResponseData.js +54 -0
- package/dist/models/BudgetDetail.d.ts +139 -0
- package/dist/models/BudgetDetail.js +96 -0
- package/dist/models/BudgetDetailAllOf.d.ts +95 -0
- package/dist/models/BudgetDetailAllOf.js +78 -0
- package/dist/models/BudgetDetailResponse.d.ts +32 -0
- package/dist/models/BudgetDetailResponse.js +51 -0
- package/dist/models/BudgetDetailResponseData.d.ts +38 -0
- package/dist/models/BudgetDetailResponseData.js +54 -0
- package/dist/models/BudgetSettings.d.ts +39 -0
- package/dist/models/BudgetSettings.js +55 -0
- package/dist/models/BudgetSettingsResponse.d.ts +32 -0
- package/dist/models/BudgetSettingsResponse.js +51 -0
- package/dist/models/BudgetSettingsResponseData.d.ts +32 -0
- package/dist/models/BudgetSettingsResponseData.js +51 -0
- package/dist/models/BudgetSummary.d.ts +76 -0
- package/dist/models/BudgetSummary.js +69 -0
- package/dist/models/BudgetSummaryResponse.d.ts +32 -0
- package/dist/models/BudgetSummaryResponse.js +51 -0
- package/dist/models/BudgetSummaryResponseData.d.ts +38 -0
- package/dist/models/BudgetSummaryResponseData.js +54 -0
- package/dist/models/BulkResponse.d.ts +32 -0
- package/dist/models/BulkResponse.js +51 -0
- package/dist/models/BulkResponseData.d.ts +32 -0
- package/dist/models/BulkResponseData.js +51 -0
- package/dist/models/BulkResponseDataBulk.d.ts +37 -0
- package/dist/models/BulkResponseDataBulk.js +53 -0
- package/dist/models/BulkTransactions.d.ts +32 -0
- package/dist/models/BulkTransactions.js +51 -0
- package/dist/models/CategoriesResponse.d.ts +32 -0
- package/dist/models/CategoriesResponse.js +51 -0
- package/dist/models/CategoriesResponseData.d.ts +38 -0
- package/dist/models/CategoriesResponseData.js +54 -0
- package/dist/models/Category.d.ts +175 -0
- package/dist/models/Category.js +113 -0
- package/dist/models/CategoryGroup.d.ts +49 -0
- package/dist/models/CategoryGroup.js +59 -0
- package/dist/models/CategoryGroupWithCategories.d.ts +56 -0
- package/dist/models/CategoryGroupWithCategories.js +63 -0
- package/dist/models/CategoryGroupWithCategoriesAllOf.d.ts +32 -0
- package/dist/models/CategoryGroupWithCategoriesAllOf.js +51 -0
- package/dist/models/CategoryResponse.d.ts +32 -0
- package/dist/models/CategoryResponse.js +51 -0
- package/dist/models/CategoryResponseData.d.ts +32 -0
- package/dist/models/CategoryResponseData.js +51 -0
- package/dist/models/CurrencyFormat.d.ts +73 -0
- package/dist/models/CurrencyFormat.js +71 -0
- package/dist/models/DateFormat.d.ts +31 -0
- package/dist/models/DateFormat.js +50 -0
- package/dist/models/ErrorDetail.d.ts +43 -0
- package/dist/models/ErrorDetail.js +56 -0
- package/dist/models/ErrorResponse.d.ts +32 -0
- package/dist/models/ErrorResponse.js +51 -0
- package/dist/models/HybridTransaction.d.ts +208 -0
- package/dist/models/HybridTransaction.js +144 -0
- package/dist/models/HybridTransactionAllOf.d.ts +63 -0
- package/dist/models/HybridTransactionAllOf.js +67 -0
- package/dist/models/HybridTransactionsResponse.d.ts +32 -0
- package/dist/models/HybridTransactionsResponse.js +51 -0
- package/dist/models/HybridTransactionsResponseData.d.ts +38 -0
- package/dist/models/HybridTransactionsResponseData.js +54 -0
- package/dist/models/MonthDetail.d.ts +80 -0
- package/dist/models/MonthDetail.js +74 -0
- package/dist/models/MonthDetailAllOf.d.ts +32 -0
- package/dist/models/MonthDetailAllOf.js +51 -0
- package/dist/models/MonthDetailResponse.d.ts +32 -0
- package/dist/models/MonthDetailResponse.js +51 -0
- package/dist/models/MonthDetailResponseData.d.ts +32 -0
- package/dist/models/MonthDetailResponseData.js +51 -0
- package/dist/models/MonthSummariesResponse.d.ts +32 -0
- package/dist/models/MonthSummariesResponse.js +51 -0
- package/dist/models/MonthSummariesResponseData.d.ts +38 -0
- package/dist/models/MonthSummariesResponseData.js +54 -0
- package/dist/models/MonthSummary.d.ts +73 -0
- package/dist/models/MonthSummary.js +70 -0
- package/dist/models/PatchMonthCategoryWrapper.d.ts +32 -0
- package/dist/models/PatchMonthCategoryWrapper.js +51 -0
- package/dist/models/PatchTransactionsWrapper.d.ts +32 -0
- package/dist/models/PatchTransactionsWrapper.js +51 -0
- package/dist/models/Payee.d.ts +49 -0
- package/dist/models/Payee.js +59 -0
- package/dist/models/PayeeLocation.d.ts +55 -0
- package/dist/models/PayeeLocation.js +62 -0
- package/dist/models/PayeeLocationResponse.d.ts +32 -0
- package/dist/models/PayeeLocationResponse.js +51 -0
- package/dist/models/PayeeLocationResponseData.d.ts +32 -0
- package/dist/models/PayeeLocationResponseData.js +51 -0
- package/dist/models/PayeeLocationsResponse.d.ts +32 -0
- package/dist/models/PayeeLocationsResponse.js +51 -0
- package/dist/models/PayeeLocationsResponseData.d.ts +32 -0
- package/dist/models/PayeeLocationsResponseData.js +51 -0
- package/dist/models/PayeeResponse.d.ts +32 -0
- package/dist/models/PayeeResponse.js +51 -0
- package/dist/models/PayeeResponseData.d.ts +32 -0
- package/dist/models/PayeeResponseData.js +51 -0
- package/dist/models/PayeesResponse.d.ts +32 -0
- package/dist/models/PayeesResponse.js +51 -0
- package/dist/models/PayeesResponseData.d.ts +38 -0
- package/dist/models/PayeesResponseData.js +54 -0
- package/dist/models/PostAccountWrapper.d.ts +32 -0
- package/dist/models/PostAccountWrapper.js +51 -0
- package/dist/models/PostTransactionsWrapper.d.ts +38 -0
- package/dist/models/PostTransactionsWrapper.js +53 -0
- package/dist/models/PutTransactionWrapper.d.ts +32 -0
- package/dist/models/PutTransactionWrapper.js +51 -0
- package/dist/models/SaveAccount.d.ts +44 -0
- package/dist/models/SaveAccount.js +57 -0
- package/dist/models/SaveCategoryResponse.d.ts +32 -0
- package/dist/models/SaveCategoryResponse.js +51 -0
- package/dist/models/SaveCategoryResponseData.d.ts +38 -0
- package/dist/models/SaveCategoryResponseData.js +54 -0
- package/dist/models/SaveMonthCategory.d.ts +31 -0
- package/dist/models/SaveMonthCategory.js +50 -0
- package/dist/models/SaveSubTransaction.d.ts +55 -0
- package/dist/models/SaveSubTransaction.js +59 -0
- package/dist/models/SaveTransaction.d.ts +120 -0
- package/dist/models/SaveTransaction.js +93 -0
- package/dist/models/SaveTransactionWithId.d.ts +126 -0
- package/dist/models/SaveTransactionWithId.js +95 -0
- package/dist/models/SaveTransactionWithIdAllOf.d.ts +31 -0
- package/dist/models/SaveTransactionWithIdAllOf.js +50 -0
- package/dist/models/SaveTransactionWithOptionalFields.d.ts +120 -0
- package/dist/models/SaveTransactionWithOptionalFields.js +93 -0
- package/dist/models/SaveTransactionsResponse.d.ts +32 -0
- package/dist/models/SaveTransactionsResponse.js +51 -0
- package/dist/models/SaveTransactionsResponseData.d.ts +56 -0
- package/dist/models/SaveTransactionsResponseData.js +61 -0
- package/dist/models/ScheduledSubTransaction.d.ts +73 -0
- package/dist/models/ScheduledSubTransaction.js +68 -0
- package/dist/models/ScheduledTransactionDetail.d.ts +154 -0
- package/dist/models/ScheduledTransactionDetail.js +120 -0
- package/dist/models/ScheduledTransactionDetailAllOf.d.ts +50 -0
- package/dist/models/ScheduledTransactionDetailAllOf.js +59 -0
- package/dist/models/ScheduledTransactionResponse.d.ts +32 -0
- package/dist/models/ScheduledTransactionResponse.js +51 -0
- package/dist/models/ScheduledTransactionResponseData.d.ts +32 -0
- package/dist/models/ScheduledTransactionResponseData.js +51 -0
- package/dist/models/ScheduledTransactionSummary.d.ts +129 -0
- package/dist/models/ScheduledTransactionSummary.js +109 -0
- package/dist/models/ScheduledTransactionsResponse.d.ts +32 -0
- package/dist/models/ScheduledTransactionsResponse.js +51 -0
- package/dist/models/ScheduledTransactionsResponseData.d.ts +38 -0
- package/dist/models/ScheduledTransactionsResponseData.js +54 -0
- package/dist/models/SubTransaction.d.ts +91 -0
- package/dist/models/SubTransaction.js +74 -0
- package/dist/models/TransactionDetail.d.ts +195 -0
- package/dist/models/TransactionDetail.js +136 -0
- package/dist/models/TransactionDetailAllOf.d.ts +50 -0
- package/dist/models/TransactionDetailAllOf.js +59 -0
- package/dist/models/TransactionResponse.d.ts +32 -0
- package/dist/models/TransactionResponse.js +51 -0
- package/dist/models/TransactionResponseData.d.ts +32 -0
- package/dist/models/TransactionResponseData.js +51 -0
- package/dist/models/TransactionSummary.d.ts +170 -0
- package/dist/models/TransactionSummary.js +125 -0
- package/dist/models/TransactionsImportResponse.d.ts +32 -0
- package/dist/models/TransactionsImportResponse.js +51 -0
- package/dist/models/TransactionsImportResponseData.d.ts +31 -0
- package/dist/models/TransactionsImportResponseData.js +50 -0
- package/dist/models/TransactionsResponse.d.ts +32 -0
- package/dist/models/TransactionsResponse.js +51 -0
- package/dist/models/TransactionsResponseData.d.ts +38 -0
- package/dist/models/TransactionsResponseData.js +54 -0
- package/dist/models/User.d.ts +31 -0
- package/dist/models/User.js +50 -0
- package/dist/models/UserResponse.d.ts +32 -0
- package/dist/models/UserResponse.js +51 -0
- package/dist/models/UserResponseData.d.ts +32 -0
- package/dist/models/UserResponseData.js +51 -0
- package/dist/models/index.d.ts +90 -0
- package/dist/models/index.js +104 -0
- package/dist/runtime.d.ts +182 -0
- package/dist/runtime.js +336 -0
- package/package.json +4 -4
- package/dist/api.d.ts +0 -4639
- package/dist/api.js +0 -3757
- package/dist/browser/ynab.js.LICENSE.txt +0 -1
- package/dist/configuration.d.ts +0 -26
- package/dist/configuration.js +0 -22
- package/dist/esm/api.d.ts +0 -4639
- package/dist/esm/api.js +0 -4067
- package/dist/esm/configuration.d.ts +0 -26
- package/dist/esm/configuration.js +0 -20
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Please read the [YNAB API documentation](https://api.ynab.com) for an overview of using the API and a complete list of available resources.
|
|
7
7
|
|
|
8
|
-
This client is generated using the [
|
|
8
|
+
This client is generated using the [OpenAPI Generator](https://openapi-generator.tech/).
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
@@ -110,13 +110,6 @@ The API enforces [Rate Limiting](https://api.ynab.com/#rate-limiting).
|
|
|
110
110
|
|
|
111
111
|
If the rate limit is exceeded, a `429` [Error Response](https://api.ynab.com/#errors) will be returned from the API which will result in an [error being thrown](https://github.com/ynab/ynab-sdk-js#error-handling) in this library.
|
|
112
112
|
|
|
113
|
-
You can access the rate limiting info through the `rateLimit` property on a response object. It will contain the value from the `X-Rate-Limit` response header.
|
|
114
|
-
|
|
115
|
-
```typescript
|
|
116
|
-
const ynabAPI = new ynab.API(accessToken);
|
|
117
|
-
const budgetsResponse = await ynabAPI.budgets.getBudgets();
|
|
118
|
-
console.log(budgetsResponse.rateLimit); // ex: "36/200"
|
|
119
|
-
```
|
|
120
113
|
|
|
121
114
|
## Examples
|
|
122
115
|
|
|
@@ -129,36 +122,36 @@ The following methods are available in this library. For more details on paramet
|
|
|
129
122
|
|
|
130
123
|
| | Method | Description |
|
|
131
124
|
|----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------|
|
|
132
|
-
| **User** | [user.getUser()](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
133
|
-
| **Budgets** | [budgets.getBudgets()](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
134
|
-
| | [budgets.getBudgetById(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
135
|
-
| | [budgets.getBudgetSettingsById(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
136
|
-
| **Accounts** | [accounts.getAccounts(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
137
|
-
| | [accounts.getAccountById(budget_id, account_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
138
|
-
| **Categories** | [categories.getCategories(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
139
|
-
| | [categories.getCategoryById(budget_id, category_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
140
|
-
| | [categories.updateMonthCategory(budget_id, month, category_id, month_category)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
141
|
-
| **Payees** | [payees.getPayees(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
142
|
-
| | [payees.getPayeeById(budget_id, payee_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
143
|
-
| **Payee Locations** | [payee_locations.getPayeeLocations(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
144
|
-
| | [payee_locations.getPayeeLocationById(budget_id, payee_location_id)](https://github.com/ynab/ynab-sdk-js/blob/
|
|
145
|
-
| | [payee_locations.getPayeeLocationsByPayee(budget_id, payee_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
146
|
-
| **Months** | [months.getBudgetMonths(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
147
|
-
| | [months.getBudgetMonth(budget_id, month)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
148
|
-
| | [months.getMonthCategory_by_id(budget_id, month, category_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
149
|
-
| **Transactions** | [transactions.getTransactions(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
150
|
-
| | [transactions.getTransactionsByAccount(budget_id, account_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
151
|
-
| | [transactions.getTransactionsByCategory(budget_id, category_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
152
|
-
| | [transactions.getTransactionsByType(budget_id, type)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
153
|
-
| | [transactions.getTransactionById(budget_id, transaction_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
154
|
-
| | [transactions.createTransaction(budget_id, data)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
155
|
-
| | [transactions.createTransactions(budget_id, data)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
156
|
-
| | [transactions.updateTransaction(budget_id, transaction_id, data)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
157
|
-
| | [transactions.updateTransactions(budget_id, data)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
158
|
-
| | [transactions.deleteTransaction(budget_id, transaction_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
159
|
-
| | [transactions.importTransactions(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
160
|
-
| **Scheduled Transactions** | [scheduled_transactions.getScheduledTransactions(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
161
|
-
| | [scheduled_transactions.getScheduledTransactionById(budget_id, scheduled_transaction_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/
|
|
125
|
+
| **User** | [user.getUser()](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/UserApi.d.ts) | Returns authenticated user information |
|
|
126
|
+
| **Budgets** | [budgets.getBudgets()](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/BudgetsApi.d.ts) | Returns budgets list with summary information |
|
|
127
|
+
| | [budgets.getBudgetById(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/BudgetsApi.d.ts) | Returns a single budget with all related entities |
|
|
128
|
+
| | [budgets.getBudgetSettingsById(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/BudgetsApi.d.ts) | Returns settings for a budget |
|
|
129
|
+
| **Accounts** | [accounts.getAccounts(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/AccountsApi.d.ts) | Returns all accounts |
|
|
130
|
+
| | [accounts.getAccountById(budget_id, account_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/AccountsApi.d.ts) | Returns a single account |
|
|
131
|
+
| **Categories** | [categories.getCategories(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/CategoriesApi.d.ts) | Returns all categories grouped by category group. |
|
|
132
|
+
| | [categories.getCategoryById(budget_id, category_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/CategoriesApi.d.ts) | Returns a single category |
|
|
133
|
+
| | [categories.updateMonthCategory(budget_id, month, category_id, month_category)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/CategoriesApi.d.ts) | Update an existing month category |
|
|
134
|
+
| **Payees** | [payees.getPayees(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/PayeesApi.d.ts) | Returns all payees |
|
|
135
|
+
| | [payees.getPayeeById(budget_id, payee_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/PayeesApi.d.ts) | Returns single payee |
|
|
136
|
+
| **Payee Locations** | [payee_locations.getPayeeLocations(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/PayeeLocationsApi.d.ts) | Returns all payee locations |
|
|
137
|
+
| | [payee_locations.getPayeeLocationById(budget_id, payee_location_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/PayeeLocationsApi.d.ts) | Returns a single payee location |
|
|
138
|
+
| | [payee_locations.getPayeeLocationsByPayee(budget_id, payee_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/PayeeLocationsApi.d.ts) | Returns all payee locations for the specified payee |
|
|
139
|
+
| **Months** | [months.getBudgetMonths(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/MonthsApi.d.ts) | Returns all budget months |
|
|
140
|
+
| | [months.getBudgetMonth(budget_id, month)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/MonthsApi.d.ts) | Returns a single budget month |
|
|
141
|
+
| | [months.getMonthCategory_by_id(budget_id, month, category_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/MonthsApi.d.ts) | Returns a single category for a specific budget month |
|
|
142
|
+
| **Transactions** | [transactions.getTransactions(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/TransactionsApi.d.ts) | Returns budget transactions |
|
|
143
|
+
| | [transactions.getTransactionsByAccount(budget_id, account_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/TransactionsApi.d.ts) | Returns all transactions for a specified account |
|
|
144
|
+
| | [transactions.getTransactionsByCategory(budget_id, category_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/TransactionsApi.d.ts) | Returns all transactions for a specified category |
|
|
145
|
+
| | [transactions.getTransactionsByType(budget_id, type)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/TransactionsApi.d.ts) | Returns all transactions of a specified type ("unapproved" or "uncategorized") |
|
|
146
|
+
| | [transactions.getTransactionById(budget_id, transaction_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/TransactionsApi.d.ts) | Returns a single transaction |
|
|
147
|
+
| | [transactions.createTransaction(budget_id, data)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/TransactionsApi.d.ts) | Creates a single transaction |
|
|
148
|
+
| | [transactions.createTransactions(budget_id, data)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/TransactionsApi.d.ts) | Creates multiple transactions |
|
|
149
|
+
| | [transactions.updateTransaction(budget_id, transaction_id, data)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/TransactionsApi.d.ts) | Updates a single transaction |
|
|
150
|
+
| | [transactions.updateTransactions(budget_id, data)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/TransactionsApi.d.ts) | Updates multiple transactions |
|
|
151
|
+
| | [transactions.deleteTransaction(budget_id, transaction_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/TransactionsApi.d.ts) | Deletes a transaction |
|
|
152
|
+
| | [transactions.importTransactions(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/TransactionsApi.d.ts) | Imports transactions |
|
|
153
|
+
| **Scheduled Transactions** | [scheduled_transactions.getScheduledTransactions(budget_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/ScheduledTransactionsApi.d.ts) | Returns all scheduled transactions |
|
|
154
|
+
| | [scheduled_transactions.getScheduledTransactionById(budget_id, scheduled_transaction_id)](https://github.com/ynab/ynab-sdk-js/blob/main/dist/apis/ScheduledTransactionsApi.d.ts) | Returns a single scheduled transaction |
|
|
162
155
|
|
|
163
156
|
### Utilities
|
|
164
157
|
|
|
@@ -0,0 +1,60 @@
|
|
|
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 { AccountResponse, AccountsResponse, PostAccountWrapper } from '../models/index';
|
|
14
|
+
export interface CreateAccountRequest {
|
|
15
|
+
budgetId: string;
|
|
16
|
+
data: PostAccountWrapper;
|
|
17
|
+
}
|
|
18
|
+
export interface GetAccountByIdRequest {
|
|
19
|
+
budgetId: string;
|
|
20
|
+
accountId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface GetAccountsRequest {
|
|
23
|
+
budgetId: string;
|
|
24
|
+
lastKnowledgeOfServer?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
export declare class AccountsApi extends runtime.BaseAPI {
|
|
30
|
+
/**
|
|
31
|
+
* Creates a new account
|
|
32
|
+
* Create a new account
|
|
33
|
+
*/
|
|
34
|
+
createAccountRaw(requestParameters: CreateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountResponse>>;
|
|
35
|
+
/**
|
|
36
|
+
* Creates a new account
|
|
37
|
+
* Create a new account
|
|
38
|
+
*/
|
|
39
|
+
createAccount(budgetId: string, data: PostAccountWrapper, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* Returns a single account
|
|
42
|
+
* Single account
|
|
43
|
+
*/
|
|
44
|
+
getAccountByIdRaw(requestParameters: GetAccountByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountResponse>>;
|
|
45
|
+
/**
|
|
46
|
+
* Returns a single account
|
|
47
|
+
* Single account
|
|
48
|
+
*/
|
|
49
|
+
getAccountById(budgetId: string, accountId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* Returns all accounts
|
|
52
|
+
* Account list
|
|
53
|
+
*/
|
|
54
|
+
getAccountsRaw(requestParameters: GetAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountsResponse>>;
|
|
55
|
+
/**
|
|
56
|
+
* Returns all accounts
|
|
57
|
+
* Account list
|
|
58
|
+
*/
|
|
59
|
+
getAccounts(budgetId: string, lastKnowledgeOfServer?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountsResponse>;
|
|
60
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
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.AccountsApi = void 0;
|
|
17
|
+
const runtime = require("../runtime");
|
|
18
|
+
const index_1 = require("../models/index");
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
class AccountsApi extends runtime.BaseAPI {
|
|
23
|
+
/**
|
|
24
|
+
* Creates a new account
|
|
25
|
+
* Create a new account
|
|
26
|
+
*/
|
|
27
|
+
async createAccountRaw(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 createAccount.');
|
|
30
|
+
}
|
|
31
|
+
if (requestParameters.data === null || requestParameters.data === undefined) {
|
|
32
|
+
throw new runtime.RequiredError('data', 'Required parameter requestParameters.data was null or undefined when calling createAccount.');
|
|
33
|
+
}
|
|
34
|
+
const queryParameters = {};
|
|
35
|
+
const headerParameters = {};
|
|
36
|
+
headerParameters['Accept'] = 'application/json';
|
|
37
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
38
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
39
|
+
const token = this.configuration.accessToken;
|
|
40
|
+
const tokenString = await token("bearer", []);
|
|
41
|
+
if (tokenString) {
|
|
42
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const response = await this.request({
|
|
46
|
+
path: `/budgets/{budget_id}/accounts`.replace(`{${"budget_id"}}`, encodeURIComponent(String(requestParameters.budgetId))),
|
|
47
|
+
method: 'POST',
|
|
48
|
+
headers: headerParameters,
|
|
49
|
+
query: queryParameters,
|
|
50
|
+
body: (0, index_1.PostAccountWrapperToJSON)(requestParameters.data),
|
|
51
|
+
}, initOverrides);
|
|
52
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AccountResponseFromJSON)(jsonValue));
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Creates a new account
|
|
56
|
+
* Create a new account
|
|
57
|
+
*/
|
|
58
|
+
async createAccount(budgetId, data, initOverrides) {
|
|
59
|
+
const response = await this.createAccountRaw({ budgetId: budgetId, data: data }, initOverrides);
|
|
60
|
+
return await response.value();
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Returns a single account
|
|
64
|
+
* Single account
|
|
65
|
+
*/
|
|
66
|
+
async getAccountByIdRaw(requestParameters, initOverrides) {
|
|
67
|
+
if (requestParameters.budgetId === null || requestParameters.budgetId === undefined) {
|
|
68
|
+
throw new runtime.RequiredError('budgetId', 'Required parameter requestParameters.budgetId was null or undefined when calling getAccountById.');
|
|
69
|
+
}
|
|
70
|
+
if (requestParameters.accountId === null || requestParameters.accountId === undefined) {
|
|
71
|
+
throw new runtime.RequiredError('accountId', 'Required parameter requestParameters.accountId was null or undefined when calling getAccountById.');
|
|
72
|
+
}
|
|
73
|
+
const queryParameters = {};
|
|
74
|
+
const headerParameters = {};
|
|
75
|
+
headerParameters['Accept'] = 'application/json';
|
|
76
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
77
|
+
const token = this.configuration.accessToken;
|
|
78
|
+
const tokenString = await token("bearer", []);
|
|
79
|
+
if (tokenString) {
|
|
80
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const response = await this.request({
|
|
84
|
+
path: `/budgets/{budget_id}/accounts/{account_id}`.replace(`{${"budget_id"}}`, encodeURIComponent(String(requestParameters.budgetId))).replace(`{${"account_id"}}`, encodeURIComponent(String(requestParameters.accountId))),
|
|
85
|
+
method: 'GET',
|
|
86
|
+
headers: headerParameters,
|
|
87
|
+
query: queryParameters,
|
|
88
|
+
}, initOverrides);
|
|
89
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AccountResponseFromJSON)(jsonValue));
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Returns a single account
|
|
93
|
+
* Single account
|
|
94
|
+
*/
|
|
95
|
+
async getAccountById(budgetId, accountId, initOverrides) {
|
|
96
|
+
const response = await this.getAccountByIdRaw({ budgetId: budgetId, accountId: accountId }, initOverrides);
|
|
97
|
+
return await response.value();
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Returns all accounts
|
|
101
|
+
* Account list
|
|
102
|
+
*/
|
|
103
|
+
async getAccountsRaw(requestParameters, initOverrides) {
|
|
104
|
+
if (requestParameters.budgetId === null || requestParameters.budgetId === undefined) {
|
|
105
|
+
throw new runtime.RequiredError('budgetId', 'Required parameter requestParameters.budgetId was null or undefined when calling getAccounts.');
|
|
106
|
+
}
|
|
107
|
+
const queryParameters = {};
|
|
108
|
+
if (requestParameters.lastKnowledgeOfServer !== undefined) {
|
|
109
|
+
queryParameters['last_knowledge_of_server'] = requestParameters.lastKnowledgeOfServer;
|
|
110
|
+
}
|
|
111
|
+
const headerParameters = {};
|
|
112
|
+
headerParameters['Accept'] = 'application/json';
|
|
113
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
114
|
+
const token = this.configuration.accessToken;
|
|
115
|
+
const tokenString = await token("bearer", []);
|
|
116
|
+
if (tokenString) {
|
|
117
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
const response = await this.request({
|
|
121
|
+
path: `/budgets/{budget_id}/accounts`.replace(`{${"budget_id"}}`, encodeURIComponent(String(requestParameters.budgetId))),
|
|
122
|
+
method: 'GET',
|
|
123
|
+
headers: headerParameters,
|
|
124
|
+
query: queryParameters,
|
|
125
|
+
}, initOverrides);
|
|
126
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AccountsResponseFromJSON)(jsonValue));
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Returns all accounts
|
|
130
|
+
* Account list
|
|
131
|
+
*/
|
|
132
|
+
async getAccounts(budgetId, lastKnowledgeOfServer, initOverrides) {
|
|
133
|
+
const response = await this.getAccountsRaw({ budgetId: budgetId, lastKnowledgeOfServer: lastKnowledgeOfServer }, initOverrides);
|
|
134
|
+
return await response.value();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
exports.AccountsApi = AccountsApi;
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { BudgetDetailResponse, BudgetSettingsResponse, BudgetSummaryResponse } from '../models/index';
|
|
14
|
+
export interface GetBudgetByIdRequest {
|
|
15
|
+
budgetId: string;
|
|
16
|
+
lastKnowledgeOfServer?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface GetBudgetSettingsByIdRequest {
|
|
19
|
+
budgetId: string;
|
|
20
|
+
}
|
|
21
|
+
export interface GetBudgetsRequest {
|
|
22
|
+
includeAccounts?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
export declare class BudgetsApi extends runtime.BaseAPI {
|
|
28
|
+
/**
|
|
29
|
+
* Returns a single budget with all related entities. This resource is effectively a full budget export.
|
|
30
|
+
* Single budget
|
|
31
|
+
*/
|
|
32
|
+
getBudgetByIdRaw(requestParameters: GetBudgetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BudgetDetailResponse>>;
|
|
33
|
+
/**
|
|
34
|
+
* Returns a single budget with all related entities. This resource is effectively a full budget export.
|
|
35
|
+
* Single budget
|
|
36
|
+
*/
|
|
37
|
+
getBudgetById(budgetId: string, lastKnowledgeOfServer?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BudgetDetailResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Returns settings for a budget
|
|
40
|
+
* Budget Settings
|
|
41
|
+
*/
|
|
42
|
+
getBudgetSettingsByIdRaw(requestParameters: GetBudgetSettingsByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BudgetSettingsResponse>>;
|
|
43
|
+
/**
|
|
44
|
+
* Returns settings for a budget
|
|
45
|
+
* Budget Settings
|
|
46
|
+
*/
|
|
47
|
+
getBudgetSettingsById(budgetId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BudgetSettingsResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* Returns budgets list with summary information
|
|
50
|
+
* List budgets
|
|
51
|
+
*/
|
|
52
|
+
getBudgetsRaw(requestParameters: GetBudgetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BudgetSummaryResponse>>;
|
|
53
|
+
/**
|
|
54
|
+
* Returns budgets list with summary information
|
|
55
|
+
* List budgets
|
|
56
|
+
*/
|
|
57
|
+
getBudgets(includeAccounts?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BudgetSummaryResponse>;
|
|
58
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
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.BudgetsApi = void 0;
|
|
17
|
+
const runtime = require("../runtime");
|
|
18
|
+
const index_1 = require("../models/index");
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
class BudgetsApi extends runtime.BaseAPI {
|
|
23
|
+
/**
|
|
24
|
+
* Returns a single budget with all related entities. This resource is effectively a full budget export.
|
|
25
|
+
* Single budget
|
|
26
|
+
*/
|
|
27
|
+
async getBudgetByIdRaw(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 getBudgetById.');
|
|
30
|
+
}
|
|
31
|
+
const queryParameters = {};
|
|
32
|
+
if (requestParameters.lastKnowledgeOfServer !== undefined) {
|
|
33
|
+
queryParameters['last_knowledge_of_server'] = requestParameters.lastKnowledgeOfServer;
|
|
34
|
+
}
|
|
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}`.replace(`{${"budget_id"}}`, encodeURIComponent(String(requestParameters.budgetId))),
|
|
46
|
+
method: 'GET',
|
|
47
|
+
headers: headerParameters,
|
|
48
|
+
query: queryParameters,
|
|
49
|
+
}, initOverrides);
|
|
50
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BudgetDetailResponseFromJSON)(jsonValue));
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Returns a single budget with all related entities. This resource is effectively a full budget export.
|
|
54
|
+
* Single budget
|
|
55
|
+
*/
|
|
56
|
+
async getBudgetById(budgetId, lastKnowledgeOfServer, initOverrides) {
|
|
57
|
+
const response = await this.getBudgetByIdRaw({ budgetId: budgetId, lastKnowledgeOfServer: lastKnowledgeOfServer }, initOverrides);
|
|
58
|
+
return await response.value();
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Returns settings for a budget
|
|
62
|
+
* Budget Settings
|
|
63
|
+
*/
|
|
64
|
+
async getBudgetSettingsByIdRaw(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 getBudgetSettingsById.');
|
|
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}/settings`.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.BudgetSettingsResponseFromJSON)(jsonValue));
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Returns settings for a budget
|
|
88
|
+
* Budget Settings
|
|
89
|
+
*/
|
|
90
|
+
async getBudgetSettingsById(budgetId, initOverrides) {
|
|
91
|
+
const response = await this.getBudgetSettingsByIdRaw({ budgetId: budgetId }, initOverrides);
|
|
92
|
+
return await response.value();
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Returns budgets list with summary information
|
|
96
|
+
* List budgets
|
|
97
|
+
*/
|
|
98
|
+
async getBudgetsRaw(requestParameters, initOverrides) {
|
|
99
|
+
const queryParameters = {};
|
|
100
|
+
if (requestParameters.includeAccounts !== undefined) {
|
|
101
|
+
queryParameters['include_accounts'] = requestParameters.includeAccounts;
|
|
102
|
+
}
|
|
103
|
+
const headerParameters = {};
|
|
104
|
+
headerParameters['Accept'] = 'application/json';
|
|
105
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
106
|
+
const token = this.configuration.accessToken;
|
|
107
|
+
const tokenString = await token("bearer", []);
|
|
108
|
+
if (tokenString) {
|
|
109
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
const response = await this.request({
|
|
113
|
+
path: `/budgets`,
|
|
114
|
+
method: 'GET',
|
|
115
|
+
headers: headerParameters,
|
|
116
|
+
query: queryParameters,
|
|
117
|
+
}, initOverrides);
|
|
118
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BudgetSummaryResponseFromJSON)(jsonValue));
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Returns budgets list with summary information
|
|
122
|
+
* List budgets
|
|
123
|
+
*/
|
|
124
|
+
async getBudgets(includeAccounts, initOverrides) {
|
|
125
|
+
const response = await this.getBudgetsRaw({ includeAccounts: includeAccounts }, initOverrides);
|
|
126
|
+
return await response.value();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
exports.BudgetsApi = BudgetsApi;
|
|
@@ -0,0 +1,77 @@
|
|
|
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 { CategoriesResponse, CategoryResponse, PatchMonthCategoryWrapper, SaveCategoryResponse } from '../models/index';
|
|
14
|
+
export interface GetCategoriesRequest {
|
|
15
|
+
budgetId: string;
|
|
16
|
+
lastKnowledgeOfServer?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface GetCategoryByIdRequest {
|
|
19
|
+
budgetId: string;
|
|
20
|
+
categoryId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface GetMonthCategoryByIdRequest {
|
|
23
|
+
budgetId: string;
|
|
24
|
+
month: string;
|
|
25
|
+
categoryId: string;
|
|
26
|
+
}
|
|
27
|
+
export interface UpdateMonthCategoryRequest {
|
|
28
|
+
budgetId: string;
|
|
29
|
+
month: string;
|
|
30
|
+
categoryId: string;
|
|
31
|
+
data: PatchMonthCategoryWrapper;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
export declare class CategoriesApi extends runtime.BaseAPI {
|
|
37
|
+
/**
|
|
38
|
+
* Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
|
39
|
+
* List categories
|
|
40
|
+
*/
|
|
41
|
+
getCategoriesRaw(requestParameters: GetCategoriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CategoriesResponse>>;
|
|
42
|
+
/**
|
|
43
|
+
* Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
|
44
|
+
* List categories
|
|
45
|
+
*/
|
|
46
|
+
getCategories(budgetId: string, lastKnowledgeOfServer?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CategoriesResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Returns a single category. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
|
49
|
+
* Single category
|
|
50
|
+
*/
|
|
51
|
+
getCategoryByIdRaw(requestParameters: GetCategoryByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CategoryResponse>>;
|
|
52
|
+
/**
|
|
53
|
+
* Returns a single category. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
|
54
|
+
* Single category
|
|
55
|
+
*/
|
|
56
|
+
getCategoryById(budgetId: string, categoryId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CategoryResponse>;
|
|
57
|
+
/**
|
|
58
|
+
* Returns a single category for a specific budget month. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
|
59
|
+
* Single category for a specific budget month
|
|
60
|
+
*/
|
|
61
|
+
getMonthCategoryByIdRaw(requestParameters: GetMonthCategoryByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CategoryResponse>>;
|
|
62
|
+
/**
|
|
63
|
+
* Returns a single category for a specific budget month. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
|
64
|
+
* Single category for a specific budget month
|
|
65
|
+
*/
|
|
66
|
+
getMonthCategoryById(budgetId: string, month: string, categoryId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CategoryResponse>;
|
|
67
|
+
/**
|
|
68
|
+
* Update a category for a specific month. Only `budgeted` amount can be updated.
|
|
69
|
+
* Update a category for a specific month
|
|
70
|
+
*/
|
|
71
|
+
updateMonthCategoryRaw(requestParameters: UpdateMonthCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SaveCategoryResponse>>;
|
|
72
|
+
/**
|
|
73
|
+
* Update a category for a specific month. Only `budgeted` amount can be updated.
|
|
74
|
+
* Update a category for a specific month
|
|
75
|
+
*/
|
|
76
|
+
updateMonthCategory(budgetId: string, month: string, categoryId: string, data: PatchMonthCategoryWrapper, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SaveCategoryResponse>;
|
|
77
|
+
}
|