ynab 1.42.0 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -32
- 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 +3 -4
package/dist/esm/api.js
CHANGED
|
@@ -14,10 +14,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
var extendStatics = function (d, b) {
|
|
15
15
|
extendStatics = Object.setPrototypeOf ||
|
|
16
16
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
17
|
-
function (d, b) { for (var p in b) if (
|
|
17
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
18
18
|
return extendStatics(d, b);
|
|
19
19
|
};
|
|
20
20
|
return function (d, b) {
|
|
21
|
+
if (typeof b !== "function" && b !== null)
|
|
22
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
21
23
|
extendStatics(d, b);
|
|
22
24
|
function __() { this.constructor = d; }
|
|
23
25
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -67,8 +69,7 @@ if (!globalThis.fetch) {
|
|
|
67
69
|
globalThis.Headers = fetchPonyfill.Headers;
|
|
68
70
|
globalThis.Request = fetchPonyfill.Request;
|
|
69
71
|
}
|
|
70
|
-
|
|
71
|
-
var USER_AGENT = "api_client/js/1.32.0";
|
|
72
|
+
var USER_AGENT = "api_client/js/1.42.0";
|
|
72
73
|
function convertDateToFullDateStringFormat(date) {
|
|
73
74
|
// Convert to RFC 3339 "full-date" format, like "2017-11-27"
|
|
74
75
|
if (date instanceof Date) {
|
|
@@ -161,10 +162,10 @@ export var Category;
|
|
|
161
162
|
})(Category || (Category = {}));
|
|
162
163
|
/**
|
|
163
164
|
* @export
|
|
164
|
-
* @namespace
|
|
165
|
+
* @namespace SaveTransactionWithOptionalFields
|
|
165
166
|
*/
|
|
166
|
-
export var
|
|
167
|
-
(function (
|
|
167
|
+
export var SaveTransactionWithOptionalFields;
|
|
168
|
+
(function (SaveTransactionWithOptionalFields) {
|
|
168
169
|
/**
|
|
169
170
|
* @export
|
|
170
171
|
* @enum {string}
|
|
@@ -174,7 +175,7 @@ export var SaveTransaction;
|
|
|
174
175
|
ClearedEnum[ClearedEnum["Cleared"] = 'cleared'] = "Cleared";
|
|
175
176
|
ClearedEnum[ClearedEnum["Uncleared"] = 'uncleared'] = "Uncleared";
|
|
176
177
|
ClearedEnum[ClearedEnum["Reconciled"] = 'reconciled'] = "Reconciled";
|
|
177
|
-
})(ClearedEnum =
|
|
178
|
+
})(ClearedEnum = SaveTransactionWithOptionalFields.ClearedEnum || (SaveTransactionWithOptionalFields.ClearedEnum = {}));
|
|
178
179
|
/**
|
|
179
180
|
* @export
|
|
180
181
|
* @enum {string}
|
|
@@ -187,8 +188,8 @@ export var SaveTransaction;
|
|
|
187
188
|
FlagColorEnum[FlagColorEnum["Green"] = 'green'] = "Green";
|
|
188
189
|
FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue";
|
|
189
190
|
FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple";
|
|
190
|
-
})(FlagColorEnum =
|
|
191
|
-
})(
|
|
191
|
+
})(FlagColorEnum = SaveTransactionWithOptionalFields.FlagColorEnum || (SaveTransactionWithOptionalFields.FlagColorEnum = {}));
|
|
192
|
+
})(SaveTransactionWithOptionalFields || (SaveTransactionWithOptionalFields = {}));
|
|
192
193
|
/**
|
|
193
194
|
* @export
|
|
194
195
|
* @namespace ScheduledTransactionSummary
|
|
@@ -298,6 +299,66 @@ export var HybridTransaction;
|
|
|
298
299
|
TypeEnum[TypeEnum["Subtransaction"] = 'subtransaction'] = "Subtransaction";
|
|
299
300
|
})(TypeEnum = HybridTransaction.TypeEnum || (HybridTransaction.TypeEnum = {}));
|
|
300
301
|
})(HybridTransaction || (HybridTransaction = {}));
|
|
302
|
+
/**
|
|
303
|
+
* @export
|
|
304
|
+
* @namespace SaveTransaction
|
|
305
|
+
*/
|
|
306
|
+
export var SaveTransaction;
|
|
307
|
+
(function (SaveTransaction) {
|
|
308
|
+
/**
|
|
309
|
+
* @export
|
|
310
|
+
* @enum {string}
|
|
311
|
+
*/
|
|
312
|
+
var ClearedEnum;
|
|
313
|
+
(function (ClearedEnum) {
|
|
314
|
+
ClearedEnum[ClearedEnum["Cleared"] = 'cleared'] = "Cleared";
|
|
315
|
+
ClearedEnum[ClearedEnum["Uncleared"] = 'uncleared'] = "Uncleared";
|
|
316
|
+
ClearedEnum[ClearedEnum["Reconciled"] = 'reconciled'] = "Reconciled";
|
|
317
|
+
})(ClearedEnum = SaveTransaction.ClearedEnum || (SaveTransaction.ClearedEnum = {}));
|
|
318
|
+
/**
|
|
319
|
+
* @export
|
|
320
|
+
* @enum {string}
|
|
321
|
+
*/
|
|
322
|
+
var FlagColorEnum;
|
|
323
|
+
(function (FlagColorEnum) {
|
|
324
|
+
FlagColorEnum[FlagColorEnum["Red"] = 'red'] = "Red";
|
|
325
|
+
FlagColorEnum[FlagColorEnum["Orange"] = 'orange'] = "Orange";
|
|
326
|
+
FlagColorEnum[FlagColorEnum["Yellow"] = 'yellow'] = "Yellow";
|
|
327
|
+
FlagColorEnum[FlagColorEnum["Green"] = 'green'] = "Green";
|
|
328
|
+
FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue";
|
|
329
|
+
FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple";
|
|
330
|
+
})(FlagColorEnum = SaveTransaction.FlagColorEnum || (SaveTransaction.FlagColorEnum = {}));
|
|
331
|
+
})(SaveTransaction || (SaveTransaction = {}));
|
|
332
|
+
/**
|
|
333
|
+
* @export
|
|
334
|
+
* @namespace SaveTransactionWithId
|
|
335
|
+
*/
|
|
336
|
+
export var SaveTransactionWithId;
|
|
337
|
+
(function (SaveTransactionWithId) {
|
|
338
|
+
/**
|
|
339
|
+
* @export
|
|
340
|
+
* @enum {string}
|
|
341
|
+
*/
|
|
342
|
+
var ClearedEnum;
|
|
343
|
+
(function (ClearedEnum) {
|
|
344
|
+
ClearedEnum[ClearedEnum["Cleared"] = 'cleared'] = "Cleared";
|
|
345
|
+
ClearedEnum[ClearedEnum["Uncleared"] = 'uncleared'] = "Uncleared";
|
|
346
|
+
ClearedEnum[ClearedEnum["Reconciled"] = 'reconciled'] = "Reconciled";
|
|
347
|
+
})(ClearedEnum = SaveTransactionWithId.ClearedEnum || (SaveTransactionWithId.ClearedEnum = {}));
|
|
348
|
+
/**
|
|
349
|
+
* @export
|
|
350
|
+
* @enum {string}
|
|
351
|
+
*/
|
|
352
|
+
var FlagColorEnum;
|
|
353
|
+
(function (FlagColorEnum) {
|
|
354
|
+
FlagColorEnum[FlagColorEnum["Red"] = 'red'] = "Red";
|
|
355
|
+
FlagColorEnum[FlagColorEnum["Orange"] = 'orange'] = "Orange";
|
|
356
|
+
FlagColorEnum[FlagColorEnum["Yellow"] = 'yellow'] = "Yellow";
|
|
357
|
+
FlagColorEnum[FlagColorEnum["Green"] = 'green'] = "Green";
|
|
358
|
+
FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue";
|
|
359
|
+
FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple";
|
|
360
|
+
})(FlagColorEnum = SaveTransactionWithId.FlagColorEnum || (SaveTransactionWithId.FlagColorEnum = {}));
|
|
361
|
+
})(SaveTransactionWithId || (SaveTransactionWithId = {}));
|
|
301
362
|
/**
|
|
302
363
|
* @export
|
|
303
364
|
* @namespace ScheduledTransactionDetail
|
|
@@ -368,36 +429,6 @@ export var TransactionDetail;
|
|
|
368
429
|
FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple";
|
|
369
430
|
})(FlagColorEnum = TransactionDetail.FlagColorEnum || (TransactionDetail.FlagColorEnum = {}));
|
|
370
431
|
})(TransactionDetail || (TransactionDetail = {}));
|
|
371
|
-
/**
|
|
372
|
-
* @export
|
|
373
|
-
* @namespace UpdateTransaction
|
|
374
|
-
*/
|
|
375
|
-
export var UpdateTransaction;
|
|
376
|
-
(function (UpdateTransaction) {
|
|
377
|
-
/**
|
|
378
|
-
* @export
|
|
379
|
-
* @enum {string}
|
|
380
|
-
*/
|
|
381
|
-
var ClearedEnum;
|
|
382
|
-
(function (ClearedEnum) {
|
|
383
|
-
ClearedEnum[ClearedEnum["Cleared"] = 'cleared'] = "Cleared";
|
|
384
|
-
ClearedEnum[ClearedEnum["Uncleared"] = 'uncleared'] = "Uncleared";
|
|
385
|
-
ClearedEnum[ClearedEnum["Reconciled"] = 'reconciled'] = "Reconciled";
|
|
386
|
-
})(ClearedEnum = UpdateTransaction.ClearedEnum || (UpdateTransaction.ClearedEnum = {}));
|
|
387
|
-
/**
|
|
388
|
-
* @export
|
|
389
|
-
* @enum {string}
|
|
390
|
-
*/
|
|
391
|
-
var FlagColorEnum;
|
|
392
|
-
(function (FlagColorEnum) {
|
|
393
|
-
FlagColorEnum[FlagColorEnum["Red"] = 'red'] = "Red";
|
|
394
|
-
FlagColorEnum[FlagColorEnum["Orange"] = 'orange'] = "Orange";
|
|
395
|
-
FlagColorEnum[FlagColorEnum["Yellow"] = 'yellow'] = "Yellow";
|
|
396
|
-
FlagColorEnum[FlagColorEnum["Green"] = 'green'] = "Green";
|
|
397
|
-
FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue";
|
|
398
|
-
FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple";
|
|
399
|
-
})(FlagColorEnum = UpdateTransaction.FlagColorEnum || (UpdateTransaction.FlagColorEnum = {}));
|
|
400
|
-
})(UpdateTransaction || (UpdateTransaction = {}));
|
|
401
432
|
/**
|
|
402
433
|
* AccountsApi - fetch parameter creator
|
|
403
434
|
* @export
|
|
@@ -408,7 +439,7 @@ export var AccountsApiFetchParamCreator = function (configuration) {
|
|
|
408
439
|
* Creates a new account
|
|
409
440
|
* @summary Create a new account
|
|
410
441
|
* @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)
|
|
411
|
-
* @param {
|
|
442
|
+
* @param {PostAccountWrapper} data - The account to create.
|
|
412
443
|
* @param {*} [options] - Override http request options.
|
|
413
444
|
* @throws {RequiredError}
|
|
414
445
|
*/
|
|
@@ -423,8 +454,9 @@ export var AccountsApiFetchParamCreator = function (configuration) {
|
|
|
423
454
|
throw new RequiredError('data', 'Required parameter data was null or undefined when calling createAccount.');
|
|
424
455
|
}
|
|
425
456
|
var localVarPath = "/budgets/{budget_id}/accounts"
|
|
426
|
-
.replace("{"
|
|
427
|
-
|
|
457
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)));
|
|
458
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
459
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
428
460
|
var localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
429
461
|
var localVarHeaderParameter = {};
|
|
430
462
|
var localVarQueryParameter = {};
|
|
@@ -436,13 +468,18 @@ export var AccountsApiFetchParamCreator = function (configuration) {
|
|
|
436
468
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
437
469
|
}
|
|
438
470
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
471
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
472
|
+
for (var key in localVarQueryParameter) {
|
|
473
|
+
query.set(key, localVarQueryParameter[key]);
|
|
474
|
+
}
|
|
475
|
+
for (var key in options.query) {
|
|
476
|
+
query.set(key, options.query[key]);
|
|
477
|
+
}
|
|
478
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
442
479
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
443
480
|
localVarRequestOptions.body = JSON.stringify(data || {});
|
|
444
481
|
return {
|
|
445
|
-
url:
|
|
482
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
446
483
|
options: localVarRequestOptions,
|
|
447
484
|
};
|
|
448
485
|
},
|
|
@@ -465,9 +502,10 @@ export var AccountsApiFetchParamCreator = function (configuration) {
|
|
|
465
502
|
throw new RequiredError('account_id', 'Required parameter account_id was null or undefined when calling getAccountById.');
|
|
466
503
|
}
|
|
467
504
|
var localVarPath = "/budgets/{budget_id}/accounts/{account_id}"
|
|
468
|
-
.replace("{"
|
|
469
|
-
.replace("{"
|
|
470
|
-
|
|
505
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)))
|
|
506
|
+
.replace("{".concat("account_id", "}"), encodeURIComponent(String(account_id)));
|
|
507
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
508
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
471
509
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
472
510
|
var localVarHeaderParameter = {};
|
|
473
511
|
var localVarQueryParameter = {};
|
|
@@ -478,12 +516,17 @@ export var AccountsApiFetchParamCreator = function (configuration) {
|
|
|
478
516
|
var localVarApiKeyValue = configuration.apiKey;
|
|
479
517
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
480
518
|
}
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
519
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
520
|
+
for (var key in localVarQueryParameter) {
|
|
521
|
+
query.set(key, localVarQueryParameter[key]);
|
|
522
|
+
}
|
|
523
|
+
for (var key in options.query) {
|
|
524
|
+
query.set(key, options.query[key]);
|
|
525
|
+
}
|
|
526
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
484
527
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
485
528
|
return {
|
|
486
|
-
url:
|
|
529
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
487
530
|
options: localVarRequestOptions,
|
|
488
531
|
};
|
|
489
532
|
},
|
|
@@ -502,8 +545,9 @@ export var AccountsApiFetchParamCreator = function (configuration) {
|
|
|
502
545
|
throw new RequiredError('budget_id', 'Required parameter budget_id was null or undefined when calling getAccounts.');
|
|
503
546
|
}
|
|
504
547
|
var localVarPath = "/budgets/{budget_id}/accounts"
|
|
505
|
-
.replace("{"
|
|
506
|
-
|
|
548
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)));
|
|
549
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
550
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
507
551
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
508
552
|
var localVarHeaderParameter = {};
|
|
509
553
|
var localVarQueryParameter = {};
|
|
@@ -517,12 +561,17 @@ export var AccountsApiFetchParamCreator = function (configuration) {
|
|
|
517
561
|
if (last_knowledge_of_server !== undefined) {
|
|
518
562
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
519
563
|
}
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
564
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
565
|
+
for (var key in localVarQueryParameter) {
|
|
566
|
+
query.set(key, localVarQueryParameter[key]);
|
|
567
|
+
}
|
|
568
|
+
for (var key in options.query) {
|
|
569
|
+
query.set(key, options.query[key]);
|
|
570
|
+
}
|
|
571
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
523
572
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
524
573
|
return {
|
|
525
|
-
url:
|
|
574
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
526
575
|
options: localVarRequestOptions,
|
|
527
576
|
};
|
|
528
577
|
},
|
|
@@ -538,7 +587,7 @@ export var AccountsApiFp = function (configuration) {
|
|
|
538
587
|
* Creates a new account
|
|
539
588
|
* @summary Create a new account
|
|
540
589
|
* @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)
|
|
541
|
-
* @param {
|
|
590
|
+
* @param {PostAccountWrapper} data - The account to create.
|
|
542
591
|
* @param {*} [options] - Override http request options.
|
|
543
592
|
* @throws {RequiredError}
|
|
544
593
|
*/
|
|
@@ -642,7 +691,7 @@ export var AccountsApiFactory = function (configuration) {
|
|
|
642
691
|
* Creates a new account
|
|
643
692
|
* @summary Create a new account
|
|
644
693
|
* @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)
|
|
645
|
-
* @param {
|
|
694
|
+
* @param {PostAccountWrapper} data - The account to create.
|
|
646
695
|
* @param {*} [options] - Override http request options.
|
|
647
696
|
* @throws {RequiredError}
|
|
648
697
|
*/
|
|
@@ -688,7 +737,7 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
688
737
|
* Creates a new account
|
|
689
738
|
* @summary Create a new account
|
|
690
739
|
* @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)
|
|
691
|
-
* @param {
|
|
740
|
+
* @param {PostAccountWrapper} data - The account to create.
|
|
692
741
|
* @param {*} [options] - Override http request options.
|
|
693
742
|
* @throws {RequiredError}
|
|
694
743
|
* @memberof AccountsApi
|
|
@@ -744,8 +793,9 @@ export var BudgetsApiFetchParamCreator = function (configuration) {
|
|
|
744
793
|
throw new RequiredError('budget_id', 'Required parameter budget_id was null or undefined when calling getBudgetById.');
|
|
745
794
|
}
|
|
746
795
|
var localVarPath = "/budgets/{budget_id}"
|
|
747
|
-
.replace("{"
|
|
748
|
-
|
|
796
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)));
|
|
797
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
798
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
749
799
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
750
800
|
var localVarHeaderParameter = {};
|
|
751
801
|
var localVarQueryParameter = {};
|
|
@@ -759,12 +809,17 @@ export var BudgetsApiFetchParamCreator = function (configuration) {
|
|
|
759
809
|
if (last_knowledge_of_server !== undefined) {
|
|
760
810
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
761
811
|
}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
812
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
813
|
+
for (var key in localVarQueryParameter) {
|
|
814
|
+
query.set(key, localVarQueryParameter[key]);
|
|
815
|
+
}
|
|
816
|
+
for (var key in options.query) {
|
|
817
|
+
query.set(key, options.query[key]);
|
|
818
|
+
}
|
|
819
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
765
820
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
766
821
|
return {
|
|
767
|
-
url:
|
|
822
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
768
823
|
options: localVarRequestOptions,
|
|
769
824
|
};
|
|
770
825
|
},
|
|
@@ -782,8 +837,9 @@ export var BudgetsApiFetchParamCreator = function (configuration) {
|
|
|
782
837
|
throw new RequiredError('budget_id', 'Required parameter budget_id was null or undefined when calling getBudgetSettingsById.');
|
|
783
838
|
}
|
|
784
839
|
var localVarPath = "/budgets/{budget_id}/settings"
|
|
785
|
-
.replace("{"
|
|
786
|
-
|
|
840
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)));
|
|
841
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
842
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
787
843
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
788
844
|
var localVarHeaderParameter = {};
|
|
789
845
|
var localVarQueryParameter = {};
|
|
@@ -794,12 +850,17 @@ export var BudgetsApiFetchParamCreator = function (configuration) {
|
|
|
794
850
|
var localVarApiKeyValue = configuration.apiKey;
|
|
795
851
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
796
852
|
}
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
853
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
854
|
+
for (var key in localVarQueryParameter) {
|
|
855
|
+
query.set(key, localVarQueryParameter[key]);
|
|
856
|
+
}
|
|
857
|
+
for (var key in options.query) {
|
|
858
|
+
query.set(key, options.query[key]);
|
|
859
|
+
}
|
|
860
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
800
861
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
801
862
|
return {
|
|
802
|
-
url:
|
|
863
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
803
864
|
options: localVarRequestOptions,
|
|
804
865
|
};
|
|
805
866
|
},
|
|
@@ -813,7 +874,8 @@ export var BudgetsApiFetchParamCreator = function (configuration) {
|
|
|
813
874
|
getBudgets: function (include_accounts, options) {
|
|
814
875
|
if (options === void 0) { options = {}; }
|
|
815
876
|
var localVarPath = "/budgets";
|
|
816
|
-
|
|
877
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
878
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
817
879
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
818
880
|
var localVarHeaderParameter = {};
|
|
819
881
|
var localVarQueryParameter = {};
|
|
@@ -827,12 +889,17 @@ export var BudgetsApiFetchParamCreator = function (configuration) {
|
|
|
827
889
|
if (include_accounts !== undefined) {
|
|
828
890
|
localVarQueryParameter['include_accounts'] = include_accounts;
|
|
829
891
|
}
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
892
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
893
|
+
for (var key in localVarQueryParameter) {
|
|
894
|
+
query.set(key, localVarQueryParameter[key]);
|
|
895
|
+
}
|
|
896
|
+
for (var key in options.query) {
|
|
897
|
+
query.set(key, options.query[key]);
|
|
898
|
+
}
|
|
899
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
833
900
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
834
901
|
return {
|
|
835
|
-
url:
|
|
902
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
836
903
|
options: localVarRequestOptions,
|
|
837
904
|
};
|
|
838
905
|
},
|
|
@@ -1048,8 +1115,9 @@ export var CategoriesApiFetchParamCreator = function (configuration) {
|
|
|
1048
1115
|
throw new RequiredError('budget_id', 'Required parameter budget_id was null or undefined when calling getCategories.');
|
|
1049
1116
|
}
|
|
1050
1117
|
var localVarPath = "/budgets/{budget_id}/categories"
|
|
1051
|
-
.replace("{"
|
|
1052
|
-
|
|
1118
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)));
|
|
1119
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1120
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1053
1121
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1054
1122
|
var localVarHeaderParameter = {};
|
|
1055
1123
|
var localVarQueryParameter = {};
|
|
@@ -1063,12 +1131,17 @@ export var CategoriesApiFetchParamCreator = function (configuration) {
|
|
|
1063
1131
|
if (last_knowledge_of_server !== undefined) {
|
|
1064
1132
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
1065
1133
|
}
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1134
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
1135
|
+
for (var key in localVarQueryParameter) {
|
|
1136
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1137
|
+
}
|
|
1138
|
+
for (var key in options.query) {
|
|
1139
|
+
query.set(key, options.query[key]);
|
|
1140
|
+
}
|
|
1141
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1069
1142
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1070
1143
|
return {
|
|
1071
|
-
url:
|
|
1144
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1072
1145
|
options: localVarRequestOptions,
|
|
1073
1146
|
};
|
|
1074
1147
|
},
|
|
@@ -1091,9 +1164,10 @@ export var CategoriesApiFetchParamCreator = function (configuration) {
|
|
|
1091
1164
|
throw new RequiredError('category_id', 'Required parameter category_id was null or undefined when calling getCategoryById.');
|
|
1092
1165
|
}
|
|
1093
1166
|
var localVarPath = "/budgets/{budget_id}/categories/{category_id}"
|
|
1094
|
-
.replace("{"
|
|
1095
|
-
.replace("{"
|
|
1096
|
-
|
|
1167
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)))
|
|
1168
|
+
.replace("{".concat("category_id", "}"), encodeURIComponent(String(category_id)));
|
|
1169
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1170
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1097
1171
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1098
1172
|
var localVarHeaderParameter = {};
|
|
1099
1173
|
var localVarQueryParameter = {};
|
|
@@ -1104,12 +1178,17 @@ export var CategoriesApiFetchParamCreator = function (configuration) {
|
|
|
1104
1178
|
var localVarApiKeyValue = configuration.apiKey;
|
|
1105
1179
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
1106
1180
|
}
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1181
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
1182
|
+
for (var key in localVarQueryParameter) {
|
|
1183
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1184
|
+
}
|
|
1185
|
+
for (var key in options.query) {
|
|
1186
|
+
query.set(key, options.query[key]);
|
|
1187
|
+
}
|
|
1188
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1110
1189
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1111
1190
|
return {
|
|
1112
|
-
url:
|
|
1191
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1113
1192
|
options: localVarRequestOptions,
|
|
1114
1193
|
};
|
|
1115
1194
|
},
|
|
@@ -1137,10 +1216,11 @@ export var CategoriesApiFetchParamCreator = function (configuration) {
|
|
|
1137
1216
|
throw new RequiredError('category_id', 'Required parameter category_id was null or undefined when calling getMonthCategoryById.');
|
|
1138
1217
|
}
|
|
1139
1218
|
var localVarPath = "/budgets/{budget_id}/months/{month}/categories/{category_id}"
|
|
1140
|
-
.replace("{"
|
|
1141
|
-
.replace("{"
|
|
1142
|
-
.replace("{"
|
|
1143
|
-
|
|
1219
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)))
|
|
1220
|
+
.replace("{".concat("month", "}"), encodeURIComponent(convertDateToFullDateStringFormat(month)))
|
|
1221
|
+
.replace("{".concat("category_id", "}"), encodeURIComponent(String(category_id)));
|
|
1222
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1223
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1144
1224
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1145
1225
|
var localVarHeaderParameter = {};
|
|
1146
1226
|
var localVarQueryParameter = {};
|
|
@@ -1151,12 +1231,17 @@ export var CategoriesApiFetchParamCreator = function (configuration) {
|
|
|
1151
1231
|
var localVarApiKeyValue = configuration.apiKey;
|
|
1152
1232
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
1153
1233
|
}
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1234
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
1235
|
+
for (var key in localVarQueryParameter) {
|
|
1236
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1237
|
+
}
|
|
1238
|
+
for (var key in options.query) {
|
|
1239
|
+
query.set(key, options.query[key]);
|
|
1240
|
+
}
|
|
1241
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1157
1242
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1158
1243
|
return {
|
|
1159
|
-
url:
|
|
1244
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1160
1245
|
options: localVarRequestOptions,
|
|
1161
1246
|
};
|
|
1162
1247
|
},
|
|
@@ -1166,7 +1251,7 @@ export var CategoriesApiFetchParamCreator = function (configuration) {
|
|
|
1166
1251
|
* @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).
|
|
1167
1252
|
* @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))
|
|
1168
1253
|
* @param {string} category_id - The id of the category
|
|
1169
|
-
* @param {
|
|
1254
|
+
* @param {PatchMonthCategoryWrapper} data - The category to update. Only `budgeted` amount can be updated and any other fields specified will be ignored.
|
|
1170
1255
|
* @param {*} [options] - Override http request options.
|
|
1171
1256
|
* @throws {RequiredError}
|
|
1172
1257
|
*/
|
|
@@ -1189,10 +1274,11 @@ export var CategoriesApiFetchParamCreator = function (configuration) {
|
|
|
1189
1274
|
throw new RequiredError('data', 'Required parameter data was null or undefined when calling updateMonthCategory.');
|
|
1190
1275
|
}
|
|
1191
1276
|
var localVarPath = "/budgets/{budget_id}/months/{month}/categories/{category_id}"
|
|
1192
|
-
.replace("{"
|
|
1193
|
-
.replace("{"
|
|
1194
|
-
.replace("{"
|
|
1195
|
-
|
|
1277
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)))
|
|
1278
|
+
.replace("{".concat("month", "}"), encodeURIComponent(convertDateToFullDateStringFormat(month)))
|
|
1279
|
+
.replace("{".concat("category_id", "}"), encodeURIComponent(String(category_id)));
|
|
1280
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1281
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1196
1282
|
var localVarRequestOptions = Object.assign({ method: 'PATCH' }, options);
|
|
1197
1283
|
var localVarHeaderParameter = {};
|
|
1198
1284
|
var localVarQueryParameter = {};
|
|
@@ -1204,13 +1290,18 @@ export var CategoriesApiFetchParamCreator = function (configuration) {
|
|
|
1204
1290
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
1205
1291
|
}
|
|
1206
1292
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1293
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
1294
|
+
for (var key in localVarQueryParameter) {
|
|
1295
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1296
|
+
}
|
|
1297
|
+
for (var key in options.query) {
|
|
1298
|
+
query.set(key, options.query[key]);
|
|
1299
|
+
}
|
|
1300
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1210
1301
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1211
1302
|
localVarRequestOptions.body = JSON.stringify(data || {});
|
|
1212
1303
|
return {
|
|
1213
|
-
url:
|
|
1304
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1214
1305
|
options: localVarRequestOptions,
|
|
1215
1306
|
};
|
|
1216
1307
|
},
|
|
@@ -1325,7 +1416,7 @@ export var CategoriesApiFp = function (configuration) {
|
|
|
1325
1416
|
* @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).
|
|
1326
1417
|
* @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))
|
|
1327
1418
|
* @param {string} category_id - The id of the category
|
|
1328
|
-
* @param {
|
|
1419
|
+
* @param {PatchMonthCategoryWrapper} data - The category to update. Only `budgeted` amount can be updated and any other fields specified will be ignored.
|
|
1329
1420
|
* @param {*} [options] - Override http request options.
|
|
1330
1421
|
* @throws {RequiredError}
|
|
1331
1422
|
*/
|
|
@@ -1401,7 +1492,7 @@ export var CategoriesApiFactory = function (configuration) {
|
|
|
1401
1492
|
* @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).
|
|
1402
1493
|
* @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))
|
|
1403
1494
|
* @param {string} category_id - The id of the category
|
|
1404
|
-
* @param {
|
|
1495
|
+
* @param {PatchMonthCategoryWrapper} data - The category to update. Only `budgeted` amount can be updated and any other fields specified will be ignored.
|
|
1405
1496
|
* @param {*} [options] - Override http request options.
|
|
1406
1497
|
* @throws {RequiredError}
|
|
1407
1498
|
*/
|
|
@@ -1464,7 +1555,7 @@ var CategoriesApi = /** @class */ (function (_super) {
|
|
|
1464
1555
|
* @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).
|
|
1465
1556
|
* @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))
|
|
1466
1557
|
* @param {string} category_id - The id of the category
|
|
1467
|
-
* @param {
|
|
1558
|
+
* @param {PatchMonthCategoryWrapper} data - The category to update. Only `budgeted` amount can be updated and any other fields specified will be ignored.
|
|
1468
1559
|
* @param {*} [options] - Override http request options.
|
|
1469
1560
|
* @throws {RequiredError}
|
|
1470
1561
|
* @memberof CategoriesApi
|
|
@@ -1500,8 +1591,9 @@ export var DeprecatedApiFetchParamCreator = function (configuration) {
|
|
|
1500
1591
|
throw new RequiredError('transactions', 'Required parameter transactions was null or undefined when calling bulkCreateTransactions.');
|
|
1501
1592
|
}
|
|
1502
1593
|
var localVarPath = "/budgets/{budget_id}/transactions/bulk"
|
|
1503
|
-
.replace("{"
|
|
1504
|
-
|
|
1594
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)));
|
|
1595
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1596
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1505
1597
|
var localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
1506
1598
|
var localVarHeaderParameter = {};
|
|
1507
1599
|
var localVarQueryParameter = {};
|
|
@@ -1513,13 +1605,18 @@ export var DeprecatedApiFetchParamCreator = function (configuration) {
|
|
|
1513
1605
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
1514
1606
|
}
|
|
1515
1607
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1608
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
1609
|
+
for (var key in localVarQueryParameter) {
|
|
1610
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1611
|
+
}
|
|
1612
|
+
for (var key in options.query) {
|
|
1613
|
+
query.set(key, options.query[key]);
|
|
1614
|
+
}
|
|
1615
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1519
1616
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1520
1617
|
localVarRequestOptions.body = JSON.stringify(transactions || {});
|
|
1521
1618
|
return {
|
|
1522
|
-
url:
|
|
1619
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1523
1620
|
options: localVarRequestOptions,
|
|
1524
1621
|
};
|
|
1525
1622
|
},
|
|
@@ -1635,9 +1732,10 @@ export var MonthsApiFetchParamCreator = function (configuration) {
|
|
|
1635
1732
|
throw new RequiredError('month', 'Required parameter month was null or undefined when calling getBudgetMonth.');
|
|
1636
1733
|
}
|
|
1637
1734
|
var localVarPath = "/budgets/{budget_id}/months/{month}"
|
|
1638
|
-
.replace("{"
|
|
1639
|
-
.replace("{"
|
|
1640
|
-
|
|
1735
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)))
|
|
1736
|
+
.replace("{".concat("month", "}"), encodeURIComponent(convertDateToFullDateStringFormat(month)));
|
|
1737
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1738
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1641
1739
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1642
1740
|
var localVarHeaderParameter = {};
|
|
1643
1741
|
var localVarQueryParameter = {};
|
|
@@ -1648,12 +1746,17 @@ export var MonthsApiFetchParamCreator = function (configuration) {
|
|
|
1648
1746
|
var localVarApiKeyValue = configuration.apiKey;
|
|
1649
1747
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
1650
1748
|
}
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1749
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
1750
|
+
for (var key in localVarQueryParameter) {
|
|
1751
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1752
|
+
}
|
|
1753
|
+
for (var key in options.query) {
|
|
1754
|
+
query.set(key, options.query[key]);
|
|
1755
|
+
}
|
|
1756
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1654
1757
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1655
1758
|
return {
|
|
1656
|
-
url:
|
|
1759
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1657
1760
|
options: localVarRequestOptions,
|
|
1658
1761
|
};
|
|
1659
1762
|
},
|
|
@@ -1672,8 +1775,9 @@ export var MonthsApiFetchParamCreator = function (configuration) {
|
|
|
1672
1775
|
throw new RequiredError('budget_id', 'Required parameter budget_id was null or undefined when calling getBudgetMonths.');
|
|
1673
1776
|
}
|
|
1674
1777
|
var localVarPath = "/budgets/{budget_id}/months"
|
|
1675
|
-
.replace("{"
|
|
1676
|
-
|
|
1778
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)));
|
|
1779
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1780
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1677
1781
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1678
1782
|
var localVarHeaderParameter = {};
|
|
1679
1783
|
var localVarQueryParameter = {};
|
|
@@ -1687,12 +1791,17 @@ export var MonthsApiFetchParamCreator = function (configuration) {
|
|
|
1687
1791
|
if (last_knowledge_of_server !== undefined) {
|
|
1688
1792
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
1689
1793
|
}
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1794
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
1795
|
+
for (var key in localVarQueryParameter) {
|
|
1796
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1797
|
+
}
|
|
1798
|
+
for (var key in options.query) {
|
|
1799
|
+
query.set(key, options.query[key]);
|
|
1800
|
+
}
|
|
1801
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1693
1802
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1694
1803
|
return {
|
|
1695
|
-
url:
|
|
1804
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1696
1805
|
options: localVarRequestOptions,
|
|
1697
1806
|
};
|
|
1698
1807
|
},
|
|
@@ -1863,9 +1972,10 @@ export var PayeeLocationsApiFetchParamCreator = function (configuration) {
|
|
|
1863
1972
|
throw new RequiredError('payee_location_id', 'Required parameter payee_location_id was null or undefined when calling getPayeeLocationById.');
|
|
1864
1973
|
}
|
|
1865
1974
|
var localVarPath = "/budgets/{budget_id}/payee_locations/{payee_location_id}"
|
|
1866
|
-
.replace("{"
|
|
1867
|
-
.replace("{"
|
|
1868
|
-
|
|
1975
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)))
|
|
1976
|
+
.replace("{".concat("payee_location_id", "}"), encodeURIComponent(String(payee_location_id)));
|
|
1977
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1978
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1869
1979
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1870
1980
|
var localVarHeaderParameter = {};
|
|
1871
1981
|
var localVarQueryParameter = {};
|
|
@@ -1876,12 +1986,17 @@ export var PayeeLocationsApiFetchParamCreator = function (configuration) {
|
|
|
1876
1986
|
var localVarApiKeyValue = configuration.apiKey;
|
|
1877
1987
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
1878
1988
|
}
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1989
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
1990
|
+
for (var key in localVarQueryParameter) {
|
|
1991
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1992
|
+
}
|
|
1993
|
+
for (var key in options.query) {
|
|
1994
|
+
query.set(key, options.query[key]);
|
|
1995
|
+
}
|
|
1996
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1882
1997
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1883
1998
|
return {
|
|
1884
|
-
url:
|
|
1999
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1885
2000
|
options: localVarRequestOptions,
|
|
1886
2001
|
};
|
|
1887
2002
|
},
|
|
@@ -1899,8 +2014,9 @@ export var PayeeLocationsApiFetchParamCreator = function (configuration) {
|
|
|
1899
2014
|
throw new RequiredError('budget_id', 'Required parameter budget_id was null or undefined when calling getPayeeLocations.');
|
|
1900
2015
|
}
|
|
1901
2016
|
var localVarPath = "/budgets/{budget_id}/payee_locations"
|
|
1902
|
-
.replace("{"
|
|
1903
|
-
|
|
2017
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)));
|
|
2018
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2019
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1904
2020
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1905
2021
|
var localVarHeaderParameter = {};
|
|
1906
2022
|
var localVarQueryParameter = {};
|
|
@@ -1911,12 +2027,17 @@ export var PayeeLocationsApiFetchParamCreator = function (configuration) {
|
|
|
1911
2027
|
var localVarApiKeyValue = configuration.apiKey;
|
|
1912
2028
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
1913
2029
|
}
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
2030
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
2031
|
+
for (var key in localVarQueryParameter) {
|
|
2032
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2033
|
+
}
|
|
2034
|
+
for (var key in options.query) {
|
|
2035
|
+
query.set(key, options.query[key]);
|
|
2036
|
+
}
|
|
2037
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1917
2038
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1918
2039
|
return {
|
|
1919
|
-
url:
|
|
2040
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1920
2041
|
options: localVarRequestOptions,
|
|
1921
2042
|
};
|
|
1922
2043
|
},
|
|
@@ -1939,9 +2060,10 @@ export var PayeeLocationsApiFetchParamCreator = function (configuration) {
|
|
|
1939
2060
|
throw new RequiredError('payee_id', 'Required parameter payee_id was null or undefined when calling getPayeeLocationsByPayee.');
|
|
1940
2061
|
}
|
|
1941
2062
|
var localVarPath = "/budgets/{budget_id}/payees/{payee_id}/payee_locations"
|
|
1942
|
-
.replace("{"
|
|
1943
|
-
.replace("{"
|
|
1944
|
-
|
|
2063
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)))
|
|
2064
|
+
.replace("{".concat("payee_id", "}"), encodeURIComponent(String(payee_id)));
|
|
2065
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2066
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1945
2067
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1946
2068
|
var localVarHeaderParameter = {};
|
|
1947
2069
|
var localVarQueryParameter = {};
|
|
@@ -1952,12 +2074,17 @@ export var PayeeLocationsApiFetchParamCreator = function (configuration) {
|
|
|
1952
2074
|
var localVarApiKeyValue = configuration.apiKey;
|
|
1953
2075
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
1954
2076
|
}
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
2077
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
2078
|
+
for (var key in localVarQueryParameter) {
|
|
2079
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2080
|
+
}
|
|
2081
|
+
for (var key in options.query) {
|
|
2082
|
+
query.set(key, options.query[key]);
|
|
2083
|
+
}
|
|
2084
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1958
2085
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1959
2086
|
return {
|
|
1960
|
-
url:
|
|
2087
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1961
2088
|
options: localVarRequestOptions,
|
|
1962
2089
|
};
|
|
1963
2090
|
},
|
|
@@ -2180,9 +2307,10 @@ export var PayeesApiFetchParamCreator = function (configuration) {
|
|
|
2180
2307
|
throw new RequiredError('payee_id', 'Required parameter payee_id was null or undefined when calling getPayeeById.');
|
|
2181
2308
|
}
|
|
2182
2309
|
var localVarPath = "/budgets/{budget_id}/payees/{payee_id}"
|
|
2183
|
-
.replace("{"
|
|
2184
|
-
.replace("{"
|
|
2185
|
-
|
|
2310
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)))
|
|
2311
|
+
.replace("{".concat("payee_id", "}"), encodeURIComponent(String(payee_id)));
|
|
2312
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2313
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2186
2314
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2187
2315
|
var localVarHeaderParameter = {};
|
|
2188
2316
|
var localVarQueryParameter = {};
|
|
@@ -2193,12 +2321,17 @@ export var PayeesApiFetchParamCreator = function (configuration) {
|
|
|
2193
2321
|
var localVarApiKeyValue = configuration.apiKey;
|
|
2194
2322
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
2195
2323
|
}
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2324
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
2325
|
+
for (var key in localVarQueryParameter) {
|
|
2326
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2327
|
+
}
|
|
2328
|
+
for (var key in options.query) {
|
|
2329
|
+
query.set(key, options.query[key]);
|
|
2330
|
+
}
|
|
2331
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2199
2332
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2200
2333
|
return {
|
|
2201
|
-
url:
|
|
2334
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2202
2335
|
options: localVarRequestOptions,
|
|
2203
2336
|
};
|
|
2204
2337
|
},
|
|
@@ -2217,8 +2350,9 @@ export var PayeesApiFetchParamCreator = function (configuration) {
|
|
|
2217
2350
|
throw new RequiredError('budget_id', 'Required parameter budget_id was null or undefined when calling getPayees.');
|
|
2218
2351
|
}
|
|
2219
2352
|
var localVarPath = "/budgets/{budget_id}/payees"
|
|
2220
|
-
.replace("{"
|
|
2221
|
-
|
|
2353
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)));
|
|
2354
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2355
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2222
2356
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2223
2357
|
var localVarHeaderParameter = {};
|
|
2224
2358
|
var localVarQueryParameter = {};
|
|
@@ -2232,12 +2366,17 @@ export var PayeesApiFetchParamCreator = function (configuration) {
|
|
|
2232
2366
|
if (last_knowledge_of_server !== undefined) {
|
|
2233
2367
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
2234
2368
|
}
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2369
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
2370
|
+
for (var key in localVarQueryParameter) {
|
|
2371
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2372
|
+
}
|
|
2373
|
+
for (var key in options.query) {
|
|
2374
|
+
query.set(key, options.query[key]);
|
|
2375
|
+
}
|
|
2376
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2238
2377
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2239
2378
|
return {
|
|
2240
|
-
url:
|
|
2379
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2241
2380
|
options: localVarRequestOptions,
|
|
2242
2381
|
};
|
|
2243
2382
|
},
|
|
@@ -2408,9 +2547,10 @@ export var ScheduledTransactionsApiFetchParamCreator = function (configuration)
|
|
|
2408
2547
|
throw new RequiredError('scheduled_transaction_id', 'Required parameter scheduled_transaction_id was null or undefined when calling getScheduledTransactionById.');
|
|
2409
2548
|
}
|
|
2410
2549
|
var localVarPath = "/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}"
|
|
2411
|
-
.replace("{"
|
|
2412
|
-
.replace("{"
|
|
2413
|
-
|
|
2550
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)))
|
|
2551
|
+
.replace("{".concat("scheduled_transaction_id", "}"), encodeURIComponent(String(scheduled_transaction_id)));
|
|
2552
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2553
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2414
2554
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2415
2555
|
var localVarHeaderParameter = {};
|
|
2416
2556
|
var localVarQueryParameter = {};
|
|
@@ -2421,12 +2561,17 @@ export var ScheduledTransactionsApiFetchParamCreator = function (configuration)
|
|
|
2421
2561
|
var localVarApiKeyValue = configuration.apiKey;
|
|
2422
2562
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
2423
2563
|
}
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2564
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
2565
|
+
for (var key in localVarQueryParameter) {
|
|
2566
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2567
|
+
}
|
|
2568
|
+
for (var key in options.query) {
|
|
2569
|
+
query.set(key, options.query[key]);
|
|
2570
|
+
}
|
|
2571
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2427
2572
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2428
2573
|
return {
|
|
2429
|
-
url:
|
|
2574
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2430
2575
|
options: localVarRequestOptions,
|
|
2431
2576
|
};
|
|
2432
2577
|
},
|
|
@@ -2445,8 +2590,9 @@ export var ScheduledTransactionsApiFetchParamCreator = function (configuration)
|
|
|
2445
2590
|
throw new RequiredError('budget_id', 'Required parameter budget_id was null or undefined when calling getScheduledTransactions.');
|
|
2446
2591
|
}
|
|
2447
2592
|
var localVarPath = "/budgets/{budget_id}/scheduled_transactions"
|
|
2448
|
-
.replace("{"
|
|
2449
|
-
|
|
2593
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)));
|
|
2594
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2595
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2450
2596
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2451
2597
|
var localVarHeaderParameter = {};
|
|
2452
2598
|
var localVarQueryParameter = {};
|
|
@@ -2460,12 +2606,17 @@ export var ScheduledTransactionsApiFetchParamCreator = function (configuration)
|
|
|
2460
2606
|
if (last_knowledge_of_server !== undefined) {
|
|
2461
2607
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
2462
2608
|
}
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2609
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
2610
|
+
for (var key in localVarQueryParameter) {
|
|
2611
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2612
|
+
}
|
|
2613
|
+
for (var key in options.query) {
|
|
2614
|
+
query.set(key, options.query[key]);
|
|
2615
|
+
}
|
|
2616
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2466
2617
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2467
2618
|
return {
|
|
2468
|
-
url:
|
|
2619
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2469
2620
|
options: localVarRequestOptions,
|
|
2470
2621
|
};
|
|
2471
2622
|
},
|
|
@@ -2621,7 +2772,7 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2621
2772
|
* 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.
|
|
2622
2773
|
* @summary Create a single transaction or multiple transactions
|
|
2623
2774
|
* @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).
|
|
2624
|
-
* @param {
|
|
2775
|
+
* @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.
|
|
2625
2776
|
* @param {*} [options] - Override http request options.
|
|
2626
2777
|
* @throws {RequiredError}
|
|
2627
2778
|
*/
|
|
@@ -2636,8 +2787,9 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2636
2787
|
throw new RequiredError('data', 'Required parameter data was null or undefined when calling createTransaction.');
|
|
2637
2788
|
}
|
|
2638
2789
|
var localVarPath = "/budgets/{budget_id}/transactions"
|
|
2639
|
-
.replace("{"
|
|
2640
|
-
|
|
2790
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)));
|
|
2791
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2792
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2641
2793
|
var localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
2642
2794
|
var localVarHeaderParameter = {};
|
|
2643
2795
|
var localVarQueryParameter = {};
|
|
@@ -2649,13 +2801,65 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2649
2801
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
2650
2802
|
}
|
|
2651
2803
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2804
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
2805
|
+
for (var key in localVarQueryParameter) {
|
|
2806
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2807
|
+
}
|
|
2808
|
+
for (var key in options.query) {
|
|
2809
|
+
query.set(key, options.query[key]);
|
|
2810
|
+
}
|
|
2811
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2655
2812
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2656
2813
|
localVarRequestOptions.body = JSON.stringify(data || {});
|
|
2657
2814
|
return {
|
|
2658
|
-
url:
|
|
2815
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2816
|
+
options: localVarRequestOptions,
|
|
2817
|
+
};
|
|
2818
|
+
},
|
|
2819
|
+
/**
|
|
2820
|
+
* Deletes a transaction
|
|
2821
|
+
* @summary Deletes an existing transaction
|
|
2822
|
+
* @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).
|
|
2823
|
+
* @param {string} transaction_id - The id of the transaction
|
|
2824
|
+
* @param {*} [options] - Override http request options.
|
|
2825
|
+
* @throws {RequiredError}
|
|
2826
|
+
*/
|
|
2827
|
+
deleteTransaction: function (budget_id, transaction_id, options) {
|
|
2828
|
+
if (options === void 0) { options = {}; }
|
|
2829
|
+
// verify required parameter 'budget_id' is not null or undefined
|
|
2830
|
+
if (budget_id === null || budget_id === undefined) {
|
|
2831
|
+
throw new RequiredError('budget_id', 'Required parameter budget_id was null or undefined when calling deleteTransaction.');
|
|
2832
|
+
}
|
|
2833
|
+
// verify required parameter 'transaction_id' is not null or undefined
|
|
2834
|
+
if (transaction_id === null || transaction_id === undefined) {
|
|
2835
|
+
throw new RequiredError('transaction_id', 'Required parameter transaction_id was null or undefined when calling deleteTransaction.');
|
|
2836
|
+
}
|
|
2837
|
+
var localVarPath = "/budgets/{budget_id}/transactions/{transaction_id}"
|
|
2838
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)))
|
|
2839
|
+
.replace("{".concat("transaction_id", "}"), encodeURIComponent(String(transaction_id)));
|
|
2840
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2841
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2842
|
+
var localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
|
|
2843
|
+
var localVarHeaderParameter = {};
|
|
2844
|
+
var localVarQueryParameter = {};
|
|
2845
|
+
localVarHeaderParameter["User-Agent"] = USER_AGENT;
|
|
2846
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
2847
|
+
// authentication bearer required
|
|
2848
|
+
if (configuration && configuration.apiKey) {
|
|
2849
|
+
var localVarApiKeyValue = configuration.apiKey;
|
|
2850
|
+
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
2851
|
+
}
|
|
2852
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
2853
|
+
for (var key in localVarQueryParameter) {
|
|
2854
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2855
|
+
}
|
|
2856
|
+
for (var key in options.query) {
|
|
2857
|
+
query.set(key, options.query[key]);
|
|
2858
|
+
}
|
|
2859
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2860
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2861
|
+
return {
|
|
2862
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2659
2863
|
options: localVarRequestOptions,
|
|
2660
2864
|
};
|
|
2661
2865
|
},
|
|
@@ -2678,9 +2882,10 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2678
2882
|
throw new RequiredError('transaction_id', 'Required parameter transaction_id was null or undefined when calling getTransactionById.');
|
|
2679
2883
|
}
|
|
2680
2884
|
var localVarPath = "/budgets/{budget_id}/transactions/{transaction_id}"
|
|
2681
|
-
.replace("{"
|
|
2682
|
-
.replace("{"
|
|
2683
|
-
|
|
2885
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)))
|
|
2886
|
+
.replace("{".concat("transaction_id", "}"), encodeURIComponent(String(transaction_id)));
|
|
2887
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2888
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2684
2889
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2685
2890
|
var localVarHeaderParameter = {};
|
|
2686
2891
|
var localVarQueryParameter = {};
|
|
@@ -2691,12 +2896,17 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2691
2896
|
var localVarApiKeyValue = configuration.apiKey;
|
|
2692
2897
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
2693
2898
|
}
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2899
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
2900
|
+
for (var key in localVarQueryParameter) {
|
|
2901
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2902
|
+
}
|
|
2903
|
+
for (var key in options.query) {
|
|
2904
|
+
query.set(key, options.query[key]);
|
|
2905
|
+
}
|
|
2906
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2697
2907
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2698
2908
|
return {
|
|
2699
|
-
url:
|
|
2909
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2700
2910
|
options: localVarRequestOptions,
|
|
2701
2911
|
};
|
|
2702
2912
|
},
|
|
@@ -2717,8 +2927,9 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2717
2927
|
throw new RequiredError('budget_id', 'Required parameter budget_id was null or undefined when calling getTransactions.');
|
|
2718
2928
|
}
|
|
2719
2929
|
var localVarPath = "/budgets/{budget_id}/transactions"
|
|
2720
|
-
.replace("{"
|
|
2721
|
-
|
|
2930
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)));
|
|
2931
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2932
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2722
2933
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2723
2934
|
var localVarHeaderParameter = {};
|
|
2724
2935
|
var localVarQueryParameter = {};
|
|
@@ -2738,12 +2949,17 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2738
2949
|
if (last_knowledge_of_server !== undefined) {
|
|
2739
2950
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
2740
2951
|
}
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2952
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
2953
|
+
for (var key in localVarQueryParameter) {
|
|
2954
|
+
query.set(key, localVarQueryParameter[key]);
|
|
2955
|
+
}
|
|
2956
|
+
for (var key in options.query) {
|
|
2957
|
+
query.set(key, options.query[key]);
|
|
2958
|
+
}
|
|
2959
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2744
2960
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2745
2961
|
return {
|
|
2746
|
-
url:
|
|
2962
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2747
2963
|
options: localVarRequestOptions,
|
|
2748
2964
|
};
|
|
2749
2965
|
},
|
|
@@ -2769,9 +2985,10 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2769
2985
|
throw new RequiredError('account_id', 'Required parameter account_id was null or undefined when calling getTransactionsByAccount.');
|
|
2770
2986
|
}
|
|
2771
2987
|
var localVarPath = "/budgets/{budget_id}/accounts/{account_id}/transactions"
|
|
2772
|
-
.replace("{"
|
|
2773
|
-
.replace("{"
|
|
2774
|
-
|
|
2988
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)))
|
|
2989
|
+
.replace("{".concat("account_id", "}"), encodeURIComponent(String(account_id)));
|
|
2990
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2991
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2775
2992
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2776
2993
|
var localVarHeaderParameter = {};
|
|
2777
2994
|
var localVarQueryParameter = {};
|
|
@@ -2791,12 +3008,17 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2791
3008
|
if (last_knowledge_of_server !== undefined) {
|
|
2792
3009
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
2793
3010
|
}
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
3011
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
3012
|
+
for (var key in localVarQueryParameter) {
|
|
3013
|
+
query.set(key, localVarQueryParameter[key]);
|
|
3014
|
+
}
|
|
3015
|
+
for (var key in options.query) {
|
|
3016
|
+
query.set(key, options.query[key]);
|
|
3017
|
+
}
|
|
3018
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2797
3019
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2798
3020
|
return {
|
|
2799
|
-
url:
|
|
3021
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2800
3022
|
options: localVarRequestOptions,
|
|
2801
3023
|
};
|
|
2802
3024
|
},
|
|
@@ -2822,9 +3044,10 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2822
3044
|
throw new RequiredError('category_id', 'Required parameter category_id was null or undefined when calling getTransactionsByCategory.');
|
|
2823
3045
|
}
|
|
2824
3046
|
var localVarPath = "/budgets/{budget_id}/categories/{category_id}/transactions"
|
|
2825
|
-
.replace("{"
|
|
2826
|
-
.replace("{"
|
|
2827
|
-
|
|
3047
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)))
|
|
3048
|
+
.replace("{".concat("category_id", "}"), encodeURIComponent(String(category_id)));
|
|
3049
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3050
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2828
3051
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2829
3052
|
var localVarHeaderParameter = {};
|
|
2830
3053
|
var localVarQueryParameter = {};
|
|
@@ -2844,12 +3067,17 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2844
3067
|
if (last_knowledge_of_server !== undefined) {
|
|
2845
3068
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
2846
3069
|
}
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
3070
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
3071
|
+
for (var key in localVarQueryParameter) {
|
|
3072
|
+
query.set(key, localVarQueryParameter[key]);
|
|
3073
|
+
}
|
|
3074
|
+
for (var key in options.query) {
|
|
3075
|
+
query.set(key, options.query[key]);
|
|
3076
|
+
}
|
|
3077
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2850
3078
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2851
3079
|
return {
|
|
2852
|
-
url:
|
|
3080
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2853
3081
|
options: localVarRequestOptions,
|
|
2854
3082
|
};
|
|
2855
3083
|
},
|
|
@@ -2875,9 +3103,10 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2875
3103
|
throw new RequiredError('payee_id', 'Required parameter payee_id was null or undefined when calling getTransactionsByPayee.');
|
|
2876
3104
|
}
|
|
2877
3105
|
var localVarPath = "/budgets/{budget_id}/payees/{payee_id}/transactions"
|
|
2878
|
-
.replace("{"
|
|
2879
|
-
.replace("{"
|
|
2880
|
-
|
|
3106
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)))
|
|
3107
|
+
.replace("{".concat("payee_id", "}"), encodeURIComponent(String(payee_id)));
|
|
3108
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3109
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2881
3110
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2882
3111
|
var localVarHeaderParameter = {};
|
|
2883
3112
|
var localVarQueryParameter = {};
|
|
@@ -2897,12 +3126,17 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2897
3126
|
if (last_knowledge_of_server !== undefined) {
|
|
2898
3127
|
localVarQueryParameter['last_knowledge_of_server'] = last_knowledge_of_server;
|
|
2899
3128
|
}
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
3129
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
3130
|
+
for (var key in localVarQueryParameter) {
|
|
3131
|
+
query.set(key, localVarQueryParameter[key]);
|
|
3132
|
+
}
|
|
3133
|
+
for (var key in options.query) {
|
|
3134
|
+
query.set(key, options.query[key]);
|
|
3135
|
+
}
|
|
3136
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2903
3137
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2904
3138
|
return {
|
|
2905
|
-
url:
|
|
3139
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2906
3140
|
options: localVarRequestOptions,
|
|
2907
3141
|
};
|
|
2908
3142
|
},
|
|
@@ -2920,8 +3154,9 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2920
3154
|
throw new RequiredError('budget_id', 'Required parameter budget_id was null or undefined when calling importTransactions.');
|
|
2921
3155
|
}
|
|
2922
3156
|
var localVarPath = "/budgets/{budget_id}/transactions/import"
|
|
2923
|
-
.replace("{"
|
|
2924
|
-
|
|
3157
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)));
|
|
3158
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3159
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2925
3160
|
var localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
2926
3161
|
var localVarHeaderParameter = {};
|
|
2927
3162
|
var localVarQueryParameter = {};
|
|
@@ -2932,12 +3167,17 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2932
3167
|
var localVarApiKeyValue = configuration.apiKey;
|
|
2933
3168
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
2934
3169
|
}
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
3170
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
3171
|
+
for (var key in localVarQueryParameter) {
|
|
3172
|
+
query.set(key, localVarQueryParameter[key]);
|
|
3173
|
+
}
|
|
3174
|
+
for (var key in options.query) {
|
|
3175
|
+
query.set(key, options.query[key]);
|
|
3176
|
+
}
|
|
3177
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2938
3178
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2939
3179
|
return {
|
|
2940
|
-
url:
|
|
3180
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2941
3181
|
options: localVarRequestOptions,
|
|
2942
3182
|
};
|
|
2943
3183
|
},
|
|
@@ -2946,7 +3186,7 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2946
3186
|
* @summary Updates an existing transaction
|
|
2947
3187
|
* @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).
|
|
2948
3188
|
* @param {string} transaction_id - The id of the transaction
|
|
2949
|
-
* @param {
|
|
3189
|
+
* @param {PutTransactionWrapper} data - The transaction to update
|
|
2950
3190
|
* @param {*} [options] - Override http request options.
|
|
2951
3191
|
* @throws {RequiredError}
|
|
2952
3192
|
*/
|
|
@@ -2965,9 +3205,10 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2965
3205
|
throw new RequiredError('data', 'Required parameter data was null or undefined when calling updateTransaction.');
|
|
2966
3206
|
}
|
|
2967
3207
|
var localVarPath = "/budgets/{budget_id}/transactions/{transaction_id}"
|
|
2968
|
-
.replace("{"
|
|
2969
|
-
.replace("{"
|
|
2970
|
-
|
|
3208
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)))
|
|
3209
|
+
.replace("{".concat("transaction_id", "}"), encodeURIComponent(String(transaction_id)));
|
|
3210
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3211
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
2971
3212
|
var localVarRequestOptions = Object.assign({ method: 'PUT' }, options);
|
|
2972
3213
|
var localVarHeaderParameter = {};
|
|
2973
3214
|
var localVarQueryParameter = {};
|
|
@@ -2979,13 +3220,18 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2979
3220
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
2980
3221
|
}
|
|
2981
3222
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
3223
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
3224
|
+
for (var key in localVarQueryParameter) {
|
|
3225
|
+
query.set(key, localVarQueryParameter[key]);
|
|
3226
|
+
}
|
|
3227
|
+
for (var key in options.query) {
|
|
3228
|
+
query.set(key, options.query[key]);
|
|
3229
|
+
}
|
|
3230
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
2985
3231
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2986
3232
|
localVarRequestOptions.body = JSON.stringify(data || {});
|
|
2987
3233
|
return {
|
|
2988
|
-
url:
|
|
3234
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
2989
3235
|
options: localVarRequestOptions,
|
|
2990
3236
|
};
|
|
2991
3237
|
},
|
|
@@ -2993,7 +3239,7 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
2993
3239
|
* Updates multiple transactions, by `id` or `import_id`.
|
|
2994
3240
|
* @summary Update multiple transactions
|
|
2995
3241
|
* @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).
|
|
2996
|
-
* @param {
|
|
3242
|
+
* @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.
|
|
2997
3243
|
* @param {*} [options] - Override http request options.
|
|
2998
3244
|
* @throws {RequiredError}
|
|
2999
3245
|
*/
|
|
@@ -3008,8 +3254,9 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
3008
3254
|
throw new RequiredError('data', 'Required parameter data was null or undefined when calling updateTransactions.');
|
|
3009
3255
|
}
|
|
3010
3256
|
var localVarPath = "/budgets/{budget_id}/transactions"
|
|
3011
|
-
.replace("{"
|
|
3012
|
-
|
|
3257
|
+
.replace("{".concat("budget_id", "}"), encodeURIComponent(String(budget_id)));
|
|
3258
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3259
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
3013
3260
|
var localVarRequestOptions = Object.assign({ method: 'PATCH' }, options);
|
|
3014
3261
|
var localVarHeaderParameter = {};
|
|
3015
3262
|
var localVarQueryParameter = {};
|
|
@@ -3021,13 +3268,18 @@ export var TransactionsApiFetchParamCreator = function (configuration) {
|
|
|
3021
3268
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
3022
3269
|
}
|
|
3023
3270
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3271
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
3272
|
+
for (var key in localVarQueryParameter) {
|
|
3273
|
+
query.set(key, localVarQueryParameter[key]);
|
|
3274
|
+
}
|
|
3275
|
+
for (var key in options.query) {
|
|
3276
|
+
query.set(key, options.query[key]);
|
|
3277
|
+
}
|
|
3278
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
3027
3279
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
3028
3280
|
localVarRequestOptions.body = JSON.stringify(data || {});
|
|
3029
3281
|
return {
|
|
3030
|
-
url:
|
|
3282
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
3031
3283
|
options: localVarRequestOptions,
|
|
3032
3284
|
};
|
|
3033
3285
|
},
|
|
@@ -3043,7 +3295,7 @@ export var TransactionsApiFp = function (configuration) {
|
|
|
3043
3295
|
* 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.
|
|
3044
3296
|
* @summary Create a single transaction or multiple transactions
|
|
3045
3297
|
* @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).
|
|
3046
|
-
* @param {
|
|
3298
|
+
* @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.
|
|
3047
3299
|
* @param {*} [options] - Override http request options.
|
|
3048
3300
|
* @throws {RequiredError}
|
|
3049
3301
|
*/
|
|
@@ -3071,6 +3323,38 @@ export var TransactionsApiFp = function (configuration) {
|
|
|
3071
3323
|
}); });
|
|
3072
3324
|
};
|
|
3073
3325
|
},
|
|
3326
|
+
/**
|
|
3327
|
+
* Deletes a transaction
|
|
3328
|
+
* @summary Deletes an existing transaction
|
|
3329
|
+
* @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).
|
|
3330
|
+
* @param {string} transaction_id - The id of the transaction
|
|
3331
|
+
* @param {*} [options] - Override http request options.
|
|
3332
|
+
* @throws {RequiredError}
|
|
3333
|
+
*/
|
|
3334
|
+
deleteTransaction: function (budget_id, transaction_id, options) {
|
|
3335
|
+
var _this = this;
|
|
3336
|
+
var localVarFetchArgs = TransactionsApiFetchParamCreator(configuration).deleteTransaction(budget_id, transaction_id, options);
|
|
3337
|
+
return function (fetchFunction) {
|
|
3338
|
+
if (fetchFunction === void 0) { fetchFunction = fetch; }
|
|
3339
|
+
return fetchFunction(configuration.basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
3340
|
+
var apiResponse;
|
|
3341
|
+
return __generator(this, function (_a) {
|
|
3342
|
+
switch (_a.label) {
|
|
3343
|
+
case 0:
|
|
3344
|
+
if (!(response.status >= 200 && response.status < 300)) return [3 /*break*/, 2];
|
|
3345
|
+
return [4 /*yield*/, response.json()];
|
|
3346
|
+
case 1:
|
|
3347
|
+
apiResponse = _a.sent();
|
|
3348
|
+
apiResponse.rateLimit = response.headers.get("X-Rate-Limit");
|
|
3349
|
+
return [2 /*return*/, apiResponse];
|
|
3350
|
+
case 2: return [2 /*return*/, response.json().then(function (e) {
|
|
3351
|
+
return Promise.reject(e);
|
|
3352
|
+
})];
|
|
3353
|
+
}
|
|
3354
|
+
});
|
|
3355
|
+
}); });
|
|
3356
|
+
};
|
|
3357
|
+
},
|
|
3074
3358
|
/**
|
|
3075
3359
|
* Returns a single transaction
|
|
3076
3360
|
* @summary Single transaction
|
|
@@ -3278,7 +3562,7 @@ export var TransactionsApiFp = function (configuration) {
|
|
|
3278
3562
|
* @summary Updates an existing transaction
|
|
3279
3563
|
* @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).
|
|
3280
3564
|
* @param {string} transaction_id - The id of the transaction
|
|
3281
|
-
* @param {
|
|
3565
|
+
* @param {PutTransactionWrapper} data - The transaction to update
|
|
3282
3566
|
* @param {*} [options] - Override http request options.
|
|
3283
3567
|
* @throws {RequiredError}
|
|
3284
3568
|
*/
|
|
@@ -3310,7 +3594,7 @@ export var TransactionsApiFp = function (configuration) {
|
|
|
3310
3594
|
* Updates multiple transactions, by `id` or `import_id`.
|
|
3311
3595
|
* @summary Update multiple transactions
|
|
3312
3596
|
* @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).
|
|
3313
|
-
* @param {
|
|
3597
|
+
* @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.
|
|
3314
3598
|
* @param {*} [options] - Override http request options.
|
|
3315
3599
|
* @throws {RequiredError}
|
|
3316
3600
|
*/
|
|
@@ -3350,13 +3634,24 @@ export var TransactionsApiFactory = function (configuration) {
|
|
|
3350
3634
|
* 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.
|
|
3351
3635
|
* @summary Create a single transaction or multiple transactions
|
|
3352
3636
|
* @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).
|
|
3353
|
-
* @param {
|
|
3637
|
+
* @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.
|
|
3354
3638
|
* @param {*} [options] - Override http request options.
|
|
3355
3639
|
* @throws {RequiredError}
|
|
3356
3640
|
*/
|
|
3357
3641
|
createTransaction: function (budget_id, data, options) {
|
|
3358
3642
|
return TransactionsApiFp(configuration).createTransaction(budget_id, data, options)();
|
|
3359
3643
|
},
|
|
3644
|
+
/**
|
|
3645
|
+
* Deletes a transaction
|
|
3646
|
+
* @summary Deletes an existing transaction
|
|
3647
|
+
* @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).
|
|
3648
|
+
* @param {string} transaction_id - The id of the transaction
|
|
3649
|
+
* @param {*} [options] - Override http request options.
|
|
3650
|
+
* @throws {RequiredError}
|
|
3651
|
+
*/
|
|
3652
|
+
deleteTransaction: function (budget_id, transaction_id, options) {
|
|
3653
|
+
return TransactionsApiFp(configuration).deleteTransaction(budget_id, transaction_id, options)();
|
|
3654
|
+
},
|
|
3360
3655
|
/**
|
|
3361
3656
|
* Returns a single transaction
|
|
3362
3657
|
* @summary Single transaction
|
|
@@ -3438,7 +3733,7 @@ export var TransactionsApiFactory = function (configuration) {
|
|
|
3438
3733
|
* @summary Updates an existing transaction
|
|
3439
3734
|
* @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).
|
|
3440
3735
|
* @param {string} transaction_id - The id of the transaction
|
|
3441
|
-
* @param {
|
|
3736
|
+
* @param {PutTransactionWrapper} data - The transaction to update
|
|
3442
3737
|
* @param {*} [options] - Override http request options.
|
|
3443
3738
|
* @throws {RequiredError}
|
|
3444
3739
|
*/
|
|
@@ -3449,7 +3744,7 @@ export var TransactionsApiFactory = function (configuration) {
|
|
|
3449
3744
|
* Updates multiple transactions, by `id` or `import_id`.
|
|
3450
3745
|
* @summary Update multiple transactions
|
|
3451
3746
|
* @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).
|
|
3452
|
-
* @param {
|
|
3747
|
+
* @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.
|
|
3453
3748
|
* @param {*} [options] - Override http request options.
|
|
3454
3749
|
* @throws {RequiredError}
|
|
3455
3750
|
*/
|
|
@@ -3473,7 +3768,7 @@ var TransactionsApi = /** @class */ (function (_super) {
|
|
|
3473
3768
|
* 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.
|
|
3474
3769
|
* @summary Create a single transaction or multiple transactions
|
|
3475
3770
|
* @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).
|
|
3476
|
-
* @param {
|
|
3771
|
+
* @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.
|
|
3477
3772
|
* @param {*} [options] - Override http request options.
|
|
3478
3773
|
* @throws {RequiredError}
|
|
3479
3774
|
* @memberof TransactionsApi
|
|
@@ -3481,6 +3776,18 @@ var TransactionsApi = /** @class */ (function (_super) {
|
|
|
3481
3776
|
TransactionsApi.prototype.createTransaction = function (budget_id, data, options) {
|
|
3482
3777
|
return TransactionsApiFp(this.configuration).createTransaction(budget_id, data, options)();
|
|
3483
3778
|
};
|
|
3779
|
+
/**
|
|
3780
|
+
* Deletes a transaction
|
|
3781
|
+
* @summary Deletes an existing transaction
|
|
3782
|
+
* @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).
|
|
3783
|
+
* @param {string} transaction_id - The id of the transaction
|
|
3784
|
+
* @param {*} [options] - Override http request options.
|
|
3785
|
+
* @throws {RequiredError}
|
|
3786
|
+
* @memberof TransactionsApi
|
|
3787
|
+
*/
|
|
3788
|
+
TransactionsApi.prototype.deleteTransaction = function (budget_id, transaction_id, options) {
|
|
3789
|
+
return TransactionsApiFp(this.configuration).deleteTransaction(budget_id, transaction_id, options)();
|
|
3790
|
+
};
|
|
3484
3791
|
/**
|
|
3485
3792
|
* Returns a single transaction
|
|
3486
3793
|
* @summary Single transaction
|
|
@@ -3568,7 +3875,7 @@ var TransactionsApi = /** @class */ (function (_super) {
|
|
|
3568
3875
|
* @summary Updates an existing transaction
|
|
3569
3876
|
* @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).
|
|
3570
3877
|
* @param {string} transaction_id - The id of the transaction
|
|
3571
|
-
* @param {
|
|
3878
|
+
* @param {PutTransactionWrapper} data - The transaction to update
|
|
3572
3879
|
* @param {*} [options] - Override http request options.
|
|
3573
3880
|
* @throws {RequiredError}
|
|
3574
3881
|
* @memberof TransactionsApi
|
|
@@ -3580,7 +3887,7 @@ var TransactionsApi = /** @class */ (function (_super) {
|
|
|
3580
3887
|
* Updates multiple transactions, by `id` or `import_id`.
|
|
3581
3888
|
* @summary Update multiple transactions
|
|
3582
3889
|
* @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).
|
|
3583
|
-
* @param {
|
|
3890
|
+
* @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.
|
|
3584
3891
|
* @param {*} [options] - Override http request options.
|
|
3585
3892
|
* @throws {RequiredError}
|
|
3586
3893
|
* @memberof TransactionsApi
|
|
@@ -3606,7 +3913,8 @@ export var UserApiFetchParamCreator = function (configuration) {
|
|
|
3606
3913
|
getUser: function (options) {
|
|
3607
3914
|
if (options === void 0) { options = {}; }
|
|
3608
3915
|
var localVarPath = "/user";
|
|
3609
|
-
|
|
3916
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3917
|
+
var localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
3610
3918
|
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
3611
3919
|
var localVarHeaderParameter = {};
|
|
3612
3920
|
var localVarQueryParameter = {};
|
|
@@ -3617,12 +3925,17 @@ export var UserApiFetchParamCreator = function (configuration) {
|
|
|
3617
3925
|
var localVarApiKeyValue = configuration.apiKey;
|
|
3618
3926
|
localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
|
|
3619
3927
|
}
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3928
|
+
var query = new URLSearchParams(localVarUrlObj.search);
|
|
3929
|
+
for (var key in localVarQueryParameter) {
|
|
3930
|
+
query.set(key, localVarQueryParameter[key]);
|
|
3931
|
+
}
|
|
3932
|
+
for (var key in options.query) {
|
|
3933
|
+
query.set(key, options.query[key]);
|
|
3934
|
+
}
|
|
3935
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
3623
3936
|
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
3624
3937
|
return {
|
|
3625
|
-
url:
|
|
3938
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
3626
3939
|
options: localVarRequestOptions,
|
|
3627
3940
|
};
|
|
3628
3941
|
},
|