ynab 2.10.0 → 4.0.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 +50 -42
- package/dist/apis/AccountsApi.d.ts +12 -12
- package/dist/apis/AccountsApi.js +38 -28
- package/dist/apis/CategoriesApi.d.ts +68 -25
- package/dist/apis/CategoriesApi.js +176 -46
- package/dist/apis/DeprecatedApi.js +17 -7
- package/dist/apis/MoneyMovementsApi.d.ts +67 -0
- package/dist/apis/MoneyMovementsApi.js +194 -0
- package/dist/apis/MonthsApi.d.ts +16 -16
- package/dist/apis/MonthsApi.js +38 -28
- package/dist/apis/PayeeLocationsApi.d.ts +12 -12
- package/dist/apis/PayeeLocationsApi.js +38 -28
- package/dist/apis/PayeesApi.d.ts +10 -10
- package/dist/apis/PayeesApi.js +36 -26
- package/dist/apis/PlansApi.d.ts +53 -0
- package/dist/apis/{BudgetsApi.js → PlansApi.js} +51 -41
- package/dist/apis/ScheduledTransactionsApi.d.ts +20 -20
- package/dist/apis/ScheduledTransactionsApi.js +52 -42
- package/dist/apis/TransactionsApi.d.ts +49 -49
- package/dist/apis/TransactionsApi.js +99 -89
- package/dist/apis/UserApi.d.ts +2 -2
- package/dist/apis/UserApi.js +19 -9
- package/dist/apis/index.d.ts +2 -1
- package/dist/apis/index.js +2 -1
- package/dist/browser/ynab.js +1 -1
- package/dist/esm/apis/AccountsApi.d.ts +12 -12
- package/dist/esm/apis/AccountsApi.js +23 -23
- package/dist/esm/apis/CategoriesApi.d.ts +68 -25
- package/dist/esm/apis/CategoriesApi.js +228 -42
- package/dist/esm/apis/DeprecatedApi.js +2 -2
- package/dist/esm/apis/MoneyMovementsApi.d.ts +67 -0
- package/dist/esm/apis/MoneyMovementsApi.js +302 -0
- package/dist/esm/apis/MonthsApi.d.ts +16 -16
- package/dist/esm/apis/MonthsApi.js +23 -23
- package/dist/esm/apis/PayeeLocationsApi.d.ts +12 -12
- package/dist/esm/apis/PayeeLocationsApi.js +23 -23
- package/dist/esm/apis/PayeesApi.d.ts +10 -10
- package/dist/esm/apis/PayeesApi.js +21 -21
- package/dist/esm/apis/PlansApi.d.ts +53 -0
- package/dist/esm/apis/{BudgetsApi.js → PlansApi.js} +39 -39
- package/dist/esm/apis/ScheduledTransactionsApi.d.ts +20 -20
- package/dist/esm/apis/ScheduledTransactionsApi.js +37 -37
- package/dist/esm/apis/TransactionsApi.d.ts +49 -49
- package/dist/esm/apis/TransactionsApi.js +84 -84
- package/dist/esm/apis/UserApi.d.ts +2 -2
- package/dist/esm/apis/UserApi.js +4 -4
- package/dist/esm/apis/index.d.ts +2 -1
- package/dist/esm/apis/index.js +2 -1
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.js +5 -5
- package/dist/esm/models/Account.d.ts +6 -6
- package/dist/esm/models/Category.d.ts +10 -4
- package/dist/esm/models/Category.js +2 -0
- package/dist/esm/models/CategoryGroupWithCategories.d.ts +1 -1
- package/dist/esm/models/CurrencyFormat.d.ts +1 -1
- package/dist/esm/models/DateFormat.d.ts +1 -1
- package/dist/esm/models/ExistingCategory.d.ts +51 -0
- package/dist/esm/models/ExistingCategory.js +45 -0
- package/dist/esm/models/ExistingTransaction.d.ts +4 -4
- package/dist/esm/models/HybridTransaction.d.ts +12 -12
- package/dist/esm/models/MoneyMovement.d.ts +75 -0
- package/dist/esm/models/MoneyMovement.js +57 -0
- package/dist/esm/models/MoneyMovementGroup.d.ts +51 -0
- package/dist/esm/models/MoneyMovementGroup.js +51 -0
- package/dist/esm/models/MoneyMovementGroupsResponse.d.ts +28 -0
- package/dist/esm/models/MoneyMovementGroupsResponse.js +40 -0
- package/dist/esm/models/MoneyMovementGroupsResponseData.d.ts +34 -0
- package/dist/esm/models/MoneyMovementGroupsResponseData.js +44 -0
- package/dist/esm/models/MoneyMovementsResponse.d.ts +28 -0
- package/dist/esm/models/{BudgetSettingsResponse.js → MoneyMovementsResponse.js} +11 -11
- package/dist/esm/models/MoneyMovementsResponseData.d.ts +34 -0
- package/dist/esm/models/MoneyMovementsResponseData.js +44 -0
- package/dist/esm/models/MonthDetail.d.ts +4 -4
- package/dist/esm/models/MonthSummary.d.ts +1 -1
- package/dist/esm/models/NewCategory.d.ts +51 -0
- package/dist/esm/models/NewCategory.js +45 -0
- package/dist/esm/models/NewTransaction.d.ts +4 -4
- package/dist/esm/models/PatchCategoryGroupWrapper.d.ts +28 -0
- package/dist/esm/models/PatchCategoryGroupWrapper.js +40 -0
- package/dist/esm/models/PatchCategoryWrapper.d.ts +3 -3
- package/dist/esm/models/PatchCategoryWrapper.js +3 -3
- package/dist/{models/BudgetDetail.d.ts → esm/models/PlanDetail.d.ts} +30 -30
- package/dist/esm/models/{BudgetDetail.js → PlanDetail.js} +8 -8
- package/dist/esm/models/PlanDetailResponse.d.ts +28 -0
- package/dist/esm/models/PlanDetailResponse.js +40 -0
- package/dist/esm/models/PlanDetailResponseData.d.ts +34 -0
- package/dist/esm/models/{BudgetDetailResponseData.js → PlanDetailResponseData.js} +12 -12
- package/dist/esm/models/PlanSettings.d.ts +35 -0
- package/dist/esm/models/{BudgetSettings.js → PlanSettings.js} +8 -8
- package/dist/esm/models/PlanSettingsResponse.d.ts +28 -0
- package/dist/esm/models/{BudgetDetailResponse.js → PlanSettingsResponse.js} +11 -11
- package/dist/esm/models/PlanSettingsResponseData.d.ts +28 -0
- package/dist/esm/models/PlanSettingsResponseData.js +40 -0
- package/dist/esm/models/PlanSummary.d.ts +72 -0
- package/dist/esm/models/{BudgetSummary.js → PlanSummary.js} +8 -8
- package/dist/esm/models/PlanSummaryResponse.d.ts +28 -0
- package/dist/esm/models/PlanSummaryResponse.js +40 -0
- package/dist/esm/models/PlanSummaryResponseData.d.ts +34 -0
- package/dist/esm/models/PlanSummaryResponseData.js +42 -0
- package/dist/esm/models/PostCategoryGroupWrapper.d.ts +28 -0
- package/dist/esm/models/PostCategoryGroupWrapper.js +40 -0
- package/dist/esm/models/PostCategoryWrapper.d.ts +28 -0
- package/dist/esm/models/PostCategoryWrapper.js +40 -0
- package/dist/esm/models/SaveCategory.d.ts +7 -1
- package/dist/esm/models/SaveCategory.js +2 -0
- package/dist/esm/models/SaveCategoryGroup.d.ts +27 -0
- package/dist/esm/models/SaveCategoryGroup.js +39 -0
- package/dist/esm/models/SaveCategoryGroupResponse.d.ts +28 -0
- package/dist/esm/models/SaveCategoryGroupResponse.js +40 -0
- package/dist/esm/models/SaveCategoryGroupResponseData.d.ts +34 -0
- package/dist/esm/models/SaveCategoryGroupResponseData.js +44 -0
- package/dist/esm/models/SaveMonthCategory.d.ts +1 -1
- package/dist/esm/models/SaveTransactionWithIdOrImportId.d.ts +4 -4
- package/dist/esm/models/ScheduledTransactionDetail.d.ts +6 -6
- package/dist/esm/models/ScheduledTransactionSummary.d.ts +1 -1
- package/dist/esm/models/TransactionDetail.d.ts +11 -11
- package/dist/esm/models/TransactionSummary.d.ts +1 -1
- package/dist/esm/models/index.d.ts +23 -9
- package/dist/esm/models/index.js +23 -9
- package/dist/esm/runtime.js +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +22 -12
- package/dist/models/Account.d.ts +6 -6
- package/dist/models/Account.js +5 -6
- package/dist/models/AccountResponse.js +5 -6
- package/dist/models/AccountResponseData.js +5 -6
- package/dist/models/AccountType.js +6 -6
- package/dist/models/AccountsResponse.js +5 -6
- package/dist/models/AccountsResponseData.js +5 -6
- package/dist/models/BulkResponse.js +5 -6
- package/dist/models/BulkResponseData.js +5 -6
- package/dist/models/BulkResponseDataBulk.js +5 -6
- package/dist/models/BulkTransactions.js +5 -6
- package/dist/models/CategoriesResponse.js +5 -6
- package/dist/models/CategoriesResponseData.js +5 -6
- package/dist/models/Category.d.ts +10 -4
- package/dist/models/Category.js +8 -6
- package/dist/models/CategoryGoalType.js +4 -5
- package/dist/models/CategoryGroup.js +5 -6
- package/dist/models/CategoryGroupWithCategories.d.ts +1 -1
- package/dist/models/CategoryGroupWithCategories.js +5 -6
- package/dist/models/CategoryGroupWithCategoriesAllOf.js +4 -5
- package/dist/models/CategoryResponse.js +5 -6
- package/dist/models/CategoryResponseData.js +5 -6
- package/dist/models/CurrencyFormat.d.ts +1 -1
- package/dist/models/CurrencyFormat.js +5 -6
- package/dist/models/DateFormat.d.ts +1 -1
- package/dist/models/DateFormat.js +5 -6
- package/dist/models/ErrorDetail.js +5 -6
- package/dist/models/ErrorResponse.js +5 -6
- package/dist/models/ExistingCategory.d.ts +51 -0
- package/dist/models/ExistingCategory.js +51 -0
- package/dist/models/ExistingTransaction.d.ts +4 -4
- package/dist/models/ExistingTransaction.js +5 -6
- package/dist/models/HybridTransaction.d.ts +12 -12
- package/dist/models/HybridTransaction.js +6 -6
- package/dist/models/HybridTransactionAllOf.js +5 -5
- package/dist/models/HybridTransactionsResponse.js +5 -6
- package/dist/models/HybridTransactionsResponseData.js +5 -6
- package/dist/models/MoneyMovement.d.ts +75 -0
- package/dist/models/MoneyMovement.js +63 -0
- package/dist/models/MoneyMovementGroup.d.ts +51 -0
- package/dist/models/MoneyMovementGroup.js +57 -0
- package/dist/models/MoneyMovementGroupsResponse.d.ts +28 -0
- package/dist/models/MoneyMovementGroupsResponse.js +46 -0
- package/dist/models/MoneyMovementGroupsResponseData.d.ts +34 -0
- package/dist/models/MoneyMovementGroupsResponseData.js +50 -0
- package/dist/models/MoneyMovementsResponse.d.ts +28 -0
- package/dist/models/MoneyMovementsResponse.js +46 -0
- package/dist/models/MoneyMovementsResponseData.d.ts +34 -0
- package/dist/models/MoneyMovementsResponseData.js +50 -0
- package/dist/models/MonthDetail.d.ts +4 -4
- package/dist/models/MonthDetail.js +5 -6
- package/dist/models/MonthDetailAllOf.js +4 -5
- package/dist/models/MonthDetailResponse.js +5 -6
- package/dist/models/MonthDetailResponseData.js +5 -6
- package/dist/models/MonthSummariesResponse.js +5 -6
- package/dist/models/MonthSummariesResponseData.js +5 -6
- package/dist/models/MonthSummary.d.ts +1 -1
- package/dist/models/MonthSummary.js +5 -6
- package/dist/models/NewCategory.d.ts +51 -0
- package/dist/models/NewCategory.js +51 -0
- package/dist/models/NewTransaction.d.ts +4 -4
- package/dist/models/NewTransaction.js +5 -6
- package/dist/models/PatchCategoryGroupWrapper.d.ts +28 -0
- package/dist/models/PatchCategoryGroupWrapper.js +46 -0
- package/dist/models/PatchCategoryWrapper.d.ts +3 -3
- package/dist/models/PatchCategoryWrapper.js +8 -9
- package/dist/models/PatchMonthCategoryWrapper.js +5 -6
- package/dist/models/PatchPayeeWrapper.js +5 -6
- package/dist/models/PatchTransactionsWrapper.js +5 -6
- package/dist/models/Payee.js +5 -6
- package/dist/models/PayeeLocation.js +5 -6
- package/dist/models/PayeeLocationResponse.js +5 -6
- package/dist/models/PayeeLocationResponseData.js +5 -6
- package/dist/models/PayeeLocationsResponse.js +5 -6
- package/dist/models/PayeeLocationsResponseData.js +5 -6
- package/dist/models/PayeeResponse.js +5 -6
- package/dist/models/PayeeResponseData.js +5 -6
- package/dist/models/PayeesResponse.js +5 -6
- package/dist/models/PayeesResponseData.js +5 -6
- package/dist/{esm/models/BudgetDetail.d.ts → models/PlanDetail.d.ts} +30 -30
- package/dist/models/{BudgetDetail.js → PlanDetail.js} +13 -14
- package/dist/models/PlanDetailResponse.d.ts +28 -0
- package/dist/models/PlanDetailResponse.js +46 -0
- package/dist/models/PlanDetailResponseData.d.ts +34 -0
- package/dist/models/PlanDetailResponseData.js +50 -0
- package/dist/models/PlanSettings.d.ts +35 -0
- package/dist/models/{BudgetSettings.js → PlanSettings.js} +13 -14
- package/dist/models/PlanSettingsResponse.d.ts +28 -0
- package/dist/models/PlanSettingsResponse.js +46 -0
- package/dist/models/PlanSettingsResponseData.d.ts +28 -0
- package/dist/models/PlanSettingsResponseData.js +46 -0
- package/dist/models/PlanSummary.d.ts +72 -0
- package/dist/models/{BudgetSummary.js → PlanSummary.js} +13 -14
- package/dist/models/PlanSummaryResponse.d.ts +28 -0
- package/dist/models/PlanSummaryResponse.js +46 -0
- package/dist/models/PlanSummaryResponseData.d.ts +34 -0
- package/dist/models/PlanSummaryResponseData.js +48 -0
- package/dist/models/PostAccountWrapper.js +5 -6
- package/dist/models/PostCategoryGroupWrapper.d.ts +28 -0
- package/dist/models/PostCategoryGroupWrapper.js +46 -0
- package/dist/models/PostCategoryWrapper.d.ts +28 -0
- package/dist/models/PostCategoryWrapper.js +46 -0
- package/dist/models/PostScheduledTransactionWrapper.js +5 -6
- package/dist/models/PostTransactionsWrapper.js +5 -6
- package/dist/models/PutScheduledTransactionWrapper.js +5 -6
- package/dist/models/PutTransactionWrapper.js +5 -6
- package/dist/models/SaveAccount.js +5 -6
- package/dist/models/SaveCategory.d.ts +7 -1
- package/dist/models/SaveCategory.js +7 -6
- package/dist/models/SaveCategoryGroup.d.ts +27 -0
- package/dist/models/SaveCategoryGroup.js +45 -0
- package/dist/models/SaveCategoryGroupResponse.d.ts +28 -0
- package/dist/models/SaveCategoryGroupResponse.js +46 -0
- package/dist/models/SaveCategoryGroupResponseData.d.ts +34 -0
- package/dist/models/SaveCategoryGroupResponseData.js +50 -0
- package/dist/models/SaveCategoryResponse.js +5 -6
- package/dist/models/SaveCategoryResponseData.js +5 -6
- package/dist/models/SaveMonthCategory.d.ts +1 -1
- package/dist/models/SaveMonthCategory.js +5 -6
- package/dist/models/SavePayee.js +5 -6
- package/dist/models/SavePayeeResponse.js +5 -6
- package/dist/models/SavePayeeResponseData.js +5 -6
- package/dist/models/SaveScheduledTransaction.js +5 -6
- package/dist/models/SaveSubTransaction.js +5 -6
- package/dist/models/SaveTransaction.js +4 -5
- package/dist/models/SaveTransactionWithId.js +4 -5
- package/dist/models/SaveTransactionWithIdAllOf.js +4 -5
- package/dist/models/SaveTransactionWithIdOrImportId.d.ts +4 -4
- package/dist/models/SaveTransactionWithIdOrImportId.js +5 -6
- package/dist/models/SaveTransactionWithOptionalFields.js +5 -6
- package/dist/models/SaveTransactionWithOptionalFieldsFlagColor.js +4 -5
- package/dist/models/SaveTransactionsResponse.js +5 -6
- package/dist/models/SaveTransactionsResponseData.js +5 -6
- package/dist/models/ScheduledSubTransaction.js +5 -6
- package/dist/models/ScheduledTransactionDetail.d.ts +6 -6
- package/dist/models/ScheduledTransactionDetail.js +6 -6
- package/dist/models/ScheduledTransactionDetailAllOf.js +4 -5
- package/dist/models/ScheduledTransactionFrequency.js +6 -6
- package/dist/models/ScheduledTransactionResponse.js +5 -6
- package/dist/models/ScheduledTransactionResponseData.js +5 -6
- package/dist/models/ScheduledTransactionSummary.d.ts +1 -1
- package/dist/models/ScheduledTransactionSummary.js +6 -6
- package/dist/models/ScheduledTransactionSummaryFlagColor.js +4 -5
- package/dist/models/ScheduledTransactionsResponse.js +5 -6
- package/dist/models/ScheduledTransactionsResponseData.js +5 -6
- package/dist/models/SubTransaction.js +5 -6
- package/dist/models/TransactionClearedStatus.js +6 -6
- package/dist/models/TransactionDetail.d.ts +11 -11
- package/dist/models/TransactionDetail.js +6 -6
- package/dist/models/TransactionDetailAllOf.js +4 -5
- package/dist/models/TransactionFlagColor.js +6 -6
- package/dist/models/TransactionResponse.js +5 -6
- package/dist/models/TransactionResponseData.js +5 -6
- package/dist/models/TransactionSummary.d.ts +1 -1
- package/dist/models/TransactionSummary.js +6 -6
- package/dist/models/TransactionSummaryDebtTransactionType.js +4 -5
- package/dist/models/TransactionsImportResponse.js +5 -6
- package/dist/models/TransactionsImportResponseData.js +5 -6
- package/dist/models/TransactionsResponse.js +5 -6
- package/dist/models/TransactionsResponseData.js +5 -6
- package/dist/models/User.js +5 -6
- package/dist/models/UserResponse.js +5 -6
- package/dist/models/UserResponseData.js +5 -6
- package/dist/models/index.d.ts +23 -9
- package/dist/models/index.js +23 -9
- package/dist/runtime.js +5 -5
- package/package.json +7 -8
- package/dist/apis/BudgetsApi.d.ts +0 -53
- package/dist/esm/apis/BudgetsApi.d.ts +0 -53
- package/dist/esm/models/BudgetDetailAllOf.d.ts +0 -95
- package/dist/esm/models/BudgetDetailAllOf.js +0 -71
- package/dist/esm/models/BudgetDetailResponse.d.ts +0 -28
- package/dist/esm/models/BudgetDetailResponseData.d.ts +0 -34
- package/dist/esm/models/BudgetSettings.d.ts +0 -35
- package/dist/esm/models/BudgetSettingsResponse.d.ts +0 -28
- package/dist/esm/models/BudgetSettingsResponseData.d.ts +0 -28
- package/dist/esm/models/BudgetSettingsResponseData.js +0 -40
- package/dist/esm/models/BudgetSummary.d.ts +0 -72
- package/dist/esm/models/BudgetSummaryResponse.d.ts +0 -28
- package/dist/esm/models/BudgetSummaryResponse.js +0 -40
- package/dist/esm/models/BudgetSummaryResponseData.d.ts +0 -34
- package/dist/esm/models/BudgetSummaryResponseData.js +0 -42
- package/dist/models/BudgetDetailAllOf.d.ts +0 -95
- package/dist/models/BudgetDetailAllOf.js +0 -78
- package/dist/models/BudgetDetailResponse.d.ts +0 -28
- package/dist/models/BudgetDetailResponse.js +0 -47
- package/dist/models/BudgetDetailResponseData.d.ts +0 -34
- package/dist/models/BudgetDetailResponseData.js +0 -51
- package/dist/models/BudgetSettings.d.ts +0 -35
- package/dist/models/BudgetSettingsResponse.d.ts +0 -28
- package/dist/models/BudgetSettingsResponse.js +0 -47
- package/dist/models/BudgetSettingsResponseData.d.ts +0 -28
- package/dist/models/BudgetSettingsResponseData.js +0 -47
- package/dist/models/BudgetSummary.d.ts +0 -72
- package/dist/models/BudgetSummaryResponse.d.ts +0 -28
- package/dist/models/BudgetSummaryResponse.js +0 -47
- package/dist/models/BudgetSummaryResponseData.d.ts +0 -34
- package/dist/models/BudgetSummaryResponseData.js +0 -49
|
@@ -31,8 +31,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
33
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
34
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
35
|
-
return g =
|
|
34
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
35
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
36
36
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
37
37
|
function step(op) {
|
|
38
38
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -58,7 +58,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
import * as runtime from '../runtime';
|
|
61
|
-
import { CategoriesResponseFromJSON, CategoryResponseFromJSON, PatchCategoryWrapperToJSON, PatchMonthCategoryWrapperToJSON, SaveCategoryResponseFromJSON, } from '../models/index';
|
|
61
|
+
import { CategoriesResponseFromJSON, CategoryResponseFromJSON, PatchCategoryGroupWrapperToJSON, PatchCategoryWrapperToJSON, PatchMonthCategoryWrapperToJSON, PostCategoryGroupWrapperToJSON, PostCategoryWrapperToJSON, SaveCategoryGroupResponseFromJSON, SaveCategoryResponseFromJSON, } from '../models/index';
|
|
62
62
|
/**
|
|
63
63
|
*
|
|
64
64
|
*/
|
|
@@ -68,8 +68,130 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
68
68
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
|
-
*
|
|
72
|
-
*
|
|
71
|
+
* Creates a new category
|
|
72
|
+
* Create a category
|
|
73
|
+
*/
|
|
74
|
+
CategoriesApi.prototype.createCategoryRaw = function (requestParameters, initOverrides) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
76
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
77
|
+
return __generator(this, function (_a) {
|
|
78
|
+
switch (_a.label) {
|
|
79
|
+
case 0:
|
|
80
|
+
if (requestParameters.planId === null || requestParameters.planId === undefined) {
|
|
81
|
+
throw new runtime.RequiredError('planId', 'Required parameter requestParameters.planId was null or undefined when calling createCategory.');
|
|
82
|
+
}
|
|
83
|
+
if (requestParameters.data === null || requestParameters.data === undefined) {
|
|
84
|
+
throw new runtime.RequiredError('data', 'Required parameter requestParameters.data was null or undefined when calling createCategory.');
|
|
85
|
+
}
|
|
86
|
+
queryParameters = {};
|
|
87
|
+
headerParameters = {};
|
|
88
|
+
headerParameters['Accept'] = 'application/json';
|
|
89
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
90
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
91
|
+
token = this.configuration.accessToken;
|
|
92
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
93
|
+
case 1:
|
|
94
|
+
tokenString = _a.sent();
|
|
95
|
+
if (tokenString) {
|
|
96
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
97
|
+
}
|
|
98
|
+
_a.label = 2;
|
|
99
|
+
case 2: return [4 /*yield*/, this.request({
|
|
100
|
+
path: "/plans/{plan_id}/categories".replace("{".concat("plan_id", "}"), encodeURIComponent(String(requestParameters.planId))),
|
|
101
|
+
method: 'POST',
|
|
102
|
+
headers: headerParameters,
|
|
103
|
+
query: queryParameters,
|
|
104
|
+
body: PostCategoryWrapperToJSON(requestParameters.data),
|
|
105
|
+
}, initOverrides)];
|
|
106
|
+
case 3:
|
|
107
|
+
response = _a.sent();
|
|
108
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return SaveCategoryResponseFromJSON(jsonValue); })];
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Creates a new category
|
|
115
|
+
* Create a category
|
|
116
|
+
*/
|
|
117
|
+
CategoriesApi.prototype.createCategory = function (planId, data, initOverrides) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
119
|
+
var response;
|
|
120
|
+
return __generator(this, function (_a) {
|
|
121
|
+
switch (_a.label) {
|
|
122
|
+
case 0: return [4 /*yield*/, this.createCategoryRaw({ planId: planId, data: data }, initOverrides)];
|
|
123
|
+
case 1:
|
|
124
|
+
response = _a.sent();
|
|
125
|
+
return [4 /*yield*/, response.value()];
|
|
126
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Creates a new category group
|
|
133
|
+
* Create a category group
|
|
134
|
+
*/
|
|
135
|
+
CategoriesApi.prototype.createCategoryGroupRaw = function (requestParameters, initOverrides) {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
137
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
138
|
+
return __generator(this, function (_a) {
|
|
139
|
+
switch (_a.label) {
|
|
140
|
+
case 0:
|
|
141
|
+
if (requestParameters.planId === null || requestParameters.planId === undefined) {
|
|
142
|
+
throw new runtime.RequiredError('planId', 'Required parameter requestParameters.planId was null or undefined when calling createCategoryGroup.');
|
|
143
|
+
}
|
|
144
|
+
if (requestParameters.data === null || requestParameters.data === undefined) {
|
|
145
|
+
throw new runtime.RequiredError('data', 'Required parameter requestParameters.data was null or undefined when calling createCategoryGroup.');
|
|
146
|
+
}
|
|
147
|
+
queryParameters = {};
|
|
148
|
+
headerParameters = {};
|
|
149
|
+
headerParameters['Accept'] = 'application/json';
|
|
150
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
151
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
152
|
+
token = this.configuration.accessToken;
|
|
153
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
154
|
+
case 1:
|
|
155
|
+
tokenString = _a.sent();
|
|
156
|
+
if (tokenString) {
|
|
157
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
158
|
+
}
|
|
159
|
+
_a.label = 2;
|
|
160
|
+
case 2: return [4 /*yield*/, this.request({
|
|
161
|
+
path: "/plans/{plan_id}/category_groups".replace("{".concat("plan_id", "}"), encodeURIComponent(String(requestParameters.planId))),
|
|
162
|
+
method: 'POST',
|
|
163
|
+
headers: headerParameters,
|
|
164
|
+
query: queryParameters,
|
|
165
|
+
body: PostCategoryGroupWrapperToJSON(requestParameters.data),
|
|
166
|
+
}, initOverrides)];
|
|
167
|
+
case 3:
|
|
168
|
+
response = _a.sent();
|
|
169
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return SaveCategoryGroupResponseFromJSON(jsonValue); })];
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Creates a new category group
|
|
176
|
+
* Create a category group
|
|
177
|
+
*/
|
|
178
|
+
CategoriesApi.prototype.createCategoryGroup = function (planId, data, initOverrides) {
|
|
179
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
180
|
+
var response;
|
|
181
|
+
return __generator(this, function (_a) {
|
|
182
|
+
switch (_a.label) {
|
|
183
|
+
case 0: return [4 /*yield*/, this.createCategoryGroupRaw({ planId: planId, data: data }, initOverrides)];
|
|
184
|
+
case 1:
|
|
185
|
+
response = _a.sent();
|
|
186
|
+
return [4 /*yield*/, response.value()];
|
|
187
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* Returns all categories grouped by category group. Amounts (assigned, activity, available, etc.) are specific to the current plan month (UTC).
|
|
194
|
+
* Get all categories
|
|
73
195
|
*/
|
|
74
196
|
CategoriesApi.prototype.getCategoriesRaw = function (requestParameters, initOverrides) {
|
|
75
197
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -77,8 +199,8 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
77
199
|
return __generator(this, function (_a) {
|
|
78
200
|
switch (_a.label) {
|
|
79
201
|
case 0:
|
|
80
|
-
if (requestParameters.
|
|
81
|
-
throw new runtime.RequiredError('
|
|
202
|
+
if (requestParameters.planId === null || requestParameters.planId === undefined) {
|
|
203
|
+
throw new runtime.RequiredError('planId', 'Required parameter requestParameters.planId was null or undefined when calling getCategories.');
|
|
82
204
|
}
|
|
83
205
|
queryParameters = {};
|
|
84
206
|
if (requestParameters.lastKnowledgeOfServer !== undefined) {
|
|
@@ -96,7 +218,7 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
96
218
|
}
|
|
97
219
|
_a.label = 2;
|
|
98
220
|
case 2: return [4 /*yield*/, this.request({
|
|
99
|
-
path: "/
|
|
221
|
+
path: "/plans/{plan_id}/categories".replace("{".concat("plan_id", "}"), encodeURIComponent(String(requestParameters.planId))),
|
|
100
222
|
method: 'GET',
|
|
101
223
|
headers: headerParameters,
|
|
102
224
|
query: queryParameters,
|
|
@@ -109,15 +231,15 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
109
231
|
});
|
|
110
232
|
};
|
|
111
233
|
/**
|
|
112
|
-
* Returns all categories grouped by category group. Amounts (
|
|
113
|
-
*
|
|
234
|
+
* Returns all categories grouped by category group. Amounts (assigned, activity, available, etc.) are specific to the current plan month (UTC).
|
|
235
|
+
* Get all categories
|
|
114
236
|
*/
|
|
115
|
-
CategoriesApi.prototype.getCategories = function (
|
|
237
|
+
CategoriesApi.prototype.getCategories = function (planId, lastKnowledgeOfServer, initOverrides) {
|
|
116
238
|
return __awaiter(this, void 0, void 0, function () {
|
|
117
239
|
var response;
|
|
118
240
|
return __generator(this, function (_a) {
|
|
119
241
|
switch (_a.label) {
|
|
120
|
-
case 0: return [4 /*yield*/, this.getCategoriesRaw({
|
|
242
|
+
case 0: return [4 /*yield*/, this.getCategoriesRaw({ planId: planId, lastKnowledgeOfServer: lastKnowledgeOfServer }, initOverrides)];
|
|
121
243
|
case 1:
|
|
122
244
|
response = _a.sent();
|
|
123
245
|
return [4 /*yield*/, response.value()];
|
|
@@ -127,8 +249,8 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
127
249
|
});
|
|
128
250
|
};
|
|
129
251
|
/**
|
|
130
|
-
* Returns a single category. Amounts (
|
|
131
|
-
*
|
|
252
|
+
* Returns a single category. Amounts (assigned, activity, available, etc.) are specific to the current plan month (UTC).
|
|
253
|
+
* Get a category
|
|
132
254
|
*/
|
|
133
255
|
CategoriesApi.prototype.getCategoryByIdRaw = function (requestParameters, initOverrides) {
|
|
134
256
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -136,8 +258,8 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
136
258
|
return __generator(this, function (_a) {
|
|
137
259
|
switch (_a.label) {
|
|
138
260
|
case 0:
|
|
139
|
-
if (requestParameters.
|
|
140
|
-
throw new runtime.RequiredError('
|
|
261
|
+
if (requestParameters.planId === null || requestParameters.planId === undefined) {
|
|
262
|
+
throw new runtime.RequiredError('planId', 'Required parameter requestParameters.planId was null or undefined when calling getCategoryById.');
|
|
141
263
|
}
|
|
142
264
|
if (requestParameters.categoryId === null || requestParameters.categoryId === undefined) {
|
|
143
265
|
throw new runtime.RequiredError('categoryId', 'Required parameter requestParameters.categoryId was null or undefined when calling getCategoryById.');
|
|
@@ -155,7 +277,7 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
155
277
|
}
|
|
156
278
|
_a.label = 2;
|
|
157
279
|
case 2: return [4 /*yield*/, this.request({
|
|
158
|
-
path: "/
|
|
280
|
+
path: "/plans/{plan_id}/categories/{category_id}".replace("{".concat("plan_id", "}"), encodeURIComponent(String(requestParameters.planId))).replace("{".concat("category_id", "}"), encodeURIComponent(String(requestParameters.categoryId))),
|
|
159
281
|
method: 'GET',
|
|
160
282
|
headers: headerParameters,
|
|
161
283
|
query: queryParameters,
|
|
@@ -168,15 +290,15 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
168
290
|
});
|
|
169
291
|
};
|
|
170
292
|
/**
|
|
171
|
-
* Returns a single category. Amounts (
|
|
172
|
-
*
|
|
293
|
+
* Returns a single category. Amounts (assigned, activity, available, etc.) are specific to the current plan month (UTC).
|
|
294
|
+
* Get a category
|
|
173
295
|
*/
|
|
174
|
-
CategoriesApi.prototype.getCategoryById = function (
|
|
296
|
+
CategoriesApi.prototype.getCategoryById = function (planId, categoryId, initOverrides) {
|
|
175
297
|
return __awaiter(this, void 0, void 0, function () {
|
|
176
298
|
var response;
|
|
177
299
|
return __generator(this, function (_a) {
|
|
178
300
|
switch (_a.label) {
|
|
179
|
-
case 0: return [4 /*yield*/, this.getCategoryByIdRaw({
|
|
301
|
+
case 0: return [4 /*yield*/, this.getCategoryByIdRaw({ planId: planId, categoryId: categoryId }, initOverrides)];
|
|
180
302
|
case 1:
|
|
181
303
|
response = _a.sent();
|
|
182
304
|
return [4 /*yield*/, response.value()];
|
|
@@ -186,8 +308,8 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
186
308
|
});
|
|
187
309
|
};
|
|
188
310
|
/**
|
|
189
|
-
* Returns a single category for a specific
|
|
190
|
-
*
|
|
311
|
+
* Returns a single category for a specific plan month. Amounts (assigned, activity, available, etc.) are specific to the current plan month (UTC).
|
|
312
|
+
* Get a category for a specific plan month
|
|
191
313
|
*/
|
|
192
314
|
CategoriesApi.prototype.getMonthCategoryByIdRaw = function (requestParameters, initOverrides) {
|
|
193
315
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -195,8 +317,8 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
195
317
|
return __generator(this, function (_a) {
|
|
196
318
|
switch (_a.label) {
|
|
197
319
|
case 0:
|
|
198
|
-
if (requestParameters.
|
|
199
|
-
throw new runtime.RequiredError('
|
|
320
|
+
if (requestParameters.planId === null || requestParameters.planId === undefined) {
|
|
321
|
+
throw new runtime.RequiredError('planId', 'Required parameter requestParameters.planId was null or undefined when calling getMonthCategoryById.');
|
|
200
322
|
}
|
|
201
323
|
if (requestParameters.month === null || requestParameters.month === undefined) {
|
|
202
324
|
throw new runtime.RequiredError('month', 'Required parameter requestParameters.month was null or undefined when calling getMonthCategoryById.');
|
|
@@ -217,7 +339,7 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
217
339
|
}
|
|
218
340
|
_a.label = 2;
|
|
219
341
|
case 2: return [4 /*yield*/, this.request({
|
|
220
|
-
path: "/
|
|
342
|
+
path: "/plans/{plan_id}/months/{month}/categories/{category_id}".replace("{".concat("plan_id", "}"), encodeURIComponent(String(requestParameters.planId))).replace("{".concat("month", "}"), encodeURIComponent(String(requestParameters.month))).replace("{".concat("category_id", "}"), encodeURIComponent(String(requestParameters.categoryId))),
|
|
221
343
|
method: 'GET',
|
|
222
344
|
headers: headerParameters,
|
|
223
345
|
query: queryParameters,
|
|
@@ -230,15 +352,15 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
230
352
|
});
|
|
231
353
|
};
|
|
232
354
|
/**
|
|
233
|
-
* Returns a single category for a specific
|
|
234
|
-
*
|
|
355
|
+
* Returns a single category for a specific plan month. Amounts (assigned, activity, available, etc.) are specific to the current plan month (UTC).
|
|
356
|
+
* Get a category for a specific plan month
|
|
235
357
|
*/
|
|
236
|
-
CategoriesApi.prototype.getMonthCategoryById = function (
|
|
358
|
+
CategoriesApi.prototype.getMonthCategoryById = function (planId, month, categoryId, initOverrides) {
|
|
237
359
|
return __awaiter(this, void 0, void 0, function () {
|
|
238
360
|
var response;
|
|
239
361
|
return __generator(this, function (_a) {
|
|
240
362
|
switch (_a.label) {
|
|
241
|
-
case 0: return [4 /*yield*/, this.getMonthCategoryByIdRaw({
|
|
363
|
+
case 0: return [4 /*yield*/, this.getMonthCategoryByIdRaw({ planId: planId, month: month, categoryId: categoryId }, initOverrides)];
|
|
242
364
|
case 1:
|
|
243
365
|
response = _a.sent();
|
|
244
366
|
return [4 /*yield*/, response.value()];
|
|
@@ -257,8 +379,8 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
257
379
|
return __generator(this, function (_a) {
|
|
258
380
|
switch (_a.label) {
|
|
259
381
|
case 0:
|
|
260
|
-
if (requestParameters.
|
|
261
|
-
throw new runtime.RequiredError('
|
|
382
|
+
if (requestParameters.planId === null || requestParameters.planId === undefined) {
|
|
383
|
+
throw new runtime.RequiredError('planId', 'Required parameter requestParameters.planId was null or undefined when calling updateCategory.');
|
|
262
384
|
}
|
|
263
385
|
if (requestParameters.categoryId === null || requestParameters.categoryId === undefined) {
|
|
264
386
|
throw new runtime.RequiredError('categoryId', 'Required parameter requestParameters.categoryId was null or undefined when calling updateCategory.');
|
|
@@ -280,7 +402,7 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
280
402
|
}
|
|
281
403
|
_a.label = 2;
|
|
282
404
|
case 2: return [4 /*yield*/, this.request({
|
|
283
|
-
path: "/
|
|
405
|
+
path: "/plans/{plan_id}/categories/{category_id}".replace("{".concat("plan_id", "}"), encodeURIComponent(String(requestParameters.planId))).replace("{".concat("category_id", "}"), encodeURIComponent(String(requestParameters.categoryId))),
|
|
284
406
|
method: 'PATCH',
|
|
285
407
|
headers: headerParameters,
|
|
286
408
|
query: queryParameters,
|
|
@@ -297,12 +419,76 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
297
419
|
* Update a category
|
|
298
420
|
* Update a category
|
|
299
421
|
*/
|
|
300
|
-
CategoriesApi.prototype.updateCategory = function (
|
|
422
|
+
CategoriesApi.prototype.updateCategory = function (planId, categoryId, data, initOverrides) {
|
|
423
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
424
|
+
var response;
|
|
425
|
+
return __generator(this, function (_a) {
|
|
426
|
+
switch (_a.label) {
|
|
427
|
+
case 0: return [4 /*yield*/, this.updateCategoryRaw({ planId: planId, categoryId: categoryId, data: data }, initOverrides)];
|
|
428
|
+
case 1:
|
|
429
|
+
response = _a.sent();
|
|
430
|
+
return [4 /*yield*/, response.value()];
|
|
431
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
});
|
|
435
|
+
};
|
|
436
|
+
/**
|
|
437
|
+
* Update a category group
|
|
438
|
+
* Update a category group
|
|
439
|
+
*/
|
|
440
|
+
CategoriesApi.prototype.updateCategoryGroupRaw = function (requestParameters, initOverrides) {
|
|
441
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
442
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
443
|
+
return __generator(this, function (_a) {
|
|
444
|
+
switch (_a.label) {
|
|
445
|
+
case 0:
|
|
446
|
+
if (requestParameters.planId === null || requestParameters.planId === undefined) {
|
|
447
|
+
throw new runtime.RequiredError('planId', 'Required parameter requestParameters.planId was null or undefined when calling updateCategoryGroup.');
|
|
448
|
+
}
|
|
449
|
+
if (requestParameters.categoryGroupId === null || requestParameters.categoryGroupId === undefined) {
|
|
450
|
+
throw new runtime.RequiredError('categoryGroupId', 'Required parameter requestParameters.categoryGroupId was null or undefined when calling updateCategoryGroup.');
|
|
451
|
+
}
|
|
452
|
+
if (requestParameters.data === null || requestParameters.data === undefined) {
|
|
453
|
+
throw new runtime.RequiredError('data', 'Required parameter requestParameters.data was null or undefined when calling updateCategoryGroup.');
|
|
454
|
+
}
|
|
455
|
+
queryParameters = {};
|
|
456
|
+
headerParameters = {};
|
|
457
|
+
headerParameters['Accept'] = 'application/json';
|
|
458
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
459
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
460
|
+
token = this.configuration.accessToken;
|
|
461
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
462
|
+
case 1:
|
|
463
|
+
tokenString = _a.sent();
|
|
464
|
+
if (tokenString) {
|
|
465
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
466
|
+
}
|
|
467
|
+
_a.label = 2;
|
|
468
|
+
case 2: return [4 /*yield*/, this.request({
|
|
469
|
+
path: "/plans/{plan_id}/category_groups/{category_group_id}".replace("{".concat("plan_id", "}"), encodeURIComponent(String(requestParameters.planId))).replace("{".concat("category_group_id", "}"), encodeURIComponent(String(requestParameters.categoryGroupId))),
|
|
470
|
+
method: 'PATCH',
|
|
471
|
+
headers: headerParameters,
|
|
472
|
+
query: queryParameters,
|
|
473
|
+
body: PatchCategoryGroupWrapperToJSON(requestParameters.data),
|
|
474
|
+
}, initOverrides)];
|
|
475
|
+
case 3:
|
|
476
|
+
response = _a.sent();
|
|
477
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return SaveCategoryGroupResponseFromJSON(jsonValue); })];
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
});
|
|
481
|
+
};
|
|
482
|
+
/**
|
|
483
|
+
* Update a category group
|
|
484
|
+
* Update a category group
|
|
485
|
+
*/
|
|
486
|
+
CategoriesApi.prototype.updateCategoryGroup = function (planId, categoryGroupId, data, initOverrides) {
|
|
301
487
|
return __awaiter(this, void 0, void 0, function () {
|
|
302
488
|
var response;
|
|
303
489
|
return __generator(this, function (_a) {
|
|
304
490
|
switch (_a.label) {
|
|
305
|
-
case 0: return [4 /*yield*/, this.
|
|
491
|
+
case 0: return [4 /*yield*/, this.updateCategoryGroupRaw({ planId: planId, categoryGroupId: categoryGroupId, data: data }, initOverrides)];
|
|
306
492
|
case 1:
|
|
307
493
|
response = _a.sent();
|
|
308
494
|
return [4 /*yield*/, response.value()];
|
|
@@ -312,7 +498,7 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
312
498
|
});
|
|
313
499
|
};
|
|
314
500
|
/**
|
|
315
|
-
* Update a category for a specific month. Only `budgeted` amount can be updated.
|
|
501
|
+
* Update a category for a specific month. Only `budgeted` (assigned) amount can be updated.
|
|
316
502
|
* Update a category for a specific month
|
|
317
503
|
*/
|
|
318
504
|
CategoriesApi.prototype.updateMonthCategoryRaw = function (requestParameters, initOverrides) {
|
|
@@ -321,8 +507,8 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
321
507
|
return __generator(this, function (_a) {
|
|
322
508
|
switch (_a.label) {
|
|
323
509
|
case 0:
|
|
324
|
-
if (requestParameters.
|
|
325
|
-
throw new runtime.RequiredError('
|
|
510
|
+
if (requestParameters.planId === null || requestParameters.planId === undefined) {
|
|
511
|
+
throw new runtime.RequiredError('planId', 'Required parameter requestParameters.planId was null or undefined when calling updateMonthCategory.');
|
|
326
512
|
}
|
|
327
513
|
if (requestParameters.month === null || requestParameters.month === undefined) {
|
|
328
514
|
throw new runtime.RequiredError('month', 'Required parameter requestParameters.month was null or undefined when calling updateMonthCategory.');
|
|
@@ -347,7 +533,7 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
347
533
|
}
|
|
348
534
|
_a.label = 2;
|
|
349
535
|
case 2: return [4 /*yield*/, this.request({
|
|
350
|
-
path: "/
|
|
536
|
+
path: "/plans/{plan_id}/months/{month}/categories/{category_id}".replace("{".concat("plan_id", "}"), encodeURIComponent(String(requestParameters.planId))).replace("{".concat("month", "}"), encodeURIComponent(String(requestParameters.month))).replace("{".concat("category_id", "}"), encodeURIComponent(String(requestParameters.categoryId))),
|
|
351
537
|
method: 'PATCH',
|
|
352
538
|
headers: headerParameters,
|
|
353
539
|
query: queryParameters,
|
|
@@ -361,15 +547,15 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
361
547
|
});
|
|
362
548
|
};
|
|
363
549
|
/**
|
|
364
|
-
* Update a category for a specific month. Only `budgeted` amount can be updated.
|
|
550
|
+
* Update a category for a specific month. Only `budgeted` (assigned) amount can be updated.
|
|
365
551
|
* Update a category for a specific month
|
|
366
552
|
*/
|
|
367
|
-
CategoriesApi.prototype.updateMonthCategory = function (
|
|
553
|
+
CategoriesApi.prototype.updateMonthCategory = function (planId, month, categoryId, data, initOverrides) {
|
|
368
554
|
return __awaiter(this, void 0, void 0, function () {
|
|
369
555
|
var response;
|
|
370
556
|
return __generator(this, function (_a) {
|
|
371
557
|
switch (_a.label) {
|
|
372
|
-
case 0: return [4 /*yield*/, this.updateMonthCategoryRaw({
|
|
558
|
+
case 0: return [4 /*yield*/, this.updateMonthCategoryRaw({ planId: planId, month: month, categoryId: categoryId, data: data }, initOverrides)];
|
|
373
559
|
case 1:
|
|
374
560
|
response = _a.sent();
|
|
375
561
|
return [4 /*yield*/, response.value()];
|
|
@@ -36,8 +36,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
38
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
39
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
40
|
-
return g =
|
|
39
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
40
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
41
41
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
42
42
|
function step(op) {
|
|
43
43
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* YNAB API Endpoints
|
|
3
|
+
* Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
|
|
4
|
+
*
|
|
5
|
+
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
6
|
+
*/
|
|
7
|
+
import * as runtime from '../runtime';
|
|
8
|
+
import type { MoneyMovementGroupsResponse, MoneyMovementsResponse } from '../models/index';
|
|
9
|
+
export interface GetMoneyMovementGroupsRequest {
|
|
10
|
+
planId: string;
|
|
11
|
+
}
|
|
12
|
+
export interface GetMoneyMovementGroupsByMonthRequest {
|
|
13
|
+
planId: string;
|
|
14
|
+
month: string;
|
|
15
|
+
}
|
|
16
|
+
export interface GetMoneyMovementsRequest {
|
|
17
|
+
planId: string;
|
|
18
|
+
}
|
|
19
|
+
export interface GetMoneyMovementsByMonthRequest {
|
|
20
|
+
planId: string;
|
|
21
|
+
month: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export declare class MoneyMovementsApi extends runtime.BaseAPI {
|
|
27
|
+
/**
|
|
28
|
+
* Returns all money movement groups
|
|
29
|
+
* Get all money movement groups
|
|
30
|
+
*/
|
|
31
|
+
getMoneyMovementGroupsRaw(requestParameters: GetMoneyMovementGroupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MoneyMovementGroupsResponse>>;
|
|
32
|
+
/**
|
|
33
|
+
* Returns all money movement groups
|
|
34
|
+
* Get all money movement groups
|
|
35
|
+
*/
|
|
36
|
+
getMoneyMovementGroups(planId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MoneyMovementGroupsResponse>;
|
|
37
|
+
/**
|
|
38
|
+
* Returns all money movement groups for a specific month
|
|
39
|
+
* Get money movement groups for a plan month
|
|
40
|
+
*/
|
|
41
|
+
getMoneyMovementGroupsByMonthRaw(requestParameters: GetMoneyMovementGroupsByMonthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MoneyMovementGroupsResponse>>;
|
|
42
|
+
/**
|
|
43
|
+
* Returns all money movement groups for a specific month
|
|
44
|
+
* Get money movement groups for a plan month
|
|
45
|
+
*/
|
|
46
|
+
getMoneyMovementGroupsByMonth(planId: string, month: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MoneyMovementGroupsResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Returns all money movements
|
|
49
|
+
* Get all money movements
|
|
50
|
+
*/
|
|
51
|
+
getMoneyMovementsRaw(requestParameters: GetMoneyMovementsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MoneyMovementsResponse>>;
|
|
52
|
+
/**
|
|
53
|
+
* Returns all money movements
|
|
54
|
+
* Get all money movements
|
|
55
|
+
*/
|
|
56
|
+
getMoneyMovements(planId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MoneyMovementsResponse>;
|
|
57
|
+
/**
|
|
58
|
+
* Returns all money movements for a specific month
|
|
59
|
+
* Get money movements for a plan month
|
|
60
|
+
*/
|
|
61
|
+
getMoneyMovementsByMonthRaw(requestParameters: GetMoneyMovementsByMonthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MoneyMovementsResponse>>;
|
|
62
|
+
/**
|
|
63
|
+
* Returns all money movements for a specific month
|
|
64
|
+
* Get money movements for a plan month
|
|
65
|
+
*/
|
|
66
|
+
getMoneyMovementsByMonth(planId: string, month: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MoneyMovementsResponse>;
|
|
67
|
+
}
|