ynab 1.42.0 → 1.43.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/dist/api.d.ts +432 -247
- package/dist/api.js +663 -329
- package/dist/browser/ynab.js +1 -2
- package/dist/esm/api.d.ts +432 -247
- package/dist/esm/api.js +566 -253
- package/dist/esm/configuration.js +1 -1
- package/dist/esm/transactionsApi.d.ts +1 -1
- package/dist/esm/transactionsApi.js +3 -1
- package/dist/esm/utils.js +1 -1
- package/dist/index.js +1 -1
- package/dist/transactionsApi.d.ts +1 -1
- package/package.json +2 -2
package/dist/api.js
CHANGED
|
@@ -21,7 +21,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.
|
|
24
|
+
exports.UserApiFetchParamCreator = exports.TransactionsApi = exports.TransactionsApiFactory = exports.TransactionsApiFp = exports.TransactionsApiFetchParamCreator = exports.ScheduledTransactionsApi = exports.ScheduledTransactionsApiFactory = exports.ScheduledTransactionsApiFp = exports.ScheduledTransactionsApiFetchParamCreator = exports.PayeesApi = exports.PayeesApiFactory = exports.PayeesApiFp = exports.PayeesApiFetchParamCreator = exports.PayeeLocationsApi = exports.PayeeLocationsApiFactory = exports.PayeeLocationsApiFp = exports.PayeeLocationsApiFetchParamCreator = exports.MonthsApi = exports.MonthsApiFactory = exports.MonthsApiFp = exports.MonthsApiFetchParamCreator = exports.DeprecatedApi = exports.DeprecatedApiFactory = exports.DeprecatedApiFp = exports.DeprecatedApiFetchParamCreator = exports.CategoriesApi = exports.CategoriesApiFactory = exports.CategoriesApiFp = exports.CategoriesApiFetchParamCreator = exports.BudgetsApi = exports.BudgetsApiFactory = exports.BudgetsApiFp = exports.BudgetsApiFetchParamCreator = exports.AccountsApi = exports.AccountsApiFactory = exports.AccountsApiFp = exports.AccountsApiFetchParamCreator = exports.TransactionDetail = exports.ScheduledTransactionDetail = exports.SaveTransactionWithId = exports.SaveTransaction = exports.HybridTransaction = exports.TransactionSummary = exports.ScheduledTransactionSummary = exports.SaveTransactionWithOptionalFields = exports.Category = exports.AccountType = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = void 0;
|
|
25
|
+
exports.UserApi = exports.UserApiFactory = exports.UserApiFp = void 0;
|
|
25
26
|
// Polyfill fetch globally - this makes it easier to override with modules like fetch-mock.
|
|
26
27
|
const fetchPonyfill = require("fetch-ponyfill")();
|
|
27
28
|
if (!globalThis.fetch) {
|
|
@@ -30,8 +31,7 @@ if (!globalThis.fetch) {
|
|
|
30
31
|
globalThis.Headers = fetchPonyfill.Headers;
|
|
31
32
|
globalThis.Request = fetchPonyfill.Request;
|
|
32
33
|
}
|
|
33
|
-
const
|
|
34
|
-
const USER_AGENT = "api_client/js/1.32.0";
|
|
34
|
+
const USER_AGENT = "api_client/js/1.42.0";
|
|
35
35
|
function convertDateToFullDateStringFormat(date) {
|
|
36
36
|
// Convert to RFC 3339 "full-date" format, like "2017-11-27"
|
|
37
37
|
if (date instanceof Date) {
|
|
@@ -120,10 +120,10 @@ var Category;
|
|
|
120
120
|
})(Category = exports.Category || (exports.Category = {}));
|
|
121
121
|
/**
|
|
122
122
|
* @export
|
|
123
|
-
* @namespace
|
|
123
|
+
* @namespace SaveTransactionWithOptionalFields
|
|
124
124
|
*/
|
|
125
|
-
var
|
|
126
|
-
(function (
|
|
125
|
+
var SaveTransactionWithOptionalFields;
|
|
126
|
+
(function (SaveTransactionWithOptionalFields) {
|
|
127
127
|
/**
|
|
128
128
|
* @export
|
|
129
129
|
* @enum {string}
|
|
@@ -133,7 +133,7 @@ var SaveTransaction;
|
|
|
133
133
|
ClearedEnum[ClearedEnum["Cleared"] = 'cleared'] = "Cleared";
|
|
134
134
|
ClearedEnum[ClearedEnum["Uncleared"] = 'uncleared'] = "Uncleared";
|
|
135
135
|
ClearedEnum[ClearedEnum["Reconciled"] = 'reconciled'] = "Reconciled";
|
|
136
|
-
})(ClearedEnum =
|
|
136
|
+
})(ClearedEnum = SaveTransactionWithOptionalFields.ClearedEnum || (SaveTransactionWithOptionalFields.ClearedEnum = {}));
|
|
137
137
|
/**
|
|
138
138
|
* @export
|
|
139
139
|
* @enum {string}
|
|
@@ -146,8 +146,8 @@ var SaveTransaction;
|
|
|
146
146
|
FlagColorEnum[FlagColorEnum["Green"] = 'green'] = "Green";
|
|
147
147
|
FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue";
|
|
148
148
|
FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple";
|
|
149
|
-
})(FlagColorEnum =
|
|
150
|
-
})(
|
|
149
|
+
})(FlagColorEnum = SaveTransactionWithOptionalFields.FlagColorEnum || (SaveTransactionWithOptionalFields.FlagColorEnum = {}));
|
|
150
|
+
})(SaveTransactionWithOptionalFields = exports.SaveTransactionWithOptionalFields || (exports.SaveTransactionWithOptionalFields = {}));
|
|
151
151
|
/**
|
|
152
152
|
* @export
|
|
153
153
|
* @namespace ScheduledTransactionSummary
|
|
@@ -257,6 +257,66 @@ var HybridTransaction;
|
|
|
257
257
|
TypeEnum[TypeEnum["Subtransaction"] = 'subtransaction'] = "Subtransaction";
|
|
258
258
|
})(TypeEnum = HybridTransaction.TypeEnum || (HybridTransaction.TypeEnum = {}));
|
|
259
259
|
})(HybridTransaction = exports.HybridTransaction || (exports.HybridTransaction = {}));
|
|
260
|
+
/**
|
|
261
|
+
* @export
|
|
262
|
+
* @namespace SaveTransaction
|
|
263
|
+
*/
|
|
264
|
+
var SaveTransaction;
|
|
265
|
+
(function (SaveTransaction) {
|
|
266
|
+
/**
|
|
267
|
+
* @export
|
|
268
|
+
* @enum {string}
|
|
269
|
+
*/
|
|
270
|
+
let ClearedEnum;
|
|
271
|
+
(function (ClearedEnum) {
|
|
272
|
+
ClearedEnum[ClearedEnum["Cleared"] = 'cleared'] = "Cleared";
|
|
273
|
+
ClearedEnum[ClearedEnum["Uncleared"] = 'uncleared'] = "Uncleared";
|
|
274
|
+
ClearedEnum[ClearedEnum["Reconciled"] = 'reconciled'] = "Reconciled";
|
|
275
|
+
})(ClearedEnum = SaveTransaction.ClearedEnum || (SaveTransaction.ClearedEnum = {}));
|
|
276
|
+
/**
|
|
277
|
+
* @export
|
|
278
|
+
* @enum {string}
|
|
279
|
+
*/
|
|
280
|
+
let FlagColorEnum;
|
|
281
|
+
(function (FlagColorEnum) {
|
|
282
|
+
FlagColorEnum[FlagColorEnum["Red"] = 'red'] = "Red";
|
|
283
|
+
FlagColorEnum[FlagColorEnum["Orange"] = 'orange'] = "Orange";
|
|
284
|
+
FlagColorEnum[FlagColorEnum["Yellow"] = 'yellow'] = "Yellow";
|
|
285
|
+
FlagColorEnum[FlagColorEnum["Green"] = 'green'] = "Green";
|
|
286
|
+
FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue";
|
|
287
|
+
FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple";
|
|
288
|
+
})(FlagColorEnum = SaveTransaction.FlagColorEnum || (SaveTransaction.FlagColorEnum = {}));
|
|
289
|
+
})(SaveTransaction = exports.SaveTransaction || (exports.SaveTransaction = {}));
|
|
290
|
+
/**
|
|
291
|
+
* @export
|
|
292
|
+
* @namespace SaveTransactionWithId
|
|
293
|
+
*/
|
|
294
|
+
var SaveTransactionWithId;
|
|
295
|
+
(function (SaveTransactionWithId) {
|
|
296
|
+
/**
|
|
297
|
+
* @export
|
|
298
|
+
* @enum {string}
|
|
299
|
+
*/
|
|
300
|
+
let ClearedEnum;
|
|
301
|
+
(function (ClearedEnum) {
|
|
302
|
+
ClearedEnum[ClearedEnum["Cleared"] = 'cleared'] = "Cleared";
|
|
303
|
+
ClearedEnum[ClearedEnum["Uncleared"] = 'uncleared'] = "Uncleared";
|
|
304
|
+
ClearedEnum[ClearedEnum["Reconciled"] = 'reconciled'] = "Reconciled";
|
|
305
|
+
})(ClearedEnum = SaveTransactionWithId.ClearedEnum || (SaveTransactionWithId.ClearedEnum = {}));
|
|
306
|
+
/**
|
|
307
|
+
* @export
|
|
308
|
+
* @enum {string}
|
|
309
|
+
*/
|
|
310
|
+
let FlagColorEnum;
|
|
311
|
+
(function (FlagColorEnum) {
|
|
312
|
+
FlagColorEnum[FlagColorEnum["Red"] = 'red'] = "Red";
|
|
313
|
+
FlagColorEnum[FlagColorEnum["Orange"] = 'orange'] = "Orange";
|
|
314
|
+
FlagColorEnum[FlagColorEnum["Yellow"] = 'yellow'] = "Yellow";
|
|
315
|
+
FlagColorEnum[FlagColorEnum["Green"] = 'green'] = "Green";
|
|
316
|
+
FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue";
|
|
317
|
+
FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple";
|
|
318
|
+
})(FlagColorEnum = SaveTransactionWithId.FlagColorEnum || (SaveTransactionWithId.FlagColorEnum = {}));
|
|
319
|
+
})(SaveTransactionWithId = exports.SaveTransactionWithId || (exports.SaveTransactionWithId = {}));
|
|
260
320
|
/**
|
|
261
321
|
* @export
|
|
262
322
|
* @namespace ScheduledTransactionDetail
|
|
@@ -327,47 +387,17 @@ var TransactionDetail;
|
|
|
327
387
|
FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple";
|
|
328
388
|
})(FlagColorEnum = TransactionDetail.FlagColorEnum || (TransactionDetail.FlagColorEnum = {}));
|
|
329
389
|
})(TransactionDetail = exports.TransactionDetail || (exports.TransactionDetail = {}));
|
|
330
|
-
/**
|
|
331
|
-
* @export
|
|
332
|
-
* @namespace UpdateTransaction
|
|
333
|
-
*/
|
|
334
|
-
var UpdateTransaction;
|
|
335
|
-
(function (UpdateTransaction) {
|
|
336
|
-
/**
|
|
337
|
-
* @export
|
|
338
|
-
* @enum {string}
|
|
339
|
-
*/
|
|
340
|
-
let ClearedEnum;
|
|
341
|
-
(function (ClearedEnum) {
|
|
342
|
-
ClearedEnum[ClearedEnum["Cleared"] = 'cleared'] = "Cleared";
|
|
343
|
-
ClearedEnum[ClearedEnum["Uncleared"] = 'uncleared'] = "Uncleared";
|
|
344
|
-
ClearedEnum[ClearedEnum["Reconciled"] = 'reconciled'] = "Reconciled";
|
|
345
|
-
})(ClearedEnum = UpdateTransaction.ClearedEnum || (UpdateTransaction.ClearedEnum = {}));
|
|
346
|
-
/**
|
|
347
|
-
* @export
|
|
348
|
-
* @enum {string}
|
|
349
|
-
*/
|
|
350
|
-
let FlagColorEnum;
|
|
351
|
-
(function (FlagColorEnum) {
|
|
352
|
-
FlagColorEnum[FlagColorEnum["Red"] = 'red'] = "Red";
|
|
353
|
-
FlagColorEnum[FlagColorEnum["Orange"] = 'orange'] = "Orange";
|
|
354
|
-
FlagColorEnum[FlagColorEnum["Yellow"] = 'yellow'] = "Yellow";
|
|
355
|
-
FlagColorEnum[FlagColorEnum["Green"] = 'green'] = "Green";
|
|
356
|
-
FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue";
|
|
357
|
-
FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple";
|
|
358
|
-
})(FlagColorEnum = UpdateTransaction.FlagColorEnum || (UpdateTransaction.FlagColorEnum = {}));
|
|
359
|
-
})(UpdateTransaction = exports.UpdateTransaction || (exports.UpdateTransaction = {}));
|
|
360
390
|
/**
|
|
361
391
|
* AccountsApi - fetch parameter creator
|
|
362
392
|
* @export
|
|
363
393
|
*/
|
|
364
|
-
|
|
394
|
+
const AccountsApiFetchParamCreator = function (configuration) {
|
|
365
395
|
return {
|
|
366
396
|
/**
|
|
367
397
|
* Creates a new account
|
|
368
398
|
* @summary Create a new account
|
|
369
399
|
* @param {string} budget_id - The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget)
|
|
370
|
-
* @param {
|
|
400
|
+
* @param {PostAccountWrapper} data - The account to create.
|
|
371
401
|
* @param {*} [options] - Override http request options.
|
|
372
402
|
* @throws {RequiredError}
|
|
373
403
|
*/
|
|
@@ -382,7 +412,8 @@ exports.AccountsApiFetchParamCreator = function (configuration) {
|
|
|
382
412
|
}
|
|
383
413
|
const localVarPath = `/budgets/{budget_id}/accounts`
|
|
384
414
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)));
|
|
385
|
-
|
|
415
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
416
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
386
417
|
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
387
418
|
const localVarHeaderParameter = {};
|
|
388
419
|
const localVarQueryParameter = {};
|
|
@@ -394,13 +425,18 @@ exports.AccountsApiFetchParamCreator = function (configuration) {
|
|
|
394
425
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
395
426
|
}
|
|
396
427
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
428
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
429
|
+
for (const key in localVarQueryParameter) {
|
|
430
|
+
query.set(key, localVarQueryParameter[key]);
|
|
431
|
+
}
|
|
432
|
+
for (const key in options.query) {
|
|
433
|
+
query.set(key, options.query[key]);
|
|
434
|
+
}
|
|
435
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
400
436
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
401
437
|
localVarRequestOptions.body = JSON.stringify(data || {});
|
|
402
438
|
return {
|
|
403
|
-
url:
|
|
439
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
404
440
|
options: localVarRequestOptions,
|
|
405
441
|
};
|
|
406
442
|
},
|
|
@@ -424,7 +460,8 @@ exports.AccountsApiFetchParamCreator = function (configuration) {
|
|
|
424
460
|
const localVarPath = `/budgets/{budget_id}/accounts/{account_id}`
|
|
425
461
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)))
|
|
426
462
|
.replace(`{${"account_id"}}`, encodeURIComponent(String(account_id)));
|
|
427
|
-
|
|
463
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
464
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
428
465
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
429
466
|
const localVarHeaderParameter = {};
|
|
430
467
|
const localVarQueryParameter = {};
|
|
@@ -435,12 +472,17 @@ exports.AccountsApiFetchParamCreator = function (configuration) {
|
|
|
435
472
|
const localVarApiKeyValue = configuration.apiKey;
|
|
436
473
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
437
474
|
}
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
475
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
476
|
+
for (const key in localVarQueryParameter) {
|
|
477
|
+
query.set(key, localVarQueryParameter[key]);
|
|
478
|
+
}
|
|
479
|
+
for (const key in options.query) {
|
|
480
|
+
query.set(key, options.query[key]);
|
|
481
|
+
}
|
|
482
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
441
483
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
442
484
|
return {
|
|
443
|
-
url:
|
|
485
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
444
486
|
options: localVarRequestOptions,
|
|
445
487
|
};
|
|
446
488
|
},
|
|
@@ -459,7 +501,8 @@ exports.AccountsApiFetchParamCreator = function (configuration) {
|
|
|
459
501
|
}
|
|
460
502
|
const localVarPath = `/budgets/{budget_id}/accounts`
|
|
461
503
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)));
|
|
462
|
-
|
|
504
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
505
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
463
506
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
464
507
|
const localVarHeaderParameter = {};
|
|
465
508
|
const localVarQueryParameter = {};
|
|
@@ -473,33 +516,39 @@ exports.AccountsApiFetchParamCreator = function (configuration) {
|
|
|
473
516
|
if (last_knowledge_of_server !== undefined) {
|
|
474
517
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
475
518
|
}
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
519
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
520
|
+
for (const key in localVarQueryParameter) {
|
|
521
|
+
query.set(key, localVarQueryParameter[key]);
|
|
522
|
+
}
|
|
523
|
+
for (const key in options.query) {
|
|
524
|
+
query.set(key, options.query[key]);
|
|
525
|
+
}
|
|
526
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
479
527
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
480
528
|
return {
|
|
481
|
-
url:
|
|
529
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
482
530
|
options: localVarRequestOptions,
|
|
483
531
|
};
|
|
484
532
|
},
|
|
485
533
|
};
|
|
486
534
|
};
|
|
535
|
+
exports.AccountsApiFetchParamCreator = AccountsApiFetchParamCreator;
|
|
487
536
|
/**
|
|
488
537
|
* AccountsApi - functional programming interface
|
|
489
538
|
* @export
|
|
490
539
|
*/
|
|
491
|
-
|
|
540
|
+
const AccountsApiFp = function (configuration) {
|
|
492
541
|
return {
|
|
493
542
|
/**
|
|
494
543
|
* Creates a new account
|
|
495
544
|
* @summary Create a new account
|
|
496
545
|
* @param {string} budget_id - The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget)
|
|
497
|
-
* @param {
|
|
546
|
+
* @param {PostAccountWrapper} data - The account to create.
|
|
498
547
|
* @param {*} [options] - Override http request options.
|
|
499
548
|
* @throws {RequiredError}
|
|
500
549
|
*/
|
|
501
550
|
createAccount(budget_id, data, options) {
|
|
502
|
-
const localVarFetchArgs = exports.AccountsApiFetchParamCreator(configuration).createAccount(budget_id, data, options);
|
|
551
|
+
const localVarFetchArgs = (0, exports.AccountsApiFetchParamCreator)(configuration).createAccount(budget_id, data, options);
|
|
503
552
|
return (fetchFunction = fetch) => {
|
|
504
553
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
505
554
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -524,7 +573,7 @@ exports.AccountsApiFp = function (configuration) {
|
|
|
524
573
|
* @throws {RequiredError}
|
|
525
574
|
*/
|
|
526
575
|
getAccountById(budget_id, account_id, options) {
|
|
527
|
-
const localVarFetchArgs = exports.AccountsApiFetchParamCreator(configuration).getAccountById(budget_id, account_id, options);
|
|
576
|
+
const localVarFetchArgs = (0, exports.AccountsApiFetchParamCreator)(configuration).getAccountById(budget_id, account_id, options);
|
|
528
577
|
return (fetchFunction = fetch) => {
|
|
529
578
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
530
579
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -549,7 +598,7 @@ exports.AccountsApiFp = function (configuration) {
|
|
|
549
598
|
* @throws {RequiredError}
|
|
550
599
|
*/
|
|
551
600
|
getAccounts(budget_id, last_knowledge_of_server, options) {
|
|
552
|
-
const localVarFetchArgs = exports.AccountsApiFetchParamCreator(configuration).getAccounts(budget_id, last_knowledge_of_server, options);
|
|
601
|
+
const localVarFetchArgs = (0, exports.AccountsApiFetchParamCreator)(configuration).getAccounts(budget_id, last_knowledge_of_server, options);
|
|
553
602
|
return (fetchFunction = fetch) => {
|
|
554
603
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
555
604
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -567,22 +616,23 @@ exports.AccountsApiFp = function (configuration) {
|
|
|
567
616
|
},
|
|
568
617
|
};
|
|
569
618
|
};
|
|
619
|
+
exports.AccountsApiFp = AccountsApiFp;
|
|
570
620
|
/**
|
|
571
621
|
* AccountsApi - factory interface
|
|
572
622
|
* @export
|
|
573
623
|
*/
|
|
574
|
-
|
|
624
|
+
const AccountsApiFactory = function (configuration) {
|
|
575
625
|
return {
|
|
576
626
|
/**
|
|
577
627
|
* Creates a new account
|
|
578
628
|
* @summary Create a new account
|
|
579
629
|
* @param {string} budget_id - The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget)
|
|
580
|
-
* @param {
|
|
630
|
+
* @param {PostAccountWrapper} data - The account to create.
|
|
581
631
|
* @param {*} [options] - Override http request options.
|
|
582
632
|
* @throws {RequiredError}
|
|
583
633
|
*/
|
|
584
634
|
createAccount(budget_id, data, options) {
|
|
585
|
-
return exports.AccountsApiFp(configuration).createAccount(budget_id, data, options)();
|
|
635
|
+
return (0, exports.AccountsApiFp)(configuration).createAccount(budget_id, data, options)();
|
|
586
636
|
},
|
|
587
637
|
/**
|
|
588
638
|
* Returns a single account
|
|
@@ -593,7 +643,7 @@ exports.AccountsApiFactory = function (configuration) {
|
|
|
593
643
|
* @throws {RequiredError}
|
|
594
644
|
*/
|
|
595
645
|
getAccountById(budget_id, account_id, options) {
|
|
596
|
-
return exports.AccountsApiFp(configuration).getAccountById(budget_id, account_id, options)();
|
|
646
|
+
return (0, exports.AccountsApiFp)(configuration).getAccountById(budget_id, account_id, options)();
|
|
597
647
|
},
|
|
598
648
|
/**
|
|
599
649
|
* Returns all accounts
|
|
@@ -604,10 +654,11 @@ exports.AccountsApiFactory = function (configuration) {
|
|
|
604
654
|
* @throws {RequiredError}
|
|
605
655
|
*/
|
|
606
656
|
getAccounts(budget_id, last_knowledge_of_server, options) {
|
|
607
|
-
return exports.AccountsApiFp(configuration).getAccounts(budget_id, last_knowledge_of_server, options)();
|
|
657
|
+
return (0, exports.AccountsApiFp)(configuration).getAccounts(budget_id, last_knowledge_of_server, options)();
|
|
608
658
|
},
|
|
609
659
|
};
|
|
610
660
|
};
|
|
661
|
+
exports.AccountsApiFactory = AccountsApiFactory;
|
|
611
662
|
/**
|
|
612
663
|
* AccountsApi - object-oriented interface
|
|
613
664
|
* @export
|
|
@@ -619,13 +670,13 @@ class AccountsApi extends BaseAPI {
|
|
|
619
670
|
* Creates a new account
|
|
620
671
|
* @summary Create a new account
|
|
621
672
|
* @param {string} budget_id - The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget)
|
|
622
|
-
* @param {
|
|
673
|
+
* @param {PostAccountWrapper} data - The account to create.
|
|
623
674
|
* @param {*} [options] - Override http request options.
|
|
624
675
|
* @throws {RequiredError}
|
|
625
676
|
* @memberof AccountsApi
|
|
626
677
|
*/
|
|
627
678
|
createAccount(budget_id, data, options) {
|
|
628
|
-
return exports.AccountsApiFp(this.configuration).createAccount(budget_id, data, options)();
|
|
679
|
+
return (0, exports.AccountsApiFp)(this.configuration).createAccount(budget_id, data, options)();
|
|
629
680
|
}
|
|
630
681
|
/**
|
|
631
682
|
* Returns a single account
|
|
@@ -637,7 +688,7 @@ class AccountsApi extends BaseAPI {
|
|
|
637
688
|
* @memberof AccountsApi
|
|
638
689
|
*/
|
|
639
690
|
getAccountById(budget_id, account_id, options) {
|
|
640
|
-
return exports.AccountsApiFp(this.configuration).getAccountById(budget_id, account_id, options)();
|
|
691
|
+
return (0, exports.AccountsApiFp)(this.configuration).getAccountById(budget_id, account_id, options)();
|
|
641
692
|
}
|
|
642
693
|
/**
|
|
643
694
|
* Returns all accounts
|
|
@@ -649,7 +700,7 @@ class AccountsApi extends BaseAPI {
|
|
|
649
700
|
* @memberof AccountsApi
|
|
650
701
|
*/
|
|
651
702
|
getAccounts(budget_id, last_knowledge_of_server, options) {
|
|
652
|
-
return exports.AccountsApiFp(this.configuration).getAccounts(budget_id, last_knowledge_of_server, options)();
|
|
703
|
+
return (0, exports.AccountsApiFp)(this.configuration).getAccounts(budget_id, last_knowledge_of_server, options)();
|
|
653
704
|
}
|
|
654
705
|
}
|
|
655
706
|
exports.AccountsApi = AccountsApi;
|
|
@@ -657,7 +708,7 @@ exports.AccountsApi = AccountsApi;
|
|
|
657
708
|
* BudgetsApi - fetch parameter creator
|
|
658
709
|
* @export
|
|
659
710
|
*/
|
|
660
|
-
|
|
711
|
+
const BudgetsApiFetchParamCreator = function (configuration) {
|
|
661
712
|
return {
|
|
662
713
|
/**
|
|
663
714
|
* Returns a single budget with all related entities. This resource is effectively a full budget export.
|
|
@@ -674,7 +725,8 @@ exports.BudgetsApiFetchParamCreator = function (configuration) {
|
|
|
674
725
|
}
|
|
675
726
|
const localVarPath = `/budgets/{budget_id}`
|
|
676
727
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)));
|
|
677
|
-
|
|
728
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
729
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
678
730
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
679
731
|
const localVarHeaderParameter = {};
|
|
680
732
|
const localVarQueryParameter = {};
|
|
@@ -688,12 +740,17 @@ exports.BudgetsApiFetchParamCreator = function (configuration) {
|
|
|
688
740
|
if (last_knowledge_of_server !== undefined) {
|
|
689
741
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
690
742
|
}
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
743
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
744
|
+
for (const key in localVarQueryParameter) {
|
|
745
|
+
query.set(key, localVarQueryParameter[key]);
|
|
746
|
+
}
|
|
747
|
+
for (const key in options.query) {
|
|
748
|
+
query.set(key, options.query[key]);
|
|
749
|
+
}
|
|
750
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
694
751
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
695
752
|
return {
|
|
696
|
-
url:
|
|
753
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
697
754
|
options: localVarRequestOptions,
|
|
698
755
|
};
|
|
699
756
|
},
|
|
@@ -711,7 +768,8 @@ exports.BudgetsApiFetchParamCreator = function (configuration) {
|
|
|
711
768
|
}
|
|
712
769
|
const localVarPath = `/budgets/{budget_id}/settings`
|
|
713
770
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)));
|
|
714
|
-
|
|
771
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
772
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
715
773
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
716
774
|
const localVarHeaderParameter = {};
|
|
717
775
|
const localVarQueryParameter = {};
|
|
@@ -722,12 +780,17 @@ exports.BudgetsApiFetchParamCreator = function (configuration) {
|
|
|
722
780
|
const localVarApiKeyValue = configuration.apiKey;
|
|
723
781
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
724
782
|
}
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
783
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
784
|
+
for (const key in localVarQueryParameter) {
|
|
785
|
+
query.set(key, localVarQueryParameter[key]);
|
|
786
|
+
}
|
|
787
|
+
for (const key in options.query) {
|
|
788
|
+
query.set(key, options.query[key]);
|
|
789
|
+
}
|
|
790
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
728
791
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
729
792
|
return {
|
|
730
|
-
url:
|
|
793
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
731
794
|
options: localVarRequestOptions,
|
|
732
795
|
};
|
|
733
796
|
},
|
|
@@ -740,7 +803,8 @@ exports.BudgetsApiFetchParamCreator = function (configuration) {
|
|
|
740
803
|
*/
|
|
741
804
|
getBudgets(include_accounts, options = {}) {
|
|
742
805
|
const localVarPath = `/budgets`;
|
|
743
|
-
|
|
806
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
807
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
744
808
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
745
809
|
const localVarHeaderParameter = {};
|
|
746
810
|
const localVarQueryParameter = {};
|
|
@@ -754,22 +818,28 @@ exports.BudgetsApiFetchParamCreator = function (configuration) {
|
|
|
754
818
|
if (include_accounts !== undefined) {
|
|
755
819
|
localVarQueryParameter['include_accounts'] = include_accounts;
|
|
756
820
|
}
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
821
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
822
|
+
for (const key in localVarQueryParameter) {
|
|
823
|
+
query.set(key, localVarQueryParameter[key]);
|
|
824
|
+
}
|
|
825
|
+
for (const key in options.query) {
|
|
826
|
+
query.set(key, options.query[key]);
|
|
827
|
+
}
|
|
828
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
760
829
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
761
830
|
return {
|
|
762
|
-
url:
|
|
831
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
763
832
|
options: localVarRequestOptions,
|
|
764
833
|
};
|
|
765
834
|
},
|
|
766
835
|
};
|
|
767
836
|
};
|
|
837
|
+
exports.BudgetsApiFetchParamCreator = BudgetsApiFetchParamCreator;
|
|
768
838
|
/**
|
|
769
839
|
* BudgetsApi - functional programming interface
|
|
770
840
|
* @export
|
|
771
841
|
*/
|
|
772
|
-
|
|
842
|
+
const BudgetsApiFp = function (configuration) {
|
|
773
843
|
return {
|
|
774
844
|
/**
|
|
775
845
|
* Returns a single budget with all related entities. This resource is effectively a full budget export.
|
|
@@ -780,7 +850,7 @@ exports.BudgetsApiFp = function (configuration) {
|
|
|
780
850
|
* @throws {RequiredError}
|
|
781
851
|
*/
|
|
782
852
|
getBudgetById(budget_id, last_knowledge_of_server, options) {
|
|
783
|
-
const localVarFetchArgs = exports.BudgetsApiFetchParamCreator(configuration).getBudgetById(budget_id, last_knowledge_of_server, options);
|
|
853
|
+
const localVarFetchArgs = (0, exports.BudgetsApiFetchParamCreator)(configuration).getBudgetById(budget_id, last_knowledge_of_server, options);
|
|
784
854
|
return (fetchFunction = fetch) => {
|
|
785
855
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
786
856
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -804,7 +874,7 @@ exports.BudgetsApiFp = function (configuration) {
|
|
|
804
874
|
* @throws {RequiredError}
|
|
805
875
|
*/
|
|
806
876
|
getBudgetSettingsById(budget_id, options) {
|
|
807
|
-
const localVarFetchArgs = exports.BudgetsApiFetchParamCreator(configuration).getBudgetSettingsById(budget_id, options);
|
|
877
|
+
const localVarFetchArgs = (0, exports.BudgetsApiFetchParamCreator)(configuration).getBudgetSettingsById(budget_id, options);
|
|
808
878
|
return (fetchFunction = fetch) => {
|
|
809
879
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
810
880
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -828,7 +898,7 @@ exports.BudgetsApiFp = function (configuration) {
|
|
|
828
898
|
* @throws {RequiredError}
|
|
829
899
|
*/
|
|
830
900
|
getBudgets(include_accounts, options) {
|
|
831
|
-
const localVarFetchArgs = exports.BudgetsApiFetchParamCreator(configuration).getBudgets(include_accounts, options);
|
|
901
|
+
const localVarFetchArgs = (0, exports.BudgetsApiFetchParamCreator)(configuration).getBudgets(include_accounts, options);
|
|
832
902
|
return (fetchFunction = fetch) => {
|
|
833
903
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
834
904
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -846,11 +916,12 @@ exports.BudgetsApiFp = function (configuration) {
|
|
|
846
916
|
},
|
|
847
917
|
};
|
|
848
918
|
};
|
|
919
|
+
exports.BudgetsApiFp = BudgetsApiFp;
|
|
849
920
|
/**
|
|
850
921
|
* BudgetsApi - factory interface
|
|
851
922
|
* @export
|
|
852
923
|
*/
|
|
853
|
-
|
|
924
|
+
const BudgetsApiFactory = function (configuration) {
|
|
854
925
|
return {
|
|
855
926
|
/**
|
|
856
927
|
* Returns a single budget with all related entities. This resource is effectively a full budget export.
|
|
@@ -861,7 +932,7 @@ exports.BudgetsApiFactory = function (configuration) {
|
|
|
861
932
|
* @throws {RequiredError}
|
|
862
933
|
*/
|
|
863
934
|
getBudgetById(budget_id, last_knowledge_of_server, options) {
|
|
864
|
-
return exports.BudgetsApiFp(configuration).getBudgetById(budget_id, last_knowledge_of_server, options)();
|
|
935
|
+
return (0, exports.BudgetsApiFp)(configuration).getBudgetById(budget_id, last_knowledge_of_server, options)();
|
|
865
936
|
},
|
|
866
937
|
/**
|
|
867
938
|
* Returns settings for a budget
|
|
@@ -871,7 +942,7 @@ exports.BudgetsApiFactory = function (configuration) {
|
|
|
871
942
|
* @throws {RequiredError}
|
|
872
943
|
*/
|
|
873
944
|
getBudgetSettingsById(budget_id, options) {
|
|
874
|
-
return exports.BudgetsApiFp(configuration).getBudgetSettingsById(budget_id, options)();
|
|
945
|
+
return (0, exports.BudgetsApiFp)(configuration).getBudgetSettingsById(budget_id, options)();
|
|
875
946
|
},
|
|
876
947
|
/**
|
|
877
948
|
* Returns budgets list with summary information
|
|
@@ -881,10 +952,11 @@ exports.BudgetsApiFactory = function (configuration) {
|
|
|
881
952
|
* @throws {RequiredError}
|
|
882
953
|
*/
|
|
883
954
|
getBudgets(include_accounts, options) {
|
|
884
|
-
return exports.BudgetsApiFp(configuration).getBudgets(include_accounts, options)();
|
|
955
|
+
return (0, exports.BudgetsApiFp)(configuration).getBudgets(include_accounts, options)();
|
|
885
956
|
},
|
|
886
957
|
};
|
|
887
958
|
};
|
|
959
|
+
exports.BudgetsApiFactory = BudgetsApiFactory;
|
|
888
960
|
/**
|
|
889
961
|
* BudgetsApi - object-oriented interface
|
|
890
962
|
* @export
|
|
@@ -902,7 +974,7 @@ class BudgetsApi extends BaseAPI {
|
|
|
902
974
|
* @memberof BudgetsApi
|
|
903
975
|
*/
|
|
904
976
|
getBudgetById(budget_id, last_knowledge_of_server, options) {
|
|
905
|
-
return exports.BudgetsApiFp(this.configuration).getBudgetById(budget_id, last_knowledge_of_server, options)();
|
|
977
|
+
return (0, exports.BudgetsApiFp)(this.configuration).getBudgetById(budget_id, last_knowledge_of_server, options)();
|
|
906
978
|
}
|
|
907
979
|
/**
|
|
908
980
|
* Returns settings for a budget
|
|
@@ -913,7 +985,7 @@ class BudgetsApi extends BaseAPI {
|
|
|
913
985
|
* @memberof BudgetsApi
|
|
914
986
|
*/
|
|
915
987
|
getBudgetSettingsById(budget_id, options) {
|
|
916
|
-
return exports.BudgetsApiFp(this.configuration).getBudgetSettingsById(budget_id, options)();
|
|
988
|
+
return (0, exports.BudgetsApiFp)(this.configuration).getBudgetSettingsById(budget_id, options)();
|
|
917
989
|
}
|
|
918
990
|
/**
|
|
919
991
|
* Returns budgets list with summary information
|
|
@@ -924,7 +996,7 @@ class BudgetsApi extends BaseAPI {
|
|
|
924
996
|
* @memberof BudgetsApi
|
|
925
997
|
*/
|
|
926
998
|
getBudgets(include_accounts, options) {
|
|
927
|
-
return exports.BudgetsApiFp(this.configuration).getBudgets(include_accounts, options)();
|
|
999
|
+
return (0, exports.BudgetsApiFp)(this.configuration).getBudgets(include_accounts, options)();
|
|
928
1000
|
}
|
|
929
1001
|
}
|
|
930
1002
|
exports.BudgetsApi = BudgetsApi;
|
|
@@ -932,7 +1004,7 @@ exports.BudgetsApi = BudgetsApi;
|
|
|
932
1004
|
* CategoriesApi - fetch parameter creator
|
|
933
1005
|
* @export
|
|
934
1006
|
*/
|
|
935
|
-
|
|
1007
|
+
const CategoriesApiFetchParamCreator = function (configuration) {
|
|
936
1008
|
return {
|
|
937
1009
|
/**
|
|
938
1010
|
* Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
|
@@ -949,7 +1021,8 @@ exports.CategoriesApiFetchParamCreator = function (configuration) {
|
|
|
949
1021
|
}
|
|
950
1022
|
const localVarPath = `/budgets/{budget_id}/categories`
|
|
951
1023
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)));
|
|
952
|
-
|
|
1024
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1025
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
953
1026
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
954
1027
|
const localVarHeaderParameter = {};
|
|
955
1028
|
const localVarQueryParameter = {};
|
|
@@ -963,12 +1036,17 @@ exports.CategoriesApiFetchParamCreator = function (configuration) {
|
|
|
963
1036
|
if (last_knowledge_of_server !== undefined) {
|
|
964
1037
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
965
1038
|
}
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
1039
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
1040
|
+
for (const key in localVarQueryParameter) {
|
|
1041
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1042
|
+
}
|
|
1043
|
+
for (const key in options.query) {
|
|
1044
|
+
query.set(key, options.query[key]);
|
|
1045
|
+
}
|
|
1046
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
969
1047
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
970
1048
|
return {
|
|
971
|
-
url:
|
|
1049
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
972
1050
|
options: localVarRequestOptions,
|
|
973
1051
|
};
|
|
974
1052
|
},
|
|
@@ -992,7 +1070,8 @@ exports.CategoriesApiFetchParamCreator = function (configuration) {
|
|
|
992
1070
|
const localVarPath = `/budgets/{budget_id}/categories/{category_id}`
|
|
993
1071
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)))
|
|
994
1072
|
.replace(`{${"category_id"}}`, encodeURIComponent(String(category_id)));
|
|
995
|
-
|
|
1073
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1074
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
996
1075
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
997
1076
|
const localVarHeaderParameter = {};
|
|
998
1077
|
const localVarQueryParameter = {};
|
|
@@ -1003,12 +1082,17 @@ exports.CategoriesApiFetchParamCreator = function (configuration) {
|
|
|
1003
1082
|
const localVarApiKeyValue = configuration.apiKey;
|
|
1004
1083
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
1005
1084
|
}
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1085
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
1086
|
+
for (const key in localVarQueryParameter) {
|
|
1087
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1088
|
+
}
|
|
1089
|
+
for (const key in options.query) {
|
|
1090
|
+
query.set(key, options.query[key]);
|
|
1091
|
+
}
|
|
1092
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1009
1093
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1010
1094
|
return {
|
|
1011
|
-
url:
|
|
1095
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1012
1096
|
options: localVarRequestOptions,
|
|
1013
1097
|
};
|
|
1014
1098
|
},
|
|
@@ -1038,7 +1122,8 @@ exports.CategoriesApiFetchParamCreator = function (configuration) {
|
|
|
1038
1122
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)))
|
|
1039
1123
|
.replace(`{${"month"}}`, encodeURIComponent(convertDateToFullDateStringFormat(month)))
|
|
1040
1124
|
.replace(`{${"category_id"}}`, encodeURIComponent(String(category_id)));
|
|
1041
|
-
|
|
1125
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1126
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1042
1127
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1043
1128
|
const localVarHeaderParameter = {};
|
|
1044
1129
|
const localVarQueryParameter = {};
|
|
@@ -1049,12 +1134,17 @@ exports.CategoriesApiFetchParamCreator = function (configuration) {
|
|
|
1049
1134
|
const localVarApiKeyValue = configuration.apiKey;
|
|
1050
1135
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
1051
1136
|
}
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1137
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
1138
|
+
for (const key in localVarQueryParameter) {
|
|
1139
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1140
|
+
}
|
|
1141
|
+
for (const key in options.query) {
|
|
1142
|
+
query.set(key, options.query[key]);
|
|
1143
|
+
}
|
|
1144
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1055
1145
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1056
1146
|
return {
|
|
1057
|
-
url:
|
|
1147
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1058
1148
|
options: localVarRequestOptions,
|
|
1059
1149
|
};
|
|
1060
1150
|
},
|
|
@@ -1064,7 +1154,7 @@ exports.CategoriesApiFetchParamCreator = function (configuration) {
|
|
|
1064
1154
|
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
1065
1155
|
* @param {Date} month - The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))
|
|
1066
1156
|
* @param {string} category_id - The id of the category
|
|
1067
|
-
* @param {
|
|
1157
|
+
* @param {PatchMonthCategoryWrapper} data - The category to update. Only `budgeted` amount can be updated and any other fields specified will be ignored.
|
|
1068
1158
|
* @param {*} [options] - Override http request options.
|
|
1069
1159
|
* @throws {RequiredError}
|
|
1070
1160
|
*/
|
|
@@ -1089,7 +1179,8 @@ exports.CategoriesApiFetchParamCreator = function (configuration) {
|
|
|
1089
1179
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)))
|
|
1090
1180
|
.replace(`{${"month"}}`, encodeURIComponent(convertDateToFullDateStringFormat(month)))
|
|
1091
1181
|
.replace(`{${"category_id"}}`, encodeURIComponent(String(category_id)));
|
|
1092
|
-
|
|
1182
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1183
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1093
1184
|
const localVarRequestOptions = Object.assign({ method: 'PATCH' }, options);
|
|
1094
1185
|
const localVarHeaderParameter = {};
|
|
1095
1186
|
const localVarQueryParameter = {};
|
|
@@ -1101,23 +1192,29 @@ exports.CategoriesApiFetchParamCreator = function (configuration) {
|
|
|
1101
1192
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
1102
1193
|
}
|
|
1103
1194
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1195
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
1196
|
+
for (const key in localVarQueryParameter) {
|
|
1197
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1198
|
+
}
|
|
1199
|
+
for (const key in options.query) {
|
|
1200
|
+
query.set(key, options.query[key]);
|
|
1201
|
+
}
|
|
1202
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1107
1203
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1108
1204
|
localVarRequestOptions.body = JSON.stringify(data || {});
|
|
1109
1205
|
return {
|
|
1110
|
-
url:
|
|
1206
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1111
1207
|
options: localVarRequestOptions,
|
|
1112
1208
|
};
|
|
1113
1209
|
},
|
|
1114
1210
|
};
|
|
1115
1211
|
};
|
|
1212
|
+
exports.CategoriesApiFetchParamCreator = CategoriesApiFetchParamCreator;
|
|
1116
1213
|
/**
|
|
1117
1214
|
* CategoriesApi - functional programming interface
|
|
1118
1215
|
* @export
|
|
1119
1216
|
*/
|
|
1120
|
-
|
|
1217
|
+
const CategoriesApiFp = function (configuration) {
|
|
1121
1218
|
return {
|
|
1122
1219
|
/**
|
|
1123
1220
|
* Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
|
@@ -1128,7 +1225,7 @@ exports.CategoriesApiFp = function (configuration) {
|
|
|
1128
1225
|
* @throws {RequiredError}
|
|
1129
1226
|
*/
|
|
1130
1227
|
getCategories(budget_id, last_knowledge_of_server, options) {
|
|
1131
|
-
const localVarFetchArgs = exports.CategoriesApiFetchParamCreator(configuration).getCategories(budget_id, last_knowledge_of_server, options);
|
|
1228
|
+
const localVarFetchArgs = (0, exports.CategoriesApiFetchParamCreator)(configuration).getCategories(budget_id, last_knowledge_of_server, options);
|
|
1132
1229
|
return (fetchFunction = fetch) => {
|
|
1133
1230
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
1134
1231
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -1153,7 +1250,7 @@ exports.CategoriesApiFp = function (configuration) {
|
|
|
1153
1250
|
* @throws {RequiredError}
|
|
1154
1251
|
*/
|
|
1155
1252
|
getCategoryById(budget_id, category_id, options) {
|
|
1156
|
-
const localVarFetchArgs = exports.CategoriesApiFetchParamCreator(configuration).getCategoryById(budget_id, category_id, options);
|
|
1253
|
+
const localVarFetchArgs = (0, exports.CategoriesApiFetchParamCreator)(configuration).getCategoryById(budget_id, category_id, options);
|
|
1157
1254
|
return (fetchFunction = fetch) => {
|
|
1158
1255
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
1159
1256
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -1179,7 +1276,7 @@ exports.CategoriesApiFp = function (configuration) {
|
|
|
1179
1276
|
* @throws {RequiredError}
|
|
1180
1277
|
*/
|
|
1181
1278
|
getMonthCategoryById(budget_id, month, category_id, options) {
|
|
1182
|
-
const localVarFetchArgs = exports.CategoriesApiFetchParamCreator(configuration).getMonthCategoryById(budget_id, month, category_id, options);
|
|
1279
|
+
const localVarFetchArgs = (0, exports.CategoriesApiFetchParamCreator)(configuration).getMonthCategoryById(budget_id, month, category_id, options);
|
|
1183
1280
|
return (fetchFunction = fetch) => {
|
|
1184
1281
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
1185
1282
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -1201,12 +1298,12 @@ exports.CategoriesApiFp = function (configuration) {
|
|
|
1201
1298
|
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
1202
1299
|
* @param {Date} month - The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))
|
|
1203
1300
|
* @param {string} category_id - The id of the category
|
|
1204
|
-
* @param {
|
|
1301
|
+
* @param {PatchMonthCategoryWrapper} data - The category to update. Only `budgeted` amount can be updated and any other fields specified will be ignored.
|
|
1205
1302
|
* @param {*} [options] - Override http request options.
|
|
1206
1303
|
* @throws {RequiredError}
|
|
1207
1304
|
*/
|
|
1208
1305
|
updateMonthCategory(budget_id, month, category_id, data, options) {
|
|
1209
|
-
const localVarFetchArgs = exports.CategoriesApiFetchParamCreator(configuration).updateMonthCategory(budget_id, month, category_id, data, options);
|
|
1306
|
+
const localVarFetchArgs = (0, exports.CategoriesApiFetchParamCreator)(configuration).updateMonthCategory(budget_id, month, category_id, data, options);
|
|
1210
1307
|
return (fetchFunction = fetch) => {
|
|
1211
1308
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
1212
1309
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -1224,11 +1321,12 @@ exports.CategoriesApiFp = function (configuration) {
|
|
|
1224
1321
|
},
|
|
1225
1322
|
};
|
|
1226
1323
|
};
|
|
1324
|
+
exports.CategoriesApiFp = CategoriesApiFp;
|
|
1227
1325
|
/**
|
|
1228
1326
|
* CategoriesApi - factory interface
|
|
1229
1327
|
* @export
|
|
1230
1328
|
*/
|
|
1231
|
-
|
|
1329
|
+
const CategoriesApiFactory = function (configuration) {
|
|
1232
1330
|
return {
|
|
1233
1331
|
/**
|
|
1234
1332
|
* Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
|
@@ -1239,7 +1337,7 @@ exports.CategoriesApiFactory = function (configuration) {
|
|
|
1239
1337
|
* @throws {RequiredError}
|
|
1240
1338
|
*/
|
|
1241
1339
|
getCategories(budget_id, last_knowledge_of_server, options) {
|
|
1242
|
-
return exports.CategoriesApiFp(configuration).getCategories(budget_id, last_knowledge_of_server, options)();
|
|
1340
|
+
return (0, exports.CategoriesApiFp)(configuration).getCategories(budget_id, last_knowledge_of_server, options)();
|
|
1243
1341
|
},
|
|
1244
1342
|
/**
|
|
1245
1343
|
* Returns a single category. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
|
@@ -1250,7 +1348,7 @@ exports.CategoriesApiFactory = function (configuration) {
|
|
|
1250
1348
|
* @throws {RequiredError}
|
|
1251
1349
|
*/
|
|
1252
1350
|
getCategoryById(budget_id, category_id, options) {
|
|
1253
|
-
return exports.CategoriesApiFp(configuration).getCategoryById(budget_id, category_id, options)();
|
|
1351
|
+
return (0, exports.CategoriesApiFp)(configuration).getCategoryById(budget_id, category_id, options)();
|
|
1254
1352
|
},
|
|
1255
1353
|
/**
|
|
1256
1354
|
* Returns a single category for a specific budget month. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
|
@@ -1262,7 +1360,7 @@ exports.CategoriesApiFactory = function (configuration) {
|
|
|
1262
1360
|
* @throws {RequiredError}
|
|
1263
1361
|
*/
|
|
1264
1362
|
getMonthCategoryById(budget_id, month, category_id, options) {
|
|
1265
|
-
return exports.CategoriesApiFp(configuration).getMonthCategoryById(budget_id, month, category_id, options)();
|
|
1363
|
+
return (0, exports.CategoriesApiFp)(configuration).getMonthCategoryById(budget_id, month, category_id, options)();
|
|
1266
1364
|
},
|
|
1267
1365
|
/**
|
|
1268
1366
|
* Update a category for a specific month. Only `budgeted` amount can be updated.
|
|
@@ -1270,15 +1368,16 @@ exports.CategoriesApiFactory = function (configuration) {
|
|
|
1270
1368
|
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
1271
1369
|
* @param {Date} month - The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))
|
|
1272
1370
|
* @param {string} category_id - The id of the category
|
|
1273
|
-
* @param {
|
|
1371
|
+
* @param {PatchMonthCategoryWrapper} data - The category to update. Only `budgeted` amount can be updated and any other fields specified will be ignored.
|
|
1274
1372
|
* @param {*} [options] - Override http request options.
|
|
1275
1373
|
* @throws {RequiredError}
|
|
1276
1374
|
*/
|
|
1277
1375
|
updateMonthCategory(budget_id, month, category_id, data, options) {
|
|
1278
|
-
return exports.CategoriesApiFp(configuration).updateMonthCategory(budget_id, month, category_id, data, options)();
|
|
1376
|
+
return (0, exports.CategoriesApiFp)(configuration).updateMonthCategory(budget_id, month, category_id, data, options)();
|
|
1279
1377
|
},
|
|
1280
1378
|
};
|
|
1281
1379
|
};
|
|
1380
|
+
exports.CategoriesApiFactory = CategoriesApiFactory;
|
|
1282
1381
|
/**
|
|
1283
1382
|
* CategoriesApi - object-oriented interface
|
|
1284
1383
|
* @export
|
|
@@ -1296,7 +1395,7 @@ class CategoriesApi extends BaseAPI {
|
|
|
1296
1395
|
* @memberof CategoriesApi
|
|
1297
1396
|
*/
|
|
1298
1397
|
getCategories(budget_id, last_knowledge_of_server, options) {
|
|
1299
|
-
return exports.CategoriesApiFp(this.configuration).getCategories(budget_id, last_knowledge_of_server, options)();
|
|
1398
|
+
return (0, exports.CategoriesApiFp)(this.configuration).getCategories(budget_id, last_knowledge_of_server, options)();
|
|
1300
1399
|
}
|
|
1301
1400
|
/**
|
|
1302
1401
|
* Returns a single category. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
|
@@ -1308,7 +1407,7 @@ class CategoriesApi extends BaseAPI {
|
|
|
1308
1407
|
* @memberof CategoriesApi
|
|
1309
1408
|
*/
|
|
1310
1409
|
getCategoryById(budget_id, category_id, options) {
|
|
1311
|
-
return exports.CategoriesApiFp(this.configuration).getCategoryById(budget_id, category_id, options)();
|
|
1410
|
+
return (0, exports.CategoriesApiFp)(this.configuration).getCategoryById(budget_id, category_id, options)();
|
|
1312
1411
|
}
|
|
1313
1412
|
/**
|
|
1314
1413
|
* Returns a single category for a specific budget month. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
|
@@ -1321,7 +1420,7 @@ class CategoriesApi extends BaseAPI {
|
|
|
1321
1420
|
* @memberof CategoriesApi
|
|
1322
1421
|
*/
|
|
1323
1422
|
getMonthCategoryById(budget_id, month, category_id, options) {
|
|
1324
|
-
return exports.CategoriesApiFp(this.configuration).getMonthCategoryById(budget_id, month, category_id, options)();
|
|
1423
|
+
return (0, exports.CategoriesApiFp)(this.configuration).getMonthCategoryById(budget_id, month, category_id, options)();
|
|
1325
1424
|
}
|
|
1326
1425
|
/**
|
|
1327
1426
|
* Update a category for a specific month. Only `budgeted` amount can be updated.
|
|
@@ -1329,13 +1428,13 @@ class CategoriesApi extends BaseAPI {
|
|
|
1329
1428
|
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
1330
1429
|
* @param {Date} month - The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))
|
|
1331
1430
|
* @param {string} category_id - The id of the category
|
|
1332
|
-
* @param {
|
|
1431
|
+
* @param {PatchMonthCategoryWrapper} data - The category to update. Only `budgeted` amount can be updated and any other fields specified will be ignored.
|
|
1333
1432
|
* @param {*} [options] - Override http request options.
|
|
1334
1433
|
* @throws {RequiredError}
|
|
1335
1434
|
* @memberof CategoriesApi
|
|
1336
1435
|
*/
|
|
1337
1436
|
updateMonthCategory(budget_id, month, category_id, data, options) {
|
|
1338
|
-
return exports.CategoriesApiFp(this.configuration).updateMonthCategory(budget_id, month, category_id, data, options)();
|
|
1437
|
+
return (0, exports.CategoriesApiFp)(this.configuration).updateMonthCategory(budget_id, month, category_id, data, options)();
|
|
1339
1438
|
}
|
|
1340
1439
|
}
|
|
1341
1440
|
exports.CategoriesApi = CategoriesApi;
|
|
@@ -1343,7 +1442,7 @@ exports.CategoriesApi = CategoriesApi;
|
|
|
1343
1442
|
* DeprecatedApi - fetch parameter creator
|
|
1344
1443
|
* @export
|
|
1345
1444
|
*/
|
|
1346
|
-
|
|
1445
|
+
const DeprecatedApiFetchParamCreator = function (configuration) {
|
|
1347
1446
|
return {
|
|
1348
1447
|
/**
|
|
1349
1448
|
* Creates multiple transactions. Although this endpoint is still supported, it is recommended to use 'POST /budgets/{budget_id}/transactions' to create multiple transactions.
|
|
@@ -1364,7 +1463,8 @@ exports.DeprecatedApiFetchParamCreator = function (configuration) {
|
|
|
1364
1463
|
}
|
|
1365
1464
|
const localVarPath = `/budgets/{budget_id}/transactions/bulk`
|
|
1366
1465
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)));
|
|
1367
|
-
|
|
1466
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1467
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1368
1468
|
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
1369
1469
|
const localVarHeaderParameter = {};
|
|
1370
1470
|
const localVarQueryParameter = {};
|
|
@@ -1376,23 +1476,29 @@ exports.DeprecatedApiFetchParamCreator = function (configuration) {
|
|
|
1376
1476
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
1377
1477
|
}
|
|
1378
1478
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1479
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
1480
|
+
for (const key in localVarQueryParameter) {
|
|
1481
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1482
|
+
}
|
|
1483
|
+
for (const key in options.query) {
|
|
1484
|
+
query.set(key, options.query[key]);
|
|
1485
|
+
}
|
|
1486
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1382
1487
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1383
1488
|
localVarRequestOptions.body = JSON.stringify(transactions || {});
|
|
1384
1489
|
return {
|
|
1385
|
-
url:
|
|
1490
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1386
1491
|
options: localVarRequestOptions,
|
|
1387
1492
|
};
|
|
1388
1493
|
},
|
|
1389
1494
|
};
|
|
1390
1495
|
};
|
|
1496
|
+
exports.DeprecatedApiFetchParamCreator = DeprecatedApiFetchParamCreator;
|
|
1391
1497
|
/**
|
|
1392
1498
|
* DeprecatedApi - functional programming interface
|
|
1393
1499
|
* @export
|
|
1394
1500
|
*/
|
|
1395
|
-
|
|
1501
|
+
const DeprecatedApiFp = function (configuration) {
|
|
1396
1502
|
return {
|
|
1397
1503
|
/**
|
|
1398
1504
|
* Creates multiple transactions. Although this endpoint is still supported, it is recommended to use 'POST /budgets/{budget_id}/transactions' to create multiple transactions.
|
|
@@ -1403,7 +1509,7 @@ exports.DeprecatedApiFp = function (configuration) {
|
|
|
1403
1509
|
* @throws {RequiredError}
|
|
1404
1510
|
*/
|
|
1405
1511
|
bulkCreateTransactions(budget_id, transactions, options) {
|
|
1406
|
-
const localVarFetchArgs = exports.DeprecatedApiFetchParamCreator(configuration).bulkCreateTransactions(budget_id, transactions, options);
|
|
1512
|
+
const localVarFetchArgs = (0, exports.DeprecatedApiFetchParamCreator)(configuration).bulkCreateTransactions(budget_id, transactions, options);
|
|
1407
1513
|
return (fetchFunction = fetch) => {
|
|
1408
1514
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
1409
1515
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -1421,11 +1527,12 @@ exports.DeprecatedApiFp = function (configuration) {
|
|
|
1421
1527
|
},
|
|
1422
1528
|
};
|
|
1423
1529
|
};
|
|
1530
|
+
exports.DeprecatedApiFp = DeprecatedApiFp;
|
|
1424
1531
|
/**
|
|
1425
1532
|
* DeprecatedApi - factory interface
|
|
1426
1533
|
* @export
|
|
1427
1534
|
*/
|
|
1428
|
-
|
|
1535
|
+
const DeprecatedApiFactory = function (configuration) {
|
|
1429
1536
|
return {
|
|
1430
1537
|
/**
|
|
1431
1538
|
* Creates multiple transactions. Although this endpoint is still supported, it is recommended to use 'POST /budgets/{budget_id}/transactions' to create multiple transactions.
|
|
@@ -1436,10 +1543,11 @@ exports.DeprecatedApiFactory = function (configuration) {
|
|
|
1436
1543
|
* @throws {RequiredError}
|
|
1437
1544
|
*/
|
|
1438
1545
|
bulkCreateTransactions(budget_id, transactions, options) {
|
|
1439
|
-
return exports.DeprecatedApiFp(configuration).bulkCreateTransactions(budget_id, transactions, options)();
|
|
1546
|
+
return (0, exports.DeprecatedApiFp)(configuration).bulkCreateTransactions(budget_id, transactions, options)();
|
|
1440
1547
|
},
|
|
1441
1548
|
};
|
|
1442
1549
|
};
|
|
1550
|
+
exports.DeprecatedApiFactory = DeprecatedApiFactory;
|
|
1443
1551
|
/**
|
|
1444
1552
|
* DeprecatedApi - object-oriented interface
|
|
1445
1553
|
* @export
|
|
@@ -1457,7 +1565,7 @@ class DeprecatedApi extends BaseAPI {
|
|
|
1457
1565
|
* @memberof DeprecatedApi
|
|
1458
1566
|
*/
|
|
1459
1567
|
bulkCreateTransactions(budget_id, transactions, options) {
|
|
1460
|
-
return exports.DeprecatedApiFp(this.configuration).bulkCreateTransactions(budget_id, transactions, options)();
|
|
1568
|
+
return (0, exports.DeprecatedApiFp)(this.configuration).bulkCreateTransactions(budget_id, transactions, options)();
|
|
1461
1569
|
}
|
|
1462
1570
|
}
|
|
1463
1571
|
exports.DeprecatedApi = DeprecatedApi;
|
|
@@ -1465,7 +1573,7 @@ exports.DeprecatedApi = DeprecatedApi;
|
|
|
1465
1573
|
* MonthsApi - fetch parameter creator
|
|
1466
1574
|
* @export
|
|
1467
1575
|
*/
|
|
1468
|
-
|
|
1576
|
+
const MonthsApiFetchParamCreator = function (configuration) {
|
|
1469
1577
|
return {
|
|
1470
1578
|
/**
|
|
1471
1579
|
* Returns a single budget month
|
|
@@ -1487,7 +1595,8 @@ exports.MonthsApiFetchParamCreator = function (configuration) {
|
|
|
1487
1595
|
const localVarPath = `/budgets/{budget_id}/months/{month}`
|
|
1488
1596
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)))
|
|
1489
1597
|
.replace(`{${"month"}}`, encodeURIComponent(convertDateToFullDateStringFormat(month)));
|
|
1490
|
-
|
|
1598
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1599
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1491
1600
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1492
1601
|
const localVarHeaderParameter = {};
|
|
1493
1602
|
const localVarQueryParameter = {};
|
|
@@ -1498,12 +1607,17 @@ exports.MonthsApiFetchParamCreator = function (configuration) {
|
|
|
1498
1607
|
const localVarApiKeyValue = configuration.apiKey;
|
|
1499
1608
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
1500
1609
|
}
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1610
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
1611
|
+
for (const key in localVarQueryParameter) {
|
|
1612
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1613
|
+
}
|
|
1614
|
+
for (const key in options.query) {
|
|
1615
|
+
query.set(key, options.query[key]);
|
|
1616
|
+
}
|
|
1617
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1504
1618
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1505
1619
|
return {
|
|
1506
|
-
url:
|
|
1620
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1507
1621
|
options: localVarRequestOptions,
|
|
1508
1622
|
};
|
|
1509
1623
|
},
|
|
@@ -1522,7 +1636,8 @@ exports.MonthsApiFetchParamCreator = function (configuration) {
|
|
|
1522
1636
|
}
|
|
1523
1637
|
const localVarPath = `/budgets/{budget_id}/months`
|
|
1524
1638
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)));
|
|
1525
|
-
|
|
1639
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1640
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1526
1641
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1527
1642
|
const localVarHeaderParameter = {};
|
|
1528
1643
|
const localVarQueryParameter = {};
|
|
@@ -1536,22 +1651,28 @@ exports.MonthsApiFetchParamCreator = function (configuration) {
|
|
|
1536
1651
|
if (last_knowledge_of_server !== undefined) {
|
|
1537
1652
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
1538
1653
|
}
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1654
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
1655
|
+
for (const key in localVarQueryParameter) {
|
|
1656
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1657
|
+
}
|
|
1658
|
+
for (const key in options.query) {
|
|
1659
|
+
query.set(key, options.query[key]);
|
|
1660
|
+
}
|
|
1661
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1542
1662
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1543
1663
|
return {
|
|
1544
|
-
url:
|
|
1664
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1545
1665
|
options: localVarRequestOptions,
|
|
1546
1666
|
};
|
|
1547
1667
|
},
|
|
1548
1668
|
};
|
|
1549
1669
|
};
|
|
1670
|
+
exports.MonthsApiFetchParamCreator = MonthsApiFetchParamCreator;
|
|
1550
1671
|
/**
|
|
1551
1672
|
* MonthsApi - functional programming interface
|
|
1552
1673
|
* @export
|
|
1553
1674
|
*/
|
|
1554
|
-
|
|
1675
|
+
const MonthsApiFp = function (configuration) {
|
|
1555
1676
|
return {
|
|
1556
1677
|
/**
|
|
1557
1678
|
* Returns a single budget month
|
|
@@ -1562,7 +1683,7 @@ exports.MonthsApiFp = function (configuration) {
|
|
|
1562
1683
|
* @throws {RequiredError}
|
|
1563
1684
|
*/
|
|
1564
1685
|
getBudgetMonth(budget_id, month, options) {
|
|
1565
|
-
const localVarFetchArgs = exports.MonthsApiFetchParamCreator(configuration).getBudgetMonth(budget_id, month, options);
|
|
1686
|
+
const localVarFetchArgs = (0, exports.MonthsApiFetchParamCreator)(configuration).getBudgetMonth(budget_id, month, options);
|
|
1566
1687
|
return (fetchFunction = fetch) => {
|
|
1567
1688
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
1568
1689
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -1587,7 +1708,7 @@ exports.MonthsApiFp = function (configuration) {
|
|
|
1587
1708
|
* @throws {RequiredError}
|
|
1588
1709
|
*/
|
|
1589
1710
|
getBudgetMonths(budget_id, last_knowledge_of_server, options) {
|
|
1590
|
-
const localVarFetchArgs = exports.MonthsApiFetchParamCreator(configuration).getBudgetMonths(budget_id, last_knowledge_of_server, options);
|
|
1711
|
+
const localVarFetchArgs = (0, exports.MonthsApiFetchParamCreator)(configuration).getBudgetMonths(budget_id, last_knowledge_of_server, options);
|
|
1591
1712
|
return (fetchFunction = fetch) => {
|
|
1592
1713
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
1593
1714
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -1605,11 +1726,12 @@ exports.MonthsApiFp = function (configuration) {
|
|
|
1605
1726
|
},
|
|
1606
1727
|
};
|
|
1607
1728
|
};
|
|
1729
|
+
exports.MonthsApiFp = MonthsApiFp;
|
|
1608
1730
|
/**
|
|
1609
1731
|
* MonthsApi - factory interface
|
|
1610
1732
|
* @export
|
|
1611
1733
|
*/
|
|
1612
|
-
|
|
1734
|
+
const MonthsApiFactory = function (configuration) {
|
|
1613
1735
|
return {
|
|
1614
1736
|
/**
|
|
1615
1737
|
* Returns a single budget month
|
|
@@ -1620,7 +1742,7 @@ exports.MonthsApiFactory = function (configuration) {
|
|
|
1620
1742
|
* @throws {RequiredError}
|
|
1621
1743
|
*/
|
|
1622
1744
|
getBudgetMonth(budget_id, month, options) {
|
|
1623
|
-
return exports.MonthsApiFp(configuration).getBudgetMonth(budget_id, month, options)();
|
|
1745
|
+
return (0, exports.MonthsApiFp)(configuration).getBudgetMonth(budget_id, month, options)();
|
|
1624
1746
|
},
|
|
1625
1747
|
/**
|
|
1626
1748
|
* Returns all budget months
|
|
@@ -1631,10 +1753,11 @@ exports.MonthsApiFactory = function (configuration) {
|
|
|
1631
1753
|
* @throws {RequiredError}
|
|
1632
1754
|
*/
|
|
1633
1755
|
getBudgetMonths(budget_id, last_knowledge_of_server, options) {
|
|
1634
|
-
return exports.MonthsApiFp(configuration).getBudgetMonths(budget_id, last_knowledge_of_server, options)();
|
|
1756
|
+
return (0, exports.MonthsApiFp)(configuration).getBudgetMonths(budget_id, last_knowledge_of_server, options)();
|
|
1635
1757
|
},
|
|
1636
1758
|
};
|
|
1637
1759
|
};
|
|
1760
|
+
exports.MonthsApiFactory = MonthsApiFactory;
|
|
1638
1761
|
/**
|
|
1639
1762
|
* MonthsApi - object-oriented interface
|
|
1640
1763
|
* @export
|
|
@@ -1652,7 +1775,7 @@ class MonthsApi extends BaseAPI {
|
|
|
1652
1775
|
* @memberof MonthsApi
|
|
1653
1776
|
*/
|
|
1654
1777
|
getBudgetMonth(budget_id, month, options) {
|
|
1655
|
-
return exports.MonthsApiFp(this.configuration).getBudgetMonth(budget_id, month, options)();
|
|
1778
|
+
return (0, exports.MonthsApiFp)(this.configuration).getBudgetMonth(budget_id, month, options)();
|
|
1656
1779
|
}
|
|
1657
1780
|
/**
|
|
1658
1781
|
* Returns all budget months
|
|
@@ -1664,7 +1787,7 @@ class MonthsApi extends BaseAPI {
|
|
|
1664
1787
|
* @memberof MonthsApi
|
|
1665
1788
|
*/
|
|
1666
1789
|
getBudgetMonths(budget_id, last_knowledge_of_server, options) {
|
|
1667
|
-
return exports.MonthsApiFp(this.configuration).getBudgetMonths(budget_id, last_knowledge_of_server, options)();
|
|
1790
|
+
return (0, exports.MonthsApiFp)(this.configuration).getBudgetMonths(budget_id, last_knowledge_of_server, options)();
|
|
1668
1791
|
}
|
|
1669
1792
|
}
|
|
1670
1793
|
exports.MonthsApi = MonthsApi;
|
|
@@ -1672,7 +1795,7 @@ exports.MonthsApi = MonthsApi;
|
|
|
1672
1795
|
* PayeeLocationsApi - fetch parameter creator
|
|
1673
1796
|
* @export
|
|
1674
1797
|
*/
|
|
1675
|
-
|
|
1798
|
+
const PayeeLocationsApiFetchParamCreator = function (configuration) {
|
|
1676
1799
|
return {
|
|
1677
1800
|
/**
|
|
1678
1801
|
* Returns a single payee location
|
|
@@ -1694,7 +1817,8 @@ exports.PayeeLocationsApiFetchParamCreator = function (configuration) {
|
|
|
1694
1817
|
const localVarPath = `/budgets/{budget_id}/payee_locations/{payee_location_id}`
|
|
1695
1818
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)))
|
|
1696
1819
|
.replace(`{${"payee_location_id"}}`, encodeURIComponent(String(payee_location_id)));
|
|
1697
|
-
|
|
1820
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1821
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1698
1822
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1699
1823
|
const localVarHeaderParameter = {};
|
|
1700
1824
|
const localVarQueryParameter = {};
|
|
@@ -1705,12 +1829,17 @@ exports.PayeeLocationsApiFetchParamCreator = function (configuration) {
|
|
|
1705
1829
|
const localVarApiKeyValue = configuration.apiKey;
|
|
1706
1830
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
1707
1831
|
}
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1832
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
1833
|
+
for (const key in localVarQueryParameter) {
|
|
1834
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1835
|
+
}
|
|
1836
|
+
for (const key in options.query) {
|
|
1837
|
+
query.set(key, options.query[key]);
|
|
1838
|
+
}
|
|
1839
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1711
1840
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1712
1841
|
return {
|
|
1713
|
-
url:
|
|
1842
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1714
1843
|
options: localVarRequestOptions,
|
|
1715
1844
|
};
|
|
1716
1845
|
},
|
|
@@ -1728,7 +1857,8 @@ exports.PayeeLocationsApiFetchParamCreator = function (configuration) {
|
|
|
1728
1857
|
}
|
|
1729
1858
|
const localVarPath = `/budgets/{budget_id}/payee_locations`
|
|
1730
1859
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)));
|
|
1731
|
-
|
|
1860
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1861
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1732
1862
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1733
1863
|
const localVarHeaderParameter = {};
|
|
1734
1864
|
const localVarQueryParameter = {};
|
|
@@ -1739,12 +1869,17 @@ exports.PayeeLocationsApiFetchParamCreator = function (configuration) {
|
|
|
1739
1869
|
const localVarApiKeyValue = configuration.apiKey;
|
|
1740
1870
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
1741
1871
|
}
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1872
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
1873
|
+
for (const key in localVarQueryParameter) {
|
|
1874
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1875
|
+
}
|
|
1876
|
+
for (const key in options.query) {
|
|
1877
|
+
query.set(key, options.query[key]);
|
|
1878
|
+
}
|
|
1879
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1745
1880
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1746
1881
|
return {
|
|
1747
|
-
url:
|
|
1882
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1748
1883
|
options: localVarRequestOptions,
|
|
1749
1884
|
};
|
|
1750
1885
|
},
|
|
@@ -1768,7 +1903,8 @@ exports.PayeeLocationsApiFetchParamCreator = function (configuration) {
|
|
|
1768
1903
|
const localVarPath = `/budgets/{budget_id}/payees/{payee_id}/payee_locations`
|
|
1769
1904
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)))
|
|
1770
1905
|
.replace(`{${"payee_id"}}`, encodeURIComponent(String(payee_id)));
|
|
1771
|
-
|
|
1906
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1907
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1772
1908
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1773
1909
|
const localVarHeaderParameter = {};
|
|
1774
1910
|
const localVarQueryParameter = {};
|
|
@@ -1779,22 +1915,28 @@ exports.PayeeLocationsApiFetchParamCreator = function (configuration) {
|
|
|
1779
1915
|
const localVarApiKeyValue = configuration.apiKey;
|
|
1780
1916
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
1781
1917
|
}
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1918
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
1919
|
+
for (const key in localVarQueryParameter) {
|
|
1920
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1921
|
+
}
|
|
1922
|
+
for (const key in options.query) {
|
|
1923
|
+
query.set(key, options.query[key]);
|
|
1924
|
+
}
|
|
1925
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1785
1926
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1786
1927
|
return {
|
|
1787
|
-
url:
|
|
1928
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1788
1929
|
options: localVarRequestOptions,
|
|
1789
1930
|
};
|
|
1790
1931
|
},
|
|
1791
1932
|
};
|
|
1792
1933
|
};
|
|
1934
|
+
exports.PayeeLocationsApiFetchParamCreator = PayeeLocationsApiFetchParamCreator;
|
|
1793
1935
|
/**
|
|
1794
1936
|
* PayeeLocationsApi - functional programming interface
|
|
1795
1937
|
* @export
|
|
1796
1938
|
*/
|
|
1797
|
-
|
|
1939
|
+
const PayeeLocationsApiFp = function (configuration) {
|
|
1798
1940
|
return {
|
|
1799
1941
|
/**
|
|
1800
1942
|
* Returns a single payee location
|
|
@@ -1805,7 +1947,7 @@ exports.PayeeLocationsApiFp = function (configuration) {
|
|
|
1805
1947
|
* @throws {RequiredError}
|
|
1806
1948
|
*/
|
|
1807
1949
|
getPayeeLocationById(budget_id, payee_location_id, options) {
|
|
1808
|
-
const localVarFetchArgs = exports.PayeeLocationsApiFetchParamCreator(configuration).getPayeeLocationById(budget_id, payee_location_id, options);
|
|
1950
|
+
const localVarFetchArgs = (0, exports.PayeeLocationsApiFetchParamCreator)(configuration).getPayeeLocationById(budget_id, payee_location_id, options);
|
|
1809
1951
|
return (fetchFunction = fetch) => {
|
|
1810
1952
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
1811
1953
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -1829,7 +1971,7 @@ exports.PayeeLocationsApiFp = function (configuration) {
|
|
|
1829
1971
|
* @throws {RequiredError}
|
|
1830
1972
|
*/
|
|
1831
1973
|
getPayeeLocations(budget_id, options) {
|
|
1832
|
-
const localVarFetchArgs = exports.PayeeLocationsApiFetchParamCreator(configuration).getPayeeLocations(budget_id, options);
|
|
1974
|
+
const localVarFetchArgs = (0, exports.PayeeLocationsApiFetchParamCreator)(configuration).getPayeeLocations(budget_id, options);
|
|
1833
1975
|
return (fetchFunction = fetch) => {
|
|
1834
1976
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
1835
1977
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -1854,7 +1996,7 @@ exports.PayeeLocationsApiFp = function (configuration) {
|
|
|
1854
1996
|
* @throws {RequiredError}
|
|
1855
1997
|
*/
|
|
1856
1998
|
getPayeeLocationsByPayee(budget_id, payee_id, options) {
|
|
1857
|
-
const localVarFetchArgs = exports.PayeeLocationsApiFetchParamCreator(configuration).getPayeeLocationsByPayee(budget_id, payee_id, options);
|
|
1999
|
+
const localVarFetchArgs = (0, exports.PayeeLocationsApiFetchParamCreator)(configuration).getPayeeLocationsByPayee(budget_id, payee_id, options);
|
|
1858
2000
|
return (fetchFunction = fetch) => {
|
|
1859
2001
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
1860
2002
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -1872,11 +2014,12 @@ exports.PayeeLocationsApiFp = function (configuration) {
|
|
|
1872
2014
|
},
|
|
1873
2015
|
};
|
|
1874
2016
|
};
|
|
2017
|
+
exports.PayeeLocationsApiFp = PayeeLocationsApiFp;
|
|
1875
2018
|
/**
|
|
1876
2019
|
* PayeeLocationsApi - factory interface
|
|
1877
2020
|
* @export
|
|
1878
2021
|
*/
|
|
1879
|
-
|
|
2022
|
+
const PayeeLocationsApiFactory = function (configuration) {
|
|
1880
2023
|
return {
|
|
1881
2024
|
/**
|
|
1882
2025
|
* Returns a single payee location
|
|
@@ -1887,7 +2030,7 @@ exports.PayeeLocationsApiFactory = function (configuration) {
|
|
|
1887
2030
|
* @throws {RequiredError}
|
|
1888
2031
|
*/
|
|
1889
2032
|
getPayeeLocationById(budget_id, payee_location_id, options) {
|
|
1890
|
-
return exports.PayeeLocationsApiFp(configuration).getPayeeLocationById(budget_id, payee_location_id, options)();
|
|
2033
|
+
return (0, exports.PayeeLocationsApiFp)(configuration).getPayeeLocationById(budget_id, payee_location_id, options)();
|
|
1891
2034
|
},
|
|
1892
2035
|
/**
|
|
1893
2036
|
* Returns all payee locations
|
|
@@ -1897,7 +2040,7 @@ exports.PayeeLocationsApiFactory = function (configuration) {
|
|
|
1897
2040
|
* @throws {RequiredError}
|
|
1898
2041
|
*/
|
|
1899
2042
|
getPayeeLocations(budget_id, options) {
|
|
1900
|
-
return exports.PayeeLocationsApiFp(configuration).getPayeeLocations(budget_id, options)();
|
|
2043
|
+
return (0, exports.PayeeLocationsApiFp)(configuration).getPayeeLocations(budget_id, options)();
|
|
1901
2044
|
},
|
|
1902
2045
|
/**
|
|
1903
2046
|
* Returns all payee locations for a specified payee
|
|
@@ -1908,10 +2051,11 @@ exports.PayeeLocationsApiFactory = function (configuration) {
|
|
|
1908
2051
|
* @throws {RequiredError}
|
|
1909
2052
|
*/
|
|
1910
2053
|
getPayeeLocationsByPayee(budget_id, payee_id, options) {
|
|
1911
|
-
return exports.PayeeLocationsApiFp(configuration).getPayeeLocationsByPayee(budget_id, payee_id, options)();
|
|
2054
|
+
return (0, exports.PayeeLocationsApiFp)(configuration).getPayeeLocationsByPayee(budget_id, payee_id, options)();
|
|
1912
2055
|
},
|
|
1913
2056
|
};
|
|
1914
2057
|
};
|
|
2058
|
+
exports.PayeeLocationsApiFactory = PayeeLocationsApiFactory;
|
|
1915
2059
|
/**
|
|
1916
2060
|
* PayeeLocationsApi - object-oriented interface
|
|
1917
2061
|
* @export
|
|
@@ -1929,7 +2073,7 @@ class PayeeLocationsApi extends BaseAPI {
|
|
|
1929
2073
|
* @memberof PayeeLocationsApi
|
|
1930
2074
|
*/
|
|
1931
2075
|
getPayeeLocationById(budget_id, payee_location_id, options) {
|
|
1932
|
-
return exports.PayeeLocationsApiFp(this.configuration).getPayeeLocationById(budget_id, payee_location_id, options)();
|
|
2076
|
+
return (0, exports.PayeeLocationsApiFp)(this.configuration).getPayeeLocationById(budget_id, payee_location_id, options)();
|
|
1933
2077
|
}
|
|
1934
2078
|
/**
|
|
1935
2079
|
* Returns all payee locations
|
|
@@ -1940,7 +2084,7 @@ class PayeeLocationsApi extends BaseAPI {
|
|
|
1940
2084
|
* @memberof PayeeLocationsApi
|
|
1941
2085
|
*/
|
|
1942
2086
|
getPayeeLocations(budget_id, options) {
|
|
1943
|
-
return exports.PayeeLocationsApiFp(this.configuration).getPayeeLocations(budget_id, options)();
|
|
2087
|
+
return (0, exports.PayeeLocationsApiFp)(this.configuration).getPayeeLocations(budget_id, options)();
|
|
1944
2088
|
}
|
|
1945
2089
|
/**
|
|
1946
2090
|
* Returns all payee locations for a specified payee
|
|
@@ -1952,7 +2096,7 @@ class PayeeLocationsApi extends BaseAPI {
|
|
|
1952
2096
|
* @memberof PayeeLocationsApi
|
|
1953
2097
|
*/
|
|
1954
2098
|
getPayeeLocationsByPayee(budget_id, payee_id, options) {
|
|
1955
|
-
return exports.PayeeLocationsApiFp(this.configuration).getPayeeLocationsByPayee(budget_id, payee_id, options)();
|
|
2099
|
+
return (0, exports.PayeeLocationsApiFp)(this.configuration).getPayeeLocationsByPayee(budget_id, payee_id, options)();
|
|
1956
2100
|
}
|
|
1957
2101
|
}
|
|
1958
2102
|
exports.PayeeLocationsApi = PayeeLocationsApi;
|
|
@@ -1960,7 +2104,7 @@ exports.PayeeLocationsApi = PayeeLocationsApi;
|
|
|
1960
2104
|
* PayeesApi - fetch parameter creator
|
|
1961
2105
|
* @export
|
|
1962
2106
|
*/
|
|
1963
|
-
|
|
2107
|
+
const PayeesApiFetchParamCreator = function (configuration) {
|
|
1964
2108
|
return {
|
|
1965
2109
|
/**
|
|
1966
2110
|
* Returns a single payee
|
|
@@ -1982,7 +2126,8 @@ exports.PayeesApiFetchParamCreator = function (configuration) {
|
|
|
1982
2126
|
const localVarPath = `/budgets/{budget_id}/payees/{payee_id}`
|
|
1983
2127
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)))
|
|
1984
2128
|
.replace(`{${"payee_id"}}`, encodeURIComponent(String(payee_id)));
|
|
1985
|
-
|
|
2129
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2130
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1986
2131
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1987
2132
|
const localVarHeaderParameter = {};
|
|
1988
2133
|
const localVarQueryParameter = {};
|
|
@@ -1993,12 +2138,17 @@ exports.PayeesApiFetchParamCreator = function (configuration) {
|
|
|
1993
2138
|
const localVarApiKeyValue = configuration.apiKey;
|
|
1994
2139
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
1995
2140
|
}
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
2141
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
2142
|
+
for (const key in localVarQueryParameter) {
|
|
2143
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2144
|
+
}
|
|
2145
|
+
for (const key in options.query) {
|
|
2146
|
+
query.set(key, options.query[key]);
|
|
2147
|
+
}
|
|
2148
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1999
2149
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2000
2150
|
return {
|
|
2001
|
-
url:
|
|
2151
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2002
2152
|
options: localVarRequestOptions,
|
|
2003
2153
|
};
|
|
2004
2154
|
},
|
|
@@ -2017,7 +2167,8 @@ exports.PayeesApiFetchParamCreator = function (configuration) {
|
|
|
2017
2167
|
}
|
|
2018
2168
|
const localVarPath = `/budgets/{budget_id}/payees`
|
|
2019
2169
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)));
|
|
2020
|
-
|
|
2170
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2171
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2021
2172
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2022
2173
|
const localVarHeaderParameter = {};
|
|
2023
2174
|
const localVarQueryParameter = {};
|
|
@@ -2031,22 +2182,28 @@ exports.PayeesApiFetchParamCreator = function (configuration) {
|
|
|
2031
2182
|
if (last_knowledge_of_server !== undefined) {
|
|
2032
2183
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
2033
2184
|
}
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2185
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
2186
|
+
for (const key in localVarQueryParameter) {
|
|
2187
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2188
|
+
}
|
|
2189
|
+
for (const key in options.query) {
|
|
2190
|
+
query.set(key, options.query[key]);
|
|
2191
|
+
}
|
|
2192
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2037
2193
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2038
2194
|
return {
|
|
2039
|
-
url:
|
|
2195
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2040
2196
|
options: localVarRequestOptions,
|
|
2041
2197
|
};
|
|
2042
2198
|
},
|
|
2043
2199
|
};
|
|
2044
2200
|
};
|
|
2201
|
+
exports.PayeesApiFetchParamCreator = PayeesApiFetchParamCreator;
|
|
2045
2202
|
/**
|
|
2046
2203
|
* PayeesApi - functional programming interface
|
|
2047
2204
|
* @export
|
|
2048
2205
|
*/
|
|
2049
|
-
|
|
2206
|
+
const PayeesApiFp = function (configuration) {
|
|
2050
2207
|
return {
|
|
2051
2208
|
/**
|
|
2052
2209
|
* Returns a single payee
|
|
@@ -2057,7 +2214,7 @@ exports.PayeesApiFp = function (configuration) {
|
|
|
2057
2214
|
* @throws {RequiredError}
|
|
2058
2215
|
*/
|
|
2059
2216
|
getPayeeById(budget_id, payee_id, options) {
|
|
2060
|
-
const localVarFetchArgs = exports.PayeesApiFetchParamCreator(configuration).getPayeeById(budget_id, payee_id, options);
|
|
2217
|
+
const localVarFetchArgs = (0, exports.PayeesApiFetchParamCreator)(configuration).getPayeeById(budget_id, payee_id, options);
|
|
2061
2218
|
return (fetchFunction = fetch) => {
|
|
2062
2219
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
2063
2220
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -2082,7 +2239,7 @@ exports.PayeesApiFp = function (configuration) {
|
|
|
2082
2239
|
* @throws {RequiredError}
|
|
2083
2240
|
*/
|
|
2084
2241
|
getPayees(budget_id, last_knowledge_of_server, options) {
|
|
2085
|
-
const localVarFetchArgs = exports.PayeesApiFetchParamCreator(configuration).getPayees(budget_id, last_knowledge_of_server, options);
|
|
2242
|
+
const localVarFetchArgs = (0, exports.PayeesApiFetchParamCreator)(configuration).getPayees(budget_id, last_knowledge_of_server, options);
|
|
2086
2243
|
return (fetchFunction = fetch) => {
|
|
2087
2244
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
2088
2245
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -2100,11 +2257,12 @@ exports.PayeesApiFp = function (configuration) {
|
|
|
2100
2257
|
},
|
|
2101
2258
|
};
|
|
2102
2259
|
};
|
|
2260
|
+
exports.PayeesApiFp = PayeesApiFp;
|
|
2103
2261
|
/**
|
|
2104
2262
|
* PayeesApi - factory interface
|
|
2105
2263
|
* @export
|
|
2106
2264
|
*/
|
|
2107
|
-
|
|
2265
|
+
const PayeesApiFactory = function (configuration) {
|
|
2108
2266
|
return {
|
|
2109
2267
|
/**
|
|
2110
2268
|
* Returns a single payee
|
|
@@ -2115,7 +2273,7 @@ exports.PayeesApiFactory = function (configuration) {
|
|
|
2115
2273
|
* @throws {RequiredError}
|
|
2116
2274
|
*/
|
|
2117
2275
|
getPayeeById(budget_id, payee_id, options) {
|
|
2118
|
-
return exports.PayeesApiFp(configuration).getPayeeById(budget_id, payee_id, options)();
|
|
2276
|
+
return (0, exports.PayeesApiFp)(configuration).getPayeeById(budget_id, payee_id, options)();
|
|
2119
2277
|
},
|
|
2120
2278
|
/**
|
|
2121
2279
|
* Returns all payees
|
|
@@ -2126,10 +2284,11 @@ exports.PayeesApiFactory = function (configuration) {
|
|
|
2126
2284
|
* @throws {RequiredError}
|
|
2127
2285
|
*/
|
|
2128
2286
|
getPayees(budget_id, last_knowledge_of_server, options) {
|
|
2129
|
-
return exports.PayeesApiFp(configuration).getPayees(budget_id, last_knowledge_of_server, options)();
|
|
2287
|
+
return (0, exports.PayeesApiFp)(configuration).getPayees(budget_id, last_knowledge_of_server, options)();
|
|
2130
2288
|
},
|
|
2131
2289
|
};
|
|
2132
2290
|
};
|
|
2291
|
+
exports.PayeesApiFactory = PayeesApiFactory;
|
|
2133
2292
|
/**
|
|
2134
2293
|
* PayeesApi - object-oriented interface
|
|
2135
2294
|
* @export
|
|
@@ -2147,7 +2306,7 @@ class PayeesApi extends BaseAPI {
|
|
|
2147
2306
|
* @memberof PayeesApi
|
|
2148
2307
|
*/
|
|
2149
2308
|
getPayeeById(budget_id, payee_id, options) {
|
|
2150
|
-
return exports.PayeesApiFp(this.configuration).getPayeeById(budget_id, payee_id, options)();
|
|
2309
|
+
return (0, exports.PayeesApiFp)(this.configuration).getPayeeById(budget_id, payee_id, options)();
|
|
2151
2310
|
}
|
|
2152
2311
|
/**
|
|
2153
2312
|
* Returns all payees
|
|
@@ -2159,7 +2318,7 @@ class PayeesApi extends BaseAPI {
|
|
|
2159
2318
|
* @memberof PayeesApi
|
|
2160
2319
|
*/
|
|
2161
2320
|
getPayees(budget_id, last_knowledge_of_server, options) {
|
|
2162
|
-
return exports.PayeesApiFp(this.configuration).getPayees(budget_id, last_knowledge_of_server, options)();
|
|
2321
|
+
return (0, exports.PayeesApiFp)(this.configuration).getPayees(budget_id, last_knowledge_of_server, options)();
|
|
2163
2322
|
}
|
|
2164
2323
|
}
|
|
2165
2324
|
exports.PayeesApi = PayeesApi;
|
|
@@ -2167,7 +2326,7 @@ exports.PayeesApi = PayeesApi;
|
|
|
2167
2326
|
* ScheduledTransactionsApi - fetch parameter creator
|
|
2168
2327
|
* @export
|
|
2169
2328
|
*/
|
|
2170
|
-
|
|
2329
|
+
const ScheduledTransactionsApiFetchParamCreator = function (configuration) {
|
|
2171
2330
|
return {
|
|
2172
2331
|
/**
|
|
2173
2332
|
* Returns a single scheduled transaction
|
|
@@ -2189,7 +2348,8 @@ exports.ScheduledTransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2189
2348
|
const localVarPath = `/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}`
|
|
2190
2349
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)))
|
|
2191
2350
|
.replace(`{${"scheduled_transaction_id"}}`, encodeURIComponent(String(scheduled_transaction_id)));
|
|
2192
|
-
|
|
2351
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2352
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2193
2353
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2194
2354
|
const localVarHeaderParameter = {};
|
|
2195
2355
|
const localVarQueryParameter = {};
|
|
@@ -2200,12 +2360,17 @@ exports.ScheduledTransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2200
2360
|
const localVarApiKeyValue = configuration.apiKey;
|
|
2201
2361
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
2202
2362
|
}
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2363
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
2364
|
+
for (const key in localVarQueryParameter) {
|
|
2365
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2366
|
+
}
|
|
2367
|
+
for (const key in options.query) {
|
|
2368
|
+
query.set(key, options.query[key]);
|
|
2369
|
+
}
|
|
2370
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2206
2371
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2207
2372
|
return {
|
|
2208
|
-
url:
|
|
2373
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2209
2374
|
options: localVarRequestOptions,
|
|
2210
2375
|
};
|
|
2211
2376
|
},
|
|
@@ -2224,7 +2389,8 @@ exports.ScheduledTransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2224
2389
|
}
|
|
2225
2390
|
const localVarPath = `/budgets/{budget_id}/scheduled_transactions`
|
|
2226
2391
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)));
|
|
2227
|
-
|
|
2392
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2393
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2228
2394
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2229
2395
|
const localVarHeaderParameter = {};
|
|
2230
2396
|
const localVarQueryParameter = {};
|
|
@@ -2238,22 +2404,28 @@ exports.ScheduledTransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2238
2404
|
if (last_knowledge_of_server !== undefined) {
|
|
2239
2405
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
2240
2406
|
}
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2407
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
2408
|
+
for (const key in localVarQueryParameter) {
|
|
2409
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2410
|
+
}
|
|
2411
|
+
for (const key in options.query) {
|
|
2412
|
+
query.set(key, options.query[key]);
|
|
2413
|
+
}
|
|
2414
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2244
2415
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2245
2416
|
return {
|
|
2246
|
-
url:
|
|
2417
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2247
2418
|
options: localVarRequestOptions,
|
|
2248
2419
|
};
|
|
2249
2420
|
},
|
|
2250
2421
|
};
|
|
2251
2422
|
};
|
|
2423
|
+
exports.ScheduledTransactionsApiFetchParamCreator = ScheduledTransactionsApiFetchParamCreator;
|
|
2252
2424
|
/**
|
|
2253
2425
|
* ScheduledTransactionsApi - functional programming interface
|
|
2254
2426
|
* @export
|
|
2255
2427
|
*/
|
|
2256
|
-
|
|
2428
|
+
const ScheduledTransactionsApiFp = function (configuration) {
|
|
2257
2429
|
return {
|
|
2258
2430
|
/**
|
|
2259
2431
|
* Returns a single scheduled transaction
|
|
@@ -2264,7 +2436,7 @@ exports.ScheduledTransactionsApiFp = function (configuration) {
|
|
|
2264
2436
|
* @throws {RequiredError}
|
|
2265
2437
|
*/
|
|
2266
2438
|
getScheduledTransactionById(budget_id, scheduled_transaction_id, options) {
|
|
2267
|
-
const localVarFetchArgs = exports.ScheduledTransactionsApiFetchParamCreator(configuration).getScheduledTransactionById(budget_id, scheduled_transaction_id, options);
|
|
2439
|
+
const localVarFetchArgs = (0, exports.ScheduledTransactionsApiFetchParamCreator)(configuration).getScheduledTransactionById(budget_id, scheduled_transaction_id, options);
|
|
2268
2440
|
return (fetchFunction = fetch) => {
|
|
2269
2441
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
2270
2442
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -2289,7 +2461,7 @@ exports.ScheduledTransactionsApiFp = function (configuration) {
|
|
|
2289
2461
|
* @throws {RequiredError}
|
|
2290
2462
|
*/
|
|
2291
2463
|
getScheduledTransactions(budget_id, last_knowledge_of_server, options) {
|
|
2292
|
-
const localVarFetchArgs = exports.ScheduledTransactionsApiFetchParamCreator(configuration).getScheduledTransactions(budget_id, last_knowledge_of_server, options);
|
|
2464
|
+
const localVarFetchArgs = (0, exports.ScheduledTransactionsApiFetchParamCreator)(configuration).getScheduledTransactions(budget_id, last_knowledge_of_server, options);
|
|
2293
2465
|
return (fetchFunction = fetch) => {
|
|
2294
2466
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
2295
2467
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -2307,11 +2479,12 @@ exports.ScheduledTransactionsApiFp = function (configuration) {
|
|
|
2307
2479
|
},
|
|
2308
2480
|
};
|
|
2309
2481
|
};
|
|
2482
|
+
exports.ScheduledTransactionsApiFp = ScheduledTransactionsApiFp;
|
|
2310
2483
|
/**
|
|
2311
2484
|
* ScheduledTransactionsApi - factory interface
|
|
2312
2485
|
* @export
|
|
2313
2486
|
*/
|
|
2314
|
-
|
|
2487
|
+
const ScheduledTransactionsApiFactory = function (configuration) {
|
|
2315
2488
|
return {
|
|
2316
2489
|
/**
|
|
2317
2490
|
* Returns a single scheduled transaction
|
|
@@ -2322,7 +2495,7 @@ exports.ScheduledTransactionsApiFactory = function (configuration) {
|
|
|
2322
2495
|
* @throws {RequiredError}
|
|
2323
2496
|
*/
|
|
2324
2497
|
getScheduledTransactionById(budget_id, scheduled_transaction_id, options) {
|
|
2325
|
-
return exports.ScheduledTransactionsApiFp(configuration).getScheduledTransactionById(budget_id, scheduled_transaction_id, options)();
|
|
2498
|
+
return (0, exports.ScheduledTransactionsApiFp)(configuration).getScheduledTransactionById(budget_id, scheduled_transaction_id, options)();
|
|
2326
2499
|
},
|
|
2327
2500
|
/**
|
|
2328
2501
|
* Returns all scheduled transactions
|
|
@@ -2333,10 +2506,11 @@ exports.ScheduledTransactionsApiFactory = function (configuration) {
|
|
|
2333
2506
|
* @throws {RequiredError}
|
|
2334
2507
|
*/
|
|
2335
2508
|
getScheduledTransactions(budget_id, last_knowledge_of_server, options) {
|
|
2336
|
-
return exports.ScheduledTransactionsApiFp(configuration).getScheduledTransactions(budget_id, last_knowledge_of_server, options)();
|
|
2509
|
+
return (0, exports.ScheduledTransactionsApiFp)(configuration).getScheduledTransactions(budget_id, last_knowledge_of_server, options)();
|
|
2337
2510
|
},
|
|
2338
2511
|
};
|
|
2339
2512
|
};
|
|
2513
|
+
exports.ScheduledTransactionsApiFactory = ScheduledTransactionsApiFactory;
|
|
2340
2514
|
/**
|
|
2341
2515
|
* ScheduledTransactionsApi - object-oriented interface
|
|
2342
2516
|
* @export
|
|
@@ -2354,7 +2528,7 @@ class ScheduledTransactionsApi extends BaseAPI {
|
|
|
2354
2528
|
* @memberof ScheduledTransactionsApi
|
|
2355
2529
|
*/
|
|
2356
2530
|
getScheduledTransactionById(budget_id, scheduled_transaction_id, options) {
|
|
2357
|
-
return exports.ScheduledTransactionsApiFp(this.configuration).getScheduledTransactionById(budget_id, scheduled_transaction_id, options)();
|
|
2531
|
+
return (0, exports.ScheduledTransactionsApiFp)(this.configuration).getScheduledTransactionById(budget_id, scheduled_transaction_id, options)();
|
|
2358
2532
|
}
|
|
2359
2533
|
/**
|
|
2360
2534
|
* Returns all scheduled transactions
|
|
@@ -2366,7 +2540,7 @@ class ScheduledTransactionsApi extends BaseAPI {
|
|
|
2366
2540
|
* @memberof ScheduledTransactionsApi
|
|
2367
2541
|
*/
|
|
2368
2542
|
getScheduledTransactions(budget_id, last_knowledge_of_server, options) {
|
|
2369
|
-
return exports.ScheduledTransactionsApiFp(this.configuration).getScheduledTransactions(budget_id, last_knowledge_of_server, options)();
|
|
2543
|
+
return (0, exports.ScheduledTransactionsApiFp)(this.configuration).getScheduledTransactions(budget_id, last_knowledge_of_server, options)();
|
|
2370
2544
|
}
|
|
2371
2545
|
}
|
|
2372
2546
|
exports.ScheduledTransactionsApi = ScheduledTransactionsApi;
|
|
@@ -2374,13 +2548,13 @@ exports.ScheduledTransactionsApi = ScheduledTransactionsApi;
|
|
|
2374
2548
|
* TransactionsApi - fetch parameter creator
|
|
2375
2549
|
* @export
|
|
2376
2550
|
*/
|
|
2377
|
-
|
|
2551
|
+
const TransactionsApiFetchParamCreator = function (configuration) {
|
|
2378
2552
|
return {
|
|
2379
2553
|
/**
|
|
2380
2554
|
* Creates a single transaction or multiple transactions. If you provide a body containing a `transaction` object, a single transaction will be created and if you provide a body containing a `transactions` array, multiple transactions will be created. Scheduled transactions cannot be created on this endpoint.
|
|
2381
2555
|
* @summary Create a single transaction or multiple transactions
|
|
2382
2556
|
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
2383
|
-
* @param {
|
|
2557
|
+
* @param {PostTransactionsWrapper} data - The transaction or transactions to create. To create a single transaction you can specify a value for the `transaction` object and to create multiple transactions you can specify an array of `transactions`. It is expected that you will only provide a value for one of these objects.
|
|
2384
2558
|
* @param {*} [options] - Override http request options.
|
|
2385
2559
|
* @throws {RequiredError}
|
|
2386
2560
|
*/
|
|
@@ -2395,7 +2569,8 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2395
2569
|
}
|
|
2396
2570
|
const localVarPath = `/budgets/{budget_id}/transactions`
|
|
2397
2571
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)));
|
|
2398
|
-
|
|
2572
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2573
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2399
2574
|
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
2400
2575
|
const localVarHeaderParameter = {};
|
|
2401
2576
|
const localVarQueryParameter = {};
|
|
@@ -2407,13 +2582,64 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2407
2582
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
2408
2583
|
}
|
|
2409
2584
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2585
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
2586
|
+
for (const key in localVarQueryParameter) {
|
|
2587
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2588
|
+
}
|
|
2589
|
+
for (const key in options.query) {
|
|
2590
|
+
query.set(key, options.query[key]);
|
|
2591
|
+
}
|
|
2592
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2413
2593
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2414
2594
|
localVarRequestOptions.body = JSON.stringify(data || {});
|
|
2415
2595
|
return {
|
|
2416
|
-
url:
|
|
2596
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2597
|
+
options: localVarRequestOptions,
|
|
2598
|
+
};
|
|
2599
|
+
},
|
|
2600
|
+
/**
|
|
2601
|
+
* Deletes a transaction
|
|
2602
|
+
* @summary Deletes an existing transaction
|
|
2603
|
+
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
2604
|
+
* @param {string} transaction_id - The id of the transaction
|
|
2605
|
+
* @param {*} [options] - Override http request options.
|
|
2606
|
+
* @throws {RequiredError}
|
|
2607
|
+
*/
|
|
2608
|
+
deleteTransaction(budget_id, transaction_id, options = {}) {
|
|
2609
|
+
// verify required parameter 'budget_id' is not null or undefined
|
|
2610
|
+
if (budget_id === null || budget_id === undefined) {
|
|
2611
|
+
throw new RequiredError('budget_id', 'Required parameter budget_id was null or undefined when calling deleteTransaction.');
|
|
2612
|
+
}
|
|
2613
|
+
// verify required parameter 'transaction_id' is not null or undefined
|
|
2614
|
+
if (transaction_id === null || transaction_id === undefined) {
|
|
2615
|
+
throw new RequiredError('transaction_id', 'Required parameter transaction_id was null or undefined when calling deleteTransaction.');
|
|
2616
|
+
}
|
|
2617
|
+
const localVarPath = `/budgets/{budget_id}/transactions/{transaction_id}`
|
|
2618
|
+
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)))
|
|
2619
|
+
.replace(`{${"transaction_id"}}`, encodeURIComponent(String(transaction_id)));
|
|
2620
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2621
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2622
|
+
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
|
|
2623
|
+
const localVarHeaderParameter = {};
|
|
2624
|
+
const localVarQueryParameter = {};
|
|
2625
|
+
localVarHeaderParameter["User-Agent"] = USER_AGENT;
|
|
2626
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
2627
|
+
// authentication bearer required
|
|
2628
|
+
if (configuration && configuration.apiKey) {
|
|
2629
|
+
const localVarApiKeyValue = configuration.apiKey;
|
|
2630
|
+
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
2631
|
+
}
|
|
2632
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
2633
|
+
for (const key in localVarQueryParameter) {
|
|
2634
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2635
|
+
}
|
|
2636
|
+
for (const key in options.query) {
|
|
2637
|
+
query.set(key, options.query[key]);
|
|
2638
|
+
}
|
|
2639
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2640
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2641
|
+
return {
|
|
2642
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2417
2643
|
options: localVarRequestOptions,
|
|
2418
2644
|
};
|
|
2419
2645
|
},
|
|
@@ -2437,7 +2663,8 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2437
2663
|
const localVarPath = `/budgets/{budget_id}/transactions/{transaction_id}`
|
|
2438
2664
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)))
|
|
2439
2665
|
.replace(`{${"transaction_id"}}`, encodeURIComponent(String(transaction_id)));
|
|
2440
|
-
|
|
2666
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2667
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2441
2668
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2442
2669
|
const localVarHeaderParameter = {};
|
|
2443
2670
|
const localVarQueryParameter = {};
|
|
@@ -2448,12 +2675,17 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2448
2675
|
const localVarApiKeyValue = configuration.apiKey;
|
|
2449
2676
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
2450
2677
|
}
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2678
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
2679
|
+
for (const key in localVarQueryParameter) {
|
|
2680
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2681
|
+
}
|
|
2682
|
+
for (const key in options.query) {
|
|
2683
|
+
query.set(key, options.query[key]);
|
|
2684
|
+
}
|
|
2685
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2454
2686
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2455
2687
|
return {
|
|
2456
|
-
url:
|
|
2688
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2457
2689
|
options: localVarRequestOptions,
|
|
2458
2690
|
};
|
|
2459
2691
|
},
|
|
@@ -2474,7 +2706,8 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2474
2706
|
}
|
|
2475
2707
|
const localVarPath = `/budgets/{budget_id}/transactions`
|
|
2476
2708
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)));
|
|
2477
|
-
|
|
2709
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2710
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2478
2711
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2479
2712
|
const localVarHeaderParameter = {};
|
|
2480
2713
|
const localVarQueryParameter = {};
|
|
@@ -2494,12 +2727,17 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2494
2727
|
if (last_knowledge_of_server !== undefined) {
|
|
2495
2728
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
2496
2729
|
}
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2730
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
2731
|
+
for (const key in localVarQueryParameter) {
|
|
2732
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2733
|
+
}
|
|
2734
|
+
for (const key in options.query) {
|
|
2735
|
+
query.set(key, options.query[key]);
|
|
2736
|
+
}
|
|
2737
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2500
2738
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2501
2739
|
return {
|
|
2502
|
-
url:
|
|
2740
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2503
2741
|
options: localVarRequestOptions,
|
|
2504
2742
|
};
|
|
2505
2743
|
},
|
|
@@ -2526,7 +2764,8 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2526
2764
|
const localVarPath = `/budgets/{budget_id}/accounts/{account_id}/transactions`
|
|
2527
2765
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)))
|
|
2528
2766
|
.replace(`{${"account_id"}}`, encodeURIComponent(String(account_id)));
|
|
2529
|
-
|
|
2767
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2768
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2530
2769
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2531
2770
|
const localVarHeaderParameter = {};
|
|
2532
2771
|
const localVarQueryParameter = {};
|
|
@@ -2546,12 +2785,17 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2546
2785
|
if (last_knowledge_of_server !== undefined) {
|
|
2547
2786
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
2548
2787
|
}
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2788
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
2789
|
+
for (const key in localVarQueryParameter) {
|
|
2790
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2791
|
+
}
|
|
2792
|
+
for (const key in options.query) {
|
|
2793
|
+
query.set(key, options.query[key]);
|
|
2794
|
+
}
|
|
2795
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2552
2796
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2553
2797
|
return {
|
|
2554
|
-
url:
|
|
2798
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2555
2799
|
options: localVarRequestOptions,
|
|
2556
2800
|
};
|
|
2557
2801
|
},
|
|
@@ -2578,7 +2822,8 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2578
2822
|
const localVarPath = `/budgets/{budget_id}/categories/{category_id}/transactions`
|
|
2579
2823
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)))
|
|
2580
2824
|
.replace(`{${"category_id"}}`, encodeURIComponent(String(category_id)));
|
|
2581
|
-
|
|
2825
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2826
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2582
2827
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2583
2828
|
const localVarHeaderParameter = {};
|
|
2584
2829
|
const localVarQueryParameter = {};
|
|
@@ -2598,12 +2843,17 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2598
2843
|
if (last_knowledge_of_server !== undefined) {
|
|
2599
2844
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
2600
2845
|
}
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2846
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
2847
|
+
for (const key in localVarQueryParameter) {
|
|
2848
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2849
|
+
}
|
|
2850
|
+
for (const key in options.query) {
|
|
2851
|
+
query.set(key, options.query[key]);
|
|
2852
|
+
}
|
|
2853
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2604
2854
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2605
2855
|
return {
|
|
2606
|
-
url:
|
|
2856
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2607
2857
|
options: localVarRequestOptions,
|
|
2608
2858
|
};
|
|
2609
2859
|
},
|
|
@@ -2630,7 +2880,8 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2630
2880
|
const localVarPath = `/budgets/{budget_id}/payees/{payee_id}/transactions`
|
|
2631
2881
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)))
|
|
2632
2882
|
.replace(`{${"payee_id"}}`, encodeURIComponent(String(payee_id)));
|
|
2633
|
-
|
|
2883
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2884
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2634
2885
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2635
2886
|
const localVarHeaderParameter = {};
|
|
2636
2887
|
const localVarQueryParameter = {};
|
|
@@ -2650,12 +2901,17 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2650
2901
|
if (last_knowledge_of_server !== undefined) {
|
|
2651
2902
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
2652
2903
|
}
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2904
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
2905
|
+
for (const key in localVarQueryParameter) {
|
|
2906
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2907
|
+
}
|
|
2908
|
+
for (const key in options.query) {
|
|
2909
|
+
query.set(key, options.query[key]);
|
|
2910
|
+
}
|
|
2911
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2656
2912
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2657
2913
|
return {
|
|
2658
|
-
url:
|
|
2914
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2659
2915
|
options: localVarRequestOptions,
|
|
2660
2916
|
};
|
|
2661
2917
|
},
|
|
@@ -2673,7 +2929,8 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2673
2929
|
}
|
|
2674
2930
|
const localVarPath = `/budgets/{budget_id}/transactions/import`
|
|
2675
2931
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)));
|
|
2676
|
-
|
|
2932
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2933
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2677
2934
|
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
2678
2935
|
const localVarHeaderParameter = {};
|
|
2679
2936
|
const localVarQueryParameter = {};
|
|
@@ -2684,12 +2941,17 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2684
2941
|
const localVarApiKeyValue = configuration.apiKey;
|
|
2685
2942
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
2686
2943
|
}
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2944
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
2945
|
+
for (const key in localVarQueryParameter) {
|
|
2946
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2947
|
+
}
|
|
2948
|
+
for (const key in options.query) {
|
|
2949
|
+
query.set(key, options.query[key]);
|
|
2950
|
+
}
|
|
2951
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2690
2952
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2691
2953
|
return {
|
|
2692
|
-
url:
|
|
2954
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2693
2955
|
options: localVarRequestOptions,
|
|
2694
2956
|
};
|
|
2695
2957
|
},
|
|
@@ -2698,7 +2960,7 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2698
2960
|
* @summary Updates an existing transaction
|
|
2699
2961
|
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
2700
2962
|
* @param {string} transaction_id - The id of the transaction
|
|
2701
|
-
* @param {
|
|
2963
|
+
* @param {PutTransactionWrapper} data - The transaction to update
|
|
2702
2964
|
* @param {*} [options] - Override http request options.
|
|
2703
2965
|
* @throws {RequiredError}
|
|
2704
2966
|
*/
|
|
@@ -2718,7 +2980,8 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2718
2980
|
const localVarPath = `/budgets/{budget_id}/transactions/{transaction_id}`
|
|
2719
2981
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)))
|
|
2720
2982
|
.replace(`{${"transaction_id"}}`, encodeURIComponent(String(transaction_id)));
|
|
2721
|
-
|
|
2983
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2984
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2722
2985
|
const localVarRequestOptions = Object.assign({ method: 'PUT' }, options);
|
|
2723
2986
|
const localVarHeaderParameter = {};
|
|
2724
2987
|
const localVarQueryParameter = {};
|
|
@@ -2730,13 +2993,18 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2730
2993
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
2731
2994
|
}
|
|
2732
2995
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2996
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
2997
|
+
for (const key in localVarQueryParameter) {
|
|
2998
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2999
|
+
}
|
|
3000
|
+
for (const key in options.query) {
|
|
3001
|
+
query.set(key, options.query[key]);
|
|
3002
|
+
}
|
|
3003
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2736
3004
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2737
3005
|
localVarRequestOptions.body = JSON.stringify(data || {});
|
|
2738
3006
|
return {
|
|
2739
|
-
url:
|
|
3007
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2740
3008
|
options: localVarRequestOptions,
|
|
2741
3009
|
};
|
|
2742
3010
|
},
|
|
@@ -2744,7 +3012,7 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2744
3012
|
* Updates multiple transactions, by `id` or `import_id`.
|
|
2745
3013
|
* @summary Update multiple transactions
|
|
2746
3014
|
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
2747
|
-
* @param {
|
|
3015
|
+
* @param {PatchTransactionsWrapper} data - The transactions to update. Each transaction must have either an `id` or `import_id` specified. If `id` is specified as null an `import_id` value can be provided which will allow transaction(s) to be updated by their `import_id`. If an `id` is specified, it will always be used for lookup.
|
|
2748
3016
|
* @param {*} [options] - Override http request options.
|
|
2749
3017
|
* @throws {RequiredError}
|
|
2750
3018
|
*/
|
|
@@ -2759,7 +3027,8 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2759
3027
|
}
|
|
2760
3028
|
const localVarPath = `/budgets/{budget_id}/transactions`
|
|
2761
3029
|
.replace(`{${"budget_id"}}`, encodeURIComponent(String(budget_id)));
|
|
2762
|
-
|
|
3030
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3031
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2763
3032
|
const localVarRequestOptions = Object.assign({ method: 'PATCH' }, options);
|
|
2764
3033
|
const localVarHeaderParameter = {};
|
|
2765
3034
|
const localVarQueryParameter = {};
|
|
@@ -2771,34 +3040,65 @@ exports.TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2771
3040
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
2772
3041
|
}
|
|
2773
3042
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
3043
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
3044
|
+
for (const key in localVarQueryParameter) {
|
|
3045
|
+
query.set(key, localVarQueryParameter[key]);
|
|
3046
|
+
}
|
|
3047
|
+
for (const key in options.query) {
|
|
3048
|
+
query.set(key, options.query[key]);
|
|
3049
|
+
}
|
|
3050
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2777
3051
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2778
3052
|
localVarRequestOptions.body = JSON.stringify(data || {});
|
|
2779
3053
|
return {
|
|
2780
|
-
url:
|
|
3054
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2781
3055
|
options: localVarRequestOptions,
|
|
2782
3056
|
};
|
|
2783
3057
|
},
|
|
2784
3058
|
};
|
|
2785
3059
|
};
|
|
3060
|
+
exports.TransactionsApiFetchParamCreator = TransactionsApiFetchParamCreator;
|
|
2786
3061
|
/**
|
|
2787
3062
|
* TransactionsApi - functional programming interface
|
|
2788
3063
|
* @export
|
|
2789
3064
|
*/
|
|
2790
|
-
|
|
3065
|
+
const TransactionsApiFp = function (configuration) {
|
|
2791
3066
|
return {
|
|
2792
3067
|
/**
|
|
2793
3068
|
* Creates a single transaction or multiple transactions. If you provide a body containing a `transaction` object, a single transaction will be created and if you provide a body containing a `transactions` array, multiple transactions will be created. Scheduled transactions cannot be created on this endpoint.
|
|
2794
3069
|
* @summary Create a single transaction or multiple transactions
|
|
2795
3070
|
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
2796
|
-
* @param {
|
|
3071
|
+
* @param {PostTransactionsWrapper} data - The transaction or transactions to create. To create a single transaction you can specify a value for the `transaction` object and to create multiple transactions you can specify an array of `transactions`. It is expected that you will only provide a value for one of these objects.
|
|
2797
3072
|
* @param {*} [options] - Override http request options.
|
|
2798
3073
|
* @throws {RequiredError}
|
|
2799
3074
|
*/
|
|
2800
3075
|
createTransaction(budget_id, data, options) {
|
|
2801
|
-
const localVarFetchArgs = exports.TransactionsApiFetchParamCreator(configuration).createTransaction(budget_id, data, options);
|
|
3076
|
+
const localVarFetchArgs = (0, exports.TransactionsApiFetchParamCreator)(configuration).createTransaction(budget_id, data, options);
|
|
3077
|
+
return (fetchFunction = fetch) => {
|
|
3078
|
+
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
3079
|
+
if (response.status >= 200 && response.status < 300) {
|
|
3080
|
+
const apiResponse = yield response.json();
|
|
3081
|
+
apiResponse.rateLimit = response.headers.get("X-Rate-Limit");
|
|
3082
|
+
return apiResponse;
|
|
3083
|
+
}
|
|
3084
|
+
else {
|
|
3085
|
+
return response.json().then((e) => {
|
|
3086
|
+
return Promise.reject(e);
|
|
3087
|
+
});
|
|
3088
|
+
}
|
|
3089
|
+
}));
|
|
3090
|
+
};
|
|
3091
|
+
},
|
|
3092
|
+
/**
|
|
3093
|
+
* Deletes a transaction
|
|
3094
|
+
* @summary Deletes an existing transaction
|
|
3095
|
+
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
3096
|
+
* @param {string} transaction_id - The id of the transaction
|
|
3097
|
+
* @param {*} [options] - Override http request options.
|
|
3098
|
+
* @throws {RequiredError}
|
|
3099
|
+
*/
|
|
3100
|
+
deleteTransaction(budget_id, transaction_id, options) {
|
|
3101
|
+
const localVarFetchArgs = (0, exports.TransactionsApiFetchParamCreator)(configuration).deleteTransaction(budget_id, transaction_id, options);
|
|
2802
3102
|
return (fetchFunction = fetch) => {
|
|
2803
3103
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
2804
3104
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -2823,7 +3123,7 @@ exports.TransactionsApiFp = function (configuration) {
|
|
|
2823
3123
|
* @throws {RequiredError}
|
|
2824
3124
|
*/
|
|
2825
3125
|
getTransactionById(budget_id, transaction_id, options) {
|
|
2826
|
-
const localVarFetchArgs = exports.TransactionsApiFetchParamCreator(configuration).getTransactionById(budget_id, transaction_id, options);
|
|
3126
|
+
const localVarFetchArgs = (0, exports.TransactionsApiFetchParamCreator)(configuration).getTransactionById(budget_id, transaction_id, options);
|
|
2827
3127
|
return (fetchFunction = fetch) => {
|
|
2828
3128
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
2829
3129
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -2850,7 +3150,7 @@ exports.TransactionsApiFp = function (configuration) {
|
|
|
2850
3150
|
* @throws {RequiredError}
|
|
2851
3151
|
*/
|
|
2852
3152
|
getTransactions(budget_id, since_date, type, last_knowledge_of_server, options) {
|
|
2853
|
-
const localVarFetchArgs = exports.TransactionsApiFetchParamCreator(configuration).getTransactions(budget_id, since_date, type, last_knowledge_of_server, options);
|
|
3153
|
+
const localVarFetchArgs = (0, exports.TransactionsApiFetchParamCreator)(configuration).getTransactions(budget_id, since_date, type, last_knowledge_of_server, options);
|
|
2854
3154
|
return (fetchFunction = fetch) => {
|
|
2855
3155
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
2856
3156
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -2878,7 +3178,7 @@ exports.TransactionsApiFp = function (configuration) {
|
|
|
2878
3178
|
* @throws {RequiredError}
|
|
2879
3179
|
*/
|
|
2880
3180
|
getTransactionsByAccount(budget_id, account_id, since_date, type, last_knowledge_of_server, options) {
|
|
2881
|
-
const localVarFetchArgs = exports.TransactionsApiFetchParamCreator(configuration).getTransactionsByAccount(budget_id, account_id, since_date, type, last_knowledge_of_server, options);
|
|
3181
|
+
const localVarFetchArgs = (0, exports.TransactionsApiFetchParamCreator)(configuration).getTransactionsByAccount(budget_id, account_id, since_date, type, last_knowledge_of_server, options);
|
|
2882
3182
|
return (fetchFunction = fetch) => {
|
|
2883
3183
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
2884
3184
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -2906,7 +3206,7 @@ exports.TransactionsApiFp = function (configuration) {
|
|
|
2906
3206
|
* @throws {RequiredError}
|
|
2907
3207
|
*/
|
|
2908
3208
|
getTransactionsByCategory(budget_id, category_id, since_date, type, last_knowledge_of_server, options) {
|
|
2909
|
-
const localVarFetchArgs = exports.TransactionsApiFetchParamCreator(configuration).getTransactionsByCategory(budget_id, category_id, since_date, type, last_knowledge_of_server, options);
|
|
3209
|
+
const localVarFetchArgs = (0, exports.TransactionsApiFetchParamCreator)(configuration).getTransactionsByCategory(budget_id, category_id, since_date, type, last_knowledge_of_server, options);
|
|
2910
3210
|
return (fetchFunction = fetch) => {
|
|
2911
3211
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
2912
3212
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -2934,7 +3234,7 @@ exports.TransactionsApiFp = function (configuration) {
|
|
|
2934
3234
|
* @throws {RequiredError}
|
|
2935
3235
|
*/
|
|
2936
3236
|
getTransactionsByPayee(budget_id, payee_id, since_date, type, last_knowledge_of_server, options) {
|
|
2937
|
-
const localVarFetchArgs = exports.TransactionsApiFetchParamCreator(configuration).getTransactionsByPayee(budget_id, payee_id, since_date, type, last_knowledge_of_server, options);
|
|
3237
|
+
const localVarFetchArgs = (0, exports.TransactionsApiFetchParamCreator)(configuration).getTransactionsByPayee(budget_id, payee_id, since_date, type, last_knowledge_of_server, options);
|
|
2938
3238
|
return (fetchFunction = fetch) => {
|
|
2939
3239
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
2940
3240
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -2958,7 +3258,7 @@ exports.TransactionsApiFp = function (configuration) {
|
|
|
2958
3258
|
* @throws {RequiredError}
|
|
2959
3259
|
*/
|
|
2960
3260
|
importTransactions(budget_id, options) {
|
|
2961
|
-
const localVarFetchArgs = exports.TransactionsApiFetchParamCreator(configuration).importTransactions(budget_id, options);
|
|
3261
|
+
const localVarFetchArgs = (0, exports.TransactionsApiFetchParamCreator)(configuration).importTransactions(budget_id, options);
|
|
2962
3262
|
return (fetchFunction = fetch) => {
|
|
2963
3263
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
2964
3264
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -2979,12 +3279,12 @@ exports.TransactionsApiFp = function (configuration) {
|
|
|
2979
3279
|
* @summary Updates an existing transaction
|
|
2980
3280
|
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
2981
3281
|
* @param {string} transaction_id - The id of the transaction
|
|
2982
|
-
* @param {
|
|
3282
|
+
* @param {PutTransactionWrapper} data - The transaction to update
|
|
2983
3283
|
* @param {*} [options] - Override http request options.
|
|
2984
3284
|
* @throws {RequiredError}
|
|
2985
3285
|
*/
|
|
2986
3286
|
updateTransaction(budget_id, transaction_id, data, options) {
|
|
2987
|
-
const localVarFetchArgs = exports.TransactionsApiFetchParamCreator(configuration).updateTransaction(budget_id, transaction_id, data, options);
|
|
3287
|
+
const localVarFetchArgs = (0, exports.TransactionsApiFetchParamCreator)(configuration).updateTransaction(budget_id, transaction_id, data, options);
|
|
2988
3288
|
return (fetchFunction = fetch) => {
|
|
2989
3289
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
2990
3290
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -3004,12 +3304,12 @@ exports.TransactionsApiFp = function (configuration) {
|
|
|
3004
3304
|
* Updates multiple transactions, by `id` or `import_id`.
|
|
3005
3305
|
* @summary Update multiple transactions
|
|
3006
3306
|
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
3007
|
-
* @param {
|
|
3307
|
+
* @param {PatchTransactionsWrapper} data - The transactions to update. Each transaction must have either an `id` or `import_id` specified. If `id` is specified as null an `import_id` value can be provided which will allow transaction(s) to be updated by their `import_id`. If an `id` is specified, it will always be used for lookup.
|
|
3008
3308
|
* @param {*} [options] - Override http request options.
|
|
3009
3309
|
* @throws {RequiredError}
|
|
3010
3310
|
*/
|
|
3011
3311
|
updateTransactions(budget_id, data, options) {
|
|
3012
|
-
const localVarFetchArgs = exports.TransactionsApiFetchParamCreator(configuration).updateTransactions(budget_id, data, options);
|
|
3312
|
+
const localVarFetchArgs = (0, exports.TransactionsApiFetchParamCreator)(configuration).updateTransactions(budget_id, data, options);
|
|
3013
3313
|
return (fetchFunction = fetch) => {
|
|
3014
3314
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
3015
3315
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -3027,22 +3327,34 @@ exports.TransactionsApiFp = function (configuration) {
|
|
|
3027
3327
|
},
|
|
3028
3328
|
};
|
|
3029
3329
|
};
|
|
3330
|
+
exports.TransactionsApiFp = TransactionsApiFp;
|
|
3030
3331
|
/**
|
|
3031
3332
|
* TransactionsApi - factory interface
|
|
3032
3333
|
* @export
|
|
3033
3334
|
*/
|
|
3034
|
-
|
|
3335
|
+
const TransactionsApiFactory = function (configuration) {
|
|
3035
3336
|
return {
|
|
3036
3337
|
/**
|
|
3037
3338
|
* Creates a single transaction or multiple transactions. If you provide a body containing a `transaction` object, a single transaction will be created and if you provide a body containing a `transactions` array, multiple transactions will be created. Scheduled transactions cannot be created on this endpoint.
|
|
3038
3339
|
* @summary Create a single transaction or multiple transactions
|
|
3039
3340
|
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
3040
|
-
* @param {
|
|
3341
|
+
* @param {PostTransactionsWrapper} data - The transaction or transactions to create. To create a single transaction you can specify a value for the `transaction` object and to create multiple transactions you can specify an array of `transactions`. It is expected that you will only provide a value for one of these objects.
|
|
3041
3342
|
* @param {*} [options] - Override http request options.
|
|
3042
3343
|
* @throws {RequiredError}
|
|
3043
3344
|
*/
|
|
3044
3345
|
createTransaction(budget_id, data, options) {
|
|
3045
|
-
return exports.TransactionsApiFp(configuration).createTransaction(budget_id, data, options)();
|
|
3346
|
+
return (0, exports.TransactionsApiFp)(configuration).createTransaction(budget_id, data, options)();
|
|
3347
|
+
},
|
|
3348
|
+
/**
|
|
3349
|
+
* Deletes a transaction
|
|
3350
|
+
* @summary Deletes an existing transaction
|
|
3351
|
+
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
3352
|
+
* @param {string} transaction_id - The id of the transaction
|
|
3353
|
+
* @param {*} [options] - Override http request options.
|
|
3354
|
+
* @throws {RequiredError}
|
|
3355
|
+
*/
|
|
3356
|
+
deleteTransaction(budget_id, transaction_id, options) {
|
|
3357
|
+
return (0, exports.TransactionsApiFp)(configuration).deleteTransaction(budget_id, transaction_id, options)();
|
|
3046
3358
|
},
|
|
3047
3359
|
/**
|
|
3048
3360
|
* Returns a single transaction
|
|
@@ -3053,7 +3365,7 @@ exports.TransactionsApiFactory = function (configuration) {
|
|
|
3053
3365
|
* @throws {RequiredError}
|
|
3054
3366
|
*/
|
|
3055
3367
|
getTransactionById(budget_id, transaction_id, options) {
|
|
3056
|
-
return exports.TransactionsApiFp(configuration).getTransactionById(budget_id, transaction_id, options)();
|
|
3368
|
+
return (0, exports.TransactionsApiFp)(configuration).getTransactionById(budget_id, transaction_id, options)();
|
|
3057
3369
|
},
|
|
3058
3370
|
/**
|
|
3059
3371
|
* Returns budget transactions
|
|
@@ -3066,7 +3378,7 @@ exports.TransactionsApiFactory = function (configuration) {
|
|
|
3066
3378
|
* @throws {RequiredError}
|
|
3067
3379
|
*/
|
|
3068
3380
|
getTransactions(budget_id, since_date, type, last_knowledge_of_server, options) {
|
|
3069
|
-
return exports.TransactionsApiFp(configuration).getTransactions(budget_id, since_date, type, last_knowledge_of_server, options)();
|
|
3381
|
+
return (0, exports.TransactionsApiFp)(configuration).getTransactions(budget_id, since_date, type, last_knowledge_of_server, options)();
|
|
3070
3382
|
},
|
|
3071
3383
|
/**
|
|
3072
3384
|
* Returns all transactions for a specified account
|
|
@@ -3080,7 +3392,7 @@ exports.TransactionsApiFactory = function (configuration) {
|
|
|
3080
3392
|
* @throws {RequiredError}
|
|
3081
3393
|
*/
|
|
3082
3394
|
getTransactionsByAccount(budget_id, account_id, since_date, type, last_knowledge_of_server, options) {
|
|
3083
|
-
return exports.TransactionsApiFp(configuration).getTransactionsByAccount(budget_id, account_id, since_date, type, last_knowledge_of_server, options)();
|
|
3395
|
+
return (0, exports.TransactionsApiFp)(configuration).getTransactionsByAccount(budget_id, account_id, since_date, type, last_knowledge_of_server, options)();
|
|
3084
3396
|
},
|
|
3085
3397
|
/**
|
|
3086
3398
|
* Returns all transactions for a specified category
|
|
@@ -3094,7 +3406,7 @@ exports.TransactionsApiFactory = function (configuration) {
|
|
|
3094
3406
|
* @throws {RequiredError}
|
|
3095
3407
|
*/
|
|
3096
3408
|
getTransactionsByCategory(budget_id, category_id, since_date, type, last_knowledge_of_server, options) {
|
|
3097
|
-
return exports.TransactionsApiFp(configuration).getTransactionsByCategory(budget_id, category_id, since_date, type, last_knowledge_of_server, options)();
|
|
3409
|
+
return (0, exports.TransactionsApiFp)(configuration).getTransactionsByCategory(budget_id, category_id, since_date, type, last_knowledge_of_server, options)();
|
|
3098
3410
|
},
|
|
3099
3411
|
/**
|
|
3100
3412
|
* Returns all transactions for a specified payee
|
|
@@ -3108,7 +3420,7 @@ exports.TransactionsApiFactory = function (configuration) {
|
|
|
3108
3420
|
* @throws {RequiredError}
|
|
3109
3421
|
*/
|
|
3110
3422
|
getTransactionsByPayee(budget_id, payee_id, since_date, type, last_knowledge_of_server, options) {
|
|
3111
|
-
return exports.TransactionsApiFp(configuration).getTransactionsByPayee(budget_id, payee_id, since_date, type, last_knowledge_of_server, options)();
|
|
3423
|
+
return (0, exports.TransactionsApiFp)(configuration).getTransactionsByPayee(budget_id, payee_id, since_date, type, last_knowledge_of_server, options)();
|
|
3112
3424
|
},
|
|
3113
3425
|
/**
|
|
3114
3426
|
* Imports available transactions on all linked accounts for the given budget. Linked accounts allow transactions to be imported directly from a specified financial institution and this endpoint initiates that import. Sending a request to this endpoint is the equivalent of clicking \"Import\" on each account in the web application or tapping the \"New Transactions\" banner in the mobile applications. The response for this endpoint contains the transaction ids that have been imported.
|
|
@@ -3118,33 +3430,34 @@ exports.TransactionsApiFactory = function (configuration) {
|
|
|
3118
3430
|
* @throws {RequiredError}
|
|
3119
3431
|
*/
|
|
3120
3432
|
importTransactions(budget_id, options) {
|
|
3121
|
-
return exports.TransactionsApiFp(configuration).importTransactions(budget_id, options)();
|
|
3433
|
+
return (0, exports.TransactionsApiFp)(configuration).importTransactions(budget_id, options)();
|
|
3122
3434
|
},
|
|
3123
3435
|
/**
|
|
3124
3436
|
* Updates a single transaction
|
|
3125
3437
|
* @summary Updates an existing transaction
|
|
3126
3438
|
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
3127
3439
|
* @param {string} transaction_id - The id of the transaction
|
|
3128
|
-
* @param {
|
|
3440
|
+
* @param {PutTransactionWrapper} data - The transaction to update
|
|
3129
3441
|
* @param {*} [options] - Override http request options.
|
|
3130
3442
|
* @throws {RequiredError}
|
|
3131
3443
|
*/
|
|
3132
3444
|
updateTransaction(budget_id, transaction_id, data, options) {
|
|
3133
|
-
return exports.TransactionsApiFp(configuration).updateTransaction(budget_id, transaction_id, data, options)();
|
|
3445
|
+
return (0, exports.TransactionsApiFp)(configuration).updateTransaction(budget_id, transaction_id, data, options)();
|
|
3134
3446
|
},
|
|
3135
3447
|
/**
|
|
3136
3448
|
* Updates multiple transactions, by `id` or `import_id`.
|
|
3137
3449
|
* @summary Update multiple transactions
|
|
3138
3450
|
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
3139
|
-
* @param {
|
|
3451
|
+
* @param {PatchTransactionsWrapper} data - The transactions to update. Each transaction must have either an `id` or `import_id` specified. If `id` is specified as null an `import_id` value can be provided which will allow transaction(s) to be updated by their `import_id`. If an `id` is specified, it will always be used for lookup.
|
|
3140
3452
|
* @param {*} [options] - Override http request options.
|
|
3141
3453
|
* @throws {RequiredError}
|
|
3142
3454
|
*/
|
|
3143
3455
|
updateTransactions(budget_id, data, options) {
|
|
3144
|
-
return exports.TransactionsApiFp(configuration).updateTransactions(budget_id, data, options)();
|
|
3456
|
+
return (0, exports.TransactionsApiFp)(configuration).updateTransactions(budget_id, data, options)();
|
|
3145
3457
|
},
|
|
3146
3458
|
};
|
|
3147
3459
|
};
|
|
3460
|
+
exports.TransactionsApiFactory = TransactionsApiFactory;
|
|
3148
3461
|
/**
|
|
3149
3462
|
* TransactionsApi - object-oriented interface
|
|
3150
3463
|
* @export
|
|
@@ -3156,13 +3469,25 @@ class TransactionsApi extends BaseAPI {
|
|
|
3156
3469
|
* Creates a single transaction or multiple transactions. If you provide a body containing a `transaction` object, a single transaction will be created and if you provide a body containing a `transactions` array, multiple transactions will be created. Scheduled transactions cannot be created on this endpoint.
|
|
3157
3470
|
* @summary Create a single transaction or multiple transactions
|
|
3158
3471
|
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
3159
|
-
* @param {
|
|
3472
|
+
* @param {PostTransactionsWrapper} data - The transaction or transactions to create. To create a single transaction you can specify a value for the `transaction` object and to create multiple transactions you can specify an array of `transactions`. It is expected that you will only provide a value for one of these objects.
|
|
3160
3473
|
* @param {*} [options] - Override http request options.
|
|
3161
3474
|
* @throws {RequiredError}
|
|
3162
3475
|
* @memberof TransactionsApi
|
|
3163
3476
|
*/
|
|
3164
3477
|
createTransaction(budget_id, data, options) {
|
|
3165
|
-
return exports.TransactionsApiFp(this.configuration).createTransaction(budget_id, data, options)();
|
|
3478
|
+
return (0, exports.TransactionsApiFp)(this.configuration).createTransaction(budget_id, data, options)();
|
|
3479
|
+
}
|
|
3480
|
+
/**
|
|
3481
|
+
* Deletes a transaction
|
|
3482
|
+
* @summary Deletes an existing transaction
|
|
3483
|
+
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
3484
|
+
* @param {string} transaction_id - The id of the transaction
|
|
3485
|
+
* @param {*} [options] - Override http request options.
|
|
3486
|
+
* @throws {RequiredError}
|
|
3487
|
+
* @memberof TransactionsApi
|
|
3488
|
+
*/
|
|
3489
|
+
deleteTransaction(budget_id, transaction_id, options) {
|
|
3490
|
+
return (0, exports.TransactionsApiFp)(this.configuration).deleteTransaction(budget_id, transaction_id, options)();
|
|
3166
3491
|
}
|
|
3167
3492
|
/**
|
|
3168
3493
|
* Returns a single transaction
|
|
@@ -3174,7 +3499,7 @@ class TransactionsApi extends BaseAPI {
|
|
|
3174
3499
|
* @memberof TransactionsApi
|
|
3175
3500
|
*/
|
|
3176
3501
|
getTransactionById(budget_id, transaction_id, options) {
|
|
3177
|
-
return exports.TransactionsApiFp(this.configuration).getTransactionById(budget_id, transaction_id, options)();
|
|
3502
|
+
return (0, exports.TransactionsApiFp)(this.configuration).getTransactionById(budget_id, transaction_id, options)();
|
|
3178
3503
|
}
|
|
3179
3504
|
/**
|
|
3180
3505
|
* Returns budget transactions
|
|
@@ -3188,7 +3513,7 @@ class TransactionsApi extends BaseAPI {
|
|
|
3188
3513
|
* @memberof TransactionsApi
|
|
3189
3514
|
*/
|
|
3190
3515
|
getTransactions(budget_id, since_date, type, last_knowledge_of_server, options) {
|
|
3191
|
-
return exports.TransactionsApiFp(this.configuration).getTransactions(budget_id, since_date, type, last_knowledge_of_server, options)();
|
|
3516
|
+
return (0, exports.TransactionsApiFp)(this.configuration).getTransactions(budget_id, since_date, type, last_knowledge_of_server, options)();
|
|
3192
3517
|
}
|
|
3193
3518
|
/**
|
|
3194
3519
|
* Returns all transactions for a specified account
|
|
@@ -3203,7 +3528,7 @@ class TransactionsApi extends BaseAPI {
|
|
|
3203
3528
|
* @memberof TransactionsApi
|
|
3204
3529
|
*/
|
|
3205
3530
|
getTransactionsByAccount(budget_id, account_id, since_date, type, last_knowledge_of_server, options) {
|
|
3206
|
-
return exports.TransactionsApiFp(this.configuration).getTransactionsByAccount(budget_id, account_id, since_date, type, last_knowledge_of_server, options)();
|
|
3531
|
+
return (0, exports.TransactionsApiFp)(this.configuration).getTransactionsByAccount(budget_id, account_id, since_date, type, last_knowledge_of_server, options)();
|
|
3207
3532
|
}
|
|
3208
3533
|
/**
|
|
3209
3534
|
* Returns all transactions for a specified category
|
|
@@ -3218,7 +3543,7 @@ class TransactionsApi extends BaseAPI {
|
|
|
3218
3543
|
* @memberof TransactionsApi
|
|
3219
3544
|
*/
|
|
3220
3545
|
getTransactionsByCategory(budget_id, category_id, since_date, type, last_knowledge_of_server, options) {
|
|
3221
|
-
return exports.TransactionsApiFp(this.configuration).getTransactionsByCategory(budget_id, category_id, since_date, type, last_knowledge_of_server, options)();
|
|
3546
|
+
return (0, exports.TransactionsApiFp)(this.configuration).getTransactionsByCategory(budget_id, category_id, since_date, type, last_knowledge_of_server, options)();
|
|
3222
3547
|
}
|
|
3223
3548
|
/**
|
|
3224
3549
|
* Returns all transactions for a specified payee
|
|
@@ -3233,7 +3558,7 @@ class TransactionsApi extends BaseAPI {
|
|
|
3233
3558
|
* @memberof TransactionsApi
|
|
3234
3559
|
*/
|
|
3235
3560
|
getTransactionsByPayee(budget_id, payee_id, since_date, type, last_knowledge_of_server, options) {
|
|
3236
|
-
return exports.TransactionsApiFp(this.configuration).getTransactionsByPayee(budget_id, payee_id, since_date, type, last_knowledge_of_server, options)();
|
|
3561
|
+
return (0, exports.TransactionsApiFp)(this.configuration).getTransactionsByPayee(budget_id, payee_id, since_date, type, last_knowledge_of_server, options)();
|
|
3237
3562
|
}
|
|
3238
3563
|
/**
|
|
3239
3564
|
* Imports available transactions on all linked accounts for the given budget. Linked accounts allow transactions to be imported directly from a specified financial institution and this endpoint initiates that import. Sending a request to this endpoint is the equivalent of clicking \"Import\" on each account in the web application or tapping the \"New Transactions\" banner in the mobile applications. The response for this endpoint contains the transaction ids that have been imported.
|
|
@@ -3244,32 +3569,32 @@ class TransactionsApi extends BaseAPI {
|
|
|
3244
3569
|
* @memberof TransactionsApi
|
|
3245
3570
|
*/
|
|
3246
3571
|
importTransactions(budget_id, options) {
|
|
3247
|
-
return exports.TransactionsApiFp(this.configuration).importTransactions(budget_id, options)();
|
|
3572
|
+
return (0, exports.TransactionsApiFp)(this.configuration).importTransactions(budget_id, options)();
|
|
3248
3573
|
}
|
|
3249
3574
|
/**
|
|
3250
3575
|
* Updates a single transaction
|
|
3251
3576
|
* @summary Updates an existing transaction
|
|
3252
3577
|
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
3253
3578
|
* @param {string} transaction_id - The id of the transaction
|
|
3254
|
-
* @param {
|
|
3579
|
+
* @param {PutTransactionWrapper} data - The transaction to update
|
|
3255
3580
|
* @param {*} [options] - Override http request options.
|
|
3256
3581
|
* @throws {RequiredError}
|
|
3257
3582
|
* @memberof TransactionsApi
|
|
3258
3583
|
*/
|
|
3259
3584
|
updateTransaction(budget_id, transaction_id, data, options) {
|
|
3260
|
-
return exports.TransactionsApiFp(this.configuration).updateTransaction(budget_id, transaction_id, data, options)();
|
|
3585
|
+
return (0, exports.TransactionsApiFp)(this.configuration).updateTransaction(budget_id, transaction_id, data, options)();
|
|
3261
3586
|
}
|
|
3262
3587
|
/**
|
|
3263
3588
|
* Updates multiple transactions, by `id` or `import_id`.
|
|
3264
3589
|
* @summary Update multiple transactions
|
|
3265
3590
|
* @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
|
|
3266
|
-
* @param {
|
|
3591
|
+
* @param {PatchTransactionsWrapper} data - The transactions to update. Each transaction must have either an `id` or `import_id` specified. If `id` is specified as null an `import_id` value can be provided which will allow transaction(s) to be updated by their `import_id`. If an `id` is specified, it will always be used for lookup.
|
|
3267
3592
|
* @param {*} [options] - Override http request options.
|
|
3268
3593
|
* @throws {RequiredError}
|
|
3269
3594
|
* @memberof TransactionsApi
|
|
3270
3595
|
*/
|
|
3271
3596
|
updateTransactions(budget_id, data, options) {
|
|
3272
|
-
return exports.TransactionsApiFp(this.configuration).updateTransactions(budget_id, data, options)();
|
|
3597
|
+
return (0, exports.TransactionsApiFp)(this.configuration).updateTransactions(budget_id, data, options)();
|
|
3273
3598
|
}
|
|
3274
3599
|
}
|
|
3275
3600
|
exports.TransactionsApi = TransactionsApi;
|
|
@@ -3277,7 +3602,7 @@ exports.TransactionsApi = TransactionsApi;
|
|
|
3277
3602
|
* UserApi - fetch parameter creator
|
|
3278
3603
|
* @export
|
|
3279
3604
|
*/
|
|
3280
|
-
|
|
3605
|
+
const UserApiFetchParamCreator = function (configuration) {
|
|
3281
3606
|
return {
|
|
3282
3607
|
/**
|
|
3283
3608
|
* Returns authenticated user information
|
|
@@ -3287,7 +3612,8 @@ exports.UserApiFetchParamCreator = function (configuration) {
|
|
|
3287
3612
|
*/
|
|
3288
3613
|
getUser(options = {}) {
|
|
3289
3614
|
const localVarPath = `/user`;
|
|
3290
|
-
|
|
3615
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3616
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
3291
3617
|
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
3292
3618
|
const localVarHeaderParameter = {};
|
|
3293
3619
|
const localVarQueryParameter = {};
|
|
@@ -3298,22 +3624,28 @@ exports.UserApiFetchParamCreator = function (configuration) {
|
|
|
3298
3624
|
const localVarApiKeyValue = configuration.apiKey;
|
|
3299
3625
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
3300
3626
|
}
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3627
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
3628
|
+
for (const key in localVarQueryParameter) {
|
|
3629
|
+
query.set(key, localVarQueryParameter[key]);
|
|
3630
|
+
}
|
|
3631
|
+
for (const key in options.query) {
|
|
3632
|
+
query.set(key, options.query[key]);
|
|
3633
|
+
}
|
|
3634
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
3304
3635
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
3305
3636
|
return {
|
|
3306
|
-
url:
|
|
3637
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
3307
3638
|
options: localVarRequestOptions,
|
|
3308
3639
|
};
|
|
3309
3640
|
},
|
|
3310
3641
|
};
|
|
3311
3642
|
};
|
|
3643
|
+
exports.UserApiFetchParamCreator = UserApiFetchParamCreator;
|
|
3312
3644
|
/**
|
|
3313
3645
|
* UserApi - functional programming interface
|
|
3314
3646
|
* @export
|
|
3315
3647
|
*/
|
|
3316
|
-
|
|
3648
|
+
const UserApiFp = function (configuration) {
|
|
3317
3649
|
return {
|
|
3318
3650
|
/**
|
|
3319
3651
|
* Returns authenticated user information
|
|
@@ -3322,7 +3654,7 @@ exports.UserApiFp = function (configuration) {
|
|
|
3322
3654
|
* @throws {RequiredError}
|
|
3323
3655
|
*/
|
|
3324
3656
|
getUser(options) {
|
|
3325
|
-
const localVarFetchArgs = exports.UserApiFetchParamCreator(configuration).getUser(options);
|
|
3657
|
+
const localVarFetchArgs = (0, exports.UserApiFetchParamCreator)(configuration).getUser(options);
|
|
3326
3658
|
return (fetchFunction = fetch) => {
|
|
3327
3659
|
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
3328
3660
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -3340,11 +3672,12 @@ exports.UserApiFp = function (configuration) {
|
|
|
3340
3672
|
},
|
|
3341
3673
|
};
|
|
3342
3674
|
};
|
|
3675
|
+
exports.UserApiFp = UserApiFp;
|
|
3343
3676
|
/**
|
|
3344
3677
|
* UserApi - factory interface
|
|
3345
3678
|
* @export
|
|
3346
3679
|
*/
|
|
3347
|
-
|
|
3680
|
+
const UserApiFactory = function (configuration) {
|
|
3348
3681
|
return {
|
|
3349
3682
|
/**
|
|
3350
3683
|
* Returns authenticated user information
|
|
@@ -3353,10 +3686,11 @@ exports.UserApiFactory = function (configuration) {
|
|
|
3353
3686
|
* @throws {RequiredError}
|
|
3354
3687
|
*/
|
|
3355
3688
|
getUser(options) {
|
|
3356
|
-
return exports.UserApiFp(configuration).getUser(options)();
|
|
3689
|
+
return (0, exports.UserApiFp)(configuration).getUser(options)();
|
|
3357
3690
|
},
|
|
3358
3691
|
};
|
|
3359
3692
|
};
|
|
3693
|
+
exports.UserApiFactory = UserApiFactory;
|
|
3360
3694
|
/**
|
|
3361
3695
|
* UserApi - object-oriented interface
|
|
3362
3696
|
* @export
|
|
@@ -3372,7 +3706,7 @@ class UserApi extends BaseAPI {
|
|
|
3372
3706
|
* @memberof UserApi
|
|
3373
3707
|
*/
|
|
3374
3708
|
getUser(options) {
|
|
3375
|
-
return exports.UserApiFp(this.configuration).getUser(options)();
|
|
3709
|
+
return (0, exports.UserApiFp)(this.configuration).getUser(options)();
|
|
3376
3710
|
}
|
|
3377
3711
|
}
|
|
3378
3712
|
exports.UserApi = UserApi;
|