ynab
Version:
Official JavaScript client for the YNAB API. API documentation available at https://api.ynab.com. Generated from server specification version 1.85.0
1 lines • 189 kB
JavaScript
var ynab;(()=>{var e={2681(e,n,t){var a;!function(o){"use strict";function r(e){var t=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(n){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,c="FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch(e){return!1}}(),s="FormData"in o,d="ArrayBuffer"in o;if(d)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 _(e){return"string"!=typeof e&&(e=String(e)),e}function y(e){var n={next:function(){var n=e.shift();return{done:void 0===n,value:n}}};return i&&(n[Symbol.iterator]=function(){return n}),n}function m(e){this.map={},e instanceof m?e.forEach(function(e,n){this.append(n,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(n){this.append(n,e[n])},this)}function f(e){if(e.bodyUsed)return t.reject(new TypeError("Already read"));e.bodyUsed=!0}function g(e){return new t(function(n,t){e.onload=function(){n(e.result)},e.onerror=function(){t(e.error)}})}function h(e){var n=new FileReader,t=g(n);return n.readAsArrayBuffer(e),t}function v(e){if(e.slice)return e.slice(0);var n=new Uint8Array(e.byteLength);return n.set(new Uint8Array(e)),n.buffer}function S(){return this.bodyUsed=!1,this._initBody=function(e){var n;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:c&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():d&&c&&((n=e)&&DataView.prototype.isPrototypeOf(n))?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):d&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=v(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"))},c&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return t.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return t.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return t.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?t.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):t.resolve(this._bodyArrayBuffer)):this.blob().then(h)}),this.text=function(){var e,n,a,o=f(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,n=new FileReader,a=g(n),n.readAsText(e),a;if(this._bodyArrayBuffer)return t.resolve(function(e){for(var n=new Uint8Array(e),t=new Array(n.length),a=0;a<n.length;a++)t[a]=String.fromCharCode(n[a]);return t.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return t.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}m.prototype.append=function(e,n){e=p(e),n=_(n);var t=this.map[e];this.map[e]=t?t+", "+n:n},m.prototype.delete=function(e){delete this.map[p(e)]},m.prototype.get=function(e){return e=p(e),this.has(e)?this.map[e]:null},m.prototype.has=function(e){return this.map.hasOwnProperty(p(e))},m.prototype.set=function(e,n){this.map[p(e)]=_(n)},m.prototype.forEach=function(e,n){for(var t in this.map)this.map.hasOwnProperty(t)&&e.call(n,this.map[t],t,this)},m.prototype.keys=function(){var e=[];return this.forEach(function(n,t){e.push(t)}),y(e)},m.prototype.values=function(){var e=[];return this.forEach(function(n){e.push(n)}),y(e)},m.prototype.entries=function(){var e=[];return this.forEach(function(n,t){e.push([t,n])}),y(e)},i&&(m.prototype[Symbol.iterator]=m.prototype.entries);var T=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function O(e,n){if(!(this instanceof O))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var t,a,o=(n=n||{}).body;if(e instanceof O){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,n.headers||(this.headers=new m(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=n.credentials||this.credentials||"same-origin",!n.headers&&this.headers||(this.headers=new m(n.headers)),this.method=(t=n.method||this.method||"GET",a=t.toUpperCase(),T.indexOf(a)>-1?a:t),this.mode=n.mode||this.mode||null,this.signal=n.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"!==n.cache&&"no-cache"!==n.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 w(e){var n=new FormData;return e.trim().split("&").forEach(function(e){if(e){var t=e.split("="),a=t.shift().replace(/\+/g," "),o=t.join("=").replace(/\+/g," ");n.append(decodeURIComponent(a),decodeURIComponent(o))}}),n}function b(e,n){if(!(this instanceof b))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');n||(n={}),this.type="default",this.status=void 0===n.status?200:n.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in n?n.statusText:"",this.headers=new m(n.headers),this.url=n.url||"",this._initBody(e)}O.prototype.clone=function(){return new O(this,{body:this._bodyInit})},S.call(O.prototype),S.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:0,statusText:""});return e.type="error",e};var N=[301,302,303,307,308];b.redirect=function(e,n){if(-1===N.indexOf(n))throw new RangeError("Invalid status code");return new b(null,{status:n,headers:{location:e}})},n.DOMException=o.DOMException;try{new n.DOMException}catch(e){n.DOMException=function(e,n){this.message=e,this.name=n;var t=Error(e);this.stack=t.stack},n.DOMException.prototype=Object.create(Error.prototype),n.DOMException.prototype.constructor=n.DOMException}function J(e,r){return new t(function(t,i){var s=new O(e,r);if(s.signal&&s.signal.aborted)return i(new n.DOMException("Aborted","AbortError"));var u=new a;function l(){u.abort()}u.onload=function(){var e,n,a={status:u.status,statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",n=new m,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 t=e.split(":"),a=t.shift().trim();if(a){var o=t.join(":").trim();n.append(a,o)}}),n)};a.url="responseURL"in u?u.responseURL:a.headers.get("X-Request-URL");var o="response"in u?u.response:u.responseText;setTimeout(function(){t(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 n.DOMException("Aborted","AbortError"))},0)},u.open(s.method,function(e){try{return""===e&&o.location.href?o.location.href:e}catch(n){return e}}(s.url),!0),"include"===s.credentials?u.withCredentials=!0:"omit"===s.credentials&&(u.withCredentials=!1),"responseType"in u&&(c?u.responseType="blob":d&&s.headers.get("Content-Type")&&-1!==s.headers.get("Content-Type").indexOf("application/octet-stream")&&(u.responseType="arraybuffer")),!r||"object"!=typeof r.headers||r.headers instanceof m?s.headers.forEach(function(e,n){u.setRequestHeader(n,e)}):Object.getOwnPropertyNames(r.headers).forEach(function(e){u.setRequestHeader(e,_(r.headers[e]))}),s.signal&&(s.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&s.signal.removeEventListener("abort",l)}),u.send(void 0===s._bodyInit?null:s._bodyInit)})}J.polyfill=!0,o.fetch||(o.fetch=J,o.Headers=m,o.Request=O,o.Response=b),n.Headers=m,n.Request=O,n.Response=b,n.fetch=J,Object.defineProperty(n,"__esModule",{value:!0})}(n),{fetch:e.fetch,Headers:e.Headers,Request:e.Request,Response:e.Response,DOMException:e.DOMException}}()}void 0===(a=function(){return r}.call(n,t,n,e))||(e.exports=a)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==t.g?t.g:this)},5331(e,n,t){"use strict";var a,o=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var o=Object.getOwnPropertyDescriptor(n,t);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,o)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),i=this&&this.__importStar||(a=function(e){return a=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},a(e)},function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t=a(e),i=0;i<t.length;i++)"default"!==t[i]&&o(n,e,t[i]);return r(n,e),n});Object.defineProperty(n,"__esModule",{value:!0}),n.AccountsApi=void 0;const c=i(t(9129)),s=t(1944);class d extends c.BaseAPI{async createAccountRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling createAccount.");if(null===e.data||void 0===e.data)throw new c.RequiredError("data","Required parameter requestParameters.data was null or undefined when calling createAccount.");const t={Accept:"application/json","Content-Type":"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/accounts".replace("{plan_id}",encodeURIComponent(String(e.planId))),method:"POST",headers:t,query:{},body:(0,s.PostAccountWrapperToJSON)(e.data)},n);return new c.JSONApiResponse(a,e=>(0,s.AccountResponseFromJSON)(e))}async createAccount(e,n,t){const a=await this.createAccountRaw({planId:e,data:n},t);return await a.value()}async getAccountByIdRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getAccountById.");if(null===e.accountId||void 0===e.accountId)throw new c.RequiredError("accountId","Required parameter requestParameters.accountId was null or undefined when calling getAccountById.");const t={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/accounts/{account_id}".replace("{plan_id}",encodeURIComponent(String(e.planId))).replace("{account_id}",encodeURIComponent(String(e.accountId))),method:"GET",headers:t,query:{}},n);return new c.JSONApiResponse(a,e=>(0,s.AccountResponseFromJSON)(e))}async getAccountById(e,n,t){const a=await this.getAccountByIdRaw({planId:e,accountId:n},t);return await a.value()}async getAccountsRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getAccounts.");const t={};void 0!==e.lastKnowledgeOfServer&&(t.last_knowledge_of_server=e.lastKnowledgeOfServer);const a={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(a.Authorization=`Bearer ${n}`)}const o=await this.request({path:"/plans/{plan_id}/accounts".replace("{plan_id}",encodeURIComponent(String(e.planId))),method:"GET",headers:a,query:t},n);return new c.JSONApiResponse(o,e=>(0,s.AccountsResponseFromJSON)(e))}async getAccounts(e,n,t){const a=await this.getAccountsRaw({planId:e,lastKnowledgeOfServer:n},t);return await a.value()}}n.AccountsApi=d},3547(e,n,t){"use strict";var a,o=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var o=Object.getOwnPropertyDescriptor(n,t);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,o)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),i=this&&this.__importStar||(a=function(e){return a=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},a(e)},function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t=a(e),i=0;i<t.length;i++)"default"!==t[i]&&o(n,e,t[i]);return r(n,e),n});Object.defineProperty(n,"__esModule",{value:!0}),n.CategoriesApi=void 0;const c=i(t(9129)),s=t(1944);class d extends c.BaseAPI{async createCategoryRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling createCategory.");if(null===e.data||void 0===e.data)throw new c.RequiredError("data","Required parameter requestParameters.data was null or undefined when calling createCategory.");const t={Accept:"application/json","Content-Type":"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/categories".replace("{plan_id}",encodeURIComponent(String(e.planId))),method:"POST",headers:t,query:{},body:(0,s.PostCategoryWrapperToJSON)(e.data)},n);return new c.JSONApiResponse(a,e=>(0,s.SaveCategoryResponseFromJSON)(e))}async createCategory(e,n,t){const a=await this.createCategoryRaw({planId:e,data:n},t);return await a.value()}async createCategoryGroupRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling createCategoryGroup.");if(null===e.data||void 0===e.data)throw new c.RequiredError("data","Required parameter requestParameters.data was null or undefined when calling createCategoryGroup.");const t={Accept:"application/json","Content-Type":"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/category_groups".replace("{plan_id}",encodeURIComponent(String(e.planId))),method:"POST",headers:t,query:{},body:(0,s.PostCategoryGroupWrapperToJSON)(e.data)},n);return new c.JSONApiResponse(a,e=>(0,s.SaveCategoryGroupResponseFromJSON)(e))}async createCategoryGroup(e,n,t){const a=await this.createCategoryGroupRaw({planId:e,data:n},t);return await a.value()}async getCategoriesRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getCategories.");const t={};void 0!==e.lastKnowledgeOfServer&&(t.last_knowledge_of_server=e.lastKnowledgeOfServer);const a={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(a.Authorization=`Bearer ${n}`)}const o=await this.request({path:"/plans/{plan_id}/categories".replace("{plan_id}",encodeURIComponent(String(e.planId))),method:"GET",headers:a,query:t},n);return new c.JSONApiResponse(o,e=>(0,s.CategoriesResponseFromJSON)(e))}async getCategories(e,n,t){const a=await this.getCategoriesRaw({planId:e,lastKnowledgeOfServer:n},t);return await a.value()}async getCategoryByIdRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getCategoryById.");if(null===e.categoryId||void 0===e.categoryId)throw new c.RequiredError("categoryId","Required parameter requestParameters.categoryId was null or undefined when calling getCategoryById.");const t={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/categories/{category_id}".replace("{plan_id}",encodeURIComponent(String(e.planId))).replace("{category_id}",encodeURIComponent(String(e.categoryId))),method:"GET",headers:t,query:{}},n);return new c.JSONApiResponse(a,e=>(0,s.CategoryResponseFromJSON)(e))}async getCategoryById(e,n,t){const a=await this.getCategoryByIdRaw({planId:e,categoryId:n},t);return await a.value()}async getMonthCategoryByIdRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getMonthCategoryById.");if(null===e.month||void 0===e.month)throw new c.RequiredError("month","Required parameter requestParameters.month was null or undefined when calling getMonthCategoryById.");if(null===e.categoryId||void 0===e.categoryId)throw new c.RequiredError("categoryId","Required parameter requestParameters.categoryId was null or undefined when calling getMonthCategoryById.");const t={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/months/{month}/categories/{category_id}".replace("{plan_id}",encodeURIComponent(String(e.planId))).replace("{month}",encodeURIComponent(String(e.month))).replace("{category_id}",encodeURIComponent(String(e.categoryId))),method:"GET",headers:t,query:{}},n);return new c.JSONApiResponse(a,e=>(0,s.CategoryResponseFromJSON)(e))}async getMonthCategoryById(e,n,t,a){const o=await this.getMonthCategoryByIdRaw({planId:e,month:n,categoryId:t},a);return await o.value()}async updateCategoryRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling updateCategory.");if(null===e.categoryId||void 0===e.categoryId)throw new c.RequiredError("categoryId","Required parameter requestParameters.categoryId was null or undefined when calling updateCategory.");if(null===e.data||void 0===e.data)throw new c.RequiredError("data","Required parameter requestParameters.data was null or undefined when calling updateCategory.");const t={Accept:"application/json","Content-Type":"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/categories/{category_id}".replace("{plan_id}",encodeURIComponent(String(e.planId))).replace("{category_id}",encodeURIComponent(String(e.categoryId))),method:"PATCH",headers:t,query:{},body:(0,s.PatchCategoryWrapperToJSON)(e.data)},n);return new c.JSONApiResponse(a,e=>(0,s.SaveCategoryResponseFromJSON)(e))}async updateCategory(e,n,t,a){const o=await this.updateCategoryRaw({planId:e,categoryId:n,data:t},a);return await o.value()}async updateCategoryGroupRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling updateCategoryGroup.");if(null===e.categoryGroupId||void 0===e.categoryGroupId)throw new c.RequiredError("categoryGroupId","Required parameter requestParameters.categoryGroupId was null or undefined when calling updateCategoryGroup.");if(null===e.data||void 0===e.data)throw new c.RequiredError("data","Required parameter requestParameters.data was null or undefined when calling updateCategoryGroup.");const t={Accept:"application/json","Content-Type":"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/category_groups/{category_group_id}".replace("{plan_id}",encodeURIComponent(String(e.planId))).replace("{category_group_id}",encodeURIComponent(String(e.categoryGroupId))),method:"PATCH",headers:t,query:{},body:(0,s.PatchCategoryGroupWrapperToJSON)(e.data)},n);return new c.JSONApiResponse(a,e=>(0,s.SaveCategoryGroupResponseFromJSON)(e))}async updateCategoryGroup(e,n,t,a){const o=await this.updateCategoryGroupRaw({planId:e,categoryGroupId:n,data:t},a);return await o.value()}async updateMonthCategoryRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling updateMonthCategory.");if(null===e.month||void 0===e.month)throw new c.RequiredError("month","Required parameter requestParameters.month was null or undefined when calling updateMonthCategory.");if(null===e.categoryId||void 0===e.categoryId)throw new c.RequiredError("categoryId","Required parameter requestParameters.categoryId was null or undefined when calling updateMonthCategory.");if(null===e.data||void 0===e.data)throw new c.RequiredError("data","Required parameter requestParameters.data was null or undefined when calling updateMonthCategory.");const t={Accept:"application/json","Content-Type":"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/months/{month}/categories/{category_id}".replace("{plan_id}",encodeURIComponent(String(e.planId))).replace("{month}",encodeURIComponent(String(e.month))).replace("{category_id}",encodeURIComponent(String(e.categoryId))),method:"PATCH",headers:t,query:{},body:(0,s.PatchMonthCategoryWrapperToJSON)(e.data)},n);return new c.JSONApiResponse(a,e=>(0,s.SaveCategoryResponseFromJSON)(e))}async updateMonthCategory(e,n,t,a,o){const r=await this.updateMonthCategoryRaw({planId:e,month:n,categoryId:t,data:a},o);return await r.value()}}n.CategoriesApi=d},2265(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CustomTransactionsApi=void 0;const a=t(5800);class o extends a.TransactionsApi{getTransactionsByType(e,n,t,a){return this.getTransactions(e,void 0,void 0,n,t,a)}createTransactions(e,n,t){return this.createTransaction(e,n,t)}}n.CustomTransactionsApi=o},3701(e,n,t){"use strict";var a,o=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var o=Object.getOwnPropertyDescriptor(n,t);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,o)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),i=this&&this.__importStar||(a=function(e){return a=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},a(e)},function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t=a(e),i=0;i<t.length;i++)"default"!==t[i]&&o(n,e,t[i]);return r(n,e),n});Object.defineProperty(n,"__esModule",{value:!0}),n.MoneyMovementsApi=void 0;const c=i(t(9129)),s=t(1944);class d extends c.BaseAPI{async getMoneyMovementGroupsRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getMoneyMovementGroups.");const t={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/money_movement_groups".replace("{plan_id}",encodeURIComponent(String(e.planId))),method:"GET",headers:t,query:{}},n);return new c.JSONApiResponse(a,e=>(0,s.MoneyMovementGroupsResponseFromJSON)(e))}async getMoneyMovementGroups(e,n){const t=await this.getMoneyMovementGroupsRaw({planId:e},n);return await t.value()}async getMoneyMovementGroupsByMonthRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getMoneyMovementGroupsByMonth.");if(null===e.month||void 0===e.month)throw new c.RequiredError("month","Required parameter requestParameters.month was null or undefined when calling getMoneyMovementGroupsByMonth.");const t={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/months/{month}/money_movement_groups".replace("{plan_id}",encodeURIComponent(String(e.planId))).replace("{month}",encodeURIComponent(String(e.month))),method:"GET",headers:t,query:{}},n);return new c.JSONApiResponse(a,e=>(0,s.MoneyMovementGroupsResponseFromJSON)(e))}async getMoneyMovementGroupsByMonth(e,n,t){const a=await this.getMoneyMovementGroupsByMonthRaw({planId:e,month:n},t);return await a.value()}async getMoneyMovementsRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getMoneyMovements.");const t={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/money_movements".replace("{plan_id}",encodeURIComponent(String(e.planId))),method:"GET",headers:t,query:{}},n);return new c.JSONApiResponse(a,e=>(0,s.MoneyMovementsResponseFromJSON)(e))}async getMoneyMovements(e,n){const t=await this.getMoneyMovementsRaw({planId:e},n);return await t.value()}async getMoneyMovementsByMonthRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getMoneyMovementsByMonth.");if(null===e.month||void 0===e.month)throw new c.RequiredError("month","Required parameter requestParameters.month was null or undefined when calling getMoneyMovementsByMonth.");const t={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/months/{month}/money_movements".replace("{plan_id}",encodeURIComponent(String(e.planId))).replace("{month}",encodeURIComponent(String(e.month))),method:"GET",headers:t,query:{}},n);return new c.JSONApiResponse(a,e=>(0,s.MoneyMovementsResponseFromJSON)(e))}async getMoneyMovementsByMonth(e,n,t){const a=await this.getMoneyMovementsByMonthRaw({planId:e,month:n},t);return await a.value()}}n.MoneyMovementsApi=d},3114(e,n,t){"use strict";var a,o=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var o=Object.getOwnPropertyDescriptor(n,t);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,o)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),i=this&&this.__importStar||(a=function(e){return a=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},a(e)},function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t=a(e),i=0;i<t.length;i++)"default"!==t[i]&&o(n,e,t[i]);return r(n,e),n});Object.defineProperty(n,"__esModule",{value:!0}),n.MonthsApi=void 0;const c=i(t(9129)),s=t(1944);class d extends c.BaseAPI{async getPlanMonthRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getPlanMonth.");if(null===e.month||void 0===e.month)throw new c.RequiredError("month","Required parameter requestParameters.month was null or undefined when calling getPlanMonth.");const t={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/months/{month}".replace("{plan_id}",encodeURIComponent(String(e.planId))).replace("{month}",encodeURIComponent(String(e.month))),method:"GET",headers:t,query:{}},n);return new c.JSONApiResponse(a,e=>(0,s.MonthDetailResponseFromJSON)(e))}async getPlanMonth(e,n,t){const a=await this.getPlanMonthRaw({planId:e,month:n},t);return await a.value()}async getPlanMonthsRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getPlanMonths.");const t={};void 0!==e.lastKnowledgeOfServer&&(t.last_knowledge_of_server=e.lastKnowledgeOfServer);const a={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(a.Authorization=`Bearer ${n}`)}const o=await this.request({path:"/plans/{plan_id}/months".replace("{plan_id}",encodeURIComponent(String(e.planId))),method:"GET",headers:a,query:t},n);return new c.JSONApiResponse(o,e=>(0,s.MonthSummariesResponseFromJSON)(e))}async getPlanMonths(e,n,t){const a=await this.getPlanMonthsRaw({planId:e,lastKnowledgeOfServer:n},t);return await a.value()}}n.MonthsApi=d},1567(e,n,t){"use strict";var a,o=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var o=Object.getOwnPropertyDescriptor(n,t);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,o)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),i=this&&this.__importStar||(a=function(e){return a=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},a(e)},function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t=a(e),i=0;i<t.length;i++)"default"!==t[i]&&o(n,e,t[i]);return r(n,e),n});Object.defineProperty(n,"__esModule",{value:!0}),n.PayeeLocationsApi=void 0;const c=i(t(9129)),s=t(1944);class d extends c.BaseAPI{async getPayeeLocationByIdRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getPayeeLocationById.");if(null===e.payeeLocationId||void 0===e.payeeLocationId)throw new c.RequiredError("payeeLocationId","Required parameter requestParameters.payeeLocationId was null or undefined when calling getPayeeLocationById.");const t={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/payee_locations/{payee_location_id}".replace("{plan_id}",encodeURIComponent(String(e.planId))).replace("{payee_location_id}",encodeURIComponent(String(e.payeeLocationId))),method:"GET",headers:t,query:{}},n);return new c.JSONApiResponse(a,e=>(0,s.PayeeLocationResponseFromJSON)(e))}async getPayeeLocationById(e,n,t){const a=await this.getPayeeLocationByIdRaw({planId:e,payeeLocationId:n},t);return await a.value()}async getPayeeLocationsRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getPayeeLocations.");const t={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/payee_locations".replace("{plan_id}",encodeURIComponent(String(e.planId))),method:"GET",headers:t,query:{}},n);return new c.JSONApiResponse(a,e=>(0,s.PayeeLocationsResponseFromJSON)(e))}async getPayeeLocations(e,n){const t=await this.getPayeeLocationsRaw({planId:e},n);return await t.value()}async getPayeeLocationsByPayeeRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getPayeeLocationsByPayee.");if(null===e.payeeId||void 0===e.payeeId)throw new c.RequiredError("payeeId","Required parameter requestParameters.payeeId was null or undefined when calling getPayeeLocationsByPayee.");const t={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/payees/{payee_id}/payee_locations".replace("{plan_id}",encodeURIComponent(String(e.planId))).replace("{payee_id}",encodeURIComponent(String(e.payeeId))),method:"GET",headers:t,query:{}},n);return new c.JSONApiResponse(a,e=>(0,s.PayeeLocationsResponseFromJSON)(e))}async getPayeeLocationsByPayee(e,n,t){const a=await this.getPayeeLocationsByPayeeRaw({planId:e,payeeId:n},t);return await a.value()}}n.PayeeLocationsApi=d},1892(e,n,t){"use strict";var a,o=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var o=Object.getOwnPropertyDescriptor(n,t);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,o)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),i=this&&this.__importStar||(a=function(e){return a=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},a(e)},function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t=a(e),i=0;i<t.length;i++)"default"!==t[i]&&o(n,e,t[i]);return r(n,e),n});Object.defineProperty(n,"__esModule",{value:!0}),n.PayeesApi=void 0;const c=i(t(9129)),s=t(1944);class d extends c.BaseAPI{async createPayeeRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling createPayee.");if(null===e.data||void 0===e.data)throw new c.RequiredError("data","Required parameter requestParameters.data was null or undefined when calling createPayee.");const t={Accept:"application/json","Content-Type":"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/payees".replace("{plan_id}",encodeURIComponent(String(e.planId))),method:"POST",headers:t,query:{},body:(0,s.PostPayeeWrapperToJSON)(e.data)},n);return new c.JSONApiResponse(a,e=>(0,s.SavePayeeResponseFromJSON)(e))}async createPayee(e,n,t){const a=await this.createPayeeRaw({planId:e,data:n},t);return await a.value()}async getPayeeByIdRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getPayeeById.");if(null===e.payeeId||void 0===e.payeeId)throw new c.RequiredError("payeeId","Required parameter requestParameters.payeeId was null or undefined when calling getPayeeById.");const t={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/payees/{payee_id}".replace("{plan_id}",encodeURIComponent(String(e.planId))).replace("{payee_id}",encodeURIComponent(String(e.payeeId))),method:"GET",headers:t,query:{}},n);return new c.JSONApiResponse(a,e=>(0,s.PayeeResponseFromJSON)(e))}async getPayeeById(e,n,t){const a=await this.getPayeeByIdRaw({planId:e,payeeId:n},t);return await a.value()}async getPayeesRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getPayees.");const t={};void 0!==e.lastKnowledgeOfServer&&(t.last_knowledge_of_server=e.lastKnowledgeOfServer);const a={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(a.Authorization=`Bearer ${n}`)}const o=await this.request({path:"/plans/{plan_id}/payees".replace("{plan_id}",encodeURIComponent(String(e.planId))),method:"GET",headers:a,query:t},n);return new c.JSONApiResponse(o,e=>(0,s.PayeesResponseFromJSON)(e))}async getPayees(e,n,t){const a=await this.getPayeesRaw({planId:e,lastKnowledgeOfServer:n},t);return await a.value()}async updatePayeeRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling updatePayee.");if(null===e.payeeId||void 0===e.payeeId)throw new c.RequiredError("payeeId","Required parameter requestParameters.payeeId was null or undefined when calling updatePayee.");if(null===e.data||void 0===e.data)throw new c.RequiredError("data","Required parameter requestParameters.data was null or undefined when calling updatePayee.");const t={Accept:"application/json","Content-Type":"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/payees/{payee_id}".replace("{plan_id}",encodeURIComponent(String(e.planId))).replace("{payee_id}",encodeURIComponent(String(e.payeeId))),method:"PATCH",headers:t,query:{},body:(0,s.PatchPayeeWrapperToJSON)(e.data)},n);return new c.JSONApiResponse(a,e=>(0,s.SavePayeeResponseFromJSON)(e))}async updatePayee(e,n,t,a){const o=await this.updatePayeeRaw({planId:e,payeeId:n,data:t},a);return await o.value()}}n.PayeesApi=d},9863(e,n,t){"use strict";var a,o=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var o=Object.getOwnPropertyDescriptor(n,t);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,o)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),i=this&&this.__importStar||(a=function(e){return a=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},a(e)},function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t=a(e),i=0;i<t.length;i++)"default"!==t[i]&&o(n,e,t[i]);return r(n,e),n});Object.defineProperty(n,"__esModule",{value:!0}),n.PlansApi=void 0;const c=i(t(9129)),s=t(1944);class d extends c.BaseAPI{async getPlanByIdRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getPlanById.");const t={};void 0!==e.lastKnowledgeOfServer&&(t.last_knowledge_of_server=e.lastKnowledgeOfServer);const a={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(a.Authorization=`Bearer ${n}`)}const o=await this.request({path:"/plans/{plan_id}".replace("{plan_id}",encodeURIComponent(String(e.planId))),method:"GET",headers:a,query:t},n);return new c.JSONApiResponse(o,e=>(0,s.PlanDetailResponseFromJSON)(e))}async getPlanById(e,n,t){const a=await this.getPlanByIdRaw({planId:e,lastKnowledgeOfServer:n},t);return await a.value()}async getPlanSettingsByIdRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getPlanSettingsById.");const t={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/settings".replace("{plan_id}",encodeURIComponent(String(e.planId))),method:"GET",headers:t,query:{}},n);return new c.JSONApiResponse(a,e=>(0,s.PlanSettingsResponseFromJSON)(e))}async getPlanSettingsById(e,n){const t=await this.getPlanSettingsByIdRaw({planId:e},n);return await t.value()}async getPlansRaw(e,n){const t={};void 0!==e.includeAccounts&&(t.include_accounts=e.includeAccounts);const a={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(a.Authorization=`Bearer ${n}`)}const o=await this.request({path:"/plans",method:"GET",headers:a,query:t},n);return new c.JSONApiResponse(o,e=>(0,s.PlanSummaryResponseFromJSON)(e))}async getPlans(e,n){const t=await this.getPlansRaw({includeAccounts:e},n);return await t.value()}}n.PlansApi=d},1(e,n,t){"use strict";var a,o=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var o=Object.getOwnPropertyDescriptor(n,t);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,o)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),i=this&&this.__importStar||(a=function(e){return a=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},a(e)},function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t=a(e),i=0;i<t.length;i++)"default"!==t[i]&&o(n,e,t[i]);return r(n,e),n});Object.defineProperty(n,"__esModule",{value:!0}),n.ScheduledTransactionsApi=void 0;const c=i(t(9129)),s=t(1944);class d extends c.BaseAPI{async createScheduledTransactionRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling createScheduledTransaction.");if(null===e.data||void 0===e.data)throw new c.RequiredError("data","Required parameter requestParameters.data was null or undefined when calling createScheduledTransaction.");const t={Accept:"application/json","Content-Type":"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/scheduled_transactions".replace("{plan_id}",encodeURIComponent(String(e.planId))),method:"POST",headers:t,query:{},body:(0,s.PostScheduledTransactionWrapperToJSON)(e.data)},n);return new c.JSONApiResponse(a,e=>(0,s.ScheduledTransactionResponseFromJSON)(e))}async createScheduledTransaction(e,n,t){const a=await this.createScheduledTransactionRaw({planId:e,data:n},t);return await a.value()}async deleteScheduledTransactionRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling deleteScheduledTransaction.");if(null===e.scheduledTransactionId||void 0===e.scheduledTransactionId)throw new c.RequiredError("scheduledTransactionId","Required parameter requestParameters.scheduledTransactionId was null or undefined when calling deleteScheduledTransaction.");const t={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/scheduled_transactions/{scheduled_transaction_id}".replace("{plan_id}",encodeURIComponent(String(e.planId))).replace("{scheduled_transaction_id}",encodeURIComponent(String(e.scheduledTransactionId))),method:"DELETE",headers:t,query:{}},n);return new c.JSONApiResponse(a,e=>(0,s.ScheduledTransactionResponseFromJSON)(e))}async deleteScheduledTransaction(e,n,t){const a=await this.deleteScheduledTransactionRaw({planId:e,scheduledTransactionId:n},t);return await a.value()}async getScheduledTransactionByIdRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getScheduledTransactionById.");if(null===e.scheduledTransactionId||void 0===e.scheduledTransactionId)throw new c.RequiredError("scheduledTransactionId","Required parameter requestParameters.scheduledTransactionId was null or undefined when calling getScheduledTransactionById.");const t={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/scheduled_transactions/{scheduled_transaction_id}".replace("{plan_id}",encodeURIComponent(String(e.planId))).replace("{scheduled_transaction_id}",encodeURIComponent(String(e.scheduledTransactionId))),method:"GET",headers:t,query:{}},n);return new c.JSONApiResponse(a,e=>(0,s.ScheduledTransactionResponseFromJSON)(e))}async getScheduledTransactionById(e,n,t){const a=await this.getScheduledTransactionByIdRaw({planId:e,scheduledTransactionId:n},t);return await a.value()}async getScheduledTransactionsRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling getScheduledTransactions.");const t={};void 0!==e.lastKnowledgeOfServer&&(t.last_knowledge_of_server=e.lastKnowledgeOfServer);const a={Accept:"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(a.Authorization=`Bearer ${n}`)}const o=await this.request({path:"/plans/{plan_id}/scheduled_transactions".replace("{plan_id}",encodeURIComponent(String(e.planId))),method:"GET",headers:a,query:t},n);return new c.JSONApiResponse(o,e=>(0,s.ScheduledTransactionsResponseFromJSON)(e))}async getScheduledTransactions(e,n,t){const a=await this.getScheduledTransactionsRaw({planId:e,lastKnowledgeOfServer:n},t);return await a.value()}async updateScheduledTransactionRaw(e,n){if(null===e.planId||void 0===e.planId)throw new c.RequiredError("planId","Required parameter requestParameters.planId was null or undefined when calling updateScheduledTransaction.");if(null===e.scheduledTransactionId||void 0===e.scheduledTransactionId)throw new c.RequiredError("scheduledTransactionId","Required parameter requestParameters.scheduledTransactionId was null or undefined when calling updateScheduledTransaction.");if(null===e.putScheduledTransactionWrapper||void 0===e.putScheduledTransactionWrapper)throw new c.RequiredError("putScheduledTransactionWrapper","Required parameter requestParameters.putScheduledTransactionWrapper was null or undefined when calling updateScheduledTransaction.");const t={Accept:"application/json","Content-Type":"application/json"};if(this.configuration&&this.configuration.accessToken){const e=this.configuration.accessToken,n=await e("bearer",[]);n&&(t.Authorization=`Bearer ${n}`)}const a=await this.request({path:"/plans/{plan_id}/scheduled_transactions/{scheduled_transaction_id}".replace("{plan_id}",encodeURIComponent(String(e.planId))).replace("{scheduled_transaction_id}",encodeURIComponent(String(e.scheduledTransactionId))),method:"PUT",headers:t,query:{},body:(0,s.PutScheduledTransactionWrapperToJSON)(e.putScheduledTransactionWrapper)},n);return new c.JSONApiResponse(a,e=>(0,s.ScheduledTransactionResponseFromJSON)(e))}async updateScheduledTransaction(e,n,t,a){const o=await this.updateScheduledTransactionRaw({planId:e,scheduledTransactionId:n,putScheduledTransactionWrapper:t},a);return await o.value()}}n.ScheduledTransactionsApi=d},5800(e,n,t){"use strict";var a,o=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var o=Object.getOwnPropertyDescriptor(n,t);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[t