diff --git a/dist/api.d.ts b/dist/api.d.ts index 1776b54..cc1c2d5 100644 --- a/dist/api.d.ts +++ b/dist/api.d.ts @@ -135,6 +135,36 @@ export interface Account { * @memberof Account */ direct_import_in_error?: boolean | null; + /** + * A date/time specifying when the account was last reconciled. + * @type {string} + * @memberof Account + */ + last_reconciled_at?: string | null; + /** + * The original debt/loan account balance, specified in milliunits format. + * @type {number} + * @memberof Account + */ + debt_original_balance?: number | null; + /** + * The debt/loan account interest rate(s), by effective date. + * @type {LoanAccountPeriodicValue} + * @memberof Account + */ + debt_interest_rates?: LoanAccountPeriodicValue | null; + /** + * The minimum payment amount(s) for the debt/loan account, by effective date. The amounts are specified in milliunits format. + * @type {LoanAccountPeriodicValue} + * @memberof Account + */ + debt_minimum_payments?: LoanAccountPeriodicValue | null; + /** + * The escrow value(s) for the debt/loan account, by effective date. The amounts are specified in milliunits format. + * @type {LoanAccountPeriodicValue} + * @memberof Account + */ + debt_escrow_amounts?: LoanAccountPeriodicValue | null; /** * Whether or not the account has been deleted. Deleted accounts will only be included in delta requests. * @type {boolean} @@ -540,6 +570,24 @@ export interface Category { * @memberof Category */ goal_type?: Category.GoalTypeEnum | null; + /** + * The day of the goal + * @type {number} + * @memberof Category + */ + goal_day?: number | null; + /** + * The goal cadence + * @type {number} + * @memberof Category + */ + goal_cadence?: number | null; + /** + * The goal cadence frequency + * @type {number} + * @memberof Category + */ + goal_cadence_frequency?: number | null; /** * The month a goal was created * @type {string} @@ -807,6 +855,14 @@ export interface HybridTransactionsResponseData { */ server_knowledge?: number | null; } +/** + * + * @export + * @interface LoanAccountPeriodicValue + */ +export interface LoanAccountPeriodicValue { + [key: string]: number; +} /** * * @export @@ -1862,6 +1918,12 @@ export interface TransactionSummary { * @memberof TransactionSummary */ import_payee_name_original?: string | null; + /** + * If the transaction is a debt/loan account transaction, the type of transaction + * @type {string} + * @memberof TransactionSummary + */ + debt_transaction_type?: TransactionSummary.DebtTransactionTypeEnum | null; /** * Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. * @type {boolean} @@ -1895,6 +1957,20 @@ export declare namespace TransactionSummary { Blue, Purple } + /** + * @export + * @enum {string} + */ + enum DebtTransactionTypeEnum { + Payment, + Refund, + Fee, + Interest, + Escrow, + BalancedAdjustment, + Credit, + Charge + } } /** * @@ -2241,6 +2317,12 @@ export interface HybridTransaction { * @memberof HybridTransaction */ import_payee_name_original?: string | null; + /** + * If the transaction is a debt/loan account transaction, the type of transaction + * @type {string} + * @memberof HybridTransaction + */ + debt_transaction_type?: HybridTransaction.DebtTransactionTypeEnum | null; /** * Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. * @type {boolean} @@ -2304,6 +2386,20 @@ export declare namespace HybridTransaction { Blue, Purple } + /** + * @export + * @enum {string} + */ + enum DebtTransactionTypeEnum { + Payment, + Refund, + Fee, + Interest, + Escrow, + BalancedAdjustment, + Credit, + Charge + } /** * @export * @enum {string} @@ -2834,6 +2930,12 @@ export interface TransactionDetail { * @memberof TransactionDetail */ import_payee_name_original?: string | null; + /** + * If the transaction is a debt/loan account transaction, the type of transaction + * @type {string} + * @memberof TransactionDetail + */ + debt_transaction_type?: TransactionDetail.DebtTransactionTypeEnum | null; /** * Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. * @type {boolean} @@ -2891,6 +2993,20 @@ export declare namespace TransactionDetail { Blue, Purple } + /** + * @export + * @enum {string} + */ + enum DebtTransactionTypeEnum { + Payment, + Refund, + Fee, + Interest, + Escrow, + BalancedAdjustment, + Credit, + Charge + } } /** * AccountsApi - fetch parameter creator diff --git a/dist/api.js b/dist/api.js index 27b22ff..bc95898 100644 --- a/dist/api.js +++ b/dist/api.js @@ -31,7 +31,7 @@ if (!globalThis.fetch) { globalThis.Headers = fetchPonyfill.Headers; globalThis.Request = fetchPonyfill.Request; } -const USER_AGENT = "api_client/js/1.42.0"; +const USER_AGENT = "api_client/js/1.45.0"; function convertDateToFullDateStringFormat(date) { // Convert to RFC 3339 "full-date" format, like "2017-11-27" if (date instanceof Date) { @@ -217,6 +217,21 @@ var TransactionSummary; FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue"; FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple"; })(FlagColorEnum = TransactionSummary.FlagColorEnum || (TransactionSummary.FlagColorEnum = {})); + /** + * @export + * @enum {string} + */ + let DebtTransactionTypeEnum; + (function (DebtTransactionTypeEnum) { + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Payment"] = 'payment'] = "Payment"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Refund"] = 'refund'] = "Refund"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Fee"] = 'fee'] = "Fee"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Interest"] = 'interest'] = "Interest"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Escrow"] = 'escrow'] = "Escrow"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["BalancedAdjustment"] = 'balancedAdjustment'] = "BalancedAdjustment"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Credit"] = 'credit'] = "Credit"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Charge"] = 'charge'] = "Charge"; + })(DebtTransactionTypeEnum = TransactionSummary.DebtTransactionTypeEnum || (TransactionSummary.DebtTransactionTypeEnum = {})); })(TransactionSummary = exports.TransactionSummary || (exports.TransactionSummary = {})); /** * @export @@ -247,6 +262,21 @@ var HybridTransaction; FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue"; FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple"; })(FlagColorEnum = HybridTransaction.FlagColorEnum || (HybridTransaction.FlagColorEnum = {})); + /** + * @export + * @enum {string} + */ + let DebtTransactionTypeEnum; + (function (DebtTransactionTypeEnum) { + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Payment"] = 'payment'] = "Payment"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Refund"] = 'refund'] = "Refund"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Fee"] = 'fee'] = "Fee"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Interest"] = 'interest'] = "Interest"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Escrow"] = 'escrow'] = "Escrow"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["BalancedAdjustment"] = 'balancedAdjustment'] = "BalancedAdjustment"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Credit"] = 'credit'] = "Credit"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Charge"] = 'charge'] = "Charge"; + })(DebtTransactionTypeEnum = HybridTransaction.DebtTransactionTypeEnum || (HybridTransaction.DebtTransactionTypeEnum = {})); /** * @export * @enum {string} @@ -386,6 +416,21 @@ var TransactionDetail; FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue"; FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple"; })(FlagColorEnum = TransactionDetail.FlagColorEnum || (TransactionDetail.FlagColorEnum = {})); + /** + * @export + * @enum {string} + */ + let DebtTransactionTypeEnum; + (function (DebtTransactionTypeEnum) { + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Payment"] = 'payment'] = "Payment"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Refund"] = 'refund'] = "Refund"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Fee"] = 'fee'] = "Fee"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Interest"] = 'interest'] = "Interest"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Escrow"] = 'escrow'] = "Escrow"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["BalancedAdjustment"] = 'balancedAdjustment'] = "BalancedAdjustment"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Credit"] = 'credit'] = "Credit"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Charge"] = 'charge'] = "Charge"; + })(DebtTransactionTypeEnum = TransactionDetail.DebtTransactionTypeEnum || (TransactionDetail.DebtTransactionTypeEnum = {})); })(TransactionDetail = exports.TransactionDetail || (exports.TransactionDetail = {})); /** * AccountsApi - fetch parameter creator diff --git a/dist/browser/ynab.js b/dist/browser/ynab.js index ff21a47..d8aad48 100644 --- a/dist/browser/ynab.js +++ b/dist/browser/ynab.js @@ -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-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})(); \ No newline at end of file +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-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})(); \ No newline at end of file diff --git a/dist/esm/api.d.ts b/dist/esm/api.d.ts index 1776b54..cc1c2d5 100644 --- a/dist/esm/api.d.ts +++ b/dist/esm/api.d.ts @@ -135,6 +135,36 @@ export interface Account { * @memberof Account */ direct_import_in_error?: boolean | null; + /** + * A date/time specifying when the account was last reconciled. + * @type {string} + * @memberof Account + */ + last_reconciled_at?: string | null; + /** + * The original debt/loan account balance, specified in milliunits format. + * @type {number} + * @memberof Account + */ + debt_original_balance?: number | null; + /** + * The debt/loan account interest rate(s), by effective date. + * @type {LoanAccountPeriodicValue} + * @memberof Account + */ + debt_interest_rates?: LoanAccountPeriodicValue | null; + /** + * The minimum payment amount(s) for the debt/loan account, by effective date. The amounts are specified in milliunits format. + * @type {LoanAccountPeriodicValue} + * @memberof Account + */ + debt_minimum_payments?: LoanAccountPeriodicValue | null; + /** + * The escrow value(s) for the debt/loan account, by effective date. The amounts are specified in milliunits format. + * @type {LoanAccountPeriodicValue} + * @memberof Account + */ + debt_escrow_amounts?: LoanAccountPeriodicValue | null; /** * Whether or not the account has been deleted. Deleted accounts will only be included in delta requests. * @type {boolean} @@ -540,6 +570,24 @@ export interface Category { * @memberof Category */ goal_type?: Category.GoalTypeEnum | null; + /** + * The day of the goal + * @type {number} + * @memberof Category + */ + goal_day?: number | null; + /** + * The goal cadence + * @type {number} + * @memberof Category + */ + goal_cadence?: number | null; + /** + * The goal cadence frequency + * @type {number} + * @memberof Category + */ + goal_cadence_frequency?: number | null; /** * The month a goal was created * @type {string} @@ -807,6 +855,14 @@ export interface HybridTransactionsResponseData { */ server_knowledge?: number | null; } +/** + * + * @export + * @interface LoanAccountPeriodicValue + */ +export interface LoanAccountPeriodicValue { + [key: string]: number; +} /** * * @export @@ -1862,6 +1918,12 @@ export interface TransactionSummary { * @memberof TransactionSummary */ import_payee_name_original?: string | null; + /** + * If the transaction is a debt/loan account transaction, the type of transaction + * @type {string} + * @memberof TransactionSummary + */ + debt_transaction_type?: TransactionSummary.DebtTransactionTypeEnum | null; /** * Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. * @type {boolean} @@ -1895,6 +1957,20 @@ export declare namespace TransactionSummary { Blue, Purple } + /** + * @export + * @enum {string} + */ + enum DebtTransactionTypeEnum { + Payment, + Refund, + Fee, + Interest, + Escrow, + BalancedAdjustment, + Credit, + Charge + } } /** * @@ -2241,6 +2317,12 @@ export interface HybridTransaction { * @memberof HybridTransaction */ import_payee_name_original?: string | null; + /** + * If the transaction is a debt/loan account transaction, the type of transaction + * @type {string} + * @memberof HybridTransaction + */ + debt_transaction_type?: HybridTransaction.DebtTransactionTypeEnum | null; /** * Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. * @type {boolean} @@ -2304,6 +2386,20 @@ export declare namespace HybridTransaction { Blue, Purple } + /** + * @export + * @enum {string} + */ + enum DebtTransactionTypeEnum { + Payment, + Refund, + Fee, + Interest, + Escrow, + BalancedAdjustment, + Credit, + Charge + } /** * @export * @enum {string} @@ -2834,6 +2930,12 @@ export interface TransactionDetail { * @memberof TransactionDetail */ import_payee_name_original?: string | null; + /** + * If the transaction is a debt/loan account transaction, the type of transaction + * @type {string} + * @memberof TransactionDetail + */ + debt_transaction_type?: TransactionDetail.DebtTransactionTypeEnum | null; /** * Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. * @type {boolean} @@ -2891,6 +2993,20 @@ export declare namespace TransactionDetail { Blue, Purple } + /** + * @export + * @enum {string} + */ + enum DebtTransactionTypeEnum { + Payment, + Refund, + Fee, + Interest, + Escrow, + BalancedAdjustment, + Credit, + Charge + } } /** * AccountsApi - fetch parameter creator diff --git a/dist/esm/api.js b/dist/esm/api.js index bca023e..ce33188 100644 --- a/dist/esm/api.js +++ b/dist/esm/api.js @@ -69,7 +69,7 @@ if (!globalThis.fetch) { globalThis.Headers = fetchPonyfill.Headers; globalThis.Request = fetchPonyfill.Request; } -var USER_AGENT = "api_client/js/1.42.0"; +var USER_AGENT = "api_client/js/1.45.0"; function convertDateToFullDateStringFormat(date) { // Convert to RFC 3339 "full-date" format, like "2017-11-27" if (date instanceof Date) { @@ -259,6 +259,21 @@ export var TransactionSummary; FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue"; FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple"; })(FlagColorEnum = TransactionSummary.FlagColorEnum || (TransactionSummary.FlagColorEnum = {})); + /** + * @export + * @enum {string} + */ + var DebtTransactionTypeEnum; + (function (DebtTransactionTypeEnum) { + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Payment"] = 'payment'] = "Payment"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Refund"] = 'refund'] = "Refund"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Fee"] = 'fee'] = "Fee"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Interest"] = 'interest'] = "Interest"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Escrow"] = 'escrow'] = "Escrow"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["BalancedAdjustment"] = 'balancedAdjustment'] = "BalancedAdjustment"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Credit"] = 'credit'] = "Credit"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Charge"] = 'charge'] = "Charge"; + })(DebtTransactionTypeEnum = TransactionSummary.DebtTransactionTypeEnum || (TransactionSummary.DebtTransactionTypeEnum = {})); })(TransactionSummary || (TransactionSummary = {})); /** * @export @@ -289,6 +304,21 @@ export var HybridTransaction; FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue"; FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple"; })(FlagColorEnum = HybridTransaction.FlagColorEnum || (HybridTransaction.FlagColorEnum = {})); + /** + * @export + * @enum {string} + */ + var DebtTransactionTypeEnum; + (function (DebtTransactionTypeEnum) { + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Payment"] = 'payment'] = "Payment"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Refund"] = 'refund'] = "Refund"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Fee"] = 'fee'] = "Fee"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Interest"] = 'interest'] = "Interest"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Escrow"] = 'escrow'] = "Escrow"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["BalancedAdjustment"] = 'balancedAdjustment'] = "BalancedAdjustment"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Credit"] = 'credit'] = "Credit"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Charge"] = 'charge'] = "Charge"; + })(DebtTransactionTypeEnum = HybridTransaction.DebtTransactionTypeEnum || (HybridTransaction.DebtTransactionTypeEnum = {})); /** * @export * @enum {string} @@ -428,6 +458,21 @@ export var TransactionDetail; FlagColorEnum[FlagColorEnum["Blue"] = 'blue'] = "Blue"; FlagColorEnum[FlagColorEnum["Purple"] = 'purple'] = "Purple"; })(FlagColorEnum = TransactionDetail.FlagColorEnum || (TransactionDetail.FlagColorEnum = {})); + /** + * @export + * @enum {string} + */ + var DebtTransactionTypeEnum; + (function (DebtTransactionTypeEnum) { + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Payment"] = 'payment'] = "Payment"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Refund"] = 'refund'] = "Refund"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Fee"] = 'fee'] = "Fee"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Interest"] = 'interest'] = "Interest"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Escrow"] = 'escrow'] = "Escrow"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["BalancedAdjustment"] = 'balancedAdjustment'] = "BalancedAdjustment"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Credit"] = 'credit'] = "Credit"; + DebtTransactionTypeEnum[DebtTransactionTypeEnum["Charge"] = 'charge'] = "Charge"; + })(DebtTransactionTypeEnum = TransactionDetail.DebtTransactionTypeEnum || (TransactionDetail.DebtTransactionTypeEnum = {})); })(TransactionDetail || (TransactionDetail = {})); /** * AccountsApi - fetch parameter creator diff --git a/package-lock.json b/package-lock.json index 80f040f..0bbc2e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ynab", - "version": "1.54.0", + "version": "1.55.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ynab", - "version": "1.54.0", + "version": "1.55.0", "license": "Apache-2.0", "dependencies": { "fetch-ponyfill": "^7.1.0" diff --git a/package.json b/package.json index a5ad10c..ebd97e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ynab", - "version": "1.54.0", + "version": "1.55.0", "description": "YNAB API Javascript (Node) Library", "author": "YNAB", "email": "api@ynab.com",