ynab 1.45.0 → 1.47.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 +1 -1
- package/dist/api.d.ts +116 -0
- package/dist/api.js +46 -1
- package/dist/browser/ynab.js +1 -1
- package/dist/esm/api.d.ts +116 -0
- package/dist/esm/api.js +46 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# YNAB API JavaScript Library
|
|
2
2
|
|
|
3
|
-
[](https://github.com/ynab/ynab-sdk-js/actions/workflows/ci.yml)
|
|
4
4
|
[](https://badge.fury.io/js/ynab)
|
|
5
5
|
|
|
6
6
|
Please read the [YNAB API documentation](https://api.youneedabudget.com) for an overview of using the API and a complete list of available resources.
|
package/dist/api.d.ts
CHANGED
|
@@ -135,6 +135,36 @@ export interface Account {
|
|
|
135
135
|
* @memberof Account
|
|
136
136
|
*/
|
|
137
137
|
direct_import_in_error?: boolean | null;
|
|
138
|
+
/**
|
|
139
|
+
* A date/time specifying when the account was last reconciled.
|
|
140
|
+
* @type {string}
|
|
141
|
+
* @memberof Account
|
|
142
|
+
*/
|
|
143
|
+
last_reconciled_at?: string | null;
|
|
144
|
+
/**
|
|
145
|
+
* The original debt/loan account balance, specified in milliunits format.
|
|
146
|
+
* @type {number}
|
|
147
|
+
* @memberof Account
|
|
148
|
+
*/
|
|
149
|
+
debt_original_balance?: number | null;
|
|
150
|
+
/**
|
|
151
|
+
* The debt/loan account interest rate(s), by effective date.
|
|
152
|
+
* @type {LoanAccountPeriodicValue}
|
|
153
|
+
* @memberof Account
|
|
154
|
+
*/
|
|
155
|
+
debt_interest_rates?: LoanAccountPeriodicValue | null;
|
|
156
|
+
/**
|
|
157
|
+
* The minimum payment amount(s) for the debt/loan account, by effective date. The amounts are specified in milliunits format.
|
|
158
|
+
* @type {LoanAccountPeriodicValue}
|
|
159
|
+
* @memberof Account
|
|
160
|
+
*/
|
|
161
|
+
debt_minimum_payments?: LoanAccountPeriodicValue | null;
|
|
162
|
+
/**
|
|
163
|
+
* The escrow value(s) for the debt/loan account, by effective date. The amounts are specified in milliunits format.
|
|
164
|
+
* @type {LoanAccountPeriodicValue}
|
|
165
|
+
* @memberof Account
|
|
166
|
+
*/
|
|
167
|
+
debt_escrow_amounts?: LoanAccountPeriodicValue | null;
|
|
138
168
|
/**
|
|
139
169
|
* Whether or not the account has been deleted. Deleted accounts will only be included in delta requests.
|
|
140
170
|
* @type {boolean}
|
|
@@ -540,6 +570,24 @@ export interface Category {
|
|
|
540
570
|
* @memberof Category
|
|
541
571
|
*/
|
|
542
572
|
goal_type?: Category.GoalTypeEnum | null;
|
|
573
|
+
/**
|
|
574
|
+
* The day of the goal
|
|
575
|
+
* @type {number}
|
|
576
|
+
* @memberof Category
|
|
577
|
+
*/
|
|
578
|
+
goal_day?: number | null;
|
|
579
|
+
/**
|
|
580
|
+
* The goal cadence
|
|
581
|
+
* @type {number}
|
|
582
|
+
* @memberof Category
|
|
583
|
+
*/
|
|
584
|
+
goal_cadence?: number | null;
|
|
585
|
+
/**
|
|
586
|
+
* The goal cadence frequency
|
|
587
|
+
* @type {number}
|
|
588
|
+
* @memberof Category
|
|
589
|
+
*/
|
|
590
|
+
goal_cadence_frequency?: number | null;
|
|
543
591
|
/**
|
|
544
592
|
* The month a goal was created
|
|
545
593
|
* @type {string}
|
|
@@ -807,6 +855,14 @@ export interface HybridTransactionsResponseData {
|
|
|
807
855
|
*/
|
|
808
856
|
server_knowledge?: number | null;
|
|
809
857
|
}
|
|
858
|
+
/**
|
|
859
|
+
*
|
|
860
|
+
* @export
|
|
861
|
+
* @interface LoanAccountPeriodicValue
|
|
862
|
+
*/
|
|
863
|
+
export interface LoanAccountPeriodicValue {
|
|
864
|
+
[key: string]: number;
|
|
865
|
+
}
|
|
810
866
|
/**
|
|
811
867
|
*
|
|
812
868
|
* @export
|
|
@@ -1862,6 +1918,12 @@ export interface TransactionSummary {
|
|
|
1862
1918
|
* @memberof TransactionSummary
|
|
1863
1919
|
*/
|
|
1864
1920
|
import_payee_name_original?: string | null;
|
|
1921
|
+
/**
|
|
1922
|
+
* If the transaction is a debt/loan account transaction, the type of transaction
|
|
1923
|
+
* @type {string}
|
|
1924
|
+
* @memberof TransactionSummary
|
|
1925
|
+
*/
|
|
1926
|
+
debt_transaction_type?: TransactionSummary.DebtTransactionTypeEnum | null;
|
|
1865
1927
|
/**
|
|
1866
1928
|
* Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
|
|
1867
1929
|
* @type {boolean}
|
|
@@ -1895,6 +1957,20 @@ export declare namespace TransactionSummary {
|
|
|
1895
1957
|
Blue,
|
|
1896
1958
|
Purple
|
|
1897
1959
|
}
|
|
1960
|
+
/**
|
|
1961
|
+
* @export
|
|
1962
|
+
* @enum {string}
|
|
1963
|
+
*/
|
|
1964
|
+
enum DebtTransactionTypeEnum {
|
|
1965
|
+
Payment,
|
|
1966
|
+
Refund,
|
|
1967
|
+
Fee,
|
|
1968
|
+
Interest,
|
|
1969
|
+
Escrow,
|
|
1970
|
+
BalancedAdjustment,
|
|
1971
|
+
Credit,
|
|
1972
|
+
Charge
|
|
1973
|
+
}
|
|
1898
1974
|
}
|
|
1899
1975
|
/**
|
|
1900
1976
|
*
|
|
@@ -2241,6 +2317,12 @@ export interface HybridTransaction {
|
|
|
2241
2317
|
* @memberof HybridTransaction
|
|
2242
2318
|
*/
|
|
2243
2319
|
import_payee_name_original?: string | null;
|
|
2320
|
+
/**
|
|
2321
|
+
* If the transaction is a debt/loan account transaction, the type of transaction
|
|
2322
|
+
* @type {string}
|
|
2323
|
+
* @memberof HybridTransaction
|
|
2324
|
+
*/
|
|
2325
|
+
debt_transaction_type?: HybridTransaction.DebtTransactionTypeEnum | null;
|
|
2244
2326
|
/**
|
|
2245
2327
|
* Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
|
|
2246
2328
|
* @type {boolean}
|
|
@@ -2304,6 +2386,20 @@ export declare namespace HybridTransaction {
|
|
|
2304
2386
|
Blue,
|
|
2305
2387
|
Purple
|
|
2306
2388
|
}
|
|
2389
|
+
/**
|
|
2390
|
+
* @export
|
|
2391
|
+
* @enum {string}
|
|
2392
|
+
*/
|
|
2393
|
+
enum DebtTransactionTypeEnum {
|
|
2394
|
+
Payment,
|
|
2395
|
+
Refund,
|
|
2396
|
+
Fee,
|
|
2397
|
+
Interest,
|
|
2398
|
+
Escrow,
|
|
2399
|
+
BalancedAdjustment,
|
|
2400
|
+
Credit,
|
|
2401
|
+
Charge
|
|
2402
|
+
}
|
|
2307
2403
|
/**
|
|
2308
2404
|
* @export
|
|
2309
2405
|
* @enum {string}
|
|
@@ -2834,6 +2930,12 @@ export interface TransactionDetail {
|
|
|
2834
2930
|
* @memberof TransactionDetail
|
|
2835
2931
|
*/
|
|
2836
2932
|
import_payee_name_original?: string | null;
|
|
2933
|
+
/**
|
|
2934
|
+
* If the transaction is a debt/loan account transaction, the type of transaction
|
|
2935
|
+
* @type {string}
|
|
2936
|
+
* @memberof TransactionDetail
|
|
2937
|
+
*/
|
|
2938
|
+
debt_transaction_type?: TransactionDetail.DebtTransactionTypeEnum | null;
|
|
2837
2939
|
/**
|
|
2838
2940
|
* Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
|
|
2839
2941
|
* @type {boolean}
|
|
@@ -2891,6 +2993,20 @@ export declare namespace TransactionDetail {
|
|
|
2891
2993
|
Blue,
|
|
2892
2994
|
Purple
|
|
2893
2995
|
}
|
|
2996
|
+
/**
|
|
2997
|
+
* @export
|
|
2998
|
+
* @enum {string}
|
|
2999
|
+
*/
|
|
3000
|
+
enum DebtTransactionTypeEnum {
|
|
3001
|
+
Payment,
|
|
3002
|
+
Refund,
|
|
3003
|
+
Fee,
|
|
3004
|
+
Interest,
|
|
3005
|
+
Escrow,
|
|
3006
|
+
BalancedAdjustment,
|
|
3007
|
+
Credit,
|
|
3008
|
+
Charge
|
|
3009
|
+
}
|
|
2894
3010
|
}
|
|
2895
3011
|
/**
|
|
2896
3012
|
* AccountsApi - fetch parameter creator
|
package/dist/api.js
CHANGED
|
@@ -31,7 +31,7 @@ if (!globalThis.fetch) {
|
|
|
31
31
|
globalThis.Headers = fetchPonyfill.Headers;
|
|
32
32
|
globalThis.Request = fetchPonyfill.Request;
|
|
33
33
|
}
|
|
34
|
-
const USER_AGENT = "api_client/js/1.
|
|
34
|
+
const USER_AGENT = "api_client/js/1.45.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) {
|
|
@@ -217,6 +217,21 @@ var TransactionSummary;
|
|
|
217
217
|
FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue";
|
|
218
218
|
FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple";
|
|
219
219
|
})(FlagColorEnum = TransactionSummary.FlagColorEnum || (TransactionSummary.FlagColorEnum = {}));
|
|
220
|
+
/**
|
|
221
|
+
* @export
|
|
222
|
+
* @enum {string}
|
|
223
|
+
*/
|
|
224
|
+
let DebtTransactionTypeEnum;
|
|
225
|
+
(function (DebtTransactionTypeEnum) {
|
|
226
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Payment"] = 'payment'] = "Payment";
|
|
227
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Refund"] = 'refund'] = "Refund";
|
|
228
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Fee"] = 'fee'] = "Fee";
|
|
229
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Interest"] = 'interest'] = "Interest";
|
|
230
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Escrow"] = 'escrow'] = "Escrow";
|
|
231
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["BalancedAdjustment"] = 'balancedAdjustment'] = "BalancedAdjustment";
|
|
232
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Credit"] = 'credit'] = "Credit";
|
|
233
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Charge"] = 'charge'] = "Charge";
|
|
234
|
+
})(DebtTransactionTypeEnum = TransactionSummary.DebtTransactionTypeEnum || (TransactionSummary.DebtTransactionTypeEnum = {}));
|
|
220
235
|
})(TransactionSummary = exports.TransactionSummary || (exports.TransactionSummary = {}));
|
|
221
236
|
/**
|
|
222
237
|
* @export
|
|
@@ -247,6 +262,21 @@ var HybridTransaction;
|
|
|
247
262
|
FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue";
|
|
248
263
|
FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple";
|
|
249
264
|
})(FlagColorEnum = HybridTransaction.FlagColorEnum || (HybridTransaction.FlagColorEnum = {}));
|
|
265
|
+
/**
|
|
266
|
+
* @export
|
|
267
|
+
* @enum {string}
|
|
268
|
+
*/
|
|
269
|
+
let DebtTransactionTypeEnum;
|
|
270
|
+
(function (DebtTransactionTypeEnum) {
|
|
271
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Payment"] = 'payment'] = "Payment";
|
|
272
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Refund"] = 'refund'] = "Refund";
|
|
273
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Fee"] = 'fee'] = "Fee";
|
|
274
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Interest"] = 'interest'] = "Interest";
|
|
275
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Escrow"] = 'escrow'] = "Escrow";
|
|
276
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["BalancedAdjustment"] = 'balancedAdjustment'] = "BalancedAdjustment";
|
|
277
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Credit"] = 'credit'] = "Credit";
|
|
278
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Charge"] = 'charge'] = "Charge";
|
|
279
|
+
})(DebtTransactionTypeEnum = HybridTransaction.DebtTransactionTypeEnum || (HybridTransaction.DebtTransactionTypeEnum = {}));
|
|
250
280
|
/**
|
|
251
281
|
* @export
|
|
252
282
|
* @enum {string}
|
|
@@ -386,6 +416,21 @@ var TransactionDetail;
|
|
|
386
416
|
FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue";
|
|
387
417
|
FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple";
|
|
388
418
|
})(FlagColorEnum = TransactionDetail.FlagColorEnum || (TransactionDetail.FlagColorEnum = {}));
|
|
419
|
+
/**
|
|
420
|
+
* @export
|
|
421
|
+
* @enum {string}
|
|
422
|
+
*/
|
|
423
|
+
let DebtTransactionTypeEnum;
|
|
424
|
+
(function (DebtTransactionTypeEnum) {
|
|
425
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Payment"] = 'payment'] = "Payment";
|
|
426
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Refund"] = 'refund'] = "Refund";
|
|
427
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Fee"] = 'fee'] = "Fee";
|
|
428
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Interest"] = 'interest'] = "Interest";
|
|
429
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Escrow"] = 'escrow'] = "Escrow";
|
|
430
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["BalancedAdjustment"] = 'balancedAdjustment'] = "BalancedAdjustment";
|
|
431
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Credit"] = 'credit'] = "Credit";
|
|
432
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Charge"] = 'charge'] = "Charge";
|
|
433
|
+
})(DebtTransactionTypeEnum = TransactionDetail.DebtTransactionTypeEnum || (TransactionDetail.DebtTransactionTypeEnum = {}));
|
|
389
434
|
})(TransactionDetail = exports.TransactionDetail || (exports.TransactionDetail = {}));
|
|
390
435
|
/**
|
|
391
436
|
* AccountsApi - fetch parameter creator
|
package/dist/browser/ynab.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var ynab;(()=>{var e={559:function(e,t,n){var r;!function(a){"use strict";function o(e){var n=e&&e.Promise||a.Promise,r=e&&e.XMLHttpRequest||a.XMLHttpRequest;return function(){var e=Object.create(a,{fetch:{value:void 0,writable:!0}});return function(t){var a=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==a&&a,o="URLSearchParams"in a,i="Symbol"in a&&"iterator"in Symbol,s="FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch(e){return!1}}(),c="FormData"in a,u="ArrayBuffer"in a;if(u)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(e){return e&&d.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function p(e){return"string"!=typeof e&&(e=String(e)),e}function g(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function y(e){this.map={},e instanceof y?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function f(e){if(e.bodyUsed)return n.reject(new TypeError("Already read"));e.bodyUsed=!0}function m(e){return new n((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function w(e){var t=new FileReader,n=m(t);return t.readAsArrayBuffer(e),n}function b(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function A(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:s&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:c&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:o&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u&&s&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=b(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u&&(ArrayBuffer.prototype.isPrototypeOf(e)||h(e))?this._bodyArrayBuffer=b(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return n.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return n.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return n.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?n.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):n.resolve(this._bodyArrayBuffer)):this.blob().then(w)}),this.text=function(){var e,t,r,a=f(this);if(a)return a;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=m(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return n.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return n.resolve(this._bodyText)},c&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}y.prototype.append=function(e,t){e=l(e),t=p(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},y.prototype.delete=function(e){delete this.map[l(e)]},y.prototype.get=function(e){return e=l(e),this.has(e)?this.map[e]:null},y.prototype.has=function(e){return this.map.hasOwnProperty(l(e))},y.prototype.set=function(e,t){this.map[l(e)]=p(t)},y.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},y.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),g(e)},y.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),g(e)},y.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),g(e)},i&&(y.prototype[Symbol.iterator]=y.prototype.entries);var T=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function P(e,t){if(!(this instanceof P))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,a=(t=t||{}).body;if(e instanceof P){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new y(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new y(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),T.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(a),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;if(o.test(this.url))this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}})),t}function R(e,t){if(!(this instanceof R))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"",this.headers=new y(t.headers),this.url=t.url||"",this._initBody(e)}P.prototype.clone=function(){return new P(this,{body:this._bodyInit})},A.call(P.prototype),A.call(R.prototype),R.prototype.clone=function(){return new R(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},R.error=function(){var e=new R(null,{status:0,statusText:""});return e.type="error",e};var C=[301,302,303,307,308];R.redirect=function(e,t){if(-1===C.indexOf(t))throw new RangeError("Invalid status code");return new R(null,{status:t,headers:{location:e}})},t.DOMException=a.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,o){return new n((function(n,i){var c=new P(e,o);if(c.signal&&c.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var d=new r;function h(){d.abort()}d.onload=function(){var e,t,r={status:d.status,statusText:d.statusText,headers:(e=d.getAllResponseHeaders()||"",t=new y,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var a=n.join(":").trim();t.append(r,a)}})),t)};r.url="responseURL"in d?d.responseURL:r.headers.get("X-Request-URL");var a="response"in d?d.response:d.responseText;setTimeout((function(){n(new R(a,r))}),0)},d.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},d.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},d.onabort=function(){setTimeout((function(){i(new t.DOMException("Aborted","AbortError"))}),0)},d.open(c.method,function(e){try{return""===e&&a.location.href?a.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?d.withCredentials=!0:"omit"===c.credentials&&(d.withCredentials=!1),"responseType"in d&&(s?d.responseType="blob":u&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(d.responseType="arraybuffer")),!o||"object"!=typeof o.headers||o.headers instanceof y?c.headers.forEach((function(e,t){d.setRequestHeader(t,e)})):Object.getOwnPropertyNames(o.headers).forEach((function(e){d.setRequestHeader(e,p(o.headers[e]))})),c.signal&&(c.signal.addEventListener("abort",h),d.onreadystatechange=function(){4===d.readyState&&c.signal.removeEventListener("abort",h)}),d.send(void 0===c._bodyInit?null:c._bodyInit)}))}S.polyfill=!0,a.fetch||(a.fetch=S,a.Headers=y,a.Request=P,a.Response=R),t.Headers=y,t.Request=P,t.Response=R,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}(t),{fetch:e.fetch,Headers:e.Headers,Request:e.Request,Response:e.Response,DOMException:e.DOMException}}()}void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==n.g?n.g:this)},665:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserApiFetchParamCreator=t.TransactionsApi=t.TransactionsApiFactory=t.TransactionsApiFp=t.TransactionsApiFetchParamCreator=t.ScheduledTransactionsApi=t.ScheduledTransactionsApiFactory=t.ScheduledTransactionsApiFp=t.ScheduledTransactionsApiFetchParamCreator=t.PayeesApi=t.PayeesApiFactory=t.PayeesApiFp=t.PayeesApiFetchParamCreator=t.PayeeLocationsApi=t.PayeeLocationsApiFactory=t.PayeeLocationsApiFp=t.PayeeLocationsApiFetchParamCreator=t.MonthsApi=t.MonthsApiFactory=t.MonthsApiFp=t.MonthsApiFetchParamCreator=t.DeprecatedApi=t.DeprecatedApiFactory=t.DeprecatedApiFp=t.DeprecatedApiFetchParamCreator=t.CategoriesApi=t.CategoriesApiFactory=t.CategoriesApiFp=t.CategoriesApiFetchParamCreator=t.BudgetsApi=t.BudgetsApiFactory=t.BudgetsApiFp=t.BudgetsApiFetchParamCreator=t.AccountsApi=t.AccountsApiFactory=t.AccountsApiFp=t.AccountsApiFetchParamCreator=t.TransactionDetail=t.ScheduledTransactionDetail=t.SaveTransactionWithId=t.SaveTransaction=t.HybridTransaction=t.TransactionSummary=t.ScheduledTransactionSummary=t.SaveTransactionWithOptionalFields=t.Category=t.AccountType=t.RequiredError=t.BaseAPI=t.COLLECTION_FORMATS=void 0,t.UserApi=t.UserApiFactory=t.UserApiFp=void 0;const a=n(559)();globalThis.fetch||(globalThis.fetch=a.fetch,globalThis.Response=a.Response,globalThis.Headers=a.Headers,globalThis.Request=a.Request);const o="api_client/js/1.42.0";function i(e){return e instanceof Date?e.toISOString().substring(0,10):e}t.COLLECTION_FORMATS={csv:",",ssv:" ",tsv:"\t",pipes:"|"};class s{constructor(e){e&&(this.configuration=e)}}t.BaseAPI=s;class c extends Error{constructor(e,t){super(t),this.field=e}}var u;t.RequiredError=c,(u=t.AccountType||(t.AccountType={}))[u.Checking="checking"]="Checking",u[u.Savings="savings"]="Savings",u[u.Cash="cash"]="Cash",u[u.CreditCard="creditCard"]="CreditCard",u[u.LineOfCredit="lineOfCredit"]="LineOfCredit",u[u.OtherAsset="otherAsset"]="OtherAsset",u[u.OtherLiability="otherLiability"]="OtherLiability",u[u.Mortgage="mortgage"]="Mortgage",u[u.AutoLoan="autoLoan"]="AutoLoan",u[u.StudentLoan="studentLoan"]="StudentLoan",u[u.PersonalLoan="personalLoan"]="PersonalLoan",u[u.MedicalDebt="medicalDebt"]="MedicalDebt",u[u.OtherDebt="otherDebt"]="OtherDebt",function(e){let t;!function(e){e[e.TB="TB"]="TB",e[e.TBD="TBD"]="TBD",e[e.MF="MF"]="MF",e[e.NEED="NEED"]="NEED",e[e.DEBT="DEBT"]="DEBT"}(t=e.GoalTypeEnum||(e.GoalTypeEnum={}))}(t.Category||(t.Category={})),function(e){let t,n;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.SaveTransactionWithOptionalFields||(t.SaveTransactionWithOptionalFields={})),function(e){let t,n;!function(e){e[e.Never="never"]="Never",e[e.Daily="daily"]="Daily",e[e.Weekly="weekly"]="Weekly",e[e.EveryOtherWeek="everyOtherWeek"]="EveryOtherWeek",e[e.TwiceAMonth="twiceAMonth"]="TwiceAMonth",e[e.Every4Weeks="every4Weeks"]="Every4Weeks",e[e.Monthly="monthly"]="Monthly",e[e.EveryOtherMonth="everyOtherMonth"]="EveryOtherMonth",e[e.Every3Months="every3Months"]="Every3Months",e[e.Every4Months="every4Months"]="Every4Months",e[e.TwiceAYear="twiceAYear"]="TwiceAYear",e[e.Yearly="yearly"]="Yearly",e[e.EveryOtherYear="everyOtherYear"]="EveryOtherYear"}(t=e.FrequencyEnum||(e.FrequencyEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.ScheduledTransactionSummary||(t.ScheduledTransactionSummary={})),function(e){let t,n;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.TransactionSummary||(t.TransactionSummary={})),function(e){let t,n,r;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={})),function(e){e[e.Transaction="transaction"]="Transaction",e[e.Subtransaction="subtransaction"]="Subtransaction"}(r=e.TypeEnum||(e.TypeEnum={}))}(t.HybridTransaction||(t.HybridTransaction={})),function(e){let t,n;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.SaveTransaction||(t.SaveTransaction={})),function(e){let t,n;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.SaveTransactionWithId||(t.SaveTransactionWithId={})),function(e){let t,n;!function(e){e[e.Never="never"]="Never",e[e.Daily="daily"]="Daily",e[e.Weekly="weekly"]="Weekly",e[e.EveryOtherWeek="everyOtherWeek"]="EveryOtherWeek",e[e.TwiceAMonth="twiceAMonth"]="TwiceAMonth",e[e.Every4Weeks="every4Weeks"]="Every4Weeks",e[e.Monthly="monthly"]="Monthly",e[e.EveryOtherMonth="everyOtherMonth"]="EveryOtherMonth",e[e.Every3Months="every3Months"]="Every3Months",e[e.Every4Months="every4Months"]="Every4Months",e[e.TwiceAYear="twiceAYear"]="TwiceAYear",e[e.Yearly="yearly"]="Yearly",e[e.EveryOtherYear="everyOtherYear"]="EveryOtherYear"}(t=e.FrequencyEnum||(e.FrequencyEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.ScheduledTransactionDetail||(t.ScheduledTransactionDetail={})),function(e){let t,n;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.TransactionDetail||(t.TransactionDetail={})),t.AccountsApiFetchParamCreator=function(e){return{createAccount(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling createAccount.");if(null==n)throw new c("data","Required parameter data was null or undefined when calling createAccount.");const a="/budgets/{budget_id}/accounts".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"POST"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}u["Content-Type"]="application/json";const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),s.body=JSON.stringify(n||{}),{url:i.pathname+i.search+i.hash,options:s}},getAccountById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getAccountById.");if(null==n)throw new c("account_id","Required parameter account_id was null or undefined when calling getAccountById.");const a="/budgets/{budget_id}/accounts/{account_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{account_id}",encodeURIComponent(String(n))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}},getAccounts(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getAccounts.");const a="/budgets/{budget_id}/accounts".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}void 0!==n&&(d.last_knowledge_of_server=n);const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}}}},t.AccountsApiFp=function(e){return{createAccount(n,a,o){const i=(0,t.AccountsApiFetchParamCreator)(e).createAccount(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getAccountById(n,a,o){const i=(0,t.AccountsApiFetchParamCreator)(e).getAccountById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getAccounts(n,a,o){const i=(0,t.AccountsApiFetchParamCreator)(e).getAccounts(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.AccountsApiFactory=function(e){return{createAccount:(n,r,a)=>(0,t.AccountsApiFp)(e).createAccount(n,r,a)(),getAccountById:(n,r,a)=>(0,t.AccountsApiFp)(e).getAccountById(n,r,a)(),getAccounts:(n,r,a)=>(0,t.AccountsApiFp)(e).getAccounts(n,r,a)()}},t.AccountsApi=class extends s{createAccount(e,n,r){return(0,t.AccountsApiFp)(this.configuration).createAccount(e,n,r)()}getAccountById(e,n,r){return(0,t.AccountsApiFp)(this.configuration).getAccountById(e,n,r)()}getAccounts(e,n,r){return(0,t.AccountsApiFp)(this.configuration).getAccounts(e,n,r)()}},t.BudgetsApiFetchParamCreator=function(e){return{getBudgetById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getBudgetById.");const a="/budgets/{budget_id}".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}void 0!==n&&(d.last_knowledge_of_server=n);const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}},getBudgetSettingsById(t,n={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getBudgetSettingsById.");const r="/budgets/{budget_id}/settings".replace("{budget_id}",encodeURIComponent(String(t))),a=new URL(r,"https://example.com"),i=Object.assign({method:"GET"},n),s={},u={};if(s["User-Agent"]=o,s.Accept="application/json",e&&e.apiKey){const t=e.apiKey;s.Authorization=t}const d=new URLSearchParams(a.search);for(const e in u)d.set(e,u[e]);for(const e in n.query)d.set(e,n.query[e]);return a.search=new URLSearchParams(d).toString(),i.headers=Object.assign({},s,n.headers),{url:a.pathname+a.search+a.hash,options:i}},getBudgets(t,n={}){const r=new URL("/budgets","https://example.com"),a=Object.assign({method:"GET"},n),i={},s={};if(i["User-Agent"]=o,i.Accept="application/json",e&&e.apiKey){const t=e.apiKey;i.Authorization=t}void 0!==t&&(s.include_accounts=t);const c=new URLSearchParams(r.search);for(const e in s)c.set(e,s[e]);for(const e in n.query)c.set(e,n.query[e]);return r.search=new URLSearchParams(c).toString(),a.headers=Object.assign({},i,n.headers),{url:r.pathname+r.search+r.hash,options:a}}}},t.BudgetsApiFp=function(e){return{getBudgetById(n,a,o){const i=(0,t.BudgetsApiFetchParamCreator)(e).getBudgetById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getBudgetSettingsById(n,a){const o=(0,t.BudgetsApiFetchParamCreator)(e).getBudgetSettingsById(n,a);return(t=fetch)=>t(e.basePath+o.url,o.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getBudgets(n,a){const o=(0,t.BudgetsApiFetchParamCreator)(e).getBudgets(n,a);return(t=fetch)=>t(e.basePath+o.url,o.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.BudgetsApiFactory=function(e){return{getBudgetById:(n,r,a)=>(0,t.BudgetsApiFp)(e).getBudgetById(n,r,a)(),getBudgetSettingsById:(n,r)=>(0,t.BudgetsApiFp)(e).getBudgetSettingsById(n,r)(),getBudgets:(n,r)=>(0,t.BudgetsApiFp)(e).getBudgets(n,r)()}},t.BudgetsApi=class extends s{getBudgetById(e,n,r){return(0,t.BudgetsApiFp)(this.configuration).getBudgetById(e,n,r)()}getBudgetSettingsById(e,n){return(0,t.BudgetsApiFp)(this.configuration).getBudgetSettingsById(e,n)()}getBudgets(e,n){return(0,t.BudgetsApiFp)(this.configuration).getBudgets(e,n)()}},t.CategoriesApiFetchParamCreator=function(e){return{getCategories(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getCategories.");const a="/budgets/{budget_id}/categories".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}void 0!==n&&(d.last_knowledge_of_server=n);const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}},getCategoryById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getCategoryById.");if(null==n)throw new c("category_id","Required parameter category_id was null or undefined when calling getCategoryById.");const a="/budgets/{budget_id}/categories/{category_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{category_id}",encodeURIComponent(String(n))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}},getMonthCategoryById(t,n,r,a={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getMonthCategoryById.");if(null==n)throw new c("month","Required parameter month was null or undefined when calling getMonthCategoryById.");if(null==r)throw new c("category_id","Required parameter category_id was null or undefined when calling getMonthCategoryById.");const s="/budgets/{budget_id}/months/{month}/categories/{category_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{month}",encodeURIComponent(i(n))).replace("{category_id}",encodeURIComponent(String(r))),u=new URL(s,"https://example.com"),d=Object.assign({method:"GET"},a),h={},l={};if(h["User-Agent"]=o,h.Accept="application/json",e&&e.apiKey){const t=e.apiKey;h.Authorization=t}const p=new URLSearchParams(u.search);for(const e in l)p.set(e,l[e]);for(const e in a.query)p.set(e,a.query[e]);return u.search=new URLSearchParams(p).toString(),d.headers=Object.assign({},h,a.headers),{url:u.pathname+u.search+u.hash,options:d}},updateMonthCategory(t,n,r,a,s={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling updateMonthCategory.");if(null==n)throw new c("month","Required parameter month was null or undefined when calling updateMonthCategory.");if(null==r)throw new c("category_id","Required parameter category_id was null or undefined when calling updateMonthCategory.");if(null==a)throw new c("data","Required parameter data was null or undefined when calling updateMonthCategory.");const u="/budgets/{budget_id}/months/{month}/categories/{category_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{month}",encodeURIComponent(i(n))).replace("{category_id}",encodeURIComponent(String(r))),d=new URL(u,"https://example.com"),h=Object.assign({method:"PATCH"},s),l={},p={};if(l["User-Agent"]=o,l.Accept="application/json",e&&e.apiKey){const t=e.apiKey;l.Authorization=t}l["Content-Type"]="application/json";const g=new URLSearchParams(d.search);for(const e in p)g.set(e,p[e]);for(const e in s.query)g.set(e,s.query[e]);return d.search=new URLSearchParams(g).toString(),h.headers=Object.assign({},l,s.headers),h.body=JSON.stringify(a||{}),{url:d.pathname+d.search+d.hash,options:h}}}},t.CategoriesApiFp=function(e){return{getCategories(n,a,o){const i=(0,t.CategoriesApiFetchParamCreator)(e).getCategories(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getCategoryById(n,a,o){const i=(0,t.CategoriesApiFetchParamCreator)(e).getCategoryById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getMonthCategoryById(n,a,o,i){const s=(0,t.CategoriesApiFetchParamCreator)(e).getMonthCategoryById(n,a,o,i);return(t=fetch)=>t(e.basePath+s.url,s.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},updateMonthCategory(n,a,o,i,s){const c=(0,t.CategoriesApiFetchParamCreator)(e).updateMonthCategory(n,a,o,i,s);return(t=fetch)=>t(e.basePath+c.url,c.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.CategoriesApiFactory=function(e){return{getCategories:(n,r,a)=>(0,t.CategoriesApiFp)(e).getCategories(n,r,a)(),getCategoryById:(n,r,a)=>(0,t.CategoriesApiFp)(e).getCategoryById(n,r,a)(),getMonthCategoryById:(n,r,a,o)=>(0,t.CategoriesApiFp)(e).getMonthCategoryById(n,r,a,o)(),updateMonthCategory:(n,r,a,o,i)=>(0,t.CategoriesApiFp)(e).updateMonthCategory(n,r,a,o,i)()}},t.CategoriesApi=class extends s{getCategories(e,n,r){return(0,t.CategoriesApiFp)(this.configuration).getCategories(e,n,r)()}getCategoryById(e,n,r){return(0,t.CategoriesApiFp)(this.configuration).getCategoryById(e,n,r)()}getMonthCategoryById(e,n,r,a){return(0,t.CategoriesApiFp)(this.configuration).getMonthCategoryById(e,n,r,a)()}updateMonthCategory(e,n,r,a,o){return(0,t.CategoriesApiFp)(this.configuration).updateMonthCategory(e,n,r,a,o)()}},t.DeprecatedApiFetchParamCreator=function(e){return{bulkCreateTransactions(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling bulkCreateTransactions.");if(null==n)throw new c("transactions","Required parameter transactions was null or undefined when calling bulkCreateTransactions.");const a="/budgets/{budget_id}/transactions/bulk".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"POST"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}u["Content-Type"]="application/json";const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),s.body=JSON.stringify(n||{}),{url:i.pathname+i.search+i.hash,options:s}}}},t.DeprecatedApiFp=function(e){return{bulkCreateTransactions(n,a,o){const i=(0,t.DeprecatedApiFetchParamCreator)(e).bulkCreateTransactions(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.DeprecatedApiFactory=function(e){return{bulkCreateTransactions:(n,r,a)=>(0,t.DeprecatedApiFp)(e).bulkCreateTransactions(n,r,a)()}},t.DeprecatedApi=class extends s{bulkCreateTransactions(e,n,r){return(0,t.DeprecatedApiFp)(this.configuration).bulkCreateTransactions(e,n,r)()}},t.MonthsApiFetchParamCreator=function(e){return{getBudgetMonth(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getBudgetMonth.");if(null==n)throw new c("month","Required parameter month was null or undefined when calling getBudgetMonth.");const a="/budgets/{budget_id}/months/{month}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{month}",encodeURIComponent(i(n))),s=new URL(a,"https://example.com"),u=Object.assign({method:"GET"},r),d={},h={};if(d["User-Agent"]=o,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}const l=new URLSearchParams(s.search);for(const e in h)l.set(e,h[e]);for(const e in r.query)l.set(e,r.query[e]);return s.search=new URLSearchParams(l).toString(),u.headers=Object.assign({},d,r.headers),{url:s.pathname+s.search+s.hash,options:u}},getBudgetMonths(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getBudgetMonths.");const a="/budgets/{budget_id}/months".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}void 0!==n&&(d.last_knowledge_of_server=n);const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}}}},t.MonthsApiFp=function(e){return{getBudgetMonth(n,a,o){const i=(0,t.MonthsApiFetchParamCreator)(e).getBudgetMonth(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getBudgetMonths(n,a,o){const i=(0,t.MonthsApiFetchParamCreator)(e).getBudgetMonths(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.MonthsApiFactory=function(e){return{getBudgetMonth:(n,r,a)=>(0,t.MonthsApiFp)(e).getBudgetMonth(n,r,a)(),getBudgetMonths:(n,r,a)=>(0,t.MonthsApiFp)(e).getBudgetMonths(n,r,a)()}},t.MonthsApi=class extends s{getBudgetMonth(e,n,r){return(0,t.MonthsApiFp)(this.configuration).getBudgetMonth(e,n,r)()}getBudgetMonths(e,n,r){return(0,t.MonthsApiFp)(this.configuration).getBudgetMonths(e,n,r)()}},t.PayeeLocationsApiFetchParamCreator=function(e){return{getPayeeLocationById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getPayeeLocationById.");if(null==n)throw new c("payee_location_id","Required parameter payee_location_id was null or undefined when calling getPayeeLocationById.");const a="/budgets/{budget_id}/payee_locations/{payee_location_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{payee_location_id}",encodeURIComponent(String(n))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}},getPayeeLocations(t,n={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getPayeeLocations.");const r="/budgets/{budget_id}/payee_locations".replace("{budget_id}",encodeURIComponent(String(t))),a=new URL(r,"https://example.com"),i=Object.assign({method:"GET"},n),s={},u={};if(s["User-Agent"]=o,s.Accept="application/json",e&&e.apiKey){const t=e.apiKey;s.Authorization=t}const d=new URLSearchParams(a.search);for(const e in u)d.set(e,u[e]);for(const e in n.query)d.set(e,n.query[e]);return a.search=new URLSearchParams(d).toString(),i.headers=Object.assign({},s,n.headers),{url:a.pathname+a.search+a.hash,options:i}},getPayeeLocationsByPayee(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getPayeeLocationsByPayee.");if(null==n)throw new c("payee_id","Required parameter payee_id was null or undefined when calling getPayeeLocationsByPayee.");const a="/budgets/{budget_id}/payees/{payee_id}/payee_locations".replace("{budget_id}",encodeURIComponent(String(t))).replace("{payee_id}",encodeURIComponent(String(n))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}}}},t.PayeeLocationsApiFp=function(e){return{getPayeeLocationById(n,a,o){const i=(0,t.PayeeLocationsApiFetchParamCreator)(e).getPayeeLocationById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getPayeeLocations(n,a){const o=(0,t.PayeeLocationsApiFetchParamCreator)(e).getPayeeLocations(n,a);return(t=fetch)=>t(e.basePath+o.url,o.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getPayeeLocationsByPayee(n,a,o){const i=(0,t.PayeeLocationsApiFetchParamCreator)(e).getPayeeLocationsByPayee(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.PayeeLocationsApiFactory=function(e){return{getPayeeLocationById:(n,r,a)=>(0,t.PayeeLocationsApiFp)(e).getPayeeLocationById(n,r,a)(),getPayeeLocations:(n,r)=>(0,t.PayeeLocationsApiFp)(e).getPayeeLocations(n,r)(),getPayeeLocationsByPayee:(n,r,a)=>(0,t.PayeeLocationsApiFp)(e).getPayeeLocationsByPayee(n,r,a)()}},t.PayeeLocationsApi=class extends s{getPayeeLocationById(e,n,r){return(0,t.PayeeLocationsApiFp)(this.configuration).getPayeeLocationById(e,n,r)()}getPayeeLocations(e,n){return(0,t.PayeeLocationsApiFp)(this.configuration).getPayeeLocations(e,n)()}getPayeeLocationsByPayee(e,n,r){return(0,t.PayeeLocationsApiFp)(this.configuration).getPayeeLocationsByPayee(e,n,r)()}},t.PayeesApiFetchParamCreator=function(e){return{getPayeeById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getPayeeById.");if(null==n)throw new c("payee_id","Required parameter payee_id was null or undefined when calling getPayeeById.");const a="/budgets/{budget_id}/payees/{payee_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{payee_id}",encodeURIComponent(String(n))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}},getPayees(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getPayees.");const a="/budgets/{budget_id}/payees".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}void 0!==n&&(d.last_knowledge_of_server=n);const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}}}},t.PayeesApiFp=function(e){return{getPayeeById(n,a,o){const i=(0,t.PayeesApiFetchParamCreator)(e).getPayeeById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getPayees(n,a,o){const i=(0,t.PayeesApiFetchParamCreator)(e).getPayees(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.PayeesApiFactory=function(e){return{getPayeeById:(n,r,a)=>(0,t.PayeesApiFp)(e).getPayeeById(n,r,a)(),getPayees:(n,r,a)=>(0,t.PayeesApiFp)(e).getPayees(n,r,a)()}},t.PayeesApi=class extends s{getPayeeById(e,n,r){return(0,t.PayeesApiFp)(this.configuration).getPayeeById(e,n,r)()}getPayees(e,n,r){return(0,t.PayeesApiFp)(this.configuration).getPayees(e,n,r)()}},t.ScheduledTransactionsApiFetchParamCreator=function(e){return{getScheduledTransactionById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getScheduledTransactionById.");if(null==n)throw new c("scheduled_transaction_id","Required parameter scheduled_transaction_id was null or undefined when calling getScheduledTransactionById.");const a="/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{scheduled_transaction_id}",encodeURIComponent(String(n))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}},getScheduledTransactions(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getScheduledTransactions.");const a="/budgets/{budget_id}/scheduled_transactions".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}void 0!==n&&(d.last_knowledge_of_server=n);const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}}}},t.ScheduledTransactionsApiFp=function(e){return{getScheduledTransactionById(n,a,o){const i=(0,t.ScheduledTransactionsApiFetchParamCreator)(e).getScheduledTransactionById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getScheduledTransactions(n,a,o){const i=(0,t.ScheduledTransactionsApiFetchParamCreator)(e).getScheduledTransactions(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.ScheduledTransactionsApiFactory=function(e){return{getScheduledTransactionById:(n,r,a)=>(0,t.ScheduledTransactionsApiFp)(e).getScheduledTransactionById(n,r,a)(),getScheduledTransactions:(n,r,a)=>(0,t.ScheduledTransactionsApiFp)(e).getScheduledTransactions(n,r,a)()}},t.ScheduledTransactionsApi=class extends s{getScheduledTransactionById(e,n,r){return(0,t.ScheduledTransactionsApiFp)(this.configuration).getScheduledTransactionById(e,n,r)()}getScheduledTransactions(e,n,r){return(0,t.ScheduledTransactionsApiFp)(this.configuration).getScheduledTransactions(e,n,r)()}},t.TransactionsApiFetchParamCreator=function(e){return{createTransaction(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling createTransaction.");if(null==n)throw new c("data","Required parameter data was null or undefined when calling createTransaction.");const a="/budgets/{budget_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"POST"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}u["Content-Type"]="application/json";const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),s.body=JSON.stringify(n||{}),{url:i.pathname+i.search+i.hash,options:s}},deleteTransaction(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling deleteTransaction.");if(null==n)throw new c("transaction_id","Required parameter transaction_id was null or undefined when calling deleteTransaction.");const a="/budgets/{budget_id}/transactions/{transaction_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{transaction_id}",encodeURIComponent(String(n))),i=new URL(a,"https://example.com"),s=Object.assign({method:"DELETE"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}},getTransactionById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getTransactionById.");if(null==n)throw new c("transaction_id","Required parameter transaction_id was null or undefined when calling getTransactionById.");const a="/budgets/{budget_id}/transactions/{transaction_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{transaction_id}",encodeURIComponent(String(n))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}},getTransactions(t,n,r,a,s={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getTransactions.");const u="/budgets/{budget_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))),d=new URL(u,"https://example.com"),h=Object.assign({method:"GET"},s),l={},p={};if(l["User-Agent"]=o,l.Accept="application/json",e&&e.apiKey){const t=e.apiKey;l.Authorization=t}void 0!==n&&(p.since_date=i(n)),void 0!==r&&(p.type=r),void 0!==a&&(p.last_knowledge_of_server=a);const g=new URLSearchParams(d.search);for(const e in p)g.set(e,p[e]);for(const e in s.query)g.set(e,s.query[e]);return d.search=new URLSearchParams(g).toString(),h.headers=Object.assign({},l,s.headers),{url:d.pathname+d.search+d.hash,options:h}},getTransactionsByAccount(t,n,r,a,s,u={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getTransactionsByAccount.");if(null==n)throw new c("account_id","Required parameter account_id was null or undefined when calling getTransactionsByAccount.");const d="/budgets/{budget_id}/accounts/{account_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))).replace("{account_id}",encodeURIComponent(String(n))),h=new URL(d,"https://example.com"),l=Object.assign({method:"GET"},u),p={},g={};if(p["User-Agent"]=o,p.Accept="application/json",e&&e.apiKey){const t=e.apiKey;p.Authorization=t}void 0!==r&&(g.since_date=i(r)),void 0!==a&&(g.type=a),void 0!==s&&(g.last_knowledge_of_server=s);const y=new URLSearchParams(h.search);for(const e in g)y.set(e,g[e]);for(const e in u.query)y.set(e,u.query[e]);return h.search=new URLSearchParams(y).toString(),l.headers=Object.assign({},p,u.headers),{url:h.pathname+h.search+h.hash,options:l}},getTransactionsByCategory(t,n,r,a,s,u={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getTransactionsByCategory.");if(null==n)throw new c("category_id","Required parameter category_id was null or undefined when calling getTransactionsByCategory.");const d="/budgets/{budget_id}/categories/{category_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))).replace("{category_id}",encodeURIComponent(String(n))),h=new URL(d,"https://example.com"),l=Object.assign({method:"GET"},u),p={},g={};if(p["User-Agent"]=o,p.Accept="application/json",e&&e.apiKey){const t=e.apiKey;p.Authorization=t}void 0!==r&&(g.since_date=i(r)),void 0!==a&&(g.type=a),void 0!==s&&(g.last_knowledge_of_server=s);const y=new URLSearchParams(h.search);for(const e in g)y.set(e,g[e]);for(const e in u.query)y.set(e,u.query[e]);return h.search=new URLSearchParams(y).toString(),l.headers=Object.assign({},p,u.headers),{url:h.pathname+h.search+h.hash,options:l}},getTransactionsByPayee(t,n,r,a,s,u={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getTransactionsByPayee.");if(null==n)throw new c("payee_id","Required parameter payee_id was null or undefined when calling getTransactionsByPayee.");const d="/budgets/{budget_id}/payees/{payee_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))).replace("{payee_id}",encodeURIComponent(String(n))),h=new URL(d,"https://example.com"),l=Object.assign({method:"GET"},u),p={},g={};if(p["User-Agent"]=o,p.Accept="application/json",e&&e.apiKey){const t=e.apiKey;p.Authorization=t}void 0!==r&&(g.since_date=i(r)),void 0!==a&&(g.type=a),void 0!==s&&(g.last_knowledge_of_server=s);const y=new URLSearchParams(h.search);for(const e in g)y.set(e,g[e]);for(const e in u.query)y.set(e,u.query[e]);return h.search=new URLSearchParams(y).toString(),l.headers=Object.assign({},p,u.headers),{url:h.pathname+h.search+h.hash,options:l}},importTransactions(t,n={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling importTransactions.");const r="/budgets/{budget_id}/transactions/import".replace("{budget_id}",encodeURIComponent(String(t))),a=new URL(r,"https://example.com"),i=Object.assign({method:"POST"},n),s={},u={};if(s["User-Agent"]=o,s.Accept="application/json",e&&e.apiKey){const t=e.apiKey;s.Authorization=t}const d=new URLSearchParams(a.search);for(const e in u)d.set(e,u[e]);for(const e in n.query)d.set(e,n.query[e]);return a.search=new URLSearchParams(d).toString(),i.headers=Object.assign({},s,n.headers),{url:a.pathname+a.search+a.hash,options:i}},updateTransaction(t,n,r,a={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling updateTransaction.");if(null==n)throw new c("transaction_id","Required parameter transaction_id was null or undefined when calling updateTransaction.");if(null==r)throw new c("data","Required parameter data was null or undefined when calling updateTransaction.");const i="/budgets/{budget_id}/transactions/{transaction_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{transaction_id}",encodeURIComponent(String(n))),s=new URL(i,"https://example.com"),u=Object.assign({method:"PUT"},a),d={},h={};if(d["User-Agent"]=o,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}d["Content-Type"]="application/json";const l=new URLSearchParams(s.search);for(const e in h)l.set(e,h[e]);for(const e in a.query)l.set(e,a.query[e]);return s.search=new URLSearchParams(l).toString(),u.headers=Object.assign({},d,a.headers),u.body=JSON.stringify(r||{}),{url:s.pathname+s.search+s.hash,options:u}},updateTransactions(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling updateTransactions.");if(null==n)throw new c("data","Required parameter data was null or undefined when calling updateTransactions.");const a="/budgets/{budget_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"PATCH"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}u["Content-Type"]="application/json";const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),s.body=JSON.stringify(n||{}),{url:i.pathname+i.search+i.hash,options:s}}}},t.TransactionsApiFp=function(e){return{createTransaction(n,a,o){const i=(0,t.TransactionsApiFetchParamCreator)(e).createTransaction(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},deleteTransaction(n,a,o){const i=(0,t.TransactionsApiFetchParamCreator)(e).deleteTransaction(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getTransactionById(n,a,o){const i=(0,t.TransactionsApiFetchParamCreator)(e).getTransactionById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getTransactions(n,a,o,i,s){const c=(0,t.TransactionsApiFetchParamCreator)(e).getTransactions(n,a,o,i,s);return(t=fetch)=>t(e.basePath+c.url,c.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getTransactionsByAccount(n,a,o,i,s,c){const u=(0,t.TransactionsApiFetchParamCreator)(e).getTransactionsByAccount(n,a,o,i,s,c);return(t=fetch)=>t(e.basePath+u.url,u.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getTransactionsByCategory(n,a,o,i,s,c){const u=(0,t.TransactionsApiFetchParamCreator)(e).getTransactionsByCategory(n,a,o,i,s,c);return(t=fetch)=>t(e.basePath+u.url,u.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getTransactionsByPayee(n,a,o,i,s,c){const u=(0,t.TransactionsApiFetchParamCreator)(e).getTransactionsByPayee(n,a,o,i,s,c);return(t=fetch)=>t(e.basePath+u.url,u.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},importTransactions(n,a){const o=(0,t.TransactionsApiFetchParamCreator)(e).importTransactions(n,a);return(t=fetch)=>t(e.basePath+o.url,o.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},updateTransaction(n,a,o,i){const s=(0,t.TransactionsApiFetchParamCreator)(e).updateTransaction(n,a,o,i);return(t=fetch)=>t(e.basePath+s.url,s.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},updateTransactions(n,a,o){const i=(0,t.TransactionsApiFetchParamCreator)(e).updateTransactions(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.TransactionsApiFactory=function(e){return{createTransaction:(n,r,a)=>(0,t.TransactionsApiFp)(e).createTransaction(n,r,a)(),deleteTransaction:(n,r,a)=>(0,t.TransactionsApiFp)(e).deleteTransaction(n,r,a)(),getTransactionById:(n,r,a)=>(0,t.TransactionsApiFp)(e).getTransactionById(n,r,a)(),getTransactions:(n,r,a,o,i)=>(0,t.TransactionsApiFp)(e).getTransactions(n,r,a,o,i)(),getTransactionsByAccount:(n,r,a,o,i,s)=>(0,t.TransactionsApiFp)(e).getTransactionsByAccount(n,r,a,o,i,s)(),getTransactionsByCategory:(n,r,a,o,i,s)=>(0,t.TransactionsApiFp)(e).getTransactionsByCategory(n,r,a,o,i,s)(),getTransactionsByPayee:(n,r,a,o,i,s)=>(0,t.TransactionsApiFp)(e).getTransactionsByPayee(n,r,a,o,i,s)(),importTransactions:(n,r)=>(0,t.TransactionsApiFp)(e).importTransactions(n,r)(),updateTransaction:(n,r,a,o)=>(0,t.TransactionsApiFp)(e).updateTransaction(n,r,a,o)(),updateTransactions:(n,r,a)=>(0,t.TransactionsApiFp)(e).updateTransactions(n,r,a)()}},t.TransactionsApi=class extends s{createTransaction(e,n,r){return(0,t.TransactionsApiFp)(this.configuration).createTransaction(e,n,r)()}deleteTransaction(e,n,r){return(0,t.TransactionsApiFp)(this.configuration).deleteTransaction(e,n,r)()}getTransactionById(e,n,r){return(0,t.TransactionsApiFp)(this.configuration).getTransactionById(e,n,r)()}getTransactions(e,n,r,a,o){return(0,t.TransactionsApiFp)(this.configuration).getTransactions(e,n,r,a,o)()}getTransactionsByAccount(e,n,r,a,o,i){return(0,t.TransactionsApiFp)(this.configuration).getTransactionsByAccount(e,n,r,a,o,i)()}getTransactionsByCategory(e,n,r,a,o,i){return(0,t.TransactionsApiFp)(this.configuration).getTransactionsByCategory(e,n,r,a,o,i)()}getTransactionsByPayee(e,n,r,a,o,i){return(0,t.TransactionsApiFp)(this.configuration).getTransactionsByPayee(e,n,r,a,o,i)()}importTransactions(e,n){return(0,t.TransactionsApiFp)(this.configuration).importTransactions(e,n)()}updateTransaction(e,n,r,a){return(0,t.TransactionsApiFp)(this.configuration).updateTransaction(e,n,r,a)()}updateTransactions(e,n,r){return(0,t.TransactionsApiFp)(this.configuration).updateTransactions(e,n,r)()}},t.UserApiFetchParamCreator=function(e){return{getUser(t={}){const n=new URL("/user","https://example.com"),r=Object.assign({method:"GET"},t),a={},i={};if(a["User-Agent"]=o,a.Accept="application/json",e&&e.apiKey){const t=e.apiKey;a.Authorization=t}const s=new URLSearchParams(n.search);for(const e in i)s.set(e,i[e]);for(const e in t.query)s.set(e,t.query[e]);return n.search=new URLSearchParams(s).toString(),r.headers=Object.assign({},a,t.headers),{url:n.pathname+n.search+n.hash,options:r}}}},t.UserApiFp=function(e){return{getUser(n){const a=(0,t.UserApiFetchParamCreator)(e).getUser(n);return(t=fetch)=>t(e.basePath+a.url,a.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.UserApiFactory=function(e){return{getUser:n=>(0,t.UserApiFp)(e).getUser(n)()}},t.UserApi=class extends s{getUser(e){return(0,t.UserApiFp)(this.configuration).getUser(e)()}}},610:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Configuration=void 0,t.Configuration=class{constructor(e,t){this.apiKey=`Bearer ${e}`,this.basePath=t}}},465:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.api=t.utils=t.API=void 0;const o=n(610),i=n(665),s=n(802),c=n(679);t.utils=c.default,a(n(665),t);class u{constructor(e,t="https://api.youneedabudget.com/v1"){this._configuration=new o.Configuration(e,t)}get user(){return this._user||(this._user=new i.UserApi(this._configuration)),this._user}get budgets(){return this._budgets||(this._budgets=new i.BudgetsApi(this._configuration)),this._budgets}get accounts(){return this._accounts||(this._accounts=new i.AccountsApi(this._configuration)),this._accounts}get categories(){return this._categories||(this._categories=new i.CategoriesApi(this._configuration)),this._categories}get months(){return this._months||(this._months=new i.MonthsApi(this._configuration)),this._months}get payees(){return this._payees||(this._payees=new i.PayeesApi(this._configuration)),this._payees}get payeeLocations(){return this._payeeLocations||(this._payeeLocations=new i.PayeeLocationsApi(this._configuration)),this._payeeLocations}get transactions(){return this._transactions||(this._transactions=new s.TransactionsApi(this._configuration)),this._transactions}get scheduledTransactions(){return this._scheduledTransactions||(this._scheduledTransactions=new i.ScheduledTransactionsApi(this._configuration)),this._scheduledTransactions}}t.api=u,t.API=u},802:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionsApi=void 0;const r=n(665);class a extends r.TransactionsApi{getTransactionsByType(e,t,n,a){return r.TransactionsApiFp(this.configuration).getTransactions(e,void 0,t,n,a)()}createTransactions(e,t,n){return r.TransactionsApiFp(this.configuration).createTransaction(e,t,n)()}bulkCreateTransactions(e,t,n){return r.DeprecatedApiFp(this.configuration).bulkCreateTransactions(e,t,n)()}}t.TransactionsApi=a},679:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={getCurrentMonthInISOFormat(){return`${this.getCurrentDateInISOFormat().substr(0,7)}-01`},getCurrentDateInISOFormat(){let e=new Date;return new Date(e.getTime()-6e4*e.getTimezoneOffset()).toISOString()},convertFromISODateString:e=>new Date(new Date(e)),convertMilliUnitsToCurrencyAmount(e,t=2){let n=Math.pow(10,3-Math.min(3,t));n=1/n;let r=Math.round(e*n)/n*(.1/Math.pow(10,2));return Number(r.toFixed(t))}}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var r=n(465);ynab=r})();
|
|
1
|
+
var ynab;(()=>{var e={559:function(e,t,n){var r;!function(a){"use strict";function o(e){var n=e&&e.Promise||a.Promise,r=e&&e.XMLHttpRequest||a.XMLHttpRequest;return function(){var e=Object.create(a,{fetch:{value:void 0,writable:!0}});return function(t){var a=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==a&&a,o="URLSearchParams"in a,i="Symbol"in a&&"iterator"in Symbol,s="FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch(e){return!1}}(),c="FormData"in a,u="ArrayBuffer"in a;if(u)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(e){return e&&d.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function p(e){return"string"!=typeof e&&(e=String(e)),e}function g(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function y(e){this.map={},e instanceof y?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function f(e){if(e.bodyUsed)return n.reject(new TypeError("Already read"));e.bodyUsed=!0}function m(e){return new n((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function w(e){var t=new FileReader,n=m(t);return t.readAsArrayBuffer(e),n}function b(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function A(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:s&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:c&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:o&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u&&s&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=b(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u&&(ArrayBuffer.prototype.isPrototypeOf(e)||h(e))?this._bodyArrayBuffer=b(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return n.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return n.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return n.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?n.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):n.resolve(this._bodyArrayBuffer)):this.blob().then(w)}),this.text=function(){var e,t,r,a=f(this);if(a)return a;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=m(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return n.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return n.resolve(this._bodyText)},c&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}y.prototype.append=function(e,t){e=l(e),t=p(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},y.prototype.delete=function(e){delete this.map[l(e)]},y.prototype.get=function(e){return e=l(e),this.has(e)?this.map[e]:null},y.prototype.has=function(e){return this.map.hasOwnProperty(l(e))},y.prototype.set=function(e,t){this.map[l(e)]=p(t)},y.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},y.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),g(e)},y.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),g(e)},y.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),g(e)},i&&(y.prototype[Symbol.iterator]=y.prototype.entries);var T=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function P(e,t){if(!(this instanceof P))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,a=(t=t||{}).body;if(e instanceof P){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new y(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new y(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),T.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(a),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;if(o.test(this.url))this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}})),t}function R(e,t){if(!(this instanceof R))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"",this.headers=new y(t.headers),this.url=t.url||"",this._initBody(e)}P.prototype.clone=function(){return new P(this,{body:this._bodyInit})},A.call(P.prototype),A.call(R.prototype),R.prototype.clone=function(){return new R(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},R.error=function(){var e=new R(null,{status:0,statusText:""});return e.type="error",e};var C=[301,302,303,307,308];R.redirect=function(e,t){if(-1===C.indexOf(t))throw new RangeError("Invalid status code");return new R(null,{status:t,headers:{location:e}})},t.DOMException=a.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function B(e,o){return new n((function(n,i){var c=new P(e,o);if(c.signal&&c.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var d=new r;function h(){d.abort()}d.onload=function(){var e,t,r={status:d.status,statusText:d.statusText,headers:(e=d.getAllResponseHeaders()||"",t=new y,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var a=n.join(":").trim();t.append(r,a)}})),t)};r.url="responseURL"in d?d.responseURL:r.headers.get("X-Request-URL");var a="response"in d?d.response:d.responseText;setTimeout((function(){n(new R(a,r))}),0)},d.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},d.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},d.onabort=function(){setTimeout((function(){i(new t.DOMException("Aborted","AbortError"))}),0)},d.open(c.method,function(e){try{return""===e&&a.location.href?a.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?d.withCredentials=!0:"omit"===c.credentials&&(d.withCredentials=!1),"responseType"in d&&(s?d.responseType="blob":u&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(d.responseType="arraybuffer")),!o||"object"!=typeof o.headers||o.headers instanceof y?c.headers.forEach((function(e,t){d.setRequestHeader(t,e)})):Object.getOwnPropertyNames(o.headers).forEach((function(e){d.setRequestHeader(e,p(o.headers[e]))})),c.signal&&(c.signal.addEventListener("abort",h),d.onreadystatechange=function(){4===d.readyState&&c.signal.removeEventListener("abort",h)}),d.send(void 0===c._bodyInit?null:c._bodyInit)}))}B.polyfill=!0,a.fetch||(a.fetch=B,a.Headers=y,a.Request=P,a.Response=R),t.Headers=y,t.Request=P,t.Response=R,t.fetch=B,Object.defineProperty(t,"__esModule",{value:!0})}(t),{fetch:e.fetch,Headers:e.Headers,Request:e.Request,Response:e.Response,DOMException:e.DOMException}}()}void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==n.g?n.g:this)},665:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserApiFetchParamCreator=t.TransactionsApi=t.TransactionsApiFactory=t.TransactionsApiFp=t.TransactionsApiFetchParamCreator=t.ScheduledTransactionsApi=t.ScheduledTransactionsApiFactory=t.ScheduledTransactionsApiFp=t.ScheduledTransactionsApiFetchParamCreator=t.PayeesApi=t.PayeesApiFactory=t.PayeesApiFp=t.PayeesApiFetchParamCreator=t.PayeeLocationsApi=t.PayeeLocationsApiFactory=t.PayeeLocationsApiFp=t.PayeeLocationsApiFetchParamCreator=t.MonthsApi=t.MonthsApiFactory=t.MonthsApiFp=t.MonthsApiFetchParamCreator=t.DeprecatedApi=t.DeprecatedApiFactory=t.DeprecatedApiFp=t.DeprecatedApiFetchParamCreator=t.CategoriesApi=t.CategoriesApiFactory=t.CategoriesApiFp=t.CategoriesApiFetchParamCreator=t.BudgetsApi=t.BudgetsApiFactory=t.BudgetsApiFp=t.BudgetsApiFetchParamCreator=t.AccountsApi=t.AccountsApiFactory=t.AccountsApiFp=t.AccountsApiFetchParamCreator=t.TransactionDetail=t.ScheduledTransactionDetail=t.SaveTransactionWithId=t.SaveTransaction=t.HybridTransaction=t.TransactionSummary=t.ScheduledTransactionSummary=t.SaveTransactionWithOptionalFields=t.Category=t.AccountType=t.RequiredError=t.BaseAPI=t.COLLECTION_FORMATS=void 0,t.UserApi=t.UserApiFactory=t.UserApiFp=void 0;const a=n(559)();globalThis.fetch||(globalThis.fetch=a.fetch,globalThis.Response=a.Response,globalThis.Headers=a.Headers,globalThis.Request=a.Request);const o="api_client/js/1.45.0";function i(e){return e instanceof Date?e.toISOString().substring(0,10):e}t.COLLECTION_FORMATS={csv:",",ssv:" ",tsv:"\t",pipes:"|"};class s{constructor(e){e&&(this.configuration=e)}}t.BaseAPI=s;class c extends Error{constructor(e,t){super(t),this.field=e}}var u;t.RequiredError=c,(u=t.AccountType||(t.AccountType={}))[u.Checking="checking"]="Checking",u[u.Savings="savings"]="Savings",u[u.Cash="cash"]="Cash",u[u.CreditCard="creditCard"]="CreditCard",u[u.LineOfCredit="lineOfCredit"]="LineOfCredit",u[u.OtherAsset="otherAsset"]="OtherAsset",u[u.OtherLiability="otherLiability"]="OtherLiability",u[u.Mortgage="mortgage"]="Mortgage",u[u.AutoLoan="autoLoan"]="AutoLoan",u[u.StudentLoan="studentLoan"]="StudentLoan",u[u.PersonalLoan="personalLoan"]="PersonalLoan",u[u.MedicalDebt="medicalDebt"]="MedicalDebt",u[u.OtherDebt="otherDebt"]="OtherDebt",function(e){let t;!function(e){e[e.TB="TB"]="TB",e[e.TBD="TBD"]="TBD",e[e.MF="MF"]="MF",e[e.NEED="NEED"]="NEED",e[e.DEBT="DEBT"]="DEBT"}(t=e.GoalTypeEnum||(e.GoalTypeEnum={}))}(t.Category||(t.Category={})),function(e){let t,n;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.SaveTransactionWithOptionalFields||(t.SaveTransactionWithOptionalFields={})),function(e){let t,n;!function(e){e[e.Never="never"]="Never",e[e.Daily="daily"]="Daily",e[e.Weekly="weekly"]="Weekly",e[e.EveryOtherWeek="everyOtherWeek"]="EveryOtherWeek",e[e.TwiceAMonth="twiceAMonth"]="TwiceAMonth",e[e.Every4Weeks="every4Weeks"]="Every4Weeks",e[e.Monthly="monthly"]="Monthly",e[e.EveryOtherMonth="everyOtherMonth"]="EveryOtherMonth",e[e.Every3Months="every3Months"]="Every3Months",e[e.Every4Months="every4Months"]="Every4Months",e[e.TwiceAYear="twiceAYear"]="TwiceAYear",e[e.Yearly="yearly"]="Yearly",e[e.EveryOtherYear="everyOtherYear"]="EveryOtherYear"}(t=e.FrequencyEnum||(e.FrequencyEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.ScheduledTransactionSummary||(t.ScheduledTransactionSummary={})),function(e){let t,n,r;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={})),function(e){e[e.Payment="payment"]="Payment",e[e.Refund="refund"]="Refund",e[e.Fee="fee"]="Fee",e[e.Interest="interest"]="Interest",e[e.Escrow="escrow"]="Escrow",e[e.BalancedAdjustment="balancedAdjustment"]="BalancedAdjustment",e[e.Credit="credit"]="Credit",e[e.Charge="charge"]="Charge"}(r=e.DebtTransactionTypeEnum||(e.DebtTransactionTypeEnum={}))}(t.TransactionSummary||(t.TransactionSummary={})),function(e){let t,n,r,a;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={})),function(e){e[e.Payment="payment"]="Payment",e[e.Refund="refund"]="Refund",e[e.Fee="fee"]="Fee",e[e.Interest="interest"]="Interest",e[e.Escrow="escrow"]="Escrow",e[e.BalancedAdjustment="balancedAdjustment"]="BalancedAdjustment",e[e.Credit="credit"]="Credit",e[e.Charge="charge"]="Charge"}(r=e.DebtTransactionTypeEnum||(e.DebtTransactionTypeEnum={})),function(e){e[e.Transaction="transaction"]="Transaction",e[e.Subtransaction="subtransaction"]="Subtransaction"}(a=e.TypeEnum||(e.TypeEnum={}))}(t.HybridTransaction||(t.HybridTransaction={})),function(e){let t,n;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.SaveTransaction||(t.SaveTransaction={})),function(e){let t,n;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.SaveTransactionWithId||(t.SaveTransactionWithId={})),function(e){let t,n;!function(e){e[e.Never="never"]="Never",e[e.Daily="daily"]="Daily",e[e.Weekly="weekly"]="Weekly",e[e.EveryOtherWeek="everyOtherWeek"]="EveryOtherWeek",e[e.TwiceAMonth="twiceAMonth"]="TwiceAMonth",e[e.Every4Weeks="every4Weeks"]="Every4Weeks",e[e.Monthly="monthly"]="Monthly",e[e.EveryOtherMonth="everyOtherMonth"]="EveryOtherMonth",e[e.Every3Months="every3Months"]="Every3Months",e[e.Every4Months="every4Months"]="Every4Months",e[e.TwiceAYear="twiceAYear"]="TwiceAYear",e[e.Yearly="yearly"]="Yearly",e[e.EveryOtherYear="everyOtherYear"]="EveryOtherYear"}(t=e.FrequencyEnum||(e.FrequencyEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.ScheduledTransactionDetail||(t.ScheduledTransactionDetail={})),function(e){let t,n,r;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={})),function(e){e[e.Payment="payment"]="Payment",e[e.Refund="refund"]="Refund",e[e.Fee="fee"]="Fee",e[e.Interest="interest"]="Interest",e[e.Escrow="escrow"]="Escrow",e[e.BalancedAdjustment="balancedAdjustment"]="BalancedAdjustment",e[e.Credit="credit"]="Credit",e[e.Charge="charge"]="Charge"}(r=e.DebtTransactionTypeEnum||(e.DebtTransactionTypeEnum={}))}(t.TransactionDetail||(t.TransactionDetail={})),t.AccountsApiFetchParamCreator=function(e){return{createAccount(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling createAccount.");if(null==n)throw new c("data","Required parameter data was null or undefined when calling createAccount.");const a="/budgets/{budget_id}/accounts".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"POST"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}u["Content-Type"]="application/json";const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),s.body=JSON.stringify(n||{}),{url:i.pathname+i.search+i.hash,options:s}},getAccountById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getAccountById.");if(null==n)throw new c("account_id","Required parameter account_id was null or undefined when calling getAccountById.");const a="/budgets/{budget_id}/accounts/{account_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{account_id}",encodeURIComponent(String(n))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}},getAccounts(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getAccounts.");const a="/budgets/{budget_id}/accounts".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}void 0!==n&&(d.last_knowledge_of_server=n);const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}}}},t.AccountsApiFp=function(e){return{createAccount(n,a,o){const i=(0,t.AccountsApiFetchParamCreator)(e).createAccount(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getAccountById(n,a,o){const i=(0,t.AccountsApiFetchParamCreator)(e).getAccountById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getAccounts(n,a,o){const i=(0,t.AccountsApiFetchParamCreator)(e).getAccounts(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.AccountsApiFactory=function(e){return{createAccount:(n,r,a)=>(0,t.AccountsApiFp)(e).createAccount(n,r,a)(),getAccountById:(n,r,a)=>(0,t.AccountsApiFp)(e).getAccountById(n,r,a)(),getAccounts:(n,r,a)=>(0,t.AccountsApiFp)(e).getAccounts(n,r,a)()}},t.AccountsApi=class extends s{createAccount(e,n,r){return(0,t.AccountsApiFp)(this.configuration).createAccount(e,n,r)()}getAccountById(e,n,r){return(0,t.AccountsApiFp)(this.configuration).getAccountById(e,n,r)()}getAccounts(e,n,r){return(0,t.AccountsApiFp)(this.configuration).getAccounts(e,n,r)()}},t.BudgetsApiFetchParamCreator=function(e){return{getBudgetById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getBudgetById.");const a="/budgets/{budget_id}".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}void 0!==n&&(d.last_knowledge_of_server=n);const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}},getBudgetSettingsById(t,n={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getBudgetSettingsById.");const r="/budgets/{budget_id}/settings".replace("{budget_id}",encodeURIComponent(String(t))),a=new URL(r,"https://example.com"),i=Object.assign({method:"GET"},n),s={},u={};if(s["User-Agent"]=o,s.Accept="application/json",e&&e.apiKey){const t=e.apiKey;s.Authorization=t}const d=new URLSearchParams(a.search);for(const e in u)d.set(e,u[e]);for(const e in n.query)d.set(e,n.query[e]);return a.search=new URLSearchParams(d).toString(),i.headers=Object.assign({},s,n.headers),{url:a.pathname+a.search+a.hash,options:i}},getBudgets(t,n={}){const r=new URL("/budgets","https://example.com"),a=Object.assign({method:"GET"},n),i={},s={};if(i["User-Agent"]=o,i.Accept="application/json",e&&e.apiKey){const t=e.apiKey;i.Authorization=t}void 0!==t&&(s.include_accounts=t);const c=new URLSearchParams(r.search);for(const e in s)c.set(e,s[e]);for(const e in n.query)c.set(e,n.query[e]);return r.search=new URLSearchParams(c).toString(),a.headers=Object.assign({},i,n.headers),{url:r.pathname+r.search+r.hash,options:a}}}},t.BudgetsApiFp=function(e){return{getBudgetById(n,a,o){const i=(0,t.BudgetsApiFetchParamCreator)(e).getBudgetById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getBudgetSettingsById(n,a){const o=(0,t.BudgetsApiFetchParamCreator)(e).getBudgetSettingsById(n,a);return(t=fetch)=>t(e.basePath+o.url,o.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getBudgets(n,a){const o=(0,t.BudgetsApiFetchParamCreator)(e).getBudgets(n,a);return(t=fetch)=>t(e.basePath+o.url,o.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.BudgetsApiFactory=function(e){return{getBudgetById:(n,r,a)=>(0,t.BudgetsApiFp)(e).getBudgetById(n,r,a)(),getBudgetSettingsById:(n,r)=>(0,t.BudgetsApiFp)(e).getBudgetSettingsById(n,r)(),getBudgets:(n,r)=>(0,t.BudgetsApiFp)(e).getBudgets(n,r)()}},t.BudgetsApi=class extends s{getBudgetById(e,n,r){return(0,t.BudgetsApiFp)(this.configuration).getBudgetById(e,n,r)()}getBudgetSettingsById(e,n){return(0,t.BudgetsApiFp)(this.configuration).getBudgetSettingsById(e,n)()}getBudgets(e,n){return(0,t.BudgetsApiFp)(this.configuration).getBudgets(e,n)()}},t.CategoriesApiFetchParamCreator=function(e){return{getCategories(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getCategories.");const a="/budgets/{budget_id}/categories".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}void 0!==n&&(d.last_knowledge_of_server=n);const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}},getCategoryById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getCategoryById.");if(null==n)throw new c("category_id","Required parameter category_id was null or undefined when calling getCategoryById.");const a="/budgets/{budget_id}/categories/{category_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{category_id}",encodeURIComponent(String(n))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}},getMonthCategoryById(t,n,r,a={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getMonthCategoryById.");if(null==n)throw new c("month","Required parameter month was null or undefined when calling getMonthCategoryById.");if(null==r)throw new c("category_id","Required parameter category_id was null or undefined when calling getMonthCategoryById.");const s="/budgets/{budget_id}/months/{month}/categories/{category_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{month}",encodeURIComponent(i(n))).replace("{category_id}",encodeURIComponent(String(r))),u=new URL(s,"https://example.com"),d=Object.assign({method:"GET"},a),h={},l={};if(h["User-Agent"]=o,h.Accept="application/json",e&&e.apiKey){const t=e.apiKey;h.Authorization=t}const p=new URLSearchParams(u.search);for(const e in l)p.set(e,l[e]);for(const e in a.query)p.set(e,a.query[e]);return u.search=new URLSearchParams(p).toString(),d.headers=Object.assign({},h,a.headers),{url:u.pathname+u.search+u.hash,options:d}},updateMonthCategory(t,n,r,a,s={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling updateMonthCategory.");if(null==n)throw new c("month","Required parameter month was null or undefined when calling updateMonthCategory.");if(null==r)throw new c("category_id","Required parameter category_id was null or undefined when calling updateMonthCategory.");if(null==a)throw new c("data","Required parameter data was null or undefined when calling updateMonthCategory.");const u="/budgets/{budget_id}/months/{month}/categories/{category_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{month}",encodeURIComponent(i(n))).replace("{category_id}",encodeURIComponent(String(r))),d=new URL(u,"https://example.com"),h=Object.assign({method:"PATCH"},s),l={},p={};if(l["User-Agent"]=o,l.Accept="application/json",e&&e.apiKey){const t=e.apiKey;l.Authorization=t}l["Content-Type"]="application/json";const g=new URLSearchParams(d.search);for(const e in p)g.set(e,p[e]);for(const e in s.query)g.set(e,s.query[e]);return d.search=new URLSearchParams(g).toString(),h.headers=Object.assign({},l,s.headers),h.body=JSON.stringify(a||{}),{url:d.pathname+d.search+d.hash,options:h}}}},t.CategoriesApiFp=function(e){return{getCategories(n,a,o){const i=(0,t.CategoriesApiFetchParamCreator)(e).getCategories(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getCategoryById(n,a,o){const i=(0,t.CategoriesApiFetchParamCreator)(e).getCategoryById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getMonthCategoryById(n,a,o,i){const s=(0,t.CategoriesApiFetchParamCreator)(e).getMonthCategoryById(n,a,o,i);return(t=fetch)=>t(e.basePath+s.url,s.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},updateMonthCategory(n,a,o,i,s){const c=(0,t.CategoriesApiFetchParamCreator)(e).updateMonthCategory(n,a,o,i,s);return(t=fetch)=>t(e.basePath+c.url,c.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.CategoriesApiFactory=function(e){return{getCategories:(n,r,a)=>(0,t.CategoriesApiFp)(e).getCategories(n,r,a)(),getCategoryById:(n,r,a)=>(0,t.CategoriesApiFp)(e).getCategoryById(n,r,a)(),getMonthCategoryById:(n,r,a,o)=>(0,t.CategoriesApiFp)(e).getMonthCategoryById(n,r,a,o)(),updateMonthCategory:(n,r,a,o,i)=>(0,t.CategoriesApiFp)(e).updateMonthCategory(n,r,a,o,i)()}},t.CategoriesApi=class extends s{getCategories(e,n,r){return(0,t.CategoriesApiFp)(this.configuration).getCategories(e,n,r)()}getCategoryById(e,n,r){return(0,t.CategoriesApiFp)(this.configuration).getCategoryById(e,n,r)()}getMonthCategoryById(e,n,r,a){return(0,t.CategoriesApiFp)(this.configuration).getMonthCategoryById(e,n,r,a)()}updateMonthCategory(e,n,r,a,o){return(0,t.CategoriesApiFp)(this.configuration).updateMonthCategory(e,n,r,a,o)()}},t.DeprecatedApiFetchParamCreator=function(e){return{bulkCreateTransactions(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling bulkCreateTransactions.");if(null==n)throw new c("transactions","Required parameter transactions was null or undefined when calling bulkCreateTransactions.");const a="/budgets/{budget_id}/transactions/bulk".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"POST"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}u["Content-Type"]="application/json";const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),s.body=JSON.stringify(n||{}),{url:i.pathname+i.search+i.hash,options:s}}}},t.DeprecatedApiFp=function(e){return{bulkCreateTransactions(n,a,o){const i=(0,t.DeprecatedApiFetchParamCreator)(e).bulkCreateTransactions(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.DeprecatedApiFactory=function(e){return{bulkCreateTransactions:(n,r,a)=>(0,t.DeprecatedApiFp)(e).bulkCreateTransactions(n,r,a)()}},t.DeprecatedApi=class extends s{bulkCreateTransactions(e,n,r){return(0,t.DeprecatedApiFp)(this.configuration).bulkCreateTransactions(e,n,r)()}},t.MonthsApiFetchParamCreator=function(e){return{getBudgetMonth(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getBudgetMonth.");if(null==n)throw new c("month","Required parameter month was null or undefined when calling getBudgetMonth.");const a="/budgets/{budget_id}/months/{month}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{month}",encodeURIComponent(i(n))),s=new URL(a,"https://example.com"),u=Object.assign({method:"GET"},r),d={},h={};if(d["User-Agent"]=o,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}const l=new URLSearchParams(s.search);for(const e in h)l.set(e,h[e]);for(const e in r.query)l.set(e,r.query[e]);return s.search=new URLSearchParams(l).toString(),u.headers=Object.assign({},d,r.headers),{url:s.pathname+s.search+s.hash,options:u}},getBudgetMonths(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getBudgetMonths.");const a="/budgets/{budget_id}/months".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}void 0!==n&&(d.last_knowledge_of_server=n);const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}}}},t.MonthsApiFp=function(e){return{getBudgetMonth(n,a,o){const i=(0,t.MonthsApiFetchParamCreator)(e).getBudgetMonth(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getBudgetMonths(n,a,o){const i=(0,t.MonthsApiFetchParamCreator)(e).getBudgetMonths(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.MonthsApiFactory=function(e){return{getBudgetMonth:(n,r,a)=>(0,t.MonthsApiFp)(e).getBudgetMonth(n,r,a)(),getBudgetMonths:(n,r,a)=>(0,t.MonthsApiFp)(e).getBudgetMonths(n,r,a)()}},t.MonthsApi=class extends s{getBudgetMonth(e,n,r){return(0,t.MonthsApiFp)(this.configuration).getBudgetMonth(e,n,r)()}getBudgetMonths(e,n,r){return(0,t.MonthsApiFp)(this.configuration).getBudgetMonths(e,n,r)()}},t.PayeeLocationsApiFetchParamCreator=function(e){return{getPayeeLocationById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getPayeeLocationById.");if(null==n)throw new c("payee_location_id","Required parameter payee_location_id was null or undefined when calling getPayeeLocationById.");const a="/budgets/{budget_id}/payee_locations/{payee_location_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{payee_location_id}",encodeURIComponent(String(n))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}},getPayeeLocations(t,n={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getPayeeLocations.");const r="/budgets/{budget_id}/payee_locations".replace("{budget_id}",encodeURIComponent(String(t))),a=new URL(r,"https://example.com"),i=Object.assign({method:"GET"},n),s={},u={};if(s["User-Agent"]=o,s.Accept="application/json",e&&e.apiKey){const t=e.apiKey;s.Authorization=t}const d=new URLSearchParams(a.search);for(const e in u)d.set(e,u[e]);for(const e in n.query)d.set(e,n.query[e]);return a.search=new URLSearchParams(d).toString(),i.headers=Object.assign({},s,n.headers),{url:a.pathname+a.search+a.hash,options:i}},getPayeeLocationsByPayee(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getPayeeLocationsByPayee.");if(null==n)throw new c("payee_id","Required parameter payee_id was null or undefined when calling getPayeeLocationsByPayee.");const a="/budgets/{budget_id}/payees/{payee_id}/payee_locations".replace("{budget_id}",encodeURIComponent(String(t))).replace("{payee_id}",encodeURIComponent(String(n))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}}}},t.PayeeLocationsApiFp=function(e){return{getPayeeLocationById(n,a,o){const i=(0,t.PayeeLocationsApiFetchParamCreator)(e).getPayeeLocationById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getPayeeLocations(n,a){const o=(0,t.PayeeLocationsApiFetchParamCreator)(e).getPayeeLocations(n,a);return(t=fetch)=>t(e.basePath+o.url,o.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getPayeeLocationsByPayee(n,a,o){const i=(0,t.PayeeLocationsApiFetchParamCreator)(e).getPayeeLocationsByPayee(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.PayeeLocationsApiFactory=function(e){return{getPayeeLocationById:(n,r,a)=>(0,t.PayeeLocationsApiFp)(e).getPayeeLocationById(n,r,a)(),getPayeeLocations:(n,r)=>(0,t.PayeeLocationsApiFp)(e).getPayeeLocations(n,r)(),getPayeeLocationsByPayee:(n,r,a)=>(0,t.PayeeLocationsApiFp)(e).getPayeeLocationsByPayee(n,r,a)()}},t.PayeeLocationsApi=class extends s{getPayeeLocationById(e,n,r){return(0,t.PayeeLocationsApiFp)(this.configuration).getPayeeLocationById(e,n,r)()}getPayeeLocations(e,n){return(0,t.PayeeLocationsApiFp)(this.configuration).getPayeeLocations(e,n)()}getPayeeLocationsByPayee(e,n,r){return(0,t.PayeeLocationsApiFp)(this.configuration).getPayeeLocationsByPayee(e,n,r)()}},t.PayeesApiFetchParamCreator=function(e){return{getPayeeById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getPayeeById.");if(null==n)throw new c("payee_id","Required parameter payee_id was null or undefined when calling getPayeeById.");const a="/budgets/{budget_id}/payees/{payee_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{payee_id}",encodeURIComponent(String(n))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}},getPayees(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getPayees.");const a="/budgets/{budget_id}/payees".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}void 0!==n&&(d.last_knowledge_of_server=n);const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}}}},t.PayeesApiFp=function(e){return{getPayeeById(n,a,o){const i=(0,t.PayeesApiFetchParamCreator)(e).getPayeeById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getPayees(n,a,o){const i=(0,t.PayeesApiFetchParamCreator)(e).getPayees(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.PayeesApiFactory=function(e){return{getPayeeById:(n,r,a)=>(0,t.PayeesApiFp)(e).getPayeeById(n,r,a)(),getPayees:(n,r,a)=>(0,t.PayeesApiFp)(e).getPayees(n,r,a)()}},t.PayeesApi=class extends s{getPayeeById(e,n,r){return(0,t.PayeesApiFp)(this.configuration).getPayeeById(e,n,r)()}getPayees(e,n,r){return(0,t.PayeesApiFp)(this.configuration).getPayees(e,n,r)()}},t.ScheduledTransactionsApiFetchParamCreator=function(e){return{getScheduledTransactionById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getScheduledTransactionById.");if(null==n)throw new c("scheduled_transaction_id","Required parameter scheduled_transaction_id was null or undefined when calling getScheduledTransactionById.");const a="/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{scheduled_transaction_id}",encodeURIComponent(String(n))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}},getScheduledTransactions(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getScheduledTransactions.");const a="/budgets/{budget_id}/scheduled_transactions".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}void 0!==n&&(d.last_knowledge_of_server=n);const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}}}},t.ScheduledTransactionsApiFp=function(e){return{getScheduledTransactionById(n,a,o){const i=(0,t.ScheduledTransactionsApiFetchParamCreator)(e).getScheduledTransactionById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getScheduledTransactions(n,a,o){const i=(0,t.ScheduledTransactionsApiFetchParamCreator)(e).getScheduledTransactions(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.ScheduledTransactionsApiFactory=function(e){return{getScheduledTransactionById:(n,r,a)=>(0,t.ScheduledTransactionsApiFp)(e).getScheduledTransactionById(n,r,a)(),getScheduledTransactions:(n,r,a)=>(0,t.ScheduledTransactionsApiFp)(e).getScheduledTransactions(n,r,a)()}},t.ScheduledTransactionsApi=class extends s{getScheduledTransactionById(e,n,r){return(0,t.ScheduledTransactionsApiFp)(this.configuration).getScheduledTransactionById(e,n,r)()}getScheduledTransactions(e,n,r){return(0,t.ScheduledTransactionsApiFp)(this.configuration).getScheduledTransactions(e,n,r)()}},t.TransactionsApiFetchParamCreator=function(e){return{createTransaction(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling createTransaction.");if(null==n)throw new c("data","Required parameter data was null or undefined when calling createTransaction.");const a="/budgets/{budget_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"POST"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}u["Content-Type"]="application/json";const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),s.body=JSON.stringify(n||{}),{url:i.pathname+i.search+i.hash,options:s}},deleteTransaction(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling deleteTransaction.");if(null==n)throw new c("transaction_id","Required parameter transaction_id was null or undefined when calling deleteTransaction.");const a="/budgets/{budget_id}/transactions/{transaction_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{transaction_id}",encodeURIComponent(String(n))),i=new URL(a,"https://example.com"),s=Object.assign({method:"DELETE"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}},getTransactionById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getTransactionById.");if(null==n)throw new c("transaction_id","Required parameter transaction_id was null or undefined when calling getTransactionById.");const a="/budgets/{budget_id}/transactions/{transaction_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{transaction_id}",encodeURIComponent(String(n))),i=new URL(a,"https://example.com"),s=Object.assign({method:"GET"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),{url:i.pathname+i.search+i.hash,options:s}},getTransactions(t,n,r,a,s={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getTransactions.");const u="/budgets/{budget_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))),d=new URL(u,"https://example.com"),h=Object.assign({method:"GET"},s),l={},p={};if(l["User-Agent"]=o,l.Accept="application/json",e&&e.apiKey){const t=e.apiKey;l.Authorization=t}void 0!==n&&(p.since_date=i(n)),void 0!==r&&(p.type=r),void 0!==a&&(p.last_knowledge_of_server=a);const g=new URLSearchParams(d.search);for(const e in p)g.set(e,p[e]);for(const e in s.query)g.set(e,s.query[e]);return d.search=new URLSearchParams(g).toString(),h.headers=Object.assign({},l,s.headers),{url:d.pathname+d.search+d.hash,options:h}},getTransactionsByAccount(t,n,r,a,s,u={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getTransactionsByAccount.");if(null==n)throw new c("account_id","Required parameter account_id was null or undefined when calling getTransactionsByAccount.");const d="/budgets/{budget_id}/accounts/{account_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))).replace("{account_id}",encodeURIComponent(String(n))),h=new URL(d,"https://example.com"),l=Object.assign({method:"GET"},u),p={},g={};if(p["User-Agent"]=o,p.Accept="application/json",e&&e.apiKey){const t=e.apiKey;p.Authorization=t}void 0!==r&&(g.since_date=i(r)),void 0!==a&&(g.type=a),void 0!==s&&(g.last_knowledge_of_server=s);const y=new URLSearchParams(h.search);for(const e in g)y.set(e,g[e]);for(const e in u.query)y.set(e,u.query[e]);return h.search=new URLSearchParams(y).toString(),l.headers=Object.assign({},p,u.headers),{url:h.pathname+h.search+h.hash,options:l}},getTransactionsByCategory(t,n,r,a,s,u={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getTransactionsByCategory.");if(null==n)throw new c("category_id","Required parameter category_id was null or undefined when calling getTransactionsByCategory.");const d="/budgets/{budget_id}/categories/{category_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))).replace("{category_id}",encodeURIComponent(String(n))),h=new URL(d,"https://example.com"),l=Object.assign({method:"GET"},u),p={},g={};if(p["User-Agent"]=o,p.Accept="application/json",e&&e.apiKey){const t=e.apiKey;p.Authorization=t}void 0!==r&&(g.since_date=i(r)),void 0!==a&&(g.type=a),void 0!==s&&(g.last_knowledge_of_server=s);const y=new URLSearchParams(h.search);for(const e in g)y.set(e,g[e]);for(const e in u.query)y.set(e,u.query[e]);return h.search=new URLSearchParams(y).toString(),l.headers=Object.assign({},p,u.headers),{url:h.pathname+h.search+h.hash,options:l}},getTransactionsByPayee(t,n,r,a,s,u={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getTransactionsByPayee.");if(null==n)throw new c("payee_id","Required parameter payee_id was null or undefined when calling getTransactionsByPayee.");const d="/budgets/{budget_id}/payees/{payee_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))).replace("{payee_id}",encodeURIComponent(String(n))),h=new URL(d,"https://example.com"),l=Object.assign({method:"GET"},u),p={},g={};if(p["User-Agent"]=o,p.Accept="application/json",e&&e.apiKey){const t=e.apiKey;p.Authorization=t}void 0!==r&&(g.since_date=i(r)),void 0!==a&&(g.type=a),void 0!==s&&(g.last_knowledge_of_server=s);const y=new URLSearchParams(h.search);for(const e in g)y.set(e,g[e]);for(const e in u.query)y.set(e,u.query[e]);return h.search=new URLSearchParams(y).toString(),l.headers=Object.assign({},p,u.headers),{url:h.pathname+h.search+h.hash,options:l}},importTransactions(t,n={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling importTransactions.");const r="/budgets/{budget_id}/transactions/import".replace("{budget_id}",encodeURIComponent(String(t))),a=new URL(r,"https://example.com"),i=Object.assign({method:"POST"},n),s={},u={};if(s["User-Agent"]=o,s.Accept="application/json",e&&e.apiKey){const t=e.apiKey;s.Authorization=t}const d=new URLSearchParams(a.search);for(const e in u)d.set(e,u[e]);for(const e in n.query)d.set(e,n.query[e]);return a.search=new URLSearchParams(d).toString(),i.headers=Object.assign({},s,n.headers),{url:a.pathname+a.search+a.hash,options:i}},updateTransaction(t,n,r,a={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling updateTransaction.");if(null==n)throw new c("transaction_id","Required parameter transaction_id was null or undefined when calling updateTransaction.");if(null==r)throw new c("data","Required parameter data was null or undefined when calling updateTransaction.");const i="/budgets/{budget_id}/transactions/{transaction_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{transaction_id}",encodeURIComponent(String(n))),s=new URL(i,"https://example.com"),u=Object.assign({method:"PUT"},a),d={},h={};if(d["User-Agent"]=o,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}d["Content-Type"]="application/json";const l=new URLSearchParams(s.search);for(const e in h)l.set(e,h[e]);for(const e in a.query)l.set(e,a.query[e]);return s.search=new URLSearchParams(l).toString(),u.headers=Object.assign({},d,a.headers),u.body=JSON.stringify(r||{}),{url:s.pathname+s.search+s.hash,options:u}},updateTransactions(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling updateTransactions.");if(null==n)throw new c("data","Required parameter data was null or undefined when calling updateTransactions.");const a="/budgets/{budget_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))),i=new URL(a,"https://example.com"),s=Object.assign({method:"PATCH"},r),u={},d={};if(u["User-Agent"]=o,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}u["Content-Type"]="application/json";const h=new URLSearchParams(i.search);for(const e in d)h.set(e,d[e]);for(const e in r.query)h.set(e,r.query[e]);return i.search=new URLSearchParams(h).toString(),s.headers=Object.assign({},u,r.headers),s.body=JSON.stringify(n||{}),{url:i.pathname+i.search+i.hash,options:s}}}},t.TransactionsApiFp=function(e){return{createTransaction(n,a,o){const i=(0,t.TransactionsApiFetchParamCreator)(e).createTransaction(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},deleteTransaction(n,a,o){const i=(0,t.TransactionsApiFetchParamCreator)(e).deleteTransaction(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getTransactionById(n,a,o){const i=(0,t.TransactionsApiFetchParamCreator)(e).getTransactionById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getTransactions(n,a,o,i,s){const c=(0,t.TransactionsApiFetchParamCreator)(e).getTransactions(n,a,o,i,s);return(t=fetch)=>t(e.basePath+c.url,c.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getTransactionsByAccount(n,a,o,i,s,c){const u=(0,t.TransactionsApiFetchParamCreator)(e).getTransactionsByAccount(n,a,o,i,s,c);return(t=fetch)=>t(e.basePath+u.url,u.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getTransactionsByCategory(n,a,o,i,s,c){const u=(0,t.TransactionsApiFetchParamCreator)(e).getTransactionsByCategory(n,a,o,i,s,c);return(t=fetch)=>t(e.basePath+u.url,u.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getTransactionsByPayee(n,a,o,i,s,c){const u=(0,t.TransactionsApiFetchParamCreator)(e).getTransactionsByPayee(n,a,o,i,s,c);return(t=fetch)=>t(e.basePath+u.url,u.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},importTransactions(n,a){const o=(0,t.TransactionsApiFetchParamCreator)(e).importTransactions(n,a);return(t=fetch)=>t(e.basePath+o.url,o.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},updateTransaction(n,a,o,i){const s=(0,t.TransactionsApiFetchParamCreator)(e).updateTransaction(n,a,o,i);return(t=fetch)=>t(e.basePath+s.url,s.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},updateTransactions(n,a,o){const i=(0,t.TransactionsApiFetchParamCreator)(e).updateTransactions(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.TransactionsApiFactory=function(e){return{createTransaction:(n,r,a)=>(0,t.TransactionsApiFp)(e).createTransaction(n,r,a)(),deleteTransaction:(n,r,a)=>(0,t.TransactionsApiFp)(e).deleteTransaction(n,r,a)(),getTransactionById:(n,r,a)=>(0,t.TransactionsApiFp)(e).getTransactionById(n,r,a)(),getTransactions:(n,r,a,o,i)=>(0,t.TransactionsApiFp)(e).getTransactions(n,r,a,o,i)(),getTransactionsByAccount:(n,r,a,o,i,s)=>(0,t.TransactionsApiFp)(e).getTransactionsByAccount(n,r,a,o,i,s)(),getTransactionsByCategory:(n,r,a,o,i,s)=>(0,t.TransactionsApiFp)(e).getTransactionsByCategory(n,r,a,o,i,s)(),getTransactionsByPayee:(n,r,a,o,i,s)=>(0,t.TransactionsApiFp)(e).getTransactionsByPayee(n,r,a,o,i,s)(),importTransactions:(n,r)=>(0,t.TransactionsApiFp)(e).importTransactions(n,r)(),updateTransaction:(n,r,a,o)=>(0,t.TransactionsApiFp)(e).updateTransaction(n,r,a,o)(),updateTransactions:(n,r,a)=>(0,t.TransactionsApiFp)(e).updateTransactions(n,r,a)()}},t.TransactionsApi=class extends s{createTransaction(e,n,r){return(0,t.TransactionsApiFp)(this.configuration).createTransaction(e,n,r)()}deleteTransaction(e,n,r){return(0,t.TransactionsApiFp)(this.configuration).deleteTransaction(e,n,r)()}getTransactionById(e,n,r){return(0,t.TransactionsApiFp)(this.configuration).getTransactionById(e,n,r)()}getTransactions(e,n,r,a,o){return(0,t.TransactionsApiFp)(this.configuration).getTransactions(e,n,r,a,o)()}getTransactionsByAccount(e,n,r,a,o,i){return(0,t.TransactionsApiFp)(this.configuration).getTransactionsByAccount(e,n,r,a,o,i)()}getTransactionsByCategory(e,n,r,a,o,i){return(0,t.TransactionsApiFp)(this.configuration).getTransactionsByCategory(e,n,r,a,o,i)()}getTransactionsByPayee(e,n,r,a,o,i){return(0,t.TransactionsApiFp)(this.configuration).getTransactionsByPayee(e,n,r,a,o,i)()}importTransactions(e,n){return(0,t.TransactionsApiFp)(this.configuration).importTransactions(e,n)()}updateTransaction(e,n,r,a){return(0,t.TransactionsApiFp)(this.configuration).updateTransaction(e,n,r,a)()}updateTransactions(e,n,r){return(0,t.TransactionsApiFp)(this.configuration).updateTransactions(e,n,r)()}},t.UserApiFetchParamCreator=function(e){return{getUser(t={}){const n=new URL("/user","https://example.com"),r=Object.assign({method:"GET"},t),a={},i={};if(a["User-Agent"]=o,a.Accept="application/json",e&&e.apiKey){const t=e.apiKey;a.Authorization=t}const s=new URLSearchParams(n.search);for(const e in i)s.set(e,i[e]);for(const e in t.query)s.set(e,t.query[e]);return n.search=new URLSearchParams(s).toString(),r.headers=Object.assign({},a,t.headers),{url:n.pathname+n.search+n.hash,options:r}}}},t.UserApiFp=function(e){return{getUser(n){const a=(0,t.UserApiFetchParamCreator)(e).getUser(n);return(t=fetch)=>t(e.basePath+a.url,a.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.UserApiFactory=function(e){return{getUser:n=>(0,t.UserApiFp)(e).getUser(n)()}},t.UserApi=class extends s{getUser(e){return(0,t.UserApiFp)(this.configuration).getUser(e)()}}},610:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Configuration=void 0,t.Configuration=class{constructor(e,t){this.apiKey=`Bearer ${e}`,this.basePath=t}}},465:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.api=t.utils=t.API=void 0;const o=n(610),i=n(665),s=n(802),c=n(679);t.utils=c.default,a(n(665),t);class u{constructor(e,t="https://api.youneedabudget.com/v1"){this._configuration=new o.Configuration(e,t)}get user(){return this._user||(this._user=new i.UserApi(this._configuration)),this._user}get budgets(){return this._budgets||(this._budgets=new i.BudgetsApi(this._configuration)),this._budgets}get accounts(){return this._accounts||(this._accounts=new i.AccountsApi(this._configuration)),this._accounts}get categories(){return this._categories||(this._categories=new i.CategoriesApi(this._configuration)),this._categories}get months(){return this._months||(this._months=new i.MonthsApi(this._configuration)),this._months}get payees(){return this._payees||(this._payees=new i.PayeesApi(this._configuration)),this._payees}get payeeLocations(){return this._payeeLocations||(this._payeeLocations=new i.PayeeLocationsApi(this._configuration)),this._payeeLocations}get transactions(){return this._transactions||(this._transactions=new s.TransactionsApi(this._configuration)),this._transactions}get scheduledTransactions(){return this._scheduledTransactions||(this._scheduledTransactions=new i.ScheduledTransactionsApi(this._configuration)),this._scheduledTransactions}}t.api=u,t.API=u},802:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionsApi=void 0;const r=n(665);class a extends r.TransactionsApi{getTransactionsByType(e,t,n,a){return r.TransactionsApiFp(this.configuration).getTransactions(e,void 0,t,n,a)()}createTransactions(e,t,n){return r.TransactionsApiFp(this.configuration).createTransaction(e,t,n)()}bulkCreateTransactions(e,t,n){return r.DeprecatedApiFp(this.configuration).bulkCreateTransactions(e,t,n)()}}t.TransactionsApi=a},679:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={getCurrentMonthInISOFormat(){return`${this.getCurrentDateInISOFormat().substr(0,7)}-01`},getCurrentDateInISOFormat(){let e=new Date;return new Date(e.getTime()-6e4*e.getTimezoneOffset()).toISOString()},convertFromISODateString:e=>new Date(new Date(e)),convertMilliUnitsToCurrencyAmount(e,t=2){let n=Math.pow(10,3-Math.min(3,t));n=1/n;let r=Math.round(e*n)/n*(.1/Math.pow(10,2));return Number(r.toFixed(t))}}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var r=n(465);ynab=r})();
|
package/dist/esm/api.d.ts
CHANGED
|
@@ -135,6 +135,36 @@ export interface Account {
|
|
|
135
135
|
* @memberof Account
|
|
136
136
|
*/
|
|
137
137
|
direct_import_in_error?: boolean | null;
|
|
138
|
+
/**
|
|
139
|
+
* A date/time specifying when the account was last reconciled.
|
|
140
|
+
* @type {string}
|
|
141
|
+
* @memberof Account
|
|
142
|
+
*/
|
|
143
|
+
last_reconciled_at?: string | null;
|
|
144
|
+
/**
|
|
145
|
+
* The original debt/loan account balance, specified in milliunits format.
|
|
146
|
+
* @type {number}
|
|
147
|
+
* @memberof Account
|
|
148
|
+
*/
|
|
149
|
+
debt_original_balance?: number | null;
|
|
150
|
+
/**
|
|
151
|
+
* The debt/loan account interest rate(s), by effective date.
|
|
152
|
+
* @type {LoanAccountPeriodicValue}
|
|
153
|
+
* @memberof Account
|
|
154
|
+
*/
|
|
155
|
+
debt_interest_rates?: LoanAccountPeriodicValue | null;
|
|
156
|
+
/**
|
|
157
|
+
* The minimum payment amount(s) for the debt/loan account, by effective date. The amounts are specified in milliunits format.
|
|
158
|
+
* @type {LoanAccountPeriodicValue}
|
|
159
|
+
* @memberof Account
|
|
160
|
+
*/
|
|
161
|
+
debt_minimum_payments?: LoanAccountPeriodicValue | null;
|
|
162
|
+
/**
|
|
163
|
+
* The escrow value(s) for the debt/loan account, by effective date. The amounts are specified in milliunits format.
|
|
164
|
+
* @type {LoanAccountPeriodicValue}
|
|
165
|
+
* @memberof Account
|
|
166
|
+
*/
|
|
167
|
+
debt_escrow_amounts?: LoanAccountPeriodicValue | null;
|
|
138
168
|
/**
|
|
139
169
|
* Whether or not the account has been deleted. Deleted accounts will only be included in delta requests.
|
|
140
170
|
* @type {boolean}
|
|
@@ -540,6 +570,24 @@ export interface Category {
|
|
|
540
570
|
* @memberof Category
|
|
541
571
|
*/
|
|
542
572
|
goal_type?: Category.GoalTypeEnum | null;
|
|
573
|
+
/**
|
|
574
|
+
* The day of the goal
|
|
575
|
+
* @type {number}
|
|
576
|
+
* @memberof Category
|
|
577
|
+
*/
|
|
578
|
+
goal_day?: number | null;
|
|
579
|
+
/**
|
|
580
|
+
* The goal cadence
|
|
581
|
+
* @type {number}
|
|
582
|
+
* @memberof Category
|
|
583
|
+
*/
|
|
584
|
+
goal_cadence?: number | null;
|
|
585
|
+
/**
|
|
586
|
+
* The goal cadence frequency
|
|
587
|
+
* @type {number}
|
|
588
|
+
* @memberof Category
|
|
589
|
+
*/
|
|
590
|
+
goal_cadence_frequency?: number | null;
|
|
543
591
|
/**
|
|
544
592
|
* The month a goal was created
|
|
545
593
|
* @type {string}
|
|
@@ -807,6 +855,14 @@ export interface HybridTransactionsResponseData {
|
|
|
807
855
|
*/
|
|
808
856
|
server_knowledge?: number | null;
|
|
809
857
|
}
|
|
858
|
+
/**
|
|
859
|
+
*
|
|
860
|
+
* @export
|
|
861
|
+
* @interface LoanAccountPeriodicValue
|
|
862
|
+
*/
|
|
863
|
+
export interface LoanAccountPeriodicValue {
|
|
864
|
+
[key: string]: number;
|
|
865
|
+
}
|
|
810
866
|
/**
|
|
811
867
|
*
|
|
812
868
|
* @export
|
|
@@ -1862,6 +1918,12 @@ export interface TransactionSummary {
|
|
|
1862
1918
|
* @memberof TransactionSummary
|
|
1863
1919
|
*/
|
|
1864
1920
|
import_payee_name_original?: string | null;
|
|
1921
|
+
/**
|
|
1922
|
+
* If the transaction is a debt/loan account transaction, the type of transaction
|
|
1923
|
+
* @type {string}
|
|
1924
|
+
* @memberof TransactionSummary
|
|
1925
|
+
*/
|
|
1926
|
+
debt_transaction_type?: TransactionSummary.DebtTransactionTypeEnum | null;
|
|
1865
1927
|
/**
|
|
1866
1928
|
* Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
|
|
1867
1929
|
* @type {boolean}
|
|
@@ -1895,6 +1957,20 @@ export declare namespace TransactionSummary {
|
|
|
1895
1957
|
Blue,
|
|
1896
1958
|
Purple
|
|
1897
1959
|
}
|
|
1960
|
+
/**
|
|
1961
|
+
* @export
|
|
1962
|
+
* @enum {string}
|
|
1963
|
+
*/
|
|
1964
|
+
enum DebtTransactionTypeEnum {
|
|
1965
|
+
Payment,
|
|
1966
|
+
Refund,
|
|
1967
|
+
Fee,
|
|
1968
|
+
Interest,
|
|
1969
|
+
Escrow,
|
|
1970
|
+
BalancedAdjustment,
|
|
1971
|
+
Credit,
|
|
1972
|
+
Charge
|
|
1973
|
+
}
|
|
1898
1974
|
}
|
|
1899
1975
|
/**
|
|
1900
1976
|
*
|
|
@@ -2241,6 +2317,12 @@ export interface HybridTransaction {
|
|
|
2241
2317
|
* @memberof HybridTransaction
|
|
2242
2318
|
*/
|
|
2243
2319
|
import_payee_name_original?: string | null;
|
|
2320
|
+
/**
|
|
2321
|
+
* If the transaction is a debt/loan account transaction, the type of transaction
|
|
2322
|
+
* @type {string}
|
|
2323
|
+
* @memberof HybridTransaction
|
|
2324
|
+
*/
|
|
2325
|
+
debt_transaction_type?: HybridTransaction.DebtTransactionTypeEnum | null;
|
|
2244
2326
|
/**
|
|
2245
2327
|
* Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
|
|
2246
2328
|
* @type {boolean}
|
|
@@ -2304,6 +2386,20 @@ export declare namespace HybridTransaction {
|
|
|
2304
2386
|
Blue,
|
|
2305
2387
|
Purple
|
|
2306
2388
|
}
|
|
2389
|
+
/**
|
|
2390
|
+
* @export
|
|
2391
|
+
* @enum {string}
|
|
2392
|
+
*/
|
|
2393
|
+
enum DebtTransactionTypeEnum {
|
|
2394
|
+
Payment,
|
|
2395
|
+
Refund,
|
|
2396
|
+
Fee,
|
|
2397
|
+
Interest,
|
|
2398
|
+
Escrow,
|
|
2399
|
+
BalancedAdjustment,
|
|
2400
|
+
Credit,
|
|
2401
|
+
Charge
|
|
2402
|
+
}
|
|
2307
2403
|
/**
|
|
2308
2404
|
* @export
|
|
2309
2405
|
* @enum {string}
|
|
@@ -2834,6 +2930,12 @@ export interface TransactionDetail {
|
|
|
2834
2930
|
* @memberof TransactionDetail
|
|
2835
2931
|
*/
|
|
2836
2932
|
import_payee_name_original?: string | null;
|
|
2933
|
+
/**
|
|
2934
|
+
* If the transaction is a debt/loan account transaction, the type of transaction
|
|
2935
|
+
* @type {string}
|
|
2936
|
+
* @memberof TransactionDetail
|
|
2937
|
+
*/
|
|
2938
|
+
debt_transaction_type?: TransactionDetail.DebtTransactionTypeEnum | null;
|
|
2837
2939
|
/**
|
|
2838
2940
|
* Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
|
|
2839
2941
|
* @type {boolean}
|
|
@@ -2891,6 +2993,20 @@ export declare namespace TransactionDetail {
|
|
|
2891
2993
|
Blue,
|
|
2892
2994
|
Purple
|
|
2893
2995
|
}
|
|
2996
|
+
/**
|
|
2997
|
+
* @export
|
|
2998
|
+
* @enum {string}
|
|
2999
|
+
*/
|
|
3000
|
+
enum DebtTransactionTypeEnum {
|
|
3001
|
+
Payment,
|
|
3002
|
+
Refund,
|
|
3003
|
+
Fee,
|
|
3004
|
+
Interest,
|
|
3005
|
+
Escrow,
|
|
3006
|
+
BalancedAdjustment,
|
|
3007
|
+
Credit,
|
|
3008
|
+
Charge
|
|
3009
|
+
}
|
|
2894
3010
|
}
|
|
2895
3011
|
/**
|
|
2896
3012
|
* AccountsApi - fetch parameter creator
|
package/dist/esm/api.js
CHANGED
|
@@ -69,7 +69,7 @@ if (!globalThis.fetch) {
|
|
|
69
69
|
globalThis.Headers = fetchPonyfill.Headers;
|
|
70
70
|
globalThis.Request = fetchPonyfill.Request;
|
|
71
71
|
}
|
|
72
|
-
var USER_AGENT = "api_client/js/1.
|
|
72
|
+
var USER_AGENT = "api_client/js/1.45.0";
|
|
73
73
|
function convertDateToFullDateStringFormat(date) {
|
|
74
74
|
// Convert to RFC 3339 "full-date" format, like "2017-11-27"
|
|
75
75
|
if (date instanceof Date) {
|
|
@@ -259,6 +259,21 @@ export var TransactionSummary;
|
|
|
259
259
|
FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue";
|
|
260
260
|
FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple";
|
|
261
261
|
})(FlagColorEnum = TransactionSummary.FlagColorEnum || (TransactionSummary.FlagColorEnum = {}));
|
|
262
|
+
/**
|
|
263
|
+
* @export
|
|
264
|
+
* @enum {string}
|
|
265
|
+
*/
|
|
266
|
+
var DebtTransactionTypeEnum;
|
|
267
|
+
(function (DebtTransactionTypeEnum) {
|
|
268
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Payment"] = 'payment'] = "Payment";
|
|
269
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Refund"] = 'refund'] = "Refund";
|
|
270
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Fee"] = 'fee'] = "Fee";
|
|
271
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Interest"] = 'interest'] = "Interest";
|
|
272
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Escrow"] = 'escrow'] = "Escrow";
|
|
273
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["BalancedAdjustment"] = 'balancedAdjustment'] = "BalancedAdjustment";
|
|
274
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Credit"] = 'credit'] = "Credit";
|
|
275
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Charge"] = 'charge'] = "Charge";
|
|
276
|
+
})(DebtTransactionTypeEnum = TransactionSummary.DebtTransactionTypeEnum || (TransactionSummary.DebtTransactionTypeEnum = {}));
|
|
262
277
|
})(TransactionSummary || (TransactionSummary = {}));
|
|
263
278
|
/**
|
|
264
279
|
* @export
|
|
@@ -289,6 +304,21 @@ export var HybridTransaction;
|
|
|
289
304
|
FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue";
|
|
290
305
|
FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple";
|
|
291
306
|
})(FlagColorEnum = HybridTransaction.FlagColorEnum || (HybridTransaction.FlagColorEnum = {}));
|
|
307
|
+
/**
|
|
308
|
+
* @export
|
|
309
|
+
* @enum {string}
|
|
310
|
+
*/
|
|
311
|
+
var DebtTransactionTypeEnum;
|
|
312
|
+
(function (DebtTransactionTypeEnum) {
|
|
313
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Payment"] = 'payment'] = "Payment";
|
|
314
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Refund"] = 'refund'] = "Refund";
|
|
315
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Fee"] = 'fee'] = "Fee";
|
|
316
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Interest"] = 'interest'] = "Interest";
|
|
317
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Escrow"] = 'escrow'] = "Escrow";
|
|
318
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["BalancedAdjustment"] = 'balancedAdjustment'] = "BalancedAdjustment";
|
|
319
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Credit"] = 'credit'] = "Credit";
|
|
320
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Charge"] = 'charge'] = "Charge";
|
|
321
|
+
})(DebtTransactionTypeEnum = HybridTransaction.DebtTransactionTypeEnum || (HybridTransaction.DebtTransactionTypeEnum = {}));
|
|
292
322
|
/**
|
|
293
323
|
* @export
|
|
294
324
|
* @enum {string}
|
|
@@ -428,6 +458,21 @@ export var TransactionDetail;
|
|
|
428
458
|
FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue";
|
|
429
459
|
FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple";
|
|
430
460
|
})(FlagColorEnum = TransactionDetail.FlagColorEnum || (TransactionDetail.FlagColorEnum = {}));
|
|
461
|
+
/**
|
|
462
|
+
* @export
|
|
463
|
+
* @enum {string}
|
|
464
|
+
*/
|
|
465
|
+
var DebtTransactionTypeEnum;
|
|
466
|
+
(function (DebtTransactionTypeEnum) {
|
|
467
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Payment"] = 'payment'] = "Payment";
|
|
468
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Refund"] = 'refund'] = "Refund";
|
|
469
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Fee"] = 'fee'] = "Fee";
|
|
470
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Interest"] = 'interest'] = "Interest";
|
|
471
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Escrow"] = 'escrow'] = "Escrow";
|
|
472
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["BalancedAdjustment"] = 'balancedAdjustment'] = "BalancedAdjustment";
|
|
473
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Credit"] = 'credit'] = "Credit";
|
|
474
|
+
DebtTransactionTypeEnum[DebtTransactionTypeEnum["Charge"] = 'charge'] = "Charge";
|
|
475
|
+
})(DebtTransactionTypeEnum = TransactionDetail.DebtTransactionTypeEnum || (TransactionDetail.DebtTransactionTypeEnum = {}));
|
|
431
476
|
})(TransactionDetail || (TransactionDetail = {}));
|
|
432
477
|
/**
|
|
433
478
|
* AccountsApi - fetch parameter creator
|