ynab
Version:
Official JavaScript client for the YNAB API. API documentation available at https://api.ynab.com. Generated from server specification version 1.76.0
1 lines • 162 kB
JavaScript
var ynab;(()=>{var e={2681:function(e,t,n){var a;!function(o){"use strict";function r(e){var n=e&&e.Promise||o.Promise,a=e&&e.XMLHttpRequest||o.XMLHttpRequest;return function(){var e=Object.create(o,{fetch:{value:void 0,writable:!0}});return function(t){var o=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==o&&o,r="URLSearchParams"in o,i="Symbol"in o&&"iterator"in Symbol,s="FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch(e){return!1}}(),d="FormData"in o,c="ArrayBuffer"in o;if(c)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&u.indexOf(Object.prototype.toString.call(e))>-1};function p(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 y(e){return"string"!=typeof e&&(e=String(e)),e}function m(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 g(e){this.map={},e instanceof g?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 _(e){if(e.bodyUsed)return n.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new n((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function S(e){var t=new FileReader,n=f(t);return t.readAsArrayBuffer(e),n}function T(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function O(){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:d&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():c&&s&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=T(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=T(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):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var e=_(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?_(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(S)}),this.text=function(){var e,t,a,o=_(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,a=f(t),t.readAsText(e),a;if(this._bodyArrayBuffer)return n.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),a=0;a<t.length;a++)n[a]=String.fromCharCode(t[a]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return n.resolve(this._bodyText)},d&&(this.formData=function(){return this.text().then(N)}),this.json=function(){return this.text().then(JSON.parse)},this}g.prototype.append=function(e,t){e=p(e),t=y(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},g.prototype.delete=function(e){delete this.map[p(e)]},g.prototype.get=function(e){return e=p(e),this.has(e)?this.map[e]:null},g.prototype.has=function(e){return this.map.hasOwnProperty(p(e))},g.prototype.set=function(e,t){this.map[p(e)]=y(t)},g.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},g.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),m(e)},g.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),m(e)},g.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),m(e)},i&&(g.prototype[Symbol.iterator]=g.prototype.entries);var h=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function v(e,t){if(!(this instanceof v))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,a,o=(t=t||{}).body;if(e instanceof v){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new g(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new g(t.headers)),this.method=(n=t.method||this.method||"GET",a=n.toUpperCase(),h.indexOf(a)>-1?a:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function N(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),a=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(a),decodeURIComponent(o))}})),t}function b(e,t){if(!(this instanceof b))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 g(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},O.call(v.prototype),O.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:0,statusText:""});return e.type="error",e};var J=[301,302,303,307,308];b.redirect=function(e,t){if(-1===J.indexOf(t))throw new RangeError("Invalid status code");return new b(null,{status:t,headers:{location:e}})},t.DOMException=o.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 R(e,r){return new n((function(n,i){var d=new v(e,r);if(d.signal&&d.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var u=new a;function l(){u.abort()}u.onload=function(){var e,t,a={status:u.status,statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new g,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(":"),a=n.shift().trim();if(a){var o=n.join(":").trim();t.append(a,o)}})),t)};a.url="responseURL"in u?u.responseURL:a.headers.get("X-Request-URL");var o="response"in u?u.response:u.responseText;setTimeout((function(){n(new b(o,a))}),0)},u.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},u.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},u.onabort=function(){setTimeout((function(){i(new t.DOMException("Aborted","AbortError"))}),0)},u.open(d.method,function(e){try{return""===e&&o.location.href?o.location.href:e}catch(t){return e}}(d.url),!0),"include"===d.credentials?u.withCredentials=!0:"omit"===d.credentials&&(u.withCredentials=!1),"responseType"in u&&(s?u.responseType="blob":c&&d.headers.get("Content-Type")&&-1!==d.headers.get("Content-Type").indexOf("application/octet-stream")&&(u.responseType="arraybuffer")),!r||"object"!=typeof r.headers||r.headers instanceof g?d.headers.forEach((function(e,t){u.setRequestHeader(t,e)})):Object.getOwnPropertyNames(r.headers).forEach((function(e){u.setRequestHeader(e,y(r.headers[e]))})),d.signal&&(d.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&d.signal.removeEventListener("abort",l)}),u.send(void 0===d._bodyInit?null:d._bodyInit)}))}R.polyfill=!0,o.fetch||(o.fetch=R,o.Headers=g,o.Request=v,o.Response=b),t.Headers=g,t.Request=v,t.Response=b,t.fetch=R,Object.defineProperty(t,"__esModule",{value:!0})}(t),{fetch:e.fetch,Headers:e.Headers,Request:e.Request,Response:e.Response,DOMException:e.DOMException}}()}void 0===(a=function(){return r}.call(t,n,t,e))||(e.exports=a)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==n.g?n.g:this)},5331:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AccountsApi=void 0;const i=r(n(9129)),s=n(1944);class d extends i.BaseAPI{async createAccountRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling createAccount.");if(null===e.data||void 0===e.data)throw new i.RequiredError("data","Required parameter requestParameters.data was null or undefined when calling createAccount.");const n={Accept:"application/json","Content-Type":"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/accounts".replace("{budget_id}",encodeURIComponent(String(e.budgetId))),method:"POST",headers:n,query:{},body:(0,s.PostAccountWrapperToJSON)(e.data)},t);return new i.JSONApiResponse(a,(e=>(0,s.AccountResponseFromJSON)(e)))}async createAccount(e,t,n){const a=await this.createAccountRaw({budgetId:e,data:t},n);return await a.value()}async getAccountByIdRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getAccountById.");if(null===e.accountId||void 0===e.accountId)throw new i.RequiredError("accountId","Required parameter requestParameters.accountId was null or undefined when calling getAccountById.");const n={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/accounts/{account_id}".replace("{budget_id}",encodeURIComponent(String(e.budgetId))).replace("{account_id}",encodeURIComponent(String(e.accountId))),method:"GET",headers:n,query:{}},t);return new i.JSONApiResponse(a,(e=>(0,s.AccountResponseFromJSON)(e)))}async getAccountById(e,t,n){const a=await this.getAccountByIdRaw({budgetId:e,accountId:t},n);return await a.value()}async getAccountsRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getAccounts.");const n={};void 0!==e.lastKnowledgeOfServer&&(n.last_knowledge_of_server=e.lastKnowledgeOfServer);const a={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(a.Authorization=`Bearer ${t}`)}const o=await this.request({path:"/budgets/{budget_id}/accounts".replace("{budget_id}",encodeURIComponent(String(e.budgetId))),method:"GET",headers:a,query:n},t);return new i.JSONApiResponse(o,(e=>(0,s.AccountsResponseFromJSON)(e)))}async getAccounts(e,t,n){const a=await this.getAccountsRaw({budgetId:e,lastKnowledgeOfServer:t},n);return await a.value()}}t.AccountsApi=d},3581:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BudgetsApi=void 0;const i=r(n(9129)),s=n(1944);class d extends i.BaseAPI{async getBudgetByIdRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getBudgetById.");const n={};void 0!==e.lastKnowledgeOfServer&&(n.last_knowledge_of_server=e.lastKnowledgeOfServer);const a={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(a.Authorization=`Bearer ${t}`)}const o=await this.request({path:"/budgets/{budget_id}".replace("{budget_id}",encodeURIComponent(String(e.budgetId))),method:"GET",headers:a,query:n},t);return new i.JSONApiResponse(o,(e=>(0,s.BudgetDetailResponseFromJSON)(e)))}async getBudgetById(e,t,n){const a=await this.getBudgetByIdRaw({budgetId:e,lastKnowledgeOfServer:t},n);return await a.value()}async getBudgetSettingsByIdRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getBudgetSettingsById.");const n={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/settings".replace("{budget_id}",encodeURIComponent(String(e.budgetId))),method:"GET",headers:n,query:{}},t);return new i.JSONApiResponse(a,(e=>(0,s.BudgetSettingsResponseFromJSON)(e)))}async getBudgetSettingsById(e,t){const n=await this.getBudgetSettingsByIdRaw({budgetId:e},t);return await n.value()}async getBudgetsRaw(e,t){const n={};void 0!==e.includeAccounts&&(n.include_accounts=e.includeAccounts);const a={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(a.Authorization=`Bearer ${t}`)}const o=await this.request({path:"/budgets",method:"GET",headers:a,query:n},t);return new i.JSONApiResponse(o,(e=>(0,s.BudgetSummaryResponseFromJSON)(e)))}async getBudgets(e,t){const n=await this.getBudgetsRaw({includeAccounts:e},t);return await n.value()}}t.BudgetsApi=d},3547:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CategoriesApi=void 0;const i=r(n(9129)),s=n(1944);class d extends i.BaseAPI{async getCategoriesRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getCategories.");const n={};void 0!==e.lastKnowledgeOfServer&&(n.last_knowledge_of_server=e.lastKnowledgeOfServer);const a={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(a.Authorization=`Bearer ${t}`)}const o=await this.request({path:"/budgets/{budget_id}/categories".replace("{budget_id}",encodeURIComponent(String(e.budgetId))),method:"GET",headers:a,query:n},t);return new i.JSONApiResponse(o,(e=>(0,s.CategoriesResponseFromJSON)(e)))}async getCategories(e,t,n){const a=await this.getCategoriesRaw({budgetId:e,lastKnowledgeOfServer:t},n);return await a.value()}async getCategoryByIdRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getCategoryById.");if(null===e.categoryId||void 0===e.categoryId)throw new i.RequiredError("categoryId","Required parameter requestParameters.categoryId was null or undefined when calling getCategoryById.");const n={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/categories/{category_id}".replace("{budget_id}",encodeURIComponent(String(e.budgetId))).replace("{category_id}",encodeURIComponent(String(e.categoryId))),method:"GET",headers:n,query:{}},t);return new i.JSONApiResponse(a,(e=>(0,s.CategoryResponseFromJSON)(e)))}async getCategoryById(e,t,n){const a=await this.getCategoryByIdRaw({budgetId:e,categoryId:t},n);return await a.value()}async getMonthCategoryByIdRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getMonthCategoryById.");if(null===e.month||void 0===e.month)throw new i.RequiredError("month","Required parameter requestParameters.month was null or undefined when calling getMonthCategoryById.");if(null===e.categoryId||void 0===e.categoryId)throw new i.RequiredError("categoryId","Required parameter requestParameters.categoryId was null or undefined when calling getMonthCategoryById.");const n={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/months/{month}/categories/{category_id}".replace("{budget_id}",encodeURIComponent(String(e.budgetId))).replace("{month}",encodeURIComponent(String(e.month))).replace("{category_id}",encodeURIComponent(String(e.categoryId))),method:"GET",headers:n,query:{}},t);return new i.JSONApiResponse(a,(e=>(0,s.CategoryResponseFromJSON)(e)))}async getMonthCategoryById(e,t,n,a){const o=await this.getMonthCategoryByIdRaw({budgetId:e,month:t,categoryId:n},a);return await o.value()}async updateCategoryRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling updateCategory.");if(null===e.categoryId||void 0===e.categoryId)throw new i.RequiredError("categoryId","Required parameter requestParameters.categoryId was null or undefined when calling updateCategory.");if(null===e.data||void 0===e.data)throw new i.RequiredError("data","Required parameter requestParameters.data was null or undefined when calling updateCategory.");const n={Accept:"application/json","Content-Type":"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/categories/{category_id}".replace("{budget_id}",encodeURIComponent(String(e.budgetId))).replace("{category_id}",encodeURIComponent(String(e.categoryId))),method:"PATCH",headers:n,query:{},body:(0,s.PatchCategoryWrapperToJSON)(e.data)},t);return new i.JSONApiResponse(a,(e=>(0,s.SaveCategoryResponseFromJSON)(e)))}async updateCategory(e,t,n,a){const o=await this.updateCategoryRaw({budgetId:e,categoryId:t,data:n},a);return await o.value()}async updateMonthCategoryRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling updateMonthCategory.");if(null===e.month||void 0===e.month)throw new i.RequiredError("month","Required parameter requestParameters.month was null or undefined when calling updateMonthCategory.");if(null===e.categoryId||void 0===e.categoryId)throw new i.RequiredError("categoryId","Required parameter requestParameters.categoryId was null or undefined when calling updateMonthCategory.");if(null===e.data||void 0===e.data)throw new i.RequiredError("data","Required parameter requestParameters.data was null or undefined when calling updateMonthCategory.");const n={Accept:"application/json","Content-Type":"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/months/{month}/categories/{category_id}".replace("{budget_id}",encodeURIComponent(String(e.budgetId))).replace("{month}",encodeURIComponent(String(e.month))).replace("{category_id}",encodeURIComponent(String(e.categoryId))),method:"PATCH",headers:n,query:{},body:(0,s.PatchMonthCategoryWrapperToJSON)(e.data)},t);return new i.JSONApiResponse(a,(e=>(0,s.SaveCategoryResponseFromJSON)(e)))}async updateMonthCategory(e,t,n,a,o){const r=await this.updateMonthCategoryRaw({budgetId:e,month:t,categoryId:n,data:a},o);return await r.value()}}t.CategoriesApi=d},2265:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomTransactionsApi=void 0;const a=n(5800);class o extends a.TransactionsApi{getTransactionsByType(e,t,n,a){return this.getTransactions(e,void 0,t,n,a)}createTransactions(e,t,n){return this.createTransaction(e,t,n)}}t.CustomTransactionsApi=o},3114:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MonthsApi=void 0;const i=r(n(9129)),s=n(1944);class d extends i.BaseAPI{async getBudgetMonthRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getBudgetMonth.");if(null===e.month||void 0===e.month)throw new i.RequiredError("month","Required parameter requestParameters.month was null or undefined when calling getBudgetMonth.");const n={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/months/{month}".replace("{budget_id}",encodeURIComponent(String(e.budgetId))).replace("{month}",encodeURIComponent(String(e.month))),method:"GET",headers:n,query:{}},t);return new i.JSONApiResponse(a,(e=>(0,s.MonthDetailResponseFromJSON)(e)))}async getBudgetMonth(e,t,n){const a=await this.getBudgetMonthRaw({budgetId:e,month:t},n);return await a.value()}async getBudgetMonthsRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getBudgetMonths.");const n={};void 0!==e.lastKnowledgeOfServer&&(n.last_knowledge_of_server=e.lastKnowledgeOfServer);const a={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(a.Authorization=`Bearer ${t}`)}const o=await this.request({path:"/budgets/{budget_id}/months".replace("{budget_id}",encodeURIComponent(String(e.budgetId))),method:"GET",headers:a,query:n},t);return new i.JSONApiResponse(o,(e=>(0,s.MonthSummariesResponseFromJSON)(e)))}async getBudgetMonths(e,t,n){const a=await this.getBudgetMonthsRaw({budgetId:e,lastKnowledgeOfServer:t},n);return await a.value()}}t.MonthsApi=d},1567:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PayeeLocationsApi=void 0;const i=r(n(9129)),s=n(1944);class d extends i.BaseAPI{async getPayeeLocationByIdRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getPayeeLocationById.");if(null===e.payeeLocationId||void 0===e.payeeLocationId)throw new i.RequiredError("payeeLocationId","Required parameter requestParameters.payeeLocationId was null or undefined when calling getPayeeLocationById.");const n={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/payee_locations/{payee_location_id}".replace("{budget_id}",encodeURIComponent(String(e.budgetId))).replace("{payee_location_id}",encodeURIComponent(String(e.payeeLocationId))),method:"GET",headers:n,query:{}},t);return new i.JSONApiResponse(a,(e=>(0,s.PayeeLocationResponseFromJSON)(e)))}async getPayeeLocationById(e,t,n){const a=await this.getPayeeLocationByIdRaw({budgetId:e,payeeLocationId:t},n);return await a.value()}async getPayeeLocationsRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getPayeeLocations.");const n={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/payee_locations".replace("{budget_id}",encodeURIComponent(String(e.budgetId))),method:"GET",headers:n,query:{}},t);return new i.JSONApiResponse(a,(e=>(0,s.PayeeLocationsResponseFromJSON)(e)))}async getPayeeLocations(e,t){const n=await this.getPayeeLocationsRaw({budgetId:e},t);return await n.value()}async getPayeeLocationsByPayeeRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getPayeeLocationsByPayee.");if(null===e.payeeId||void 0===e.payeeId)throw new i.RequiredError("payeeId","Required parameter requestParameters.payeeId was null or undefined when calling getPayeeLocationsByPayee.");const n={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/payees/{payee_id}/payee_locations".replace("{budget_id}",encodeURIComponent(String(e.budgetId))).replace("{payee_id}",encodeURIComponent(String(e.payeeId))),method:"GET",headers:n,query:{}},t);return new i.JSONApiResponse(a,(e=>(0,s.PayeeLocationsResponseFromJSON)(e)))}async getPayeeLocationsByPayee(e,t,n){const a=await this.getPayeeLocationsByPayeeRaw({budgetId:e,payeeId:t},n);return await a.value()}}t.PayeeLocationsApi=d},1892:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PayeesApi=void 0;const i=r(n(9129)),s=n(1944);class d extends i.BaseAPI{async getPayeeByIdRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getPayeeById.");if(null===e.payeeId||void 0===e.payeeId)throw new i.RequiredError("payeeId","Required parameter requestParameters.payeeId was null or undefined when calling getPayeeById.");const n={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/payees/{payee_id}".replace("{budget_id}",encodeURIComponent(String(e.budgetId))).replace("{payee_id}",encodeURIComponent(String(e.payeeId))),method:"GET",headers:n,query:{}},t);return new i.JSONApiResponse(a,(e=>(0,s.PayeeResponseFromJSON)(e)))}async getPayeeById(e,t,n){const a=await this.getPayeeByIdRaw({budgetId:e,payeeId:t},n);return await a.value()}async getPayeesRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getPayees.");const n={};void 0!==e.lastKnowledgeOfServer&&(n.last_knowledge_of_server=e.lastKnowledgeOfServer);const a={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(a.Authorization=`Bearer ${t}`)}const o=await this.request({path:"/budgets/{budget_id}/payees".replace("{budget_id}",encodeURIComponent(String(e.budgetId))),method:"GET",headers:a,query:n},t);return new i.JSONApiResponse(o,(e=>(0,s.PayeesResponseFromJSON)(e)))}async getPayees(e,t,n){const a=await this.getPayeesRaw({budgetId:e,lastKnowledgeOfServer:t},n);return await a.value()}async updatePayeeRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling updatePayee.");if(null===e.payeeId||void 0===e.payeeId)throw new i.RequiredError("payeeId","Required parameter requestParameters.payeeId was null or undefined when calling updatePayee.");if(null===e.data||void 0===e.data)throw new i.RequiredError("data","Required parameter requestParameters.data was null or undefined when calling updatePayee.");const n={Accept:"application/json","Content-Type":"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/payees/{payee_id}".replace("{budget_id}",encodeURIComponent(String(e.budgetId))).replace("{payee_id}",encodeURIComponent(String(e.payeeId))),method:"PATCH",headers:n,query:{},body:(0,s.PatchPayeeWrapperToJSON)(e.data)},t);return new i.JSONApiResponse(a,(e=>(0,s.SavePayeeResponseFromJSON)(e)))}async updatePayee(e,t,n,a){const o=await this.updatePayeeRaw({budgetId:e,payeeId:t,data:n},a);return await o.value()}}t.PayeesApi=d},1:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ScheduledTransactionsApi=void 0;const i=r(n(9129)),s=n(1944);class d extends i.BaseAPI{async createScheduledTransactionRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling createScheduledTransaction.");if(null===e.data||void 0===e.data)throw new i.RequiredError("data","Required parameter requestParameters.data was null or undefined when calling createScheduledTransaction.");const n={Accept:"application/json","Content-Type":"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/scheduled_transactions".replace("{budget_id}",encodeURIComponent(String(e.budgetId))),method:"POST",headers:n,query:{},body:(0,s.PostScheduledTransactionWrapperToJSON)(e.data)},t);return new i.JSONApiResponse(a,(e=>(0,s.ScheduledTransactionResponseFromJSON)(e)))}async createScheduledTransaction(e,t,n){const a=await this.createScheduledTransactionRaw({budgetId:e,data:t},n);return await a.value()}async deleteScheduledTransactionRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling deleteScheduledTransaction.");if(null===e.scheduledTransactionId||void 0===e.scheduledTransactionId)throw new i.RequiredError("scheduledTransactionId","Required parameter requestParameters.scheduledTransactionId was null or undefined when calling deleteScheduledTransaction.");const n={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}".replace("{budget_id}",encodeURIComponent(String(e.budgetId))).replace("{scheduled_transaction_id}",encodeURIComponent(String(e.scheduledTransactionId))),method:"DELETE",headers:n,query:{}},t);return new i.JSONApiResponse(a,(e=>(0,s.ScheduledTransactionResponseFromJSON)(e)))}async deleteScheduledTransaction(e,t,n){const a=await this.deleteScheduledTransactionRaw({budgetId:e,scheduledTransactionId:t},n);return await a.value()}async getScheduledTransactionByIdRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getScheduledTransactionById.");if(null===e.scheduledTransactionId||void 0===e.scheduledTransactionId)throw new i.RequiredError("scheduledTransactionId","Required parameter requestParameters.scheduledTransactionId was null or undefined when calling getScheduledTransactionById.");const n={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}".replace("{budget_id}",encodeURIComponent(String(e.budgetId))).replace("{scheduled_transaction_id}",encodeURIComponent(String(e.scheduledTransactionId))),method:"GET",headers:n,query:{}},t);return new i.JSONApiResponse(a,(e=>(0,s.ScheduledTransactionResponseFromJSON)(e)))}async getScheduledTransactionById(e,t,n){const a=await this.getScheduledTransactionByIdRaw({budgetId:e,scheduledTransactionId:t},n);return await a.value()}async getScheduledTransactionsRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getScheduledTransactions.");const n={};void 0!==e.lastKnowledgeOfServer&&(n.last_knowledge_of_server=e.lastKnowledgeOfServer);const a={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(a.Authorization=`Bearer ${t}`)}const o=await this.request({path:"/budgets/{budget_id}/scheduled_transactions".replace("{budget_id}",encodeURIComponent(String(e.budgetId))),method:"GET",headers:a,query:n},t);return new i.JSONApiResponse(o,(e=>(0,s.ScheduledTransactionsResponseFromJSON)(e)))}async getScheduledTransactions(e,t,n){const a=await this.getScheduledTransactionsRaw({budgetId:e,lastKnowledgeOfServer:t},n);return await a.value()}async updateScheduledTransactionRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling updateScheduledTransaction.");if(null===e.scheduledTransactionId||void 0===e.scheduledTransactionId)throw new i.RequiredError("scheduledTransactionId","Required parameter requestParameters.scheduledTransactionId was null or undefined when calling updateScheduledTransaction.");if(null===e.putScheduledTransactionWrapper||void 0===e.putScheduledTransactionWrapper)throw new i.RequiredError("putScheduledTransactionWrapper","Required parameter requestParameters.putScheduledTransactionWrapper was null or undefined when calling updateScheduledTransaction.");const n={Accept:"application/json","Content-Type":"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}".replace("{budget_id}",encodeURIComponent(String(e.budgetId))).replace("{scheduled_transaction_id}",encodeURIComponent(String(e.scheduledTransactionId))),method:"PUT",headers:n,query:{},body:(0,s.PutScheduledTransactionWrapperToJSON)(e.putScheduledTransactionWrapper)},t);return new i.JSONApiResponse(a,(e=>(0,s.ScheduledTransactionResponseFromJSON)(e)))}async updateScheduledTransaction(e,t,n,a){const o=await this.updateScheduledTransactionRaw({budgetId:e,scheduledTransactionId:t,putScheduledTransactionWrapper:n},a);return await o.value()}}t.ScheduledTransactionsApi=d},5800:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GetTransactionsByPayeeTypeEnum=t.GetTransactionsByMonthTypeEnum=t.GetTransactionsByCategoryTypeEnum=t.GetTransactionsByAccountTypeEnum=t.GetTransactionsTypeEnum=t.TransactionsApi=void 0;const i=r(n(9129)),s=n(1944);class d extends i.BaseAPI{async createTransactionRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling createTransaction.");if(null===e.data||void 0===e.data)throw new i.RequiredError("data","Required parameter requestParameters.data was null or undefined when calling createTransaction.");const n={Accept:"application/json","Content-Type":"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/transactions".replace("{budget_id}",encodeURIComponent(String(e.budgetId))),method:"POST",headers:n,query:{},body:(0,s.PostTransactionsWrapperToJSON)(e.data)},t);return new i.JSONApiResponse(a,(e=>(0,s.SaveTransactionsResponseFromJSON)(e)))}async createTransaction(e,t,n){const a=await this.createTransactionRaw({budgetId:e,data:t},n);return await a.value()}async deleteTransactionRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling deleteTransaction.");if(null===e.transactionId||void 0===e.transactionId)throw new i.RequiredError("transactionId","Required parameter requestParameters.transactionId was null or undefined when calling deleteTransaction.");const n={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/transactions/{transaction_id}".replace("{budget_id}",encodeURIComponent(String(e.budgetId))).replace("{transaction_id}",encodeURIComponent(String(e.transactionId))),method:"DELETE",headers:n,query:{}},t);return new i.JSONApiResponse(a,(e=>(0,s.TransactionResponseFromJSON)(e)))}async deleteTransaction(e,t,n){const a=await this.deleteTransactionRaw({budgetId:e,transactionId:t},n);return await a.value()}async getTransactionByIdRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getTransactionById.");if(null===e.transactionId||void 0===e.transactionId)throw new i.RequiredError("transactionId","Required parameter requestParameters.transactionId was null or undefined when calling getTransactionById.");const n={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(n.Authorization=`Bearer ${t}`)}const a=await this.request({path:"/budgets/{budget_id}/transactions/{transaction_id}".replace("{budget_id}",encodeURIComponent(String(e.budgetId))).replace("{transaction_id}",encodeURIComponent(String(e.transactionId))),method:"GET",headers:n,query:{}},t);return new i.JSONApiResponse(a,(e=>(0,s.TransactionResponseFromJSON)(e)))}async getTransactionById(e,t,n){const a=await this.getTransactionByIdRaw({budgetId:e,transactionId:t},n);return await a.value()}async getTransactionsRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getTransactions.");const n={};void 0!==e.sinceDate&&(n.since_date=e.sinceDate),void 0!==e.type&&(n.type=e.type),void 0!==e.lastKnowledgeOfServer&&(n.last_knowledge_of_server=e.lastKnowledgeOfServer);const a={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(a.Authorization=`Bearer ${t}`)}const o=await this.request({path:"/budgets/{budget_id}/transactions".replace("{budget_id}",encodeURIComponent(String(e.budgetId))),method:"GET",headers:a,query:n},t);return new i.JSONApiResponse(o,(e=>(0,s.TransactionsResponseFromJSON)(e)))}async getTransactions(e,t,n,a,o){const r=await this.getTransactionsRaw({budgetId:e,sinceDate:t,type:n,lastKnowledgeOfServer:a},o);return await r.value()}async getTransactionsByAccountRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getTransactionsByAccount.");if(null===e.accountId||void 0===e.accountId)throw new i.RequiredError("accountId","Required parameter requestParameters.accountId was null or undefined when calling getTransactionsByAccount.");const n={};void 0!==e.sinceDate&&(n.since_date=e.sinceDate),void 0!==e.type&&(n.type=e.type),void 0!==e.lastKnowledgeOfServer&&(n.last_knowledge_of_server=e.lastKnowledgeOfServer);const a={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(a.Authorization=`Bearer ${t}`)}const o=await this.request({path:"/budgets/{budget_id}/accounts/{account_id}/transactions".replace("{budget_id}",encodeURIComponent(String(e.budgetId))).replace("{account_id}",encodeURIComponent(String(e.accountId))),method:"GET",headers:a,query:n},t);return new i.JSONApiResponse(o,(e=>(0,s.TransactionsResponseFromJSON)(e)))}async getTransactionsByAccount(e,t,n,a,o,r){const i=await this.getTransactionsByAccountRaw({budgetId:e,accountId:t,sinceDate:n,type:a,lastKnowledgeOfServer:o},r);return await i.value()}async getTransactionsByCategoryRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getTransactionsByCategory.");if(null===e.categoryId||void 0===e.categoryId)throw new i.RequiredError("categoryId","Required parameter requestParameters.categoryId was null or undefined when calling getTransactionsByCategory.");const n={};void 0!==e.sinceDate&&(n.since_date=e.sinceDate),void 0!==e.type&&(n.type=e.type),void 0!==e.lastKnowledgeOfServer&&(n.last_knowledge_of_server=e.lastKnowledgeOfServer);const a={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(a.Authorization=`Bearer ${t}`)}const o=await this.request({path:"/budgets/{budget_id}/categories/{category_id}/transactions".replace("{budget_id}",encodeURIComponent(String(e.budgetId))).replace("{category_id}",encodeURIComponent(String(e.categoryId))),method:"GET",headers:a,query:n},t);return new i.JSONApiResponse(o,(e=>(0,s.HybridTransactionsResponseFromJSON)(e)))}async getTransactionsByCategory(e,t,n,a,o,r){const i=await this.getTransactionsByCategoryRaw({budgetId:e,categoryId:t,sinceDate:n,type:a,lastKnowledgeOfServer:o},r);return await i.value()}async getTransactionsByMonthRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getTransactionsByMonth.");if(null===e.month||void 0===e.month)throw new i.RequiredError("month","Required parameter requestParameters.month was null or undefined when calling getTransactionsByMonth.");const n={};void 0!==e.sinceDate&&(n.since_date=e.sinceDate),void 0!==e.type&&(n.type=e.type),void 0!==e.lastKnowledgeOfServer&&(n.last_knowledge_of_server=e.lastKnowledgeOfServer);const a={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,t=await e("bearer",[]);t&&(a.Authorization=`Bearer ${t}`)}const o=await this.request({path:"/budgets/{budget_id}/months/{month}/transactions".replace("{budget_id}",encodeURIComponent(String(e.budgetId))).replace("{month}",encodeURIComponent(String(e.month))),method:"GET",headers:a,query:n},t);return new i.JSONApiResponse(o,(e=>(0,s.HybridTransactionsResponseFromJSON)(e)))}async getTransactionsByMonth(e,t,n,a,o,r){const i=await this.getTransactionsByMonthRaw({budgetId:e,month:t,sinceDate:n,type:a,lastKnowledgeOfServer:o},r);return await i.value()}async getTransactionsByPayeeRaw(e,t){if(null===e.budgetId||void 0===e.budgetId)throw new i.RequiredError("budgetId","Required parameter requestParameters.budgetId was null or undefined when calling getTransactionsByPayee.");if(null===e.payeeId||void 0===e.payeeId)throw new i.RequiredError("payeeId","Required parameter requestParameters.payeeId was null or undefined when calling getTransactionsByPayee.");const n={};void 0!==e.sinceDate&&(n.since_date=e.sinceDate),void 0!==e.type&&(n.type=e.type),void 0!==e.lastKnowledgeOfServ