ynab 1.27.0 → 1.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/api.d.ts +34 -55
- package/dist/api.js +29 -48
- package/dist/browser/ynab.js +2 -1
- package/dist/browser/ynab.js.LICENSE.txt +1 -0
- package/dist/esm/api.d.ts +34 -55
- package/dist/esm/api.js +28 -47
- package/package.json +12 -9
package/README.md
CHANGED
package/dist/api.d.ts
CHANGED
|
@@ -76,11 +76,11 @@ export interface Account {
|
|
|
76
76
|
*/
|
|
77
77
|
name: string;
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
80
|
-
* @type {
|
|
79
|
+
*
|
|
80
|
+
* @type {AccountType}
|
|
81
81
|
* @memberof Account
|
|
82
82
|
*/
|
|
83
|
-
type:
|
|
83
|
+
type: AccountType;
|
|
84
84
|
/**
|
|
85
85
|
* Whether this account is on budget or not
|
|
86
86
|
* @type {boolean}
|
|
@@ -142,29 +142,6 @@ export interface Account {
|
|
|
142
142
|
*/
|
|
143
143
|
deleted: boolean;
|
|
144
144
|
}
|
|
145
|
-
/**
|
|
146
|
-
* @export
|
|
147
|
-
* @namespace Account
|
|
148
|
-
*/
|
|
149
|
-
export declare namespace Account {
|
|
150
|
-
/**
|
|
151
|
-
* @export
|
|
152
|
-
* @enum {string}
|
|
153
|
-
*/
|
|
154
|
-
enum TypeEnum {
|
|
155
|
-
Checking,
|
|
156
|
-
Savings,
|
|
157
|
-
Cash,
|
|
158
|
-
CreditCard,
|
|
159
|
-
LineOfCredit,
|
|
160
|
-
OtherAsset,
|
|
161
|
-
OtherLiability,
|
|
162
|
-
PayPal,
|
|
163
|
-
MerchantAccount,
|
|
164
|
-
InvestmentAccount,
|
|
165
|
-
Mortgage
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
145
|
/**
|
|
169
146
|
*
|
|
170
147
|
* @export
|
|
@@ -191,6 +168,26 @@ export interface AccountResponseData {
|
|
|
191
168
|
*/
|
|
192
169
|
account: Account;
|
|
193
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* The type of account
|
|
173
|
+
* @export
|
|
174
|
+
* @enum {string}
|
|
175
|
+
*/
|
|
176
|
+
export declare enum AccountType {
|
|
177
|
+
Checking,
|
|
178
|
+
Savings,
|
|
179
|
+
Cash,
|
|
180
|
+
CreditCard,
|
|
181
|
+
LineOfCredit,
|
|
182
|
+
OtherAsset,
|
|
183
|
+
OtherLiability,
|
|
184
|
+
Mortgage,
|
|
185
|
+
AutoLoan,
|
|
186
|
+
StudentLoan,
|
|
187
|
+
PersonalLoan,
|
|
188
|
+
MedicalDebt,
|
|
189
|
+
OtherDebt
|
|
190
|
+
}
|
|
194
191
|
/**
|
|
195
192
|
*
|
|
196
193
|
* @export
|
|
@@ -611,7 +608,8 @@ export declare namespace Category {
|
|
|
611
608
|
TB,
|
|
612
609
|
TBD,
|
|
613
610
|
MF,
|
|
614
|
-
NEED
|
|
611
|
+
NEED,
|
|
612
|
+
DEBT
|
|
615
613
|
}
|
|
616
614
|
}
|
|
617
615
|
/**
|
|
@@ -880,7 +878,7 @@ export interface MonthSummary {
|
|
|
880
878
|
*/
|
|
881
879
|
note?: string | null;
|
|
882
880
|
/**
|
|
883
|
-
* The total amount of transactions categorized to 'Inflow:
|
|
881
|
+
* The total amount of transactions categorized to 'Inflow: Ready to Assign' in the month
|
|
884
882
|
* @type {number}
|
|
885
883
|
* @memberof MonthSummary
|
|
886
884
|
*/
|
|
@@ -892,13 +890,13 @@ export interface MonthSummary {
|
|
|
892
890
|
*/
|
|
893
891
|
budgeted: number;
|
|
894
892
|
/**
|
|
895
|
-
* The total amount of transactions in the month, excluding those categorized to 'Inflow:
|
|
893
|
+
* The total amount of transactions in the month, excluding those categorized to 'Inflow: Ready to Assign'
|
|
896
894
|
* @type {number}
|
|
897
895
|
* @memberof MonthSummary
|
|
898
896
|
*/
|
|
899
897
|
activity: number;
|
|
900
898
|
/**
|
|
901
|
-
* The available amount for '
|
|
899
|
+
* The available amount for 'Ready to Assign'
|
|
902
900
|
* @type {number}
|
|
903
901
|
* @memberof MonthSummary
|
|
904
902
|
*/
|
|
@@ -1107,11 +1105,11 @@ export interface SaveAccount {
|
|
|
1107
1105
|
*/
|
|
1108
1106
|
name: string;
|
|
1109
1107
|
/**
|
|
1110
|
-
*
|
|
1111
|
-
* @type {
|
|
1108
|
+
*
|
|
1109
|
+
* @type {AccountType}
|
|
1112
1110
|
* @memberof SaveAccount
|
|
1113
1111
|
*/
|
|
1114
|
-
type:
|
|
1112
|
+
type: AccountType;
|
|
1115
1113
|
/**
|
|
1116
1114
|
* The current balance of the account in milliunits format
|
|
1117
1115
|
* @type {number}
|
|
@@ -1119,25 +1117,6 @@ export interface SaveAccount {
|
|
|
1119
1117
|
*/
|
|
1120
1118
|
balance: number;
|
|
1121
1119
|
}
|
|
1122
|
-
/**
|
|
1123
|
-
* @export
|
|
1124
|
-
* @namespace SaveAccount
|
|
1125
|
-
*/
|
|
1126
|
-
export declare namespace SaveAccount {
|
|
1127
|
-
/**
|
|
1128
|
-
* @export
|
|
1129
|
-
* @enum {string}
|
|
1130
|
-
*/
|
|
1131
|
-
enum TypeEnum {
|
|
1132
|
-
Checking,
|
|
1133
|
-
Savings,
|
|
1134
|
-
CreditCard,
|
|
1135
|
-
Cash,
|
|
1136
|
-
LineOfCredit,
|
|
1137
|
-
OtherAsset,
|
|
1138
|
-
OtherLiability
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
1120
|
/**
|
|
1142
1121
|
*
|
|
1143
1122
|
* @export
|
|
@@ -2323,7 +2302,7 @@ export interface MonthDetail {
|
|
|
2323
2302
|
*/
|
|
2324
2303
|
note?: string | null;
|
|
2325
2304
|
/**
|
|
2326
|
-
* The total amount of transactions categorized to 'Inflow:
|
|
2305
|
+
* The total amount of transactions categorized to 'Inflow: Ready to Assign' in the month
|
|
2327
2306
|
* @type {number}
|
|
2328
2307
|
* @memberof MonthDetail
|
|
2329
2308
|
*/
|
|
@@ -2335,13 +2314,13 @@ export interface MonthDetail {
|
|
|
2335
2314
|
*/
|
|
2336
2315
|
budgeted: number;
|
|
2337
2316
|
/**
|
|
2338
|
-
* The total amount of transactions in the month, excluding those categorized to 'Inflow:
|
|
2317
|
+
* The total amount of transactions in the month, excluding those categorized to 'Inflow: Ready to Assign'
|
|
2339
2318
|
* @type {number}
|
|
2340
2319
|
* @memberof MonthDetail
|
|
2341
2320
|
*/
|
|
2342
2321
|
activity: number;
|
|
2343
2322
|
/**
|
|
2344
|
-
* The available amount for '
|
|
2323
|
+
* The available amount for 'Ready to Assign'
|
|
2345
2324
|
* @type {number}
|
|
2346
2325
|
* @memberof MonthDetail
|
|
2347
2326
|
*/
|
package/dist/api.js
CHANGED
|
@@ -21,12 +21,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiFetchParamCreator = exports.TransactionsApi = exports.TransactionsApiFactory = exports.TransactionsApiFp = exports.TransactionsApiFetchParamCreator = exports.ScheduledTransactionsApi = exports.ScheduledTransactionsApiFactory = exports.ScheduledTransactionsApiFp = exports.ScheduledTransactionsApiFetchParamCreator = exports.PayeesApi = exports.PayeesApiFactory = exports.PayeesApiFp = exports.PayeesApiFetchParamCreator = exports.PayeeLocationsApi = exports.PayeeLocationsApiFactory = exports.PayeeLocationsApiFp = exports.PayeeLocationsApiFetchParamCreator = exports.MonthsApi = exports.MonthsApiFactory = exports.MonthsApiFp = exports.MonthsApiFetchParamCreator = exports.DeprecatedApi = exports.DeprecatedApiFactory = exports.DeprecatedApiFp = exports.DeprecatedApiFetchParamCreator = exports.CategoriesApi = exports.CategoriesApiFactory = exports.CategoriesApiFp = exports.CategoriesApiFetchParamCreator = exports.BudgetsApi = exports.BudgetsApiFactory = exports.BudgetsApiFp = exports.BudgetsApiFetchParamCreator = exports.AccountsApi = exports.AccountsApiFactory = exports.AccountsApiFp = exports.AccountsApiFetchParamCreator = exports.UpdateTransaction = exports.TransactionDetail = exports.ScheduledTransactionDetail = exports.HybridTransaction = exports.TransactionSummary = exports.ScheduledTransactionSummary = exports.SaveTransaction = exports.
|
|
24
|
+
exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiFetchParamCreator = exports.TransactionsApi = exports.TransactionsApiFactory = exports.TransactionsApiFp = exports.TransactionsApiFetchParamCreator = exports.ScheduledTransactionsApi = exports.ScheduledTransactionsApiFactory = exports.ScheduledTransactionsApiFp = exports.ScheduledTransactionsApiFetchParamCreator = exports.PayeesApi = exports.PayeesApiFactory = exports.PayeesApiFp = exports.PayeesApiFetchParamCreator = exports.PayeeLocationsApi = exports.PayeeLocationsApiFactory = exports.PayeeLocationsApiFp = exports.PayeeLocationsApiFetchParamCreator = exports.MonthsApi = exports.MonthsApiFactory = exports.MonthsApiFp = exports.MonthsApiFetchParamCreator = exports.DeprecatedApi = exports.DeprecatedApiFactory = exports.DeprecatedApiFp = exports.DeprecatedApiFetchParamCreator = exports.CategoriesApi = exports.CategoriesApiFactory = exports.CategoriesApiFp = exports.CategoriesApiFetchParamCreator = exports.BudgetsApi = exports.BudgetsApiFactory = exports.BudgetsApiFp = exports.BudgetsApiFetchParamCreator = exports.AccountsApi = exports.AccountsApiFactory = exports.AccountsApiFp = exports.AccountsApiFetchParamCreator = exports.UpdateTransaction = exports.TransactionDetail = exports.ScheduledTransactionDetail = exports.HybridTransaction = exports.TransactionSummary = exports.ScheduledTransactionSummary = exports.SaveTransaction = exports.Category = exports.AccountType = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = void 0;
|
|
25
|
+
// Polyfill fetch globally - this makes it easier to override with modules like fetch-mock.
|
|
26
|
+
const fetchPonyfill = require("fetch-ponyfill")();
|
|
27
|
+
if (!globalThis.fetch) {
|
|
28
|
+
globalThis.fetch = fetchPonyfill.fetch;
|
|
29
|
+
globalThis.Response = fetchPonyfill.Response;
|
|
30
|
+
globalThis.Headers = fetchPonyfill.Headers;
|
|
31
|
+
globalThis.Request = fetchPonyfill.Request;
|
|
32
|
+
}
|
|
25
33
|
const url = require("url");
|
|
26
|
-
|
|
27
|
-
// That makes it easier to override with modules like fetch-mock
|
|
28
|
-
require("portable-fetch");
|
|
29
|
-
const USER_AGENT = "api_client/js/1.24.0";
|
|
34
|
+
const USER_AGENT = "api_client/js/1.29.0";
|
|
30
35
|
function convertDateToFullDateStringFormat(date) {
|
|
31
36
|
// Convert to RFC 3339 "full-date" format, like "2017-11-27"
|
|
32
37
|
if (date instanceof Date) {
|
|
@@ -74,30 +79,26 @@ class RequiredError extends Error {
|
|
|
74
79
|
}
|
|
75
80
|
exports.RequiredError = RequiredError;
|
|
76
81
|
/**
|
|
82
|
+
* The type of account
|
|
77
83
|
* @export
|
|
78
|
-
* @
|
|
84
|
+
* @enum {string}
|
|
79
85
|
*/
|
|
80
|
-
var
|
|
81
|
-
(function (
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
TypeEnum[TypeEnum["MerchantAccount"] = 'merchantAccount'] = "MerchantAccount";
|
|
97
|
-
TypeEnum[TypeEnum["InvestmentAccount"] = 'investmentAccount'] = "InvestmentAccount";
|
|
98
|
-
TypeEnum[TypeEnum["Mortgage"] = 'mortgage'] = "Mortgage";
|
|
99
|
-
})(TypeEnum = Account.TypeEnum || (Account.TypeEnum = {}));
|
|
100
|
-
})(Account = exports.Account || (exports.Account = {}));
|
|
86
|
+
var AccountType;
|
|
87
|
+
(function (AccountType) {
|
|
88
|
+
AccountType[AccountType["Checking"] = 'checking'] = "Checking";
|
|
89
|
+
AccountType[AccountType["Savings"] = 'savings'] = "Savings";
|
|
90
|
+
AccountType[AccountType["Cash"] = 'cash'] = "Cash";
|
|
91
|
+
AccountType[AccountType["CreditCard"] = 'creditCard'] = "CreditCard";
|
|
92
|
+
AccountType[AccountType["LineOfCredit"] = 'lineOfCredit'] = "LineOfCredit";
|
|
93
|
+
AccountType[AccountType["OtherAsset"] = 'otherAsset'] = "OtherAsset";
|
|
94
|
+
AccountType[AccountType["OtherLiability"] = 'otherLiability'] = "OtherLiability";
|
|
95
|
+
AccountType[AccountType["Mortgage"] = 'mortgage'] = "Mortgage";
|
|
96
|
+
AccountType[AccountType["AutoLoan"] = 'autoLoan'] = "AutoLoan";
|
|
97
|
+
AccountType[AccountType["StudentLoan"] = 'studentLoan'] = "StudentLoan";
|
|
98
|
+
AccountType[AccountType["PersonalLoan"] = 'personalLoan'] = "PersonalLoan";
|
|
99
|
+
AccountType[AccountType["MedicalDebt"] = 'medicalDebt'] = "MedicalDebt";
|
|
100
|
+
AccountType[AccountType["OtherDebt"] = 'otherDebt'] = "OtherDebt";
|
|
101
|
+
})(AccountType = exports.AccountType || (exports.AccountType = {}));
|
|
101
102
|
/**
|
|
102
103
|
* @export
|
|
103
104
|
* @namespace Category
|
|
@@ -114,29 +115,9 @@ var Category;
|
|
|
114
115
|
GoalTypeEnum[GoalTypeEnum["TBD"] = 'TBD'] = "TBD";
|
|
115
116
|
GoalTypeEnum[GoalTypeEnum["MF"] = 'MF'] = "MF";
|
|
116
117
|
GoalTypeEnum[GoalTypeEnum["NEED"] = 'NEED'] = "NEED";
|
|
118
|
+
GoalTypeEnum[GoalTypeEnum["DEBT"] = 'DEBT'] = "DEBT";
|
|
117
119
|
})(GoalTypeEnum = Category.GoalTypeEnum || (Category.GoalTypeEnum = {}));
|
|
118
120
|
})(Category = exports.Category || (exports.Category = {}));
|
|
119
|
-
/**
|
|
120
|
-
* @export
|
|
121
|
-
* @namespace SaveAccount
|
|
122
|
-
*/
|
|
123
|
-
var SaveAccount;
|
|
124
|
-
(function (SaveAccount) {
|
|
125
|
-
/**
|
|
126
|
-
* @export
|
|
127
|
-
* @enum {string}
|
|
128
|
-
*/
|
|
129
|
-
let TypeEnum;
|
|
130
|
-
(function (TypeEnum) {
|
|
131
|
-
TypeEnum[TypeEnum["Checking"] = 'checking'] = "Checking";
|
|
132
|
-
TypeEnum[TypeEnum["Savings"] = 'savings'] = "Savings";
|
|
133
|
-
TypeEnum[TypeEnum["CreditCard"] = 'creditCard'] = "CreditCard";
|
|
134
|
-
TypeEnum[TypeEnum["Cash"] = 'cash'] = "Cash";
|
|
135
|
-
TypeEnum[TypeEnum["LineOfCredit"] = 'lineOfCredit'] = "LineOfCredit";
|
|
136
|
-
TypeEnum[TypeEnum["OtherAsset"] = 'otherAsset'] = "OtherAsset";
|
|
137
|
-
TypeEnum[TypeEnum["OtherLiability"] = 'otherLiability'] = "OtherLiability";
|
|
138
|
-
})(TypeEnum = SaveAccount.TypeEnum || (SaveAccount.TypeEnum = {}));
|
|
139
|
-
})(SaveAccount = exports.SaveAccount || (exports.SaveAccount = {}));
|
|
140
121
|
/**
|
|
141
122
|
* @export
|
|
142
123
|
* @namespace SaveTransaction
|
package/dist/browser/ynab.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
var ynab=function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserApi=t.UserApiFactory=t.UserApiFp=t.UserApiFetchParamCreator=t.TransactionsApi=t.TransactionsApiFactory=t.TransactionsApiFp=t.TransactionsApiFetchParamCreator=t.ScheduledTransactionsApi=t.ScheduledTransactionsApiFactory=t.ScheduledTransactionsApiFp=t.ScheduledTransactionsApiFetchParamCreator=t.PayeesApi=t.PayeesApiFactory=t.PayeesApiFp=t.PayeesApiFetchParamCreator=t.PayeeLocationsApi=t.PayeeLocationsApiFactory=t.PayeeLocationsApiFp=t.PayeeLocationsApiFetchParamCreator=t.MonthsApi=t.MonthsApiFactory=t.MonthsApiFp=t.MonthsApiFetchParamCreator=t.DeprecatedApi=t.DeprecatedApiFactory=t.DeprecatedApiFp=t.DeprecatedApiFetchParamCreator=t.CategoriesApi=t.CategoriesApiFactory=t.CategoriesApiFp=t.CategoriesApiFetchParamCreator=t.BudgetsApi=t.BudgetsApiFactory=t.BudgetsApiFp=t.BudgetsApiFetchParamCreator=t.AccountsApi=t.AccountsApiFactory=t.AccountsApiFp=t.AccountsApiFetchParamCreator=t.UpdateTransaction=t.TransactionDetail=t.ScheduledTransactionDetail=t.HybridTransaction=t.TransactionSummary=t.ScheduledTransactionSummary=t.SaveTransaction=t.SaveAccount=t.Category=t.Account=t.RequiredError=t.BaseAPI=t.COLLECTION_FORMATS=void 0;const a=n(3);n(11);const i="api_client/js/1.24.0";function o(e){return e instanceof Date?e.toISOString().substring(0,10):e}t.COLLECTION_FORMATS={csv:",",ssv:" ",tsv:"\t",pipes:"|"};class s{constructor(e){e&&(this.configuration=e)}}t.BaseAPI=s;class c extends Error{constructor(e,t){super(t),this.field=e}}t.RequiredError=c,function(e){let t;!function(e){e[e.Checking="checking"]="Checking",e[e.Savings="savings"]="Savings",e[e.Cash="cash"]="Cash",e[e.CreditCard="creditCard"]="CreditCard",e[e.LineOfCredit="lineOfCredit"]="LineOfCredit",e[e.OtherAsset="otherAsset"]="OtherAsset",e[e.OtherLiability="otherLiability"]="OtherLiability",e[e.PayPal="payPal"]="PayPal",e[e.MerchantAccount="merchantAccount"]="MerchantAccount",e[e.InvestmentAccount="investmentAccount"]="InvestmentAccount",e[e.Mortgage="mortgage"]="Mortgage"}(t=e.TypeEnum||(e.TypeEnum={}))}(t.Account||(t.Account={})),function(e){let t;!function(e){e[e.TB="TB"]="TB",e[e.TBD="TBD"]="TBD",e[e.MF="MF"]="MF",e[e.NEED="NEED"]="NEED"}(t=e.GoalTypeEnum||(e.GoalTypeEnum={}))}(t.Category||(t.Category={})),function(e){let t;!function(e){e[e.Checking="checking"]="Checking",e[e.Savings="savings"]="Savings",e[e.CreditCard="creditCard"]="CreditCard",e[e.Cash="cash"]="Cash",e[e.LineOfCredit="lineOfCredit"]="LineOfCredit",e[e.OtherAsset="otherAsset"]="OtherAsset",e[e.OtherLiability="otherLiability"]="OtherLiability"}(t=e.TypeEnum||(e.TypeEnum={}))}(t.SaveAccount||(t.SaveAccount={})),function(e){let t,n;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.SaveTransaction||(t.SaveTransaction={})),function(e){let t,n;!function(e){e[e.Never="never"]="Never",e[e.Daily="daily"]="Daily",e[e.Weekly="weekly"]="Weekly",e[e.EveryOtherWeek="everyOtherWeek"]="EveryOtherWeek",e[e.TwiceAMonth="twiceAMonth"]="TwiceAMonth",e[e.Every4Weeks="every4Weeks"]="Every4Weeks",e[e.Monthly="monthly"]="Monthly",e[e.EveryOtherMonth="everyOtherMonth"]="EveryOtherMonth",e[e.Every3Months="every3Months"]="Every3Months",e[e.Every4Months="every4Months"]="Every4Months",e[e.TwiceAYear="twiceAYear"]="TwiceAYear",e[e.Yearly="yearly"]="Yearly",e[e.EveryOtherYear="everyOtherYear"]="EveryOtherYear"}(t=e.FrequencyEnum||(e.FrequencyEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.ScheduledTransactionSummary||(t.ScheduledTransactionSummary={})),function(e){let t,n;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.TransactionSummary||(t.TransactionSummary={})),function(e){let t,n,r;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={})),function(e){e[e.Transaction="transaction"]="Transaction",e[e.Subtransaction="subtransaction"]="Subtransaction"}(r=e.TypeEnum||(e.TypeEnum={}))}(t.HybridTransaction||(t.HybridTransaction={})),function(e){let t,n;!function(e){e[e.Never="never"]="Never",e[e.Daily="daily"]="Daily",e[e.Weekly="weekly"]="Weekly",e[e.EveryOtherWeek="everyOtherWeek"]="EveryOtherWeek",e[e.TwiceAMonth="twiceAMonth"]="TwiceAMonth",e[e.Every4Weeks="every4Weeks"]="Every4Weeks",e[e.Monthly="monthly"]="Monthly",e[e.EveryOtherMonth="everyOtherMonth"]="EveryOtherMonth",e[e.Every3Months="every3Months"]="Every3Months",e[e.Every4Months="every4Months"]="Every4Months",e[e.TwiceAYear="twiceAYear"]="TwiceAYear",e[e.Yearly="yearly"]="Yearly",e[e.EveryOtherYear="everyOtherYear"]="EveryOtherYear"}(t=e.FrequencyEnum||(e.FrequencyEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.ScheduledTransactionDetail||(t.ScheduledTransactionDetail={})),function(e){let t,n;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.TransactionDetail||(t.TransactionDetail={})),function(e){let t,n;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.UpdateTransaction||(t.UpdateTransaction={})),t.AccountsApiFetchParamCreator=function(e){return{createAccount(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling createAccount.");if(null==n)throw new c("data","Required parameter data was null or undefined when calling createAccount.");const o="/budgets/{budget_id}/accounts".replace("{budget_id}",encodeURIComponent(String(t))),s=a.parse(o,!0),u=Object.assign({method:"POST"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return d["Content-Type"]="application/json",s.query=Object.assign({},s.query,{},r.query),delete s.search,u.headers=Object.assign({},d,r.headers),u.body=JSON.stringify(n||{}),{url:a.format(s),options:u}},getAccountById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getAccountById.");if(null==n)throw new c("account_id","Required parameter account_id was null or undefined when calling getAccountById.");const o="/budgets/{budget_id}/accounts/{account_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{account_id}",encodeURIComponent(String(n))),s=a.parse(o,!0),u=Object.assign({method:"GET"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return s.query=Object.assign({},s.query,{},r.query),delete s.search,u.headers=Object.assign({},d,r.headers),{url:a.format(s),options:u}},getAccounts(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getAccounts.");const o="/budgets/{budget_id}/accounts".replace("{budget_id}",encodeURIComponent(String(t))),s=a.parse(o,!0),u=Object.assign({method:"GET"},r),d={},h={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return void 0!==n&&(h.last_knowledge_of_server=n),s.query=Object.assign({},s.query,h,r.query),delete s.search,u.headers=Object.assign({},d,r.headers),{url:a.format(s),options:u}}}},t.AccountsApiFp=function(e){return{createAccount(n,a,i){const o=t.AccountsApiFetchParamCreator(e).createAccount(n,a,i);return(t=fetch)=>t(e.basePath+o.url,o.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},getAccountById(n,a,i){const o=t.AccountsApiFetchParamCreator(e).getAccountById(n,a,i);return(t=fetch)=>t(e.basePath+o.url,o.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},getAccounts(n,a,i){const o=t.AccountsApiFetchParamCreator(e).getAccounts(n,a,i);return(t=fetch)=>t(e.basePath+o.url,o.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))}}},t.AccountsApiFactory=function(e){return{createAccount:(n,r,a)=>t.AccountsApiFp(e).createAccount(n,r,a)(),getAccountById:(n,r,a)=>t.AccountsApiFp(e).getAccountById(n,r,a)(),getAccounts:(n,r,a)=>t.AccountsApiFp(e).getAccounts(n,r,a)()}};t.AccountsApi=class extends s{createAccount(e,n,r){return t.AccountsApiFp(this.configuration).createAccount(e,n,r)()}getAccountById(e,n,r){return t.AccountsApiFp(this.configuration).getAccountById(e,n,r)()}getAccounts(e,n,r){return t.AccountsApiFp(this.configuration).getAccounts(e,n,r)()}},t.BudgetsApiFetchParamCreator=function(e){return{getBudgetById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getBudgetById.");const o="/budgets/{budget_id}".replace("{budget_id}",encodeURIComponent(String(t))),s=a.parse(o,!0),u=Object.assign({method:"GET"},r),d={},h={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return void 0!==n&&(h.last_knowledge_of_server=n),s.query=Object.assign({},s.query,h,r.query),delete s.search,u.headers=Object.assign({},d,r.headers),{url:a.format(s),options:u}},getBudgetSettingsById(t,n={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getBudgetSettingsById.");const r="/budgets/{budget_id}/settings".replace("{budget_id}",encodeURIComponent(String(t))),o=a.parse(r,!0),s=Object.assign({method:"GET"},n),u={};if(u["User-Agent"]=i,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}return o.query=Object.assign({},o.query,{},n.query),delete o.search,s.headers=Object.assign({},u,n.headers),{url:a.format(o),options:s}},getBudgets(t,n={}){const r=a.parse("/budgets",!0),o=Object.assign({method:"GET"},n),s={},c={};if(s["User-Agent"]=i,s.Accept="application/json",e&&e.apiKey){const t=e.apiKey;s.Authorization=t}return void 0!==t&&(c.include_accounts=t),r.query=Object.assign({},r.query,c,n.query),delete r.search,o.headers=Object.assign({},s,n.headers),{url:a.format(r),options:o}}}},t.BudgetsApiFp=function(e){return{getBudgetById(n,a,i){const o=t.BudgetsApiFetchParamCreator(e).getBudgetById(n,a,i);return(t=fetch)=>t(e.basePath+o.url,o.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},getBudgetSettingsById(n,a){const i=t.BudgetsApiFetchParamCreator(e).getBudgetSettingsById(n,a);return(t=fetch)=>t(e.basePath+i.url,i.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},getBudgets(n,a){const i=t.BudgetsApiFetchParamCreator(e).getBudgets(n,a);return(t=fetch)=>t(e.basePath+i.url,i.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))}}},t.BudgetsApiFactory=function(e){return{getBudgetById:(n,r,a)=>t.BudgetsApiFp(e).getBudgetById(n,r,a)(),getBudgetSettingsById:(n,r)=>t.BudgetsApiFp(e).getBudgetSettingsById(n,r)(),getBudgets:(n,r)=>t.BudgetsApiFp(e).getBudgets(n,r)()}};t.BudgetsApi=class extends s{getBudgetById(e,n,r){return t.BudgetsApiFp(this.configuration).getBudgetById(e,n,r)()}getBudgetSettingsById(e,n){return t.BudgetsApiFp(this.configuration).getBudgetSettingsById(e,n)()}getBudgets(e,n){return t.BudgetsApiFp(this.configuration).getBudgets(e,n)()}},t.CategoriesApiFetchParamCreator=function(e){return{getCategories(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getCategories.");const o="/budgets/{budget_id}/categories".replace("{budget_id}",encodeURIComponent(String(t))),s=a.parse(o,!0),u=Object.assign({method:"GET"},r),d={},h={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return void 0!==n&&(h.last_knowledge_of_server=n),s.query=Object.assign({},s.query,h,r.query),delete s.search,u.headers=Object.assign({},d,r.headers),{url:a.format(s),options:u}},getCategoryById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getCategoryById.");if(null==n)throw new c("category_id","Required parameter category_id was null or undefined when calling getCategoryById.");const o="/budgets/{budget_id}/categories/{category_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{category_id}",encodeURIComponent(String(n))),s=a.parse(o,!0),u=Object.assign({method:"GET"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return s.query=Object.assign({},s.query,{},r.query),delete s.search,u.headers=Object.assign({},d,r.headers),{url:a.format(s),options:u}},getMonthCategoryById(t,n,r,s={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getMonthCategoryById.");if(null==n)throw new c("month","Required parameter month was null or undefined when calling getMonthCategoryById.");if(null==r)throw new c("category_id","Required parameter category_id was null or undefined when calling getMonthCategoryById.");const u="/budgets/{budget_id}/months/{month}/categories/{category_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{month}",encodeURIComponent(o(n))).replace("{category_id}",encodeURIComponent(String(r))),d=a.parse(u,!0),h=Object.assign({method:"GET"},s),l={};if(l["User-Agent"]=i,l.Accept="application/json",e&&e.apiKey){const t=e.apiKey;l.Authorization=t}return d.query=Object.assign({},d.query,{},s.query),delete d.search,h.headers=Object.assign({},l,s.headers),{url:a.format(d),options:h}},updateMonthCategory(t,n,r,s,u={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling updateMonthCategory.");if(null==n)throw new c("month","Required parameter month was null or undefined when calling updateMonthCategory.");if(null==r)throw new c("category_id","Required parameter category_id was null or undefined when calling updateMonthCategory.");if(null==s)throw new c("data","Required parameter data was null or undefined when calling updateMonthCategory.");const d="/budgets/{budget_id}/months/{month}/categories/{category_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{month}",encodeURIComponent(o(n))).replace("{category_id}",encodeURIComponent(String(r))),h=a.parse(d,!0),l=Object.assign({method:"PATCH"},u),p={};if(p["User-Agent"]=i,p.Accept="application/json",e&&e.apiKey){const t=e.apiKey;p.Authorization=t}return p["Content-Type"]="application/json",h.query=Object.assign({},h.query,{},u.query),delete h.search,l.headers=Object.assign({},p,u.headers),l.body=JSON.stringify(s||{}),{url:a.format(h),options:l}}}},t.CategoriesApiFp=function(e){return{getCategories(n,a,i){const o=t.CategoriesApiFetchParamCreator(e).getCategories(n,a,i);return(t=fetch)=>t(e.basePath+o.url,o.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},getCategoryById(n,a,i){const o=t.CategoriesApiFetchParamCreator(e).getCategoryById(n,a,i);return(t=fetch)=>t(e.basePath+o.url,o.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},getMonthCategoryById(n,a,i,o){const s=t.CategoriesApiFetchParamCreator(e).getMonthCategoryById(n,a,i,o);return(t=fetch)=>t(e.basePath+s.url,s.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},updateMonthCategory(n,a,i,o,s){const c=t.CategoriesApiFetchParamCreator(e).updateMonthCategory(n,a,i,o,s);return(t=fetch)=>t(e.basePath+c.url,c.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))}}},t.CategoriesApiFactory=function(e){return{getCategories:(n,r,a)=>t.CategoriesApiFp(e).getCategories(n,r,a)(),getCategoryById:(n,r,a)=>t.CategoriesApiFp(e).getCategoryById(n,r,a)(),getMonthCategoryById:(n,r,a,i)=>t.CategoriesApiFp(e).getMonthCategoryById(n,r,a,i)(),updateMonthCategory:(n,r,a,i,o)=>t.CategoriesApiFp(e).updateMonthCategory(n,r,a,i,o)()}};t.CategoriesApi=class extends s{getCategories(e,n,r){return t.CategoriesApiFp(this.configuration).getCategories(e,n,r)()}getCategoryById(e,n,r){return t.CategoriesApiFp(this.configuration).getCategoryById(e,n,r)()}getMonthCategoryById(e,n,r,a){return t.CategoriesApiFp(this.configuration).getMonthCategoryById(e,n,r,a)()}updateMonthCategory(e,n,r,a,i){return t.CategoriesApiFp(this.configuration).updateMonthCategory(e,n,r,a,i)()}},t.DeprecatedApiFetchParamCreator=function(e){return{bulkCreateTransactions(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling bulkCreateTransactions.");if(null==n)throw new c("transactions","Required parameter transactions was null or undefined when calling bulkCreateTransactions.");const o="/budgets/{budget_id}/transactions/bulk".replace("{budget_id}",encodeURIComponent(String(t))),s=a.parse(o,!0),u=Object.assign({method:"POST"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return d["Content-Type"]="application/json",s.query=Object.assign({},s.query,{},r.query),delete s.search,u.headers=Object.assign({},d,r.headers),u.body=JSON.stringify(n||{}),{url:a.format(s),options:u}}}},t.DeprecatedApiFp=function(e){return{bulkCreateTransactions(n,a,i){const o=t.DeprecatedApiFetchParamCreator(e).bulkCreateTransactions(n,a,i);return(t=fetch)=>t(e.basePath+o.url,o.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))}}},t.DeprecatedApiFactory=function(e){return{bulkCreateTransactions:(n,r,a)=>t.DeprecatedApiFp(e).bulkCreateTransactions(n,r,a)()}};t.DeprecatedApi=class extends s{bulkCreateTransactions(e,n,r){return t.DeprecatedApiFp(this.configuration).bulkCreateTransactions(e,n,r)()}},t.MonthsApiFetchParamCreator=function(e){return{getBudgetMonth(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getBudgetMonth.");if(null==n)throw new c("month","Required parameter month was null or undefined when calling getBudgetMonth.");const s="/budgets/{budget_id}/months/{month}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{month}",encodeURIComponent(o(n))),u=a.parse(s,!0),d=Object.assign({method:"GET"},r),h={};if(h["User-Agent"]=i,h.Accept="application/json",e&&e.apiKey){const t=e.apiKey;h.Authorization=t}return u.query=Object.assign({},u.query,{},r.query),delete u.search,d.headers=Object.assign({},h,r.headers),{url:a.format(u),options:d}},getBudgetMonths(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getBudgetMonths.");const o="/budgets/{budget_id}/months".replace("{budget_id}",encodeURIComponent(String(t))),s=a.parse(o,!0),u=Object.assign({method:"GET"},r),d={},h={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return void 0!==n&&(h.last_knowledge_of_server=n),s.query=Object.assign({},s.query,h,r.query),delete s.search,u.headers=Object.assign({},d,r.headers),{url:a.format(s),options:u}}}},t.MonthsApiFp=function(e){return{getBudgetMonth(n,a,i){const o=t.MonthsApiFetchParamCreator(e).getBudgetMonth(n,a,i);return(t=fetch)=>t(e.basePath+o.url,o.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},getBudgetMonths(n,a,i){const o=t.MonthsApiFetchParamCreator(e).getBudgetMonths(n,a,i);return(t=fetch)=>t(e.basePath+o.url,o.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))}}},t.MonthsApiFactory=function(e){return{getBudgetMonth:(n,r,a)=>t.MonthsApiFp(e).getBudgetMonth(n,r,a)(),getBudgetMonths:(n,r,a)=>t.MonthsApiFp(e).getBudgetMonths(n,r,a)()}};t.MonthsApi=class extends s{getBudgetMonth(e,n,r){return t.MonthsApiFp(this.configuration).getBudgetMonth(e,n,r)()}getBudgetMonths(e,n,r){return t.MonthsApiFp(this.configuration).getBudgetMonths(e,n,r)()}},t.PayeeLocationsApiFetchParamCreator=function(e){return{getPayeeLocationById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getPayeeLocationById.");if(null==n)throw new c("payee_location_id","Required parameter payee_location_id was null or undefined when calling getPayeeLocationById.");const o="/budgets/{budget_id}/payee_locations/{payee_location_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{payee_location_id}",encodeURIComponent(String(n))),s=a.parse(o,!0),u=Object.assign({method:"GET"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return s.query=Object.assign({},s.query,{},r.query),delete s.search,u.headers=Object.assign({},d,r.headers),{url:a.format(s),options:u}},getPayeeLocations(t,n={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getPayeeLocations.");const r="/budgets/{budget_id}/payee_locations".replace("{budget_id}",encodeURIComponent(String(t))),o=a.parse(r,!0),s=Object.assign({method:"GET"},n),u={};if(u["User-Agent"]=i,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}return o.query=Object.assign({},o.query,{},n.query),delete o.search,s.headers=Object.assign({},u,n.headers),{url:a.format(o),options:s}},getPayeeLocationsByPayee(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getPayeeLocationsByPayee.");if(null==n)throw new c("payee_id","Required parameter payee_id was null or undefined when calling getPayeeLocationsByPayee.");const o="/budgets/{budget_id}/payees/{payee_id}/payee_locations".replace("{budget_id}",encodeURIComponent(String(t))).replace("{payee_id}",encodeURIComponent(String(n))),s=a.parse(o,!0),u=Object.assign({method:"GET"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return s.query=Object.assign({},s.query,{},r.query),delete s.search,u.headers=Object.assign({},d,r.headers),{url:a.format(s),options:u}}}},t.PayeeLocationsApiFp=function(e){return{getPayeeLocationById(n,a,i){const o=t.PayeeLocationsApiFetchParamCreator(e).getPayeeLocationById(n,a,i);return(t=fetch)=>t(e.basePath+o.url,o.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},getPayeeLocations(n,a){const i=t.PayeeLocationsApiFetchParamCreator(e).getPayeeLocations(n,a);return(t=fetch)=>t(e.basePath+i.url,i.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},getPayeeLocationsByPayee(n,a,i){const o=t.PayeeLocationsApiFetchParamCreator(e).getPayeeLocationsByPayee(n,a,i);return(t=fetch)=>t(e.basePath+o.url,o.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))}}},t.PayeeLocationsApiFactory=function(e){return{getPayeeLocationById:(n,r,a)=>t.PayeeLocationsApiFp(e).getPayeeLocationById(n,r,a)(),getPayeeLocations:(n,r)=>t.PayeeLocationsApiFp(e).getPayeeLocations(n,r)(),getPayeeLocationsByPayee:(n,r,a)=>t.PayeeLocationsApiFp(e).getPayeeLocationsByPayee(n,r,a)()}};t.PayeeLocationsApi=class extends s{getPayeeLocationById(e,n,r){return t.PayeeLocationsApiFp(this.configuration).getPayeeLocationById(e,n,r)()}getPayeeLocations(e,n){return t.PayeeLocationsApiFp(this.configuration).getPayeeLocations(e,n)()}getPayeeLocationsByPayee(e,n,r){return t.PayeeLocationsApiFp(this.configuration).getPayeeLocationsByPayee(e,n,r)()}},t.PayeesApiFetchParamCreator=function(e){return{getPayeeById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getPayeeById.");if(null==n)throw new c("payee_id","Required parameter payee_id was null or undefined when calling getPayeeById.");const o="/budgets/{budget_id}/payees/{payee_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{payee_id}",encodeURIComponent(String(n))),s=a.parse(o,!0),u=Object.assign({method:"GET"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return s.query=Object.assign({},s.query,{},r.query),delete s.search,u.headers=Object.assign({},d,r.headers),{url:a.format(s),options:u}},getPayees(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getPayees.");const o="/budgets/{budget_id}/payees".replace("{budget_id}",encodeURIComponent(String(t))),s=a.parse(o,!0),u=Object.assign({method:"GET"},r),d={},h={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return void 0!==n&&(h.last_knowledge_of_server=n),s.query=Object.assign({},s.query,h,r.query),delete s.search,u.headers=Object.assign({},d,r.headers),{url:a.format(s),options:u}}}},t.PayeesApiFp=function(e){return{getPayeeById(n,a,i){const o=t.PayeesApiFetchParamCreator(e).getPayeeById(n,a,i);return(t=fetch)=>t(e.basePath+o.url,o.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},getPayees(n,a,i){const o=t.PayeesApiFetchParamCreator(e).getPayees(n,a,i);return(t=fetch)=>t(e.basePath+o.url,o.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))}}},t.PayeesApiFactory=function(e){return{getPayeeById:(n,r,a)=>t.PayeesApiFp(e).getPayeeById(n,r,a)(),getPayees:(n,r,a)=>t.PayeesApiFp(e).getPayees(n,r,a)()}};t.PayeesApi=class extends s{getPayeeById(e,n,r){return t.PayeesApiFp(this.configuration).getPayeeById(e,n,r)()}getPayees(e,n,r){return t.PayeesApiFp(this.configuration).getPayees(e,n,r)()}},t.ScheduledTransactionsApiFetchParamCreator=function(e){return{getScheduledTransactionById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getScheduledTransactionById.");if(null==n)throw new c("scheduled_transaction_id","Required parameter scheduled_transaction_id was null or undefined when calling getScheduledTransactionById.");const o="/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{scheduled_transaction_id}",encodeURIComponent(String(n))),s=a.parse(o,!0),u=Object.assign({method:"GET"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return s.query=Object.assign({},s.query,{},r.query),delete s.search,u.headers=Object.assign({},d,r.headers),{url:a.format(s),options:u}},getScheduledTransactions(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getScheduledTransactions.");const o="/budgets/{budget_id}/scheduled_transactions".replace("{budget_id}",encodeURIComponent(String(t))),s=a.parse(o,!0),u=Object.assign({method:"GET"},r),d={},h={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return void 0!==n&&(h.last_knowledge_of_server=n),s.query=Object.assign({},s.query,h,r.query),delete s.search,u.headers=Object.assign({},d,r.headers),{url:a.format(s),options:u}}}},t.ScheduledTransactionsApiFp=function(e){return{getScheduledTransactionById(n,a,i){const o=t.ScheduledTransactionsApiFetchParamCreator(e).getScheduledTransactionById(n,a,i);return(t=fetch)=>t(e.basePath+o.url,o.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},getScheduledTransactions(n,a,i){const o=t.ScheduledTransactionsApiFetchParamCreator(e).getScheduledTransactions(n,a,i);return(t=fetch)=>t(e.basePath+o.url,o.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))}}},t.ScheduledTransactionsApiFactory=function(e){return{getScheduledTransactionById:(n,r,a)=>t.ScheduledTransactionsApiFp(e).getScheduledTransactionById(n,r,a)(),getScheduledTransactions:(n,r,a)=>t.ScheduledTransactionsApiFp(e).getScheduledTransactions(n,r,a)()}};t.ScheduledTransactionsApi=class extends s{getScheduledTransactionById(e,n,r){return t.ScheduledTransactionsApiFp(this.configuration).getScheduledTransactionById(e,n,r)()}getScheduledTransactions(e,n,r){return t.ScheduledTransactionsApiFp(this.configuration).getScheduledTransactions(e,n,r)()}},t.TransactionsApiFetchParamCreator=function(e){return{createTransaction(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling createTransaction.");if(null==n)throw new c("data","Required parameter data was null or undefined when calling createTransaction.");const o="/budgets/{budget_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))),s=a.parse(o,!0),u=Object.assign({method:"POST"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return d["Content-Type"]="application/json",s.query=Object.assign({},s.query,{},r.query),delete s.search,u.headers=Object.assign({},d,r.headers),u.body=JSON.stringify(n||{}),{url:a.format(s),options:u}},getTransactionById(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getTransactionById.");if(null==n)throw new c("transaction_id","Required parameter transaction_id was null or undefined when calling getTransactionById.");const o="/budgets/{budget_id}/transactions/{transaction_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{transaction_id}",encodeURIComponent(String(n))),s=a.parse(o,!0),u=Object.assign({method:"GET"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return s.query=Object.assign({},s.query,{},r.query),delete s.search,u.headers=Object.assign({},d,r.headers),{url:a.format(s),options:u}},getTransactions(t,n,r,s,u={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getTransactions.");const d="/budgets/{budget_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))),h=a.parse(d,!0),l=Object.assign({method:"GET"},u),p={},g={};if(p["User-Agent"]=i,p.Accept="application/json",e&&e.apiKey){const t=e.apiKey;p.Authorization=t}return void 0!==n&&(g.since_date=o(n)),void 0!==r&&(g.type=r),void 0!==s&&(g.last_knowledge_of_server=s),h.query=Object.assign({},h.query,g,u.query),delete h.search,l.headers=Object.assign({},p,u.headers),{url:a.format(h),options:l}},getTransactionsByAccount(t,n,r,s,u,d={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getTransactionsByAccount.");if(null==n)throw new c("account_id","Required parameter account_id was null or undefined when calling getTransactionsByAccount.");const h="/budgets/{budget_id}/accounts/{account_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))).replace("{account_id}",encodeURIComponent(String(n))),l=a.parse(h,!0),p=Object.assign({method:"GET"},d),g={},y={};if(g["User-Agent"]=i,g.Accept="application/json",e&&e.apiKey){const t=e.apiKey;g.Authorization=t}return void 0!==r&&(y.since_date=o(r)),void 0!==s&&(y.type=s),void 0!==u&&(y.last_knowledge_of_server=u),l.query=Object.assign({},l.query,y,d.query),delete l.search,p.headers=Object.assign({},g,d.headers),{url:a.format(l),options:p}},getTransactionsByCategory(t,n,r,s,u,d={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getTransactionsByCategory.");if(null==n)throw new c("category_id","Required parameter category_id was null or undefined when calling getTransactionsByCategory.");const h="/budgets/{budget_id}/categories/{category_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))).replace("{category_id}",encodeURIComponent(String(n))),l=a.parse(h,!0),p=Object.assign({method:"GET"},d),g={},y={};if(g["User-Agent"]=i,g.Accept="application/json",e&&e.apiKey){const t=e.apiKey;g.Authorization=t}return void 0!==r&&(y.since_date=o(r)),void 0!==s&&(y.type=s),void 0!==u&&(y.last_knowledge_of_server=u),l.query=Object.assign({},l.query,y,d.query),delete l.search,p.headers=Object.assign({},g,d.headers),{url:a.format(l),options:p}},getTransactionsByPayee(t,n,r,s,u,d={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling getTransactionsByPayee.");if(null==n)throw new c("payee_id","Required parameter payee_id was null or undefined when calling getTransactionsByPayee.");const h="/budgets/{budget_id}/payees/{payee_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))).replace("{payee_id}",encodeURIComponent(String(n))),l=a.parse(h,!0),p=Object.assign({method:"GET"},d),g={},y={};if(g["User-Agent"]=i,g.Accept="application/json",e&&e.apiKey){const t=e.apiKey;g.Authorization=t}return void 0!==r&&(y.since_date=o(r)),void 0!==s&&(y.type=s),void 0!==u&&(y.last_knowledge_of_server=u),l.query=Object.assign({},l.query,y,d.query),delete l.search,p.headers=Object.assign({},g,d.headers),{url:a.format(l),options:p}},importTransactions(t,n={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling importTransactions.");const r="/budgets/{budget_id}/transactions/import".replace("{budget_id}",encodeURIComponent(String(t))),o=a.parse(r,!0),s=Object.assign({method:"POST"},n),u={};if(u["User-Agent"]=i,u.Accept="application/json",e&&e.apiKey){const t=e.apiKey;u.Authorization=t}return o.query=Object.assign({},o.query,{},n.query),delete o.search,s.headers=Object.assign({},u,n.headers),{url:a.format(o),options:s}},updateTransaction(t,n,r,o={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling updateTransaction.");if(null==n)throw new c("transaction_id","Required parameter transaction_id was null or undefined when calling updateTransaction.");if(null==r)throw new c("data","Required parameter data was null or undefined when calling updateTransaction.");const s="/budgets/{budget_id}/transactions/{transaction_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{transaction_id}",encodeURIComponent(String(n))),u=a.parse(s,!0),d=Object.assign({method:"PUT"},o),h={};if(h["User-Agent"]=i,h.Accept="application/json",e&&e.apiKey){const t=e.apiKey;h.Authorization=t}return h["Content-Type"]="application/json",u.query=Object.assign({},u.query,{},o.query),delete u.search,d.headers=Object.assign({},h,o.headers),d.body=JSON.stringify(r||{}),{url:a.format(u),options:d}},updateTransactions(t,n,r={}){if(null==t)throw new c("budget_id","Required parameter budget_id was null or undefined when calling updateTransactions.");if(null==n)throw new c("data","Required parameter data was null or undefined when calling updateTransactions.");const o="/budgets/{budget_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))),s=a.parse(o,!0),u=Object.assign({method:"PATCH"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return d["Content-Type"]="application/json",s.query=Object.assign({},s.query,{},r.query),delete s.search,u.headers=Object.assign({},d,r.headers),u.body=JSON.stringify(n||{}),{url:a.format(s),options:u}}}},t.TransactionsApiFp=function(e){return{createTransaction(n,a,i){const o=t.TransactionsApiFetchParamCreator(e).createTransaction(n,a,i);return(t=fetch)=>t(e.basePath+o.url,o.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},getTransactionById(n,a,i){const o=t.TransactionsApiFetchParamCreator(e).getTransactionById(n,a,i);return(t=fetch)=>t(e.basePath+o.url,o.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},getTransactions(n,a,i,o,s){const c=t.TransactionsApiFetchParamCreator(e).getTransactions(n,a,i,o,s);return(t=fetch)=>t(e.basePath+c.url,c.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},getTransactionsByAccount(n,a,i,o,s,c){const u=t.TransactionsApiFetchParamCreator(e).getTransactionsByAccount(n,a,i,o,s,c);return(t=fetch)=>t(e.basePath+u.url,u.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},getTransactionsByCategory(n,a,i,o,s,c){const u=t.TransactionsApiFetchParamCreator(e).getTransactionsByCategory(n,a,i,o,s,c);return(t=fetch)=>t(e.basePath+u.url,u.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},getTransactionsByPayee(n,a,i,o,s,c){const u=t.TransactionsApiFetchParamCreator(e).getTransactionsByPayee(n,a,i,o,s,c);return(t=fetch)=>t(e.basePath+u.url,u.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},importTransactions(n,a){const i=t.TransactionsApiFetchParamCreator(e).importTransactions(n,a);return(t=fetch)=>t(e.basePath+i.url,i.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},updateTransaction(n,a,i,o){const s=t.TransactionsApiFetchParamCreator(e).updateTransaction(n,a,i,o);return(t=fetch)=>t(e.basePath+s.url,s.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))},updateTransactions(n,a,i){const o=t.TransactionsApiFetchParamCreator(e).updateTransactions(n,a,i);return(t=fetch)=>t(e.basePath+o.url,o.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))}}},t.TransactionsApiFactory=function(e){return{createTransaction:(n,r,a)=>t.TransactionsApiFp(e).createTransaction(n,r,a)(),getTransactionById:(n,r,a)=>t.TransactionsApiFp(e).getTransactionById(n,r,a)(),getTransactions:(n,r,a,i,o)=>t.TransactionsApiFp(e).getTransactions(n,r,a,i,o)(),getTransactionsByAccount:(n,r,a,i,o,s)=>t.TransactionsApiFp(e).getTransactionsByAccount(n,r,a,i,o,s)(),getTransactionsByCategory:(n,r,a,i,o,s)=>t.TransactionsApiFp(e).getTransactionsByCategory(n,r,a,i,o,s)(),getTransactionsByPayee:(n,r,a,i,o,s)=>t.TransactionsApiFp(e).getTransactionsByPayee(n,r,a,i,o,s)(),importTransactions:(n,r)=>t.TransactionsApiFp(e).importTransactions(n,r)(),updateTransaction:(n,r,a,i)=>t.TransactionsApiFp(e).updateTransaction(n,r,a,i)(),updateTransactions:(n,r,a)=>t.TransactionsApiFp(e).updateTransactions(n,r,a)()}};t.TransactionsApi=class extends s{createTransaction(e,n,r){return t.TransactionsApiFp(this.configuration).createTransaction(e,n,r)()}getTransactionById(e,n,r){return t.TransactionsApiFp(this.configuration).getTransactionById(e,n,r)()}getTransactions(e,n,r,a,i){return t.TransactionsApiFp(this.configuration).getTransactions(e,n,r,a,i)()}getTransactionsByAccount(e,n,r,a,i,o){return t.TransactionsApiFp(this.configuration).getTransactionsByAccount(e,n,r,a,i,o)()}getTransactionsByCategory(e,n,r,a,i,o){return t.TransactionsApiFp(this.configuration).getTransactionsByCategory(e,n,r,a,i,o)()}getTransactionsByPayee(e,n,r,a,i,o){return t.TransactionsApiFp(this.configuration).getTransactionsByPayee(e,n,r,a,i,o)()}importTransactions(e,n){return t.TransactionsApiFp(this.configuration).importTransactions(e,n)()}updateTransaction(e,n,r,a){return t.TransactionsApiFp(this.configuration).updateTransaction(e,n,r,a)()}updateTransactions(e,n,r){return t.TransactionsApiFp(this.configuration).updateTransactions(e,n,r)()}},t.UserApiFetchParamCreator=function(e){return{getUser(t={}){const n=a.parse("/user",!0),r=Object.assign({method:"GET"},t),o={};if(o["User-Agent"]=i,o.Accept="application/json",e&&e.apiKey){const t=e.apiKey;o.Authorization=t}return n.query=Object.assign({},n.query,{},t.query),delete n.search,r.headers=Object.assign({},o,t.headers),{url:a.format(n),options:r}}}},t.UserApiFp=function(e){return{getUser(n){const a=t.UserApiFetchParamCreator(e).getUser(n);return(t=fetch)=>t(e.basePath+a.url,a.options).then(e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then(e=>Promise.reject(e))})))}}},t.UserApiFactory=function(e){return{getUser:n=>t.UserApiFp(e).getUser(n)()}};t.UserApi=class extends s{getUser(e){return t.UserApiFp(this.configuration).getUser(e)()}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.api=t.utils=t.API=void 0;const i=n(2),o=n(0),s=n(13),c=n(14);t.utils=c.default,a(n(0),t);class u{constructor(e,t="https://api.youneedabudget.com/v1"){this._configuration=new i.Configuration(e,t)}get user(){return this._user||(this._user=new o.UserApi(this._configuration)),this._user}get budgets(){return this._budgets||(this._budgets=new o.BudgetsApi(this._configuration)),this._budgets}get accounts(){return this._accounts||(this._accounts=new o.AccountsApi(this._configuration)),this._accounts}get categories(){return this._categories||(this._categories=new o.CategoriesApi(this._configuration)),this._categories}get months(){return this._months||(this._months=new o.MonthsApi(this._configuration)),this._months}get payees(){return this._payees||(this._payees=new o.PayeesApi(this._configuration)),this._payees}get payeeLocations(){return this._payeeLocations||(this._payeeLocations=new o.PayeeLocationsApi(this._configuration)),this._payeeLocations}get transactions(){return this._transactions||(this._transactions=new s.TransactionsApi(this._configuration)),this._transactions}get scheduledTransactions(){return this._scheduledTransactions||(this._scheduledTransactions=new o.ScheduledTransactionsApi(this._configuration)),this._scheduledTransactions}}t.api=u,t.API=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Configuration=void 0;t.Configuration=class{constructor(e,t){this.apiKey="Bearer "+e,this.basePath=t}}},function(e,t,n){"use strict";var r=n(4),a=n(7);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=A,t.resolve=function(e,t){return A(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?A(e,!1,!0).resolveObject(t):t},t.format=function(e){a.isString(e)&&(e=A(e));return e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),d=["'"].concat(u),h=["%","/","?",";","#"].concat(d),l=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=n(8);function A(e,t,n){if(e&&a.isObject(e)&&e instanceof i)return e;var r=new i;return r.parse(e,t,n),r}i.prototype.parse=function(e,t,n){if(!a.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),s=-1!==i&&i<e.indexOf("#")?"?":"#",u=e.split(s);u[0]=u[0].replace(/\\/g,"/");var A=e=u.join(s);if(A=A.trim(),!n&&1===e.split("#").length){var w=c.exec(A);if(w)return this.path=A,this.href=A,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var _=o.exec(A);if(_){var v=(_=_[0]).toLowerCase();this.protocol=v,A=A.substr(_.length)}if(n||_||A.match(/^\/\/[^@\/]+@[^@\/]+/)){var T="//"===A.substr(0,2);!T||_&&f[_]||(A=A.substr(2),this.slashes=!0)}if(!f[_]&&(T||_&&!m[_])){for(var j,C,P=-1,B=0;B<l.length;B++){-1!==(O=A.indexOf(l[B]))&&(-1===P||O<P)&&(P=O)}-1!==(C=-1===P?A.lastIndexOf("@"):A.lastIndexOf("@",P))&&(j=A.slice(0,C),A=A.slice(C+1),this.auth=decodeURIComponent(j)),P=-1;for(B=0;B<h.length;B++){var O;-1!==(O=A.indexOf(h[B]))&&(-1===P||O<P)&&(P=O)}-1===P&&(P=A.length),this.host=A.slice(0,P),A=A.slice(P),this.parseHost(),this.hostname=this.hostname||"";var F="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!F)for(var R=this.hostname.split(/\./),I=(B=0,R.length);B<I;B++){var q=R[B];if(q&&!q.match(p)){for(var S="",U=0,L=q.length;U<L;U++)q.charCodeAt(U)>127?S+="x":S+=q[U];if(!S.match(p)){var E=R.slice(0,B),M=R.slice(B+1),x=q.match(g);x&&(E.push(x[1]),M.unshift(x[2])),M.length&&(A="/"+M.join(".")+A),this.hostname=E.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),F||(this.hostname=r.toASCII(this.hostname));var K=this.port?":"+this.port:"",k=this.hostname||"";this.host=k+K,this.href+=this.host,F&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==A[0]&&(A="/"+A))}if(!y[v])for(B=0,I=d.length;B<I;B++){var D=d[B];if(-1!==A.indexOf(D)){var G=encodeURIComponent(D);G===D&&(G=escape(D)),A=A.split(D).join(G)}}var z=A.indexOf("#");-1!==z&&(this.hash=A.substr(z),A=A.slice(0,z));var X=A.indexOf("?");if(-1!==X?(this.search=A.substr(X),this.query=A.substr(X+1),t&&(this.query=b.parse(this.query)),A=A.slice(0,X)):t&&(this.search="",this.query={}),A&&(this.pathname=A),m[v]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){K=this.pathname||"";var Y=this.search||"";this.path=K+Y}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&a.isObject(this.query)&&Object.keys(this.query).length&&(o=b.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||m[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},i.prototype.resolve=function(e){return this.resolveObject(A(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(a.isString(e)){var t=new i;t.parse(e,!1,!0),e=t}for(var n=new i,r=Object.keys(this),o=0;o<r.length;o++){var s=r[o];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var c=Object.keys(e),u=0;u<c.length;u++){var d=c[u];"protocol"!==d&&(n[d]=e[d])}return m[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!m[e.protocol]){for(var h=Object.keys(e),l=0;l<h.length;l++){var p=h[l];n[p]=e[p]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||f[e.protocol])n.pathname=e.pathname;else{for(var g=(e.pathname||"").split("/");g.length&&!(e.host=g.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==g[0]&&g.unshift(""),g.length<2&&g.unshift(""),n.pathname=g.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var y=n.pathname||"",b=n.search||"";n.path=y+b}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var A=n.pathname&&"/"===n.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=w||A||n.host&&e.pathname,v=_,T=n.pathname&&n.pathname.split("/")||[],j=(g=e.pathname&&e.pathname.split("/")||[],n.protocol&&!m[n.protocol]);if(j&&(n.hostname="",n.port=null,n.host&&(""===T[0]?T[0]=n.host:T.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===g[0]?g[0]=e.host:g.unshift(e.host)),e.host=null),_=_&&(""===g[0]||""===T[0])),w)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,T=g;else if(g.length)T||(T=[]),T.pop(),T=T.concat(g),n.search=e.search,n.query=e.query;else if(!a.isNullOrUndefined(e.search)){if(j)n.hostname=n.host=T.shift(),(F=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=F.shift(),n.host=n.hostname=F.shift());return n.search=e.search,n.query=e.query,a.isNull(n.pathname)&&a.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!T.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=T.slice(-1)[0],P=(n.host||e.host||T.length>1)&&("."===C||".."===C)||""===C,B=0,O=T.length;O>=0;O--)"."===(C=T[O])?T.splice(O,1):".."===C?(T.splice(O,1),B++):B&&(T.splice(O,1),B--);if(!_&&!v)for(;B--;B)T.unshift("..");!_||""===T[0]||T[0]&&"/"===T[0].charAt(0)||T.unshift(""),P&&"/"!==T.join("/").substr(-1)&&T.push("");var F,R=""===T[0]||T[0]&&"/"===T[0].charAt(0);j&&(n.hostname=n.host=R?"":T.length?T.shift():"",(F=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=F.shift(),n.host=n.hostname=F.shift()));return(_=_||n.host&&T.length)&&!R&&T.unshift(""),T.length?n.pathname=T.join("/"):(n.pathname=null,n.path=null),a.isNull(n.pathname)&&a.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){(function(e,r){var a;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(i){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof r&&r;o.global!==o&&o.window!==o&&o.self;var s,c=2147483647,u=/^xn--/,d=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,g=String.fromCharCode;function y(e){throw new RangeError(l[e])}function f(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function m(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+f((e=e.replace(h,".")).split("."),t).join(".")}function b(e){for(var t,n,r=[],a=0,i=e.length;a<i;)(t=e.charCodeAt(a++))>=55296&&t<=56319&&a<i?56320==(64512&(n=e.charCodeAt(a++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),a--):r.push(t);return r}function A(e){return f(e,(function(e){var t="";return e>65535&&(t+=g((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=g(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function _(e,t,n){var r=0;for(e=n?p(e/700):e>>1,e+=p(e/t);e>455;r+=36)e=p(e/35);return p(r+36*e/(e+38))}function v(e){var t,n,r,a,i,o,s,u,d,h,l,g=[],f=e.length,m=0,b=128,w=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&y("not-basic"),g.push(e.charCodeAt(r));for(a=n>0?n+1:0;a<f;){for(i=m,o=1,s=36;a>=f&&y("invalid-input"),((u=(l=e.charCodeAt(a++))-48<10?l-22:l-65<26?l-65:l-97<26?l-97:36)>=36||u>p((c-m)/o))&&y("overflow"),m+=u*o,!(u<(d=s<=w?1:s>=w+26?26:s-w));s+=36)o>p(c/(h=36-d))&&y("overflow"),o*=h;w=_(m-i,t=g.length+1,0==i),p(m/t)>c-b&&y("overflow"),b+=p(m/t),m%=t,g.splice(m++,0,b)}return A(g)}function T(e){var t,n,r,a,i,o,s,u,d,h,l,f,m,A,v,T=[];for(f=(e=b(e)).length,t=128,n=0,i=72,o=0;o<f;++o)(l=e[o])<128&&T.push(g(l));for(r=a=T.length,a&&T.push("-");r<f;){for(s=c,o=0;o<f;++o)(l=e[o])>=t&&l<s&&(s=l);for(s-t>p((c-n)/(m=r+1))&&y("overflow"),n+=(s-t)*m,t=s,o=0;o<f;++o)if((l=e[o])<t&&++n>c&&y("overflow"),l==t){for(u=n,d=36;!(u<(h=d<=i?1:d>=i+26?26:d-i));d+=36)v=u-h,A=36-h,T.push(g(w(h+v%A,0))),u=p(v/A);T.push(g(w(u,0))),i=_(n,m,r==a),n=0,++r}++n,++t}return T.join("")}s={version:"1.4.1",ucs2:{decode:b,encode:A},decode:v,encode:T,toASCII:function(e){return m(e,(function(e){return d.test(e)?"xn--"+T(e):e}))},toUnicode:function(e){return m(e,(function(e){return u.test(e)?v(e.slice(4).toLowerCase()):e}))}},void 0===(a=function(){return s}.call(t,n,t,e))||(e.exports=a)}()}).call(this,n(5)(e),n(6))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(9),t.encode=t.stringify=n(10)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var c=1e3;i&&"number"==typeof i.maxKeys&&(c=i.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var d=0;d<u;++d){var h,l,p,g,y=e[d].replace(s,"%20"),f=y.indexOf(n);f>=0?(h=y.substr(0,f),l=y.substr(f+1)):(h=y,l=""),p=decodeURIComponent(h),g=decodeURIComponent(l),r(o,p)?a(o[p])?o[p].push(g):o[p]=[o[p],g]:o[p]=g}return o};var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?i(o(e),(function(o){var s=encodeURIComponent(r(o))+n;return a(e[o])?i(e[o],(function(e){return s+encodeURIComponent(r(e))})).join(t):s+encodeURIComponent(r(e[o]))})).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var o=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){n(12),e.exports=self.fetch.bind(self)},function(e,t){!function(e){"use strict";if(!e.fetch){var t="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,r="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in e,i="ArrayBuffer"in e;if(i)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=function(e){return e&&DataView.prototype.isPrototypeOf(e)},c=ArrayBuffer.isView||function(e){return e&&o.indexOf(Object.prototype.toString.call(e))>-1};g.prototype.append=function(e,t){e=h(e),t=l(t);var n=this.map[e];this.map[e]=n?n+","+t:t},g.prototype.delete=function(e){delete this.map[h(e)]},g.prototype.get=function(e){return e=h(e),this.has(e)?this.map[e]:null},g.prototype.has=function(e){return this.map.hasOwnProperty(h(e))},g.prototype.set=function(e,t){this.map[h(e)]=l(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)})),p(e)},g.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),p(e)},g.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),p(e)},n&&(g.prototype[Symbol.iterator]=g.prototype.entries);var u=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},A.call(w.prototype),A.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var d=[301,302,303,307,308];v.redirect=function(e,t){if(-1===d.indexOf(t))throw new RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},e.Headers=g,e.Request=w,e.Response=v,e.fetch=function(e,t){return new Promise((function(n,a){var i=new w(e,t),o=new XMLHttpRequest;o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new g,e.split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var a=n.join(":").trim();t.append(r,a)}})),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var a="response"in o?o.response:o.responseText;n(new v(a,r))},o.onerror=function(){a(new TypeError("Network request failed"))},o.ontimeout=function(){a(new TypeError("Network request failed"))},o.open(i.method,i.url,!0),"include"===i.credentials&&(o.withCredentials=!0),"responseType"in o&&r&&(o.responseType="blob"),i.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),o.send(void 0===i._bodyInit?null:i._bodyInit)}))},e.fetch.polyfill=!0}function h(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function p(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(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 y(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function m(e){var t=new FileReader,n=f(t);return t.readAsArrayBuffer(e),n}function b(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function A(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(r&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(a&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(i&&r&&s(e))this._bodyArrayBuffer=b(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!i||!ArrayBuffer.prototype.isPrototypeOf(e)&&!c(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=b(e)}else 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):t&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var e=y(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?y(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e,t,n,r=y(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=f(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}function w(e,t){var n,r,a=(t=t||{}).body;if(e instanceof w){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,a||null==e._bodyInit||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new g(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),u.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a)}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}})),t}function v(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new g(t.headers),this.url=t.url||"",this._initBody(e)}}("undefined"!=typeof self?self:this)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionsApi=void 0;const r=n(0);class a extends r.TransactionsApi{getTransactionsByType(e,t,n,a){return r.TransactionsApiFp(this.configuration).getTransactions(e,void 0,t,n,a)()}createTransactions(e,t,n){return r.TransactionsApiFp(this.configuration).createTransaction(e,t,n)()}bulkCreateTransactions(e,t,n){return r.DeprecatedApiFp(this.configuration).bulkCreateTransactions(e,t,n)()}}t.TransactionsApi=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={getCurrentMonthInISOFormat(){return this.getCurrentDateInISOFormat().substr(0,7)+"-01"},getCurrentDateInISOFormat(){let e=new Date;return new Date(e.getTime()-6e4*e.getTimezoneOffset()).toISOString()},convertFromISODateString:e=>new Date(new Date(e)),convertMilliUnitsToCurrencyAmount(e,t=2){let n=Math.pow(10,3-Math.min(3,t));n=1/n;let r=Math.round(e*n)/n*(.1/Math.pow(10,2));return Number(r.toFixed(t))}}}]);
|
|
1
|
+
/*! For license information please see ynab.js.LICENSE.txt */
|
|
2
|
+
var ynab;(()=>{var e={559:function(e,t,n){var r;!function(a){"use strict";function o(e){var n=e&&e.Promise||a.Promise,r=e&&e.XMLHttpRequest||a.XMLHttpRequest;return function(){var e=Object.create(a,{fetch:{value:void 0,writable:!0}});return function(t){var a=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==a&&a,o="URLSearchParams"in a,i="Symbol"in a&&"iterator"in Symbol,s="FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch(e){return!1}}(),c="FormData"in a,u="ArrayBuffer"in a;if(u)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(e){return e&&d.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function p(e){return"string"!=typeof e&&(e=String(e)),e}function g(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function y(e){this.map={},e instanceof y?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function f(e){if(e.bodyUsed)return n.reject(new TypeError("Already read"));e.bodyUsed=!0}function m(e){return new n((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function b(e){var t=new FileReader,n=m(t);return t.readAsArrayBuffer(e),n}function A(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function w(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:s&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:c&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:o&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u&&s&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=A(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u&&(ArrayBuffer.prototype.isPrototypeOf(e)||h(e))?this._bodyArrayBuffer=A(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return n.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return n.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return n.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?n.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):n.resolve(this._bodyArrayBuffer)):this.blob().then(b)}),this.text=function(){var e,t,r,a=f(this);if(a)return a;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=m(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return n.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return n.resolve(this._bodyText)},c&&(this.formData=function(){return this.text().then(v)}),this.json=function(){return this.text().then(JSON.parse)},this}y.prototype.append=function(e,t){e=l(e),t=p(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},y.prototype.delete=function(e){delete this.map[l(e)]},y.prototype.get=function(e){return e=l(e),this.has(e)?this.map[e]:null},y.prototype.has=function(e){return this.map.hasOwnProperty(l(e))},y.prototype.set=function(e,t){this.map[l(e)]=p(t)},y.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},y.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),g(e)},y.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),g(e)},y.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),g(e)},i&&(y.prototype[Symbol.iterator]=y.prototype.entries);var T=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function _(e,t){if(!(this instanceof _))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,a=(t=t||{}).body;if(e instanceof _){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new y(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new y(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),T.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(a),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;if(o.test(this.url))this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function v(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}})),t}function j(e,t){if(!(this instanceof j))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"",this.headers=new y(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},w.call(_.prototype),w.call(j.prototype),j.prototype.clone=function(){return new j(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},j.error=function(){var e=new j(null,{status:0,statusText:""});return e.type="error",e};var C=[301,302,303,307,308];j.redirect=function(e,t){if(-1===C.indexOf(t))throw new RangeError("Invalid status code");return new j(null,{status:t,headers:{location:e}})},t.DOMException=a.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function P(e,o){return new n((function(n,i){var c=new _(e,o);if(c.signal&&c.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var d=new r;function h(){d.abort()}d.onload=function(){var e,t,r={status:d.status,statusText:d.statusText,headers:(e=d.getAllResponseHeaders()||"",t=new y,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var a=n.join(":").trim();t.append(r,a)}})),t)};r.url="responseURL"in d?d.responseURL:r.headers.get("X-Request-URL");var a="response"in d?d.response:d.responseText;setTimeout((function(){n(new j(a,r))}),0)},d.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},d.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},d.onabort=function(){setTimeout((function(){i(new t.DOMException("Aborted","AbortError"))}),0)},d.open(c.method,function(e){try{return""===e&&a.location.href?a.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?d.withCredentials=!0:"omit"===c.credentials&&(d.withCredentials=!1),"responseType"in d&&(s?d.responseType="blob":u&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(d.responseType="arraybuffer")),!o||"object"!=typeof o.headers||o.headers instanceof y?c.headers.forEach((function(e,t){d.setRequestHeader(t,e)})):Object.getOwnPropertyNames(o.headers).forEach((function(e){d.setRequestHeader(e,p(o.headers[e]))})),c.signal&&(c.signal.addEventListener("abort",h),d.onreadystatechange=function(){4===d.readyState&&c.signal.removeEventListener("abort",h)}),d.send(void 0===c._bodyInit?null:c._bodyInit)}))}P.polyfill=!0,a.fetch||(a.fetch=P,a.Headers=y,a.Request=_,a.Response=j),t.Headers=y,t.Request=_,t.Response=j,t.fetch=P,Object.defineProperty(t,"__esModule",{value:!0})}(t),{fetch:e.fetch,Headers:e.Headers,Request:e.Request,Response:e.Response,DOMException:e.DOMException}}()}void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==n.g?n.g:this)},587:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,r,a){n=n||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/g;e=e.split(n);var s=1e3;a&&"number"==typeof a.maxKeys&&(s=a.maxKeys);var c=e.length;s>0&&c>s&&(c=s);for(var u=0;u<c;++u){var d,h,l,p,g=e[u].replace(i,"%20"),y=g.indexOf(r);y>=0?(d=g.substr(0,y),h=g.substr(y+1)):(d=g,h=""),l=decodeURIComponent(d),p=decodeURIComponent(h),t(o,l)?Array.isArray(o[l])?o[l].push(p):o[l]=[o[l],p]:o[l]=p}return o}},361:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,r,a){return n=n||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(a){var o=encodeURIComponent(t(a))+r;return Array.isArray(e[a])?e[a].map((function(e){return o+encodeURIComponent(t(e))})).join(n):o+encodeURIComponent(t(e[a]))})).join(n):a?encodeURIComponent(t(a))+r+encodeURIComponent(t(e)):""}},673:(e,t,n)=>{"use strict";t.decode=t.parse=n(587),t.encode=t.stringify=n(361)},665:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserApi=t.UserApiFactory=t.UserApiFp=t.UserApiFetchParamCreator=t.TransactionsApi=t.TransactionsApiFactory=t.TransactionsApiFp=t.TransactionsApiFetchParamCreator=t.ScheduledTransactionsApi=t.ScheduledTransactionsApiFactory=t.ScheduledTransactionsApiFp=t.ScheduledTransactionsApiFetchParamCreator=t.PayeesApi=t.PayeesApiFactory=t.PayeesApiFp=t.PayeesApiFetchParamCreator=t.PayeeLocationsApi=t.PayeeLocationsApiFactory=t.PayeeLocationsApiFp=t.PayeeLocationsApiFetchParamCreator=t.MonthsApi=t.MonthsApiFactory=t.MonthsApiFp=t.MonthsApiFetchParamCreator=t.DeprecatedApi=t.DeprecatedApiFactory=t.DeprecatedApiFp=t.DeprecatedApiFetchParamCreator=t.CategoriesApi=t.CategoriesApiFactory=t.CategoriesApiFp=t.CategoriesApiFetchParamCreator=t.BudgetsApi=t.BudgetsApiFactory=t.BudgetsApiFp=t.BudgetsApiFetchParamCreator=t.AccountsApi=t.AccountsApiFactory=t.AccountsApiFp=t.AccountsApiFetchParamCreator=t.UpdateTransaction=t.TransactionDetail=t.ScheduledTransactionDetail=t.HybridTransaction=t.TransactionSummary=t.ScheduledTransactionSummary=t.SaveTransaction=t.Category=t.AccountType=t.RequiredError=t.BaseAPI=t.COLLECTION_FORMATS=void 0;const a=n(559)();globalThis.fetch||(globalThis.fetch=a.fetch,globalThis.Response=a.Response,globalThis.Headers=a.Headers,globalThis.Request=a.Request);const o=n(575),i="api_client/js/1.29.0";function s(e){return e instanceof Date?e.toISOString().substring(0,10):e}t.COLLECTION_FORMATS={csv:",",ssv:" ",tsv:"\t",pipes:"|"};class c{constructor(e){e&&(this.configuration=e)}}t.BaseAPI=c;class u extends Error{constructor(e,t){super(t),this.field=e}}var d;t.RequiredError=u,(d=t.AccountType||(t.AccountType={}))[d.Checking="checking"]="Checking",d[d.Savings="savings"]="Savings",d[d.Cash="cash"]="Cash",d[d.CreditCard="creditCard"]="CreditCard",d[d.LineOfCredit="lineOfCredit"]="LineOfCredit",d[d.OtherAsset="otherAsset"]="OtherAsset",d[d.OtherLiability="otherLiability"]="OtherLiability",d[d.Mortgage="mortgage"]="Mortgage",d[d.AutoLoan="autoLoan"]="AutoLoan",d[d.StudentLoan="studentLoan"]="StudentLoan",d[d.PersonalLoan="personalLoan"]="PersonalLoan",d[d.MedicalDebt="medicalDebt"]="MedicalDebt",d[d.OtherDebt="otherDebt"]="OtherDebt",function(e){let t;!function(e){e[e.TB="TB"]="TB",e[e.TBD="TBD"]="TBD",e[e.MF="MF"]="MF",e[e.NEED="NEED"]="NEED",e[e.DEBT="DEBT"]="DEBT"}(t=e.GoalTypeEnum||(e.GoalTypeEnum={}))}(t.Category||(t.Category={})),function(e){let t,n;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.SaveTransaction||(t.SaveTransaction={})),function(e){let t,n;!function(e){e[e.Never="never"]="Never",e[e.Daily="daily"]="Daily",e[e.Weekly="weekly"]="Weekly",e[e.EveryOtherWeek="everyOtherWeek"]="EveryOtherWeek",e[e.TwiceAMonth="twiceAMonth"]="TwiceAMonth",e[e.Every4Weeks="every4Weeks"]="Every4Weeks",e[e.Monthly="monthly"]="Monthly",e[e.EveryOtherMonth="everyOtherMonth"]="EveryOtherMonth",e[e.Every3Months="every3Months"]="Every3Months",e[e.Every4Months="every4Months"]="Every4Months",e[e.TwiceAYear="twiceAYear"]="TwiceAYear",e[e.Yearly="yearly"]="Yearly",e[e.EveryOtherYear="everyOtherYear"]="EveryOtherYear"}(t=e.FrequencyEnum||(e.FrequencyEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.ScheduledTransactionSummary||(t.ScheduledTransactionSummary={})),function(e){let t,n;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.TransactionSummary||(t.TransactionSummary={})),function(e){let t,n,r;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={})),function(e){e[e.Transaction="transaction"]="Transaction",e[e.Subtransaction="subtransaction"]="Subtransaction"}(r=e.TypeEnum||(e.TypeEnum={}))}(t.HybridTransaction||(t.HybridTransaction={})),function(e){let t,n;!function(e){e[e.Never="never"]="Never",e[e.Daily="daily"]="Daily",e[e.Weekly="weekly"]="Weekly",e[e.EveryOtherWeek="everyOtherWeek"]="EveryOtherWeek",e[e.TwiceAMonth="twiceAMonth"]="TwiceAMonth",e[e.Every4Weeks="every4Weeks"]="Every4Weeks",e[e.Monthly="monthly"]="Monthly",e[e.EveryOtherMonth="everyOtherMonth"]="EveryOtherMonth",e[e.Every3Months="every3Months"]="Every3Months",e[e.Every4Months="every4Months"]="Every4Months",e[e.TwiceAYear="twiceAYear"]="TwiceAYear",e[e.Yearly="yearly"]="Yearly",e[e.EveryOtherYear="everyOtherYear"]="EveryOtherYear"}(t=e.FrequencyEnum||(e.FrequencyEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.ScheduledTransactionDetail||(t.ScheduledTransactionDetail={})),function(e){let t,n;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.TransactionDetail||(t.TransactionDetail={})),function(e){let t,n;!function(e){e[e.Cleared="cleared"]="Cleared",e[e.Uncleared="uncleared"]="Uncleared",e[e.Reconciled="reconciled"]="Reconciled"}(t=e.ClearedEnum||(e.ClearedEnum={})),function(e){e[e.Red="red"]="Red",e[e.Orange="orange"]="Orange",e[e.Yellow="yellow"]="Yellow",e[e.Green="green"]="Green",e[e.Blue="blue"]="Blue",e[e.Purple="purple"]="Purple"}(n=e.FlagColorEnum||(e.FlagColorEnum={}))}(t.UpdateTransaction||(t.UpdateTransaction={})),t.AccountsApiFetchParamCreator=function(e){return{createAccount(t,n,r={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling createAccount.");if(null==n)throw new u("data","Required parameter data was null or undefined when calling createAccount.");const a="/budgets/{budget_id}/accounts".replace("{budget_id}",encodeURIComponent(String(t))),s=o.parse(a,!0),c=Object.assign({method:"POST"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return d["Content-Type"]="application/json",s.query=Object.assign({},s.query,{},r.query),delete s.search,c.headers=Object.assign({},d,r.headers),c.body=JSON.stringify(n||{}),{url:o.format(s),options:c}},getAccountById(t,n,r={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getAccountById.");if(null==n)throw new u("account_id","Required parameter account_id was null or undefined when calling getAccountById.");const a="/budgets/{budget_id}/accounts/{account_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{account_id}",encodeURIComponent(String(n))),s=o.parse(a,!0),c=Object.assign({method:"GET"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return s.query=Object.assign({},s.query,{},r.query),delete s.search,c.headers=Object.assign({},d,r.headers),{url:o.format(s),options:c}},getAccounts(t,n,r={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getAccounts.");const a="/budgets/{budget_id}/accounts".replace("{budget_id}",encodeURIComponent(String(t))),s=o.parse(a,!0),c=Object.assign({method:"GET"},r),d={},h={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return void 0!==n&&(h.last_knowledge_of_server=n),s.query=Object.assign({},s.query,h,r.query),delete s.search,c.headers=Object.assign({},d,r.headers),{url:o.format(s),options:c}}}},t.AccountsApiFp=function(e){return{createAccount(n,a,o){const i=t.AccountsApiFetchParamCreator(e).createAccount(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getAccountById(n,a,o){const i=t.AccountsApiFetchParamCreator(e).getAccountById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getAccounts(n,a,o){const i=t.AccountsApiFetchParamCreator(e).getAccounts(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.AccountsApiFactory=function(e){return{createAccount:(n,r,a)=>t.AccountsApiFp(e).createAccount(n,r,a)(),getAccountById:(n,r,a)=>t.AccountsApiFp(e).getAccountById(n,r,a)(),getAccounts:(n,r,a)=>t.AccountsApiFp(e).getAccounts(n,r,a)()}},t.AccountsApi=class extends c{createAccount(e,n,r){return t.AccountsApiFp(this.configuration).createAccount(e,n,r)()}getAccountById(e,n,r){return t.AccountsApiFp(this.configuration).getAccountById(e,n,r)()}getAccounts(e,n,r){return t.AccountsApiFp(this.configuration).getAccounts(e,n,r)()}},t.BudgetsApiFetchParamCreator=function(e){return{getBudgetById(t,n,r={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getBudgetById.");const a="/budgets/{budget_id}".replace("{budget_id}",encodeURIComponent(String(t))),s=o.parse(a,!0),c=Object.assign({method:"GET"},r),d={},h={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return void 0!==n&&(h.last_knowledge_of_server=n),s.query=Object.assign({},s.query,h,r.query),delete s.search,c.headers=Object.assign({},d,r.headers),{url:o.format(s),options:c}},getBudgetSettingsById(t,n={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getBudgetSettingsById.");const r="/budgets/{budget_id}/settings".replace("{budget_id}",encodeURIComponent(String(t))),a=o.parse(r,!0),s=Object.assign({method:"GET"},n),c={};if(c["User-Agent"]=i,c.Accept="application/json",e&&e.apiKey){const t=e.apiKey;c.Authorization=t}return a.query=Object.assign({},a.query,{},n.query),delete a.search,s.headers=Object.assign({},c,n.headers),{url:o.format(a),options:s}},getBudgets(t,n={}){const r=o.parse("/budgets",!0),a=Object.assign({method:"GET"},n),s={},c={};if(s["User-Agent"]=i,s.Accept="application/json",e&&e.apiKey){const t=e.apiKey;s.Authorization=t}return void 0!==t&&(c.include_accounts=t),r.query=Object.assign({},r.query,c,n.query),delete r.search,a.headers=Object.assign({},s,n.headers),{url:o.format(r),options:a}}}},t.BudgetsApiFp=function(e){return{getBudgetById(n,a,o){const i=t.BudgetsApiFetchParamCreator(e).getBudgetById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getBudgetSettingsById(n,a){const o=t.BudgetsApiFetchParamCreator(e).getBudgetSettingsById(n,a);return(t=fetch)=>t(e.basePath+o.url,o.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getBudgets(n,a){const o=t.BudgetsApiFetchParamCreator(e).getBudgets(n,a);return(t=fetch)=>t(e.basePath+o.url,o.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.BudgetsApiFactory=function(e){return{getBudgetById:(n,r,a)=>t.BudgetsApiFp(e).getBudgetById(n,r,a)(),getBudgetSettingsById:(n,r)=>t.BudgetsApiFp(e).getBudgetSettingsById(n,r)(),getBudgets:(n,r)=>t.BudgetsApiFp(e).getBudgets(n,r)()}},t.BudgetsApi=class extends c{getBudgetById(e,n,r){return t.BudgetsApiFp(this.configuration).getBudgetById(e,n,r)()}getBudgetSettingsById(e,n){return t.BudgetsApiFp(this.configuration).getBudgetSettingsById(e,n)()}getBudgets(e,n){return t.BudgetsApiFp(this.configuration).getBudgets(e,n)()}},t.CategoriesApiFetchParamCreator=function(e){return{getCategories(t,n,r={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getCategories.");const a="/budgets/{budget_id}/categories".replace("{budget_id}",encodeURIComponent(String(t))),s=o.parse(a,!0),c=Object.assign({method:"GET"},r),d={},h={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return void 0!==n&&(h.last_knowledge_of_server=n),s.query=Object.assign({},s.query,h,r.query),delete s.search,c.headers=Object.assign({},d,r.headers),{url:o.format(s),options:c}},getCategoryById(t,n,r={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getCategoryById.");if(null==n)throw new u("category_id","Required parameter category_id was null or undefined when calling getCategoryById.");const a="/budgets/{budget_id}/categories/{category_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{category_id}",encodeURIComponent(String(n))),s=o.parse(a,!0),c=Object.assign({method:"GET"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return s.query=Object.assign({},s.query,{},r.query),delete s.search,c.headers=Object.assign({},d,r.headers),{url:o.format(s),options:c}},getMonthCategoryById(t,n,r,a={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getMonthCategoryById.");if(null==n)throw new u("month","Required parameter month was null or undefined when calling getMonthCategoryById.");if(null==r)throw new u("category_id","Required parameter category_id was null or undefined when calling getMonthCategoryById.");const c="/budgets/{budget_id}/months/{month}/categories/{category_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{month}",encodeURIComponent(s(n))).replace("{category_id}",encodeURIComponent(String(r))),d=o.parse(c,!0),h=Object.assign({method:"GET"},a),l={};if(l["User-Agent"]=i,l.Accept="application/json",e&&e.apiKey){const t=e.apiKey;l.Authorization=t}return d.query=Object.assign({},d.query,{},a.query),delete d.search,h.headers=Object.assign({},l,a.headers),{url:o.format(d),options:h}},updateMonthCategory(t,n,r,a,c={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling updateMonthCategory.");if(null==n)throw new u("month","Required parameter month was null or undefined when calling updateMonthCategory.");if(null==r)throw new u("category_id","Required parameter category_id was null or undefined when calling updateMonthCategory.");if(null==a)throw new u("data","Required parameter data was null or undefined when calling updateMonthCategory.");const d="/budgets/{budget_id}/months/{month}/categories/{category_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{month}",encodeURIComponent(s(n))).replace("{category_id}",encodeURIComponent(String(r))),h=o.parse(d,!0),l=Object.assign({method:"PATCH"},c),p={};if(p["User-Agent"]=i,p.Accept="application/json",e&&e.apiKey){const t=e.apiKey;p.Authorization=t}return p["Content-Type"]="application/json",h.query=Object.assign({},h.query,{},c.query),delete h.search,l.headers=Object.assign({},p,c.headers),l.body=JSON.stringify(a||{}),{url:o.format(h),options:l}}}},t.CategoriesApiFp=function(e){return{getCategories(n,a,o){const i=t.CategoriesApiFetchParamCreator(e).getCategories(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getCategoryById(n,a,o){const i=t.CategoriesApiFetchParamCreator(e).getCategoryById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getMonthCategoryById(n,a,o,i){const s=t.CategoriesApiFetchParamCreator(e).getMonthCategoryById(n,a,o,i);return(t=fetch)=>t(e.basePath+s.url,s.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},updateMonthCategory(n,a,o,i,s){const c=t.CategoriesApiFetchParamCreator(e).updateMonthCategory(n,a,o,i,s);return(t=fetch)=>t(e.basePath+c.url,c.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.CategoriesApiFactory=function(e){return{getCategories:(n,r,a)=>t.CategoriesApiFp(e).getCategories(n,r,a)(),getCategoryById:(n,r,a)=>t.CategoriesApiFp(e).getCategoryById(n,r,a)(),getMonthCategoryById:(n,r,a,o)=>t.CategoriesApiFp(e).getMonthCategoryById(n,r,a,o)(),updateMonthCategory:(n,r,a,o,i)=>t.CategoriesApiFp(e).updateMonthCategory(n,r,a,o,i)()}},t.CategoriesApi=class extends c{getCategories(e,n,r){return t.CategoriesApiFp(this.configuration).getCategories(e,n,r)()}getCategoryById(e,n,r){return t.CategoriesApiFp(this.configuration).getCategoryById(e,n,r)()}getMonthCategoryById(e,n,r,a){return t.CategoriesApiFp(this.configuration).getMonthCategoryById(e,n,r,a)()}updateMonthCategory(e,n,r,a,o){return t.CategoriesApiFp(this.configuration).updateMonthCategory(e,n,r,a,o)()}},t.DeprecatedApiFetchParamCreator=function(e){return{bulkCreateTransactions(t,n,r={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling bulkCreateTransactions.");if(null==n)throw new u("transactions","Required parameter transactions was null or undefined when calling bulkCreateTransactions.");const a="/budgets/{budget_id}/transactions/bulk".replace("{budget_id}",encodeURIComponent(String(t))),s=o.parse(a,!0),c=Object.assign({method:"POST"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return d["Content-Type"]="application/json",s.query=Object.assign({},s.query,{},r.query),delete s.search,c.headers=Object.assign({},d,r.headers),c.body=JSON.stringify(n||{}),{url:o.format(s),options:c}}}},t.DeprecatedApiFp=function(e){return{bulkCreateTransactions(n,a,o){const i=t.DeprecatedApiFetchParamCreator(e).bulkCreateTransactions(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.DeprecatedApiFactory=function(e){return{bulkCreateTransactions:(n,r,a)=>t.DeprecatedApiFp(e).bulkCreateTransactions(n,r,a)()}},t.DeprecatedApi=class extends c{bulkCreateTransactions(e,n,r){return t.DeprecatedApiFp(this.configuration).bulkCreateTransactions(e,n,r)()}},t.MonthsApiFetchParamCreator=function(e){return{getBudgetMonth(t,n,r={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getBudgetMonth.");if(null==n)throw new u("month","Required parameter month was null or undefined when calling getBudgetMonth.");const a="/budgets/{budget_id}/months/{month}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{month}",encodeURIComponent(s(n))),c=o.parse(a,!0),d=Object.assign({method:"GET"},r),h={};if(h["User-Agent"]=i,h.Accept="application/json",e&&e.apiKey){const t=e.apiKey;h.Authorization=t}return c.query=Object.assign({},c.query,{},r.query),delete c.search,d.headers=Object.assign({},h,r.headers),{url:o.format(c),options:d}},getBudgetMonths(t,n,r={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getBudgetMonths.");const a="/budgets/{budget_id}/months".replace("{budget_id}",encodeURIComponent(String(t))),s=o.parse(a,!0),c=Object.assign({method:"GET"},r),d={},h={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return void 0!==n&&(h.last_knowledge_of_server=n),s.query=Object.assign({},s.query,h,r.query),delete s.search,c.headers=Object.assign({},d,r.headers),{url:o.format(s),options:c}}}},t.MonthsApiFp=function(e){return{getBudgetMonth(n,a,o){const i=t.MonthsApiFetchParamCreator(e).getBudgetMonth(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getBudgetMonths(n,a,o){const i=t.MonthsApiFetchParamCreator(e).getBudgetMonths(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.MonthsApiFactory=function(e){return{getBudgetMonth:(n,r,a)=>t.MonthsApiFp(e).getBudgetMonth(n,r,a)(),getBudgetMonths:(n,r,a)=>t.MonthsApiFp(e).getBudgetMonths(n,r,a)()}},t.MonthsApi=class extends c{getBudgetMonth(e,n,r){return t.MonthsApiFp(this.configuration).getBudgetMonth(e,n,r)()}getBudgetMonths(e,n,r){return t.MonthsApiFp(this.configuration).getBudgetMonths(e,n,r)()}},t.PayeeLocationsApiFetchParamCreator=function(e){return{getPayeeLocationById(t,n,r={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getPayeeLocationById.");if(null==n)throw new u("payee_location_id","Required parameter payee_location_id was null or undefined when calling getPayeeLocationById.");const a="/budgets/{budget_id}/payee_locations/{payee_location_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{payee_location_id}",encodeURIComponent(String(n))),s=o.parse(a,!0),c=Object.assign({method:"GET"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return s.query=Object.assign({},s.query,{},r.query),delete s.search,c.headers=Object.assign({},d,r.headers),{url:o.format(s),options:c}},getPayeeLocations(t,n={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getPayeeLocations.");const r="/budgets/{budget_id}/payee_locations".replace("{budget_id}",encodeURIComponent(String(t))),a=o.parse(r,!0),s=Object.assign({method:"GET"},n),c={};if(c["User-Agent"]=i,c.Accept="application/json",e&&e.apiKey){const t=e.apiKey;c.Authorization=t}return a.query=Object.assign({},a.query,{},n.query),delete a.search,s.headers=Object.assign({},c,n.headers),{url:o.format(a),options:s}},getPayeeLocationsByPayee(t,n,r={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getPayeeLocationsByPayee.");if(null==n)throw new u("payee_id","Required parameter payee_id was null or undefined when calling getPayeeLocationsByPayee.");const a="/budgets/{budget_id}/payees/{payee_id}/payee_locations".replace("{budget_id}",encodeURIComponent(String(t))).replace("{payee_id}",encodeURIComponent(String(n))),s=o.parse(a,!0),c=Object.assign({method:"GET"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return s.query=Object.assign({},s.query,{},r.query),delete s.search,c.headers=Object.assign({},d,r.headers),{url:o.format(s),options:c}}}},t.PayeeLocationsApiFp=function(e){return{getPayeeLocationById(n,a,o){const i=t.PayeeLocationsApiFetchParamCreator(e).getPayeeLocationById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getPayeeLocations(n,a){const o=t.PayeeLocationsApiFetchParamCreator(e).getPayeeLocations(n,a);return(t=fetch)=>t(e.basePath+o.url,o.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getPayeeLocationsByPayee(n,a,o){const i=t.PayeeLocationsApiFetchParamCreator(e).getPayeeLocationsByPayee(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.PayeeLocationsApiFactory=function(e){return{getPayeeLocationById:(n,r,a)=>t.PayeeLocationsApiFp(e).getPayeeLocationById(n,r,a)(),getPayeeLocations:(n,r)=>t.PayeeLocationsApiFp(e).getPayeeLocations(n,r)(),getPayeeLocationsByPayee:(n,r,a)=>t.PayeeLocationsApiFp(e).getPayeeLocationsByPayee(n,r,a)()}},t.PayeeLocationsApi=class extends c{getPayeeLocationById(e,n,r){return t.PayeeLocationsApiFp(this.configuration).getPayeeLocationById(e,n,r)()}getPayeeLocations(e,n){return t.PayeeLocationsApiFp(this.configuration).getPayeeLocations(e,n)()}getPayeeLocationsByPayee(e,n,r){return t.PayeeLocationsApiFp(this.configuration).getPayeeLocationsByPayee(e,n,r)()}},t.PayeesApiFetchParamCreator=function(e){return{getPayeeById(t,n,r={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getPayeeById.");if(null==n)throw new u("payee_id","Required parameter payee_id was null or undefined when calling getPayeeById.");const a="/budgets/{budget_id}/payees/{payee_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{payee_id}",encodeURIComponent(String(n))),s=o.parse(a,!0),c=Object.assign({method:"GET"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return s.query=Object.assign({},s.query,{},r.query),delete s.search,c.headers=Object.assign({},d,r.headers),{url:o.format(s),options:c}},getPayees(t,n,r={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getPayees.");const a="/budgets/{budget_id}/payees".replace("{budget_id}",encodeURIComponent(String(t))),s=o.parse(a,!0),c=Object.assign({method:"GET"},r),d={},h={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return void 0!==n&&(h.last_knowledge_of_server=n),s.query=Object.assign({},s.query,h,r.query),delete s.search,c.headers=Object.assign({},d,r.headers),{url:o.format(s),options:c}}}},t.PayeesApiFp=function(e){return{getPayeeById(n,a,o){const i=t.PayeesApiFetchParamCreator(e).getPayeeById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getPayees(n,a,o){const i=t.PayeesApiFetchParamCreator(e).getPayees(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.PayeesApiFactory=function(e){return{getPayeeById:(n,r,a)=>t.PayeesApiFp(e).getPayeeById(n,r,a)(),getPayees:(n,r,a)=>t.PayeesApiFp(e).getPayees(n,r,a)()}},t.PayeesApi=class extends c{getPayeeById(e,n,r){return t.PayeesApiFp(this.configuration).getPayeeById(e,n,r)()}getPayees(e,n,r){return t.PayeesApiFp(this.configuration).getPayees(e,n,r)()}},t.ScheduledTransactionsApiFetchParamCreator=function(e){return{getScheduledTransactionById(t,n,r={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getScheduledTransactionById.");if(null==n)throw new u("scheduled_transaction_id","Required parameter scheduled_transaction_id was null or undefined when calling getScheduledTransactionById.");const a="/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{scheduled_transaction_id}",encodeURIComponent(String(n))),s=o.parse(a,!0),c=Object.assign({method:"GET"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return s.query=Object.assign({},s.query,{},r.query),delete s.search,c.headers=Object.assign({},d,r.headers),{url:o.format(s),options:c}},getScheduledTransactions(t,n,r={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getScheduledTransactions.");const a="/budgets/{budget_id}/scheduled_transactions".replace("{budget_id}",encodeURIComponent(String(t))),s=o.parse(a,!0),c=Object.assign({method:"GET"},r),d={},h={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return void 0!==n&&(h.last_knowledge_of_server=n),s.query=Object.assign({},s.query,h,r.query),delete s.search,c.headers=Object.assign({},d,r.headers),{url:o.format(s),options:c}}}},t.ScheduledTransactionsApiFp=function(e){return{getScheduledTransactionById(n,a,o){const i=t.ScheduledTransactionsApiFetchParamCreator(e).getScheduledTransactionById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getScheduledTransactions(n,a,o){const i=t.ScheduledTransactionsApiFetchParamCreator(e).getScheduledTransactions(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.ScheduledTransactionsApiFactory=function(e){return{getScheduledTransactionById:(n,r,a)=>t.ScheduledTransactionsApiFp(e).getScheduledTransactionById(n,r,a)(),getScheduledTransactions:(n,r,a)=>t.ScheduledTransactionsApiFp(e).getScheduledTransactions(n,r,a)()}},t.ScheduledTransactionsApi=class extends c{getScheduledTransactionById(e,n,r){return t.ScheduledTransactionsApiFp(this.configuration).getScheduledTransactionById(e,n,r)()}getScheduledTransactions(e,n,r){return t.ScheduledTransactionsApiFp(this.configuration).getScheduledTransactions(e,n,r)()}},t.TransactionsApiFetchParamCreator=function(e){return{createTransaction(t,n,r={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling createTransaction.");if(null==n)throw new u("data","Required parameter data was null or undefined when calling createTransaction.");const a="/budgets/{budget_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))),s=o.parse(a,!0),c=Object.assign({method:"POST"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return d["Content-Type"]="application/json",s.query=Object.assign({},s.query,{},r.query),delete s.search,c.headers=Object.assign({},d,r.headers),c.body=JSON.stringify(n||{}),{url:o.format(s),options:c}},getTransactionById(t,n,r={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getTransactionById.");if(null==n)throw new u("transaction_id","Required parameter transaction_id was null or undefined when calling getTransactionById.");const a="/budgets/{budget_id}/transactions/{transaction_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{transaction_id}",encodeURIComponent(String(n))),s=o.parse(a,!0),c=Object.assign({method:"GET"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return s.query=Object.assign({},s.query,{},r.query),delete s.search,c.headers=Object.assign({},d,r.headers),{url:o.format(s),options:c}},getTransactions(t,n,r,a,c={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getTransactions.");const d="/budgets/{budget_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))),h=o.parse(d,!0),l=Object.assign({method:"GET"},c),p={},g={};if(p["User-Agent"]=i,p.Accept="application/json",e&&e.apiKey){const t=e.apiKey;p.Authorization=t}return void 0!==n&&(g.since_date=s(n)),void 0!==r&&(g.type=r),void 0!==a&&(g.last_knowledge_of_server=a),h.query=Object.assign({},h.query,g,c.query),delete h.search,l.headers=Object.assign({},p,c.headers),{url:o.format(h),options:l}},getTransactionsByAccount(t,n,r,a,c,d={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getTransactionsByAccount.");if(null==n)throw new u("account_id","Required parameter account_id was null or undefined when calling getTransactionsByAccount.");const h="/budgets/{budget_id}/accounts/{account_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))).replace("{account_id}",encodeURIComponent(String(n))),l=o.parse(h,!0),p=Object.assign({method:"GET"},d),g={},y={};if(g["User-Agent"]=i,g.Accept="application/json",e&&e.apiKey){const t=e.apiKey;g.Authorization=t}return void 0!==r&&(y.since_date=s(r)),void 0!==a&&(y.type=a),void 0!==c&&(y.last_knowledge_of_server=c),l.query=Object.assign({},l.query,y,d.query),delete l.search,p.headers=Object.assign({},g,d.headers),{url:o.format(l),options:p}},getTransactionsByCategory(t,n,r,a,c,d={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getTransactionsByCategory.");if(null==n)throw new u("category_id","Required parameter category_id was null or undefined when calling getTransactionsByCategory.");const h="/budgets/{budget_id}/categories/{category_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))).replace("{category_id}",encodeURIComponent(String(n))),l=o.parse(h,!0),p=Object.assign({method:"GET"},d),g={},y={};if(g["User-Agent"]=i,g.Accept="application/json",e&&e.apiKey){const t=e.apiKey;g.Authorization=t}return void 0!==r&&(y.since_date=s(r)),void 0!==a&&(y.type=a),void 0!==c&&(y.last_knowledge_of_server=c),l.query=Object.assign({},l.query,y,d.query),delete l.search,p.headers=Object.assign({},g,d.headers),{url:o.format(l),options:p}},getTransactionsByPayee(t,n,r,a,c,d={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling getTransactionsByPayee.");if(null==n)throw new u("payee_id","Required parameter payee_id was null or undefined when calling getTransactionsByPayee.");const h="/budgets/{budget_id}/payees/{payee_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))).replace("{payee_id}",encodeURIComponent(String(n))),l=o.parse(h,!0),p=Object.assign({method:"GET"},d),g={},y={};if(g["User-Agent"]=i,g.Accept="application/json",e&&e.apiKey){const t=e.apiKey;g.Authorization=t}return void 0!==r&&(y.since_date=s(r)),void 0!==a&&(y.type=a),void 0!==c&&(y.last_knowledge_of_server=c),l.query=Object.assign({},l.query,y,d.query),delete l.search,p.headers=Object.assign({},g,d.headers),{url:o.format(l),options:p}},importTransactions(t,n={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling importTransactions.");const r="/budgets/{budget_id}/transactions/import".replace("{budget_id}",encodeURIComponent(String(t))),a=o.parse(r,!0),s=Object.assign({method:"POST"},n),c={};if(c["User-Agent"]=i,c.Accept="application/json",e&&e.apiKey){const t=e.apiKey;c.Authorization=t}return a.query=Object.assign({},a.query,{},n.query),delete a.search,s.headers=Object.assign({},c,n.headers),{url:o.format(a),options:s}},updateTransaction(t,n,r,a={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling updateTransaction.");if(null==n)throw new u("transaction_id","Required parameter transaction_id was null or undefined when calling updateTransaction.");if(null==r)throw new u("data","Required parameter data was null or undefined when calling updateTransaction.");const s="/budgets/{budget_id}/transactions/{transaction_id}".replace("{budget_id}",encodeURIComponent(String(t))).replace("{transaction_id}",encodeURIComponent(String(n))),c=o.parse(s,!0),d=Object.assign({method:"PUT"},a),h={};if(h["User-Agent"]=i,h.Accept="application/json",e&&e.apiKey){const t=e.apiKey;h.Authorization=t}return h["Content-Type"]="application/json",c.query=Object.assign({},c.query,{},a.query),delete c.search,d.headers=Object.assign({},h,a.headers),d.body=JSON.stringify(r||{}),{url:o.format(c),options:d}},updateTransactions(t,n,r={}){if(null==t)throw new u("budget_id","Required parameter budget_id was null or undefined when calling updateTransactions.");if(null==n)throw new u("data","Required parameter data was null or undefined when calling updateTransactions.");const a="/budgets/{budget_id}/transactions".replace("{budget_id}",encodeURIComponent(String(t))),s=o.parse(a,!0),c=Object.assign({method:"PATCH"},r),d={};if(d["User-Agent"]=i,d.Accept="application/json",e&&e.apiKey){const t=e.apiKey;d.Authorization=t}return d["Content-Type"]="application/json",s.query=Object.assign({},s.query,{},r.query),delete s.search,c.headers=Object.assign({},d,r.headers),c.body=JSON.stringify(n||{}),{url:o.format(s),options:c}}}},t.TransactionsApiFp=function(e){return{createTransaction(n,a,o){const i=t.TransactionsApiFetchParamCreator(e).createTransaction(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getTransactionById(n,a,o){const i=t.TransactionsApiFetchParamCreator(e).getTransactionById(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getTransactions(n,a,o,i,s){const c=t.TransactionsApiFetchParamCreator(e).getTransactions(n,a,o,i,s);return(t=fetch)=>t(e.basePath+c.url,c.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getTransactionsByAccount(n,a,o,i,s,c){const u=t.TransactionsApiFetchParamCreator(e).getTransactionsByAccount(n,a,o,i,s,c);return(t=fetch)=>t(e.basePath+u.url,u.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getTransactionsByCategory(n,a,o,i,s,c){const u=t.TransactionsApiFetchParamCreator(e).getTransactionsByCategory(n,a,o,i,s,c);return(t=fetch)=>t(e.basePath+u.url,u.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},getTransactionsByPayee(n,a,o,i,s,c){const u=t.TransactionsApiFetchParamCreator(e).getTransactionsByPayee(n,a,o,i,s,c);return(t=fetch)=>t(e.basePath+u.url,u.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},importTransactions(n,a){const o=t.TransactionsApiFetchParamCreator(e).importTransactions(n,a);return(t=fetch)=>t(e.basePath+o.url,o.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},updateTransaction(n,a,o,i){const s=t.TransactionsApiFetchParamCreator(e).updateTransaction(n,a,o,i);return(t=fetch)=>t(e.basePath+s.url,s.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))},updateTransactions(n,a,o){const i=t.TransactionsApiFetchParamCreator(e).updateTransactions(n,a,o);return(t=fetch)=>t(e.basePath+i.url,i.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.TransactionsApiFactory=function(e){return{createTransaction:(n,r,a)=>t.TransactionsApiFp(e).createTransaction(n,r,a)(),getTransactionById:(n,r,a)=>t.TransactionsApiFp(e).getTransactionById(n,r,a)(),getTransactions:(n,r,a,o,i)=>t.TransactionsApiFp(e).getTransactions(n,r,a,o,i)(),getTransactionsByAccount:(n,r,a,o,i,s)=>t.TransactionsApiFp(e).getTransactionsByAccount(n,r,a,o,i,s)(),getTransactionsByCategory:(n,r,a,o,i,s)=>t.TransactionsApiFp(e).getTransactionsByCategory(n,r,a,o,i,s)(),getTransactionsByPayee:(n,r,a,o,i,s)=>t.TransactionsApiFp(e).getTransactionsByPayee(n,r,a,o,i,s)(),importTransactions:(n,r)=>t.TransactionsApiFp(e).importTransactions(n,r)(),updateTransaction:(n,r,a,o)=>t.TransactionsApiFp(e).updateTransaction(n,r,a,o)(),updateTransactions:(n,r,a)=>t.TransactionsApiFp(e).updateTransactions(n,r,a)()}},t.TransactionsApi=class extends c{createTransaction(e,n,r){return t.TransactionsApiFp(this.configuration).createTransaction(e,n,r)()}getTransactionById(e,n,r){return t.TransactionsApiFp(this.configuration).getTransactionById(e,n,r)()}getTransactions(e,n,r,a,o){return t.TransactionsApiFp(this.configuration).getTransactions(e,n,r,a,o)()}getTransactionsByAccount(e,n,r,a,o,i){return t.TransactionsApiFp(this.configuration).getTransactionsByAccount(e,n,r,a,o,i)()}getTransactionsByCategory(e,n,r,a,o,i){return t.TransactionsApiFp(this.configuration).getTransactionsByCategory(e,n,r,a,o,i)()}getTransactionsByPayee(e,n,r,a,o,i){return t.TransactionsApiFp(this.configuration).getTransactionsByPayee(e,n,r,a,o,i)()}importTransactions(e,n){return t.TransactionsApiFp(this.configuration).importTransactions(e,n)()}updateTransaction(e,n,r,a){return t.TransactionsApiFp(this.configuration).updateTransaction(e,n,r,a)()}updateTransactions(e,n,r){return t.TransactionsApiFp(this.configuration).updateTransactions(e,n,r)()}},t.UserApiFetchParamCreator=function(e){return{getUser(t={}){const n=o.parse("/user",!0),r=Object.assign({method:"GET"},t),a={};if(a["User-Agent"]=i,a.Accept="application/json",e&&e.apiKey){const t=e.apiKey;a.Authorization=t}return n.query=Object.assign({},n.query,{},t.query),delete n.search,r.headers=Object.assign({},a,t.headers),{url:o.format(n),options:r}}}},t.UserApiFp=function(e){return{getUser(n){const a=t.UserApiFetchParamCreator(e).getUser(n);return(t=fetch)=>t(e.basePath+a.url,a.options).then((e=>r(this,void 0,void 0,(function*(){if(e.status>=200&&e.status<300){const t=yield e.json();return t.rateLimit=e.headers.get("X-Rate-Limit"),t}return e.json().then((e=>Promise.reject(e)))}))))}}},t.UserApiFactory=function(e){return{getUser:n=>t.UserApiFp(e).getUser(n)()}},t.UserApi=class extends c{getUser(e){return t.UserApiFp(this.configuration).getUser(e)()}}},610:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Configuration=void 0,t.Configuration=class{constructor(e,t){this.apiKey=`Bearer ${e}`,this.basePath=t}}},465:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.api=t.utils=t.API=void 0;const o=n(610),i=n(665),s=n(802),c=n(679);t.utils=c.default,a(n(665),t);class u{constructor(e,t="https://api.youneedabudget.com/v1"){this._configuration=new o.Configuration(e,t)}get user(){return this._user||(this._user=new i.UserApi(this._configuration)),this._user}get budgets(){return this._budgets||(this._budgets=new i.BudgetsApi(this._configuration)),this._budgets}get accounts(){return this._accounts||(this._accounts=new i.AccountsApi(this._configuration)),this._accounts}get categories(){return this._categories||(this._categories=new i.CategoriesApi(this._configuration)),this._categories}get months(){return this._months||(this._months=new i.MonthsApi(this._configuration)),this._months}get payees(){return this._payees||(this._payees=new i.PayeesApi(this._configuration)),this._payees}get payeeLocations(){return this._payeeLocations||(this._payeeLocations=new i.PayeeLocationsApi(this._configuration)),this._payeeLocations}get transactions(){return this._transactions||(this._transactions=new s.TransactionsApi(this._configuration)),this._transactions}get scheduledTransactions(){return this._scheduledTransactions||(this._scheduledTransactions=new i.ScheduledTransactionsApi(this._configuration)),this._scheduledTransactions}}t.api=u,t.API=u},802:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionsApi=void 0;const r=n(665);class a extends r.TransactionsApi{getTransactionsByType(e,t,n,a){return r.TransactionsApiFp(this.configuration).getTransactions(e,void 0,t,n,a)()}createTransactions(e,t,n){return r.TransactionsApiFp(this.configuration).createTransaction(e,t,n)()}bulkCreateTransactions(e,t,n){return r.DeprecatedApiFp(this.configuration).bulkCreateTransactions(e,t,n)()}}t.TransactionsApi=a},679:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={getCurrentMonthInISOFormat(){return`${this.getCurrentDateInISOFormat().substr(0,7)}-01`},getCurrentDateInISOFormat(){let e=new Date;return new Date(e.getTime()-6e4*e.getTimezoneOffset()).toISOString()},convertFromISODateString:e=>new Date(new Date(e)),convertMilliUnitsToCurrencyAmount(e,t=2){let n=Math.pow(10,3-Math.min(3,t));n=1/n;let r=Math.round(e*n)/n*(.1/Math.pow(10,2));return Number(r.toFixed(t))}}},511:function(e,t,n){var r;e=n.nmd(e),function(a){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof n.g&&n.g;o.global!==o&&o.window!==o&&o.self;var i,s=2147483647,c=36,u=/^xn--/,d=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,g=String.fromCharCode;function y(e){throw RangeError(l[e])}function f(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function m(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+f((e=e.replace(h,".")).split("."),t).join(".")}function b(e){for(var t,n,r=[],a=0,o=e.length;a<o;)(t=e.charCodeAt(a++))>=55296&&t<=56319&&a<o?56320==(64512&(n=e.charCodeAt(a++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),a--):r.push(t);return r}function A(e){return f(e,(function(e){var t="";return e>65535&&(t+=g((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+g(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,n){var r=0;for(e=n?p(e/700):e>>1,e+=p(e/t);e>455;r+=c)e=p(e/35);return p(r+36*e/(e+38))}function _(e){var t,n,r,a,o,i,u,d,h,l,g,f=[],m=e.length,b=0,w=128,_=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&y("not-basic"),f.push(e.charCodeAt(r));for(a=n>0?n+1:0;a<m;){for(o=b,i=1,u=c;a>=m&&y("invalid-input"),((d=(g=e.charCodeAt(a++))-48<10?g-22:g-65<26?g-65:g-97<26?g-97:c)>=c||d>p((s-b)/i))&&y("overflow"),b+=d*i,!(d<(h=u<=_?1:u>=_+26?26:u-_));u+=c)i>p(s/(l=c-h))&&y("overflow"),i*=l;_=T(b-o,t=f.length+1,0==o),p(b/t)>s-w&&y("overflow"),w+=p(b/t),b%=t,f.splice(b++,0,w)}return A(f)}function v(e){var t,n,r,a,o,i,u,d,h,l,f,m,A,_,v,j=[];for(m=(e=b(e)).length,t=128,n=0,o=72,i=0;i<m;++i)(f=e[i])<128&&j.push(g(f));for(r=a=j.length,a&&j.push("-");r<m;){for(u=s,i=0;i<m;++i)(f=e[i])>=t&&f<u&&(u=f);for(u-t>p((s-n)/(A=r+1))&&y("overflow"),n+=(u-t)*A,t=u,i=0;i<m;++i)if((f=e[i])<t&&++n>s&&y("overflow"),f==t){for(d=n,h=c;!(d<(l=h<=o?1:h>=o+26?26:h-o));h+=c)v=d-l,_=c-l,j.push(g(w(l+v%_,0))),d=p(v/_);j.push(g(w(d,0))),o=T(n,A,r==a),n=0,++r}++n,++t}return j.join("")}i={version:"1.3.2",ucs2:{decode:b,encode:A},decode:_,encode:v,toASCII:function(e){return m(e,(function(e){return d.test(e)?"xn--"+v(e):e}))},toUnicode:function(e){return m(e,(function(e){return u.test(e)?_(e.slice(4).toLowerCase()):e}))}},void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},575:(e,t,n)=>{"use strict";var r=n(511),a=n(502);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=A,t.resolve=function(e,t){return A(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?A(e,!1,!0).resolveObject(t):t},t.format=function(e){return a.isString(e)&&(e=A(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var i=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),d=["'"].concat(u),h=["%","/","?",";","#"].concat(d),l=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=n(673);function A(e,t,n){if(e&&a.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}o.prototype.parse=function(e,t,n){if(!a.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),s=-1!==o&&o<e.indexOf("#")?"?":"#",u=e.split(s);u[0]=u[0].replace(/\\/g,"/");var A=e=u.join(s);if(A=A.trim(),!n&&1===e.split("#").length){var w=c.exec(A);if(w)return this.path=A,this.href=A,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var T=i.exec(A);if(T){var _=(T=T[0]).toLowerCase();this.protocol=_,A=A.substr(T.length)}if(n||T||A.match(/^\/\/[^@\/]+@[^@\/]+/)){var v="//"===A.substr(0,2);!v||T&&f[T]||(A=A.substr(2),this.slashes=!0)}if(!f[T]&&(v||T&&!m[T])){for(var j,C,P=-1,B=0;B<l.length;B++)-1!==(O=A.indexOf(l[B]))&&(-1===P||O<P)&&(P=O);for(-1!==(C=-1===P?A.lastIndexOf("@"):A.lastIndexOf("@",P))&&(j=A.slice(0,C),A=A.slice(C+1),this.auth=decodeURIComponent(j)),P=-1,B=0;B<h.length;B++){var O;-1!==(O=A.indexOf(h[B]))&&(-1===P||O<P)&&(P=O)}-1===P&&(P=A.length),this.host=A.slice(0,P),A=A.slice(P),this.parseHost(),this.hostname=this.hostname||"";var F="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!F)for(var R=this.hostname.split(/\./),q=(B=0,R.length);B<q;B++){var I=R[B];if(I&&!I.match(p)){for(var E="",S=0,U=I.length;S<U;S++)I.charCodeAt(S)>127?E+="x":E+=I[S];if(!E.match(p)){var L=R.slice(0,B),M=R.slice(B+1),x=I.match(g);x&&(L.push(x[1]),M.unshift(x[2])),M.length&&(A="/"+M.join(".")+A),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),F||(this.hostname=r.toASCII(this.hostname));var D=this.port?":"+this.port:"",K=this.hostname||"";this.host=K+D,this.href+=this.host,F&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==A[0]&&(A="/"+A))}if(!y[_])for(B=0,q=d.length;B<q;B++){var k=d[B];if(-1!==A.indexOf(k)){var G=encodeURIComponent(k);G===k&&(G=escape(k)),A=A.split(k).join(G)}}var z=A.indexOf("#");-1!==z&&(this.hash=A.substr(z),A=A.slice(0,z));var X=A.indexOf("?");if(-1!==X?(this.search=A.substr(X),this.query=A.substr(X+1),t&&(this.query=b.parse(this.query)),A=A.slice(0,X)):t&&(this.search="",this.query={}),A&&(this.pathname=A),m[_]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){D=this.pathname||"";var Y=this.search||"";this.path=D+Y}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,i="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&a.isObject(this.query)&&Object.keys(this.query).length&&(i=b.stringify(this.query));var s=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||m[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+o+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},o.prototype.resolve=function(e){return this.resolveObject(A(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(a.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var n=new o,r=Object.keys(this),i=0;i<r.length;i++){var s=r[i];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var c=Object.keys(e),u=0;u<c.length;u++){var d=c[u];"protocol"!==d&&(n[d]=e[d])}return m[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!m[e.protocol]){for(var h=Object.keys(e),l=0;l<h.length;l++){var p=h[l];n[p]=e[p]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||f[e.protocol])n.pathname=e.pathname;else{for(var g=(e.pathname||"").split("/");g.length&&!(e.host=g.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==g[0]&&g.unshift(""),g.length<2&&g.unshift(""),n.pathname=g.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var y=n.pathname||"",b=n.search||"";n.path=y+b}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var A=n.pathname&&"/"===n.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),T=w||A||n.host&&e.pathname,_=T,v=n.pathname&&n.pathname.split("/")||[],j=(g=e.pathname&&e.pathname.split("/")||[],n.protocol&&!m[n.protocol]);if(j&&(n.hostname="",n.port=null,n.host&&(""===v[0]?v[0]=n.host:v.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===g[0]?g[0]=e.host:g.unshift(e.host)),e.host=null),T=T&&(""===g[0]||""===v[0])),w)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,v=g;else if(g.length)v||(v=[]),v.pop(),v=v.concat(g),n.search=e.search,n.query=e.query;else if(!a.isNullOrUndefined(e.search))return j&&(n.hostname=n.host=v.shift(),(F=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=F.shift(),n.host=n.hostname=F.shift())),n.search=e.search,n.query=e.query,a.isNull(n.pathname)&&a.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!v.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=v.slice(-1)[0],P=(n.host||e.host||v.length>1)&&("."===C||".."===C)||""===C,B=0,O=v.length;O>=0;O--)"."===(C=v[O])?v.splice(O,1):".."===C?(v.splice(O,1),B++):B&&(v.splice(O,1),B--);if(!T&&!_)for(;B--;B)v.unshift("..");!T||""===v[0]||v[0]&&"/"===v[0].charAt(0)||v.unshift(""),P&&"/"!==v.join("/").substr(-1)&&v.push("");var F,R=""===v[0]||v[0]&&"/"===v[0].charAt(0);return j&&(n.hostname=n.host=R?"":v.length?v.shift():"",(F=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=F.shift(),n.host=n.hostname=F.shift())),(T=T||n.host&&v.length)&&!R&&v.unshift(""),v.length?n.pathname=v.join("/"):(n.pathname=null,n.path=null),a.isNull(n.pathname)&&a.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},502:e=>{"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r=n(465);ynab=r})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! https://mths.be/punycode v1.3.2 by @mathias */
|
package/dist/esm/api.d.ts
CHANGED
|
@@ -76,11 +76,11 @@ export interface Account {
|
|
|
76
76
|
*/
|
|
77
77
|
name: string;
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
80
|
-
* @type {
|
|
79
|
+
*
|
|
80
|
+
* @type {AccountType}
|
|
81
81
|
* @memberof Account
|
|
82
82
|
*/
|
|
83
|
-
type:
|
|
83
|
+
type: AccountType;
|
|
84
84
|
/**
|
|
85
85
|
* Whether this account is on budget or not
|
|
86
86
|
* @type {boolean}
|
|
@@ -142,29 +142,6 @@ export interface Account {
|
|
|
142
142
|
*/
|
|
143
143
|
deleted: boolean;
|
|
144
144
|
}
|
|
145
|
-
/**
|
|
146
|
-
* @export
|
|
147
|
-
* @namespace Account
|
|
148
|
-
*/
|
|
149
|
-
export declare namespace Account {
|
|
150
|
-
/**
|
|
151
|
-
* @export
|
|
152
|
-
* @enum {string}
|
|
153
|
-
*/
|
|
154
|
-
enum TypeEnum {
|
|
155
|
-
Checking,
|
|
156
|
-
Savings,
|
|
157
|
-
Cash,
|
|
158
|
-
CreditCard,
|
|
159
|
-
LineOfCredit,
|
|
160
|
-
OtherAsset,
|
|
161
|
-
OtherLiability,
|
|
162
|
-
PayPal,
|
|
163
|
-
MerchantAccount,
|
|
164
|
-
InvestmentAccount,
|
|
165
|
-
Mortgage
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
145
|
/**
|
|
169
146
|
*
|
|
170
147
|
* @export
|
|
@@ -191,6 +168,26 @@ export interface AccountResponseData {
|
|
|
191
168
|
*/
|
|
192
169
|
account: Account;
|
|
193
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* The type of account
|
|
173
|
+
* @export
|
|
174
|
+
* @enum {string}
|
|
175
|
+
*/
|
|
176
|
+
export declare enum AccountType {
|
|
177
|
+
Checking,
|
|
178
|
+
Savings,
|
|
179
|
+
Cash,
|
|
180
|
+
CreditCard,
|
|
181
|
+
LineOfCredit,
|
|
182
|
+
OtherAsset,
|
|
183
|
+
OtherLiability,
|
|
184
|
+
Mortgage,
|
|
185
|
+
AutoLoan,
|
|
186
|
+
StudentLoan,
|
|
187
|
+
PersonalLoan,
|
|
188
|
+
MedicalDebt,
|
|
189
|
+
OtherDebt
|
|
190
|
+
}
|
|
194
191
|
/**
|
|
195
192
|
*
|
|
196
193
|
* @export
|
|
@@ -611,7 +608,8 @@ export declare namespace Category {
|
|
|
611
608
|
TB,
|
|
612
609
|
TBD,
|
|
613
610
|
MF,
|
|
614
|
-
NEED
|
|
611
|
+
NEED,
|
|
612
|
+
DEBT
|
|
615
613
|
}
|
|
616
614
|
}
|
|
617
615
|
/**
|
|
@@ -880,7 +878,7 @@ export interface MonthSummary {
|
|
|
880
878
|
*/
|
|
881
879
|
note?: string | null;
|
|
882
880
|
/**
|
|
883
|
-
* The total amount of transactions categorized to 'Inflow:
|
|
881
|
+
* The total amount of transactions categorized to 'Inflow: Ready to Assign' in the month
|
|
884
882
|
* @type {number}
|
|
885
883
|
* @memberof MonthSummary
|
|
886
884
|
*/
|
|
@@ -892,13 +890,13 @@ export interface MonthSummary {
|
|
|
892
890
|
*/
|
|
893
891
|
budgeted: number;
|
|
894
892
|
/**
|
|
895
|
-
* The total amount of transactions in the month, excluding those categorized to 'Inflow:
|
|
893
|
+
* The total amount of transactions in the month, excluding those categorized to 'Inflow: Ready to Assign'
|
|
896
894
|
* @type {number}
|
|
897
895
|
* @memberof MonthSummary
|
|
898
896
|
*/
|
|
899
897
|
activity: number;
|
|
900
898
|
/**
|
|
901
|
-
* The available amount for '
|
|
899
|
+
* The available amount for 'Ready to Assign'
|
|
902
900
|
* @type {number}
|
|
903
901
|
* @memberof MonthSummary
|
|
904
902
|
*/
|
|
@@ -1107,11 +1105,11 @@ export interface SaveAccount {
|
|
|
1107
1105
|
*/
|
|
1108
1106
|
name: string;
|
|
1109
1107
|
/**
|
|
1110
|
-
*
|
|
1111
|
-
* @type {
|
|
1108
|
+
*
|
|
1109
|
+
* @type {AccountType}
|
|
1112
1110
|
* @memberof SaveAccount
|
|
1113
1111
|
*/
|
|
1114
|
-
type:
|
|
1112
|
+
type: AccountType;
|
|
1115
1113
|
/**
|
|
1116
1114
|
* The current balance of the account in milliunits format
|
|
1117
1115
|
* @type {number}
|
|
@@ -1119,25 +1117,6 @@ export interface SaveAccount {
|
|
|
1119
1117
|
*/
|
|
1120
1118
|
balance: number;
|
|
1121
1119
|
}
|
|
1122
|
-
/**
|
|
1123
|
-
* @export
|
|
1124
|
-
* @namespace SaveAccount
|
|
1125
|
-
*/
|
|
1126
|
-
export declare namespace SaveAccount {
|
|
1127
|
-
/**
|
|
1128
|
-
* @export
|
|
1129
|
-
* @enum {string}
|
|
1130
|
-
*/
|
|
1131
|
-
enum TypeEnum {
|
|
1132
|
-
Checking,
|
|
1133
|
-
Savings,
|
|
1134
|
-
CreditCard,
|
|
1135
|
-
Cash,
|
|
1136
|
-
LineOfCredit,
|
|
1137
|
-
OtherAsset,
|
|
1138
|
-
OtherLiability
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
1120
|
/**
|
|
1142
1121
|
*
|
|
1143
1122
|
* @export
|
|
@@ -2323,7 +2302,7 @@ export interface MonthDetail {
|
|
|
2323
2302
|
*/
|
|
2324
2303
|
note?: string | null;
|
|
2325
2304
|
/**
|
|
2326
|
-
* The total amount of transactions categorized to 'Inflow:
|
|
2305
|
+
* The total amount of transactions categorized to 'Inflow: Ready to Assign' in the month
|
|
2327
2306
|
* @type {number}
|
|
2328
2307
|
* @memberof MonthDetail
|
|
2329
2308
|
*/
|
|
@@ -2335,13 +2314,13 @@ export interface MonthDetail {
|
|
|
2335
2314
|
*/
|
|
2336
2315
|
budgeted: number;
|
|
2337
2316
|
/**
|
|
2338
|
-
* The total amount of transactions in the month, excluding those categorized to 'Inflow:
|
|
2317
|
+
* The total amount of transactions in the month, excluding those categorized to 'Inflow: Ready to Assign'
|
|
2339
2318
|
* @type {number}
|
|
2340
2319
|
* @memberof MonthDetail
|
|
2341
2320
|
*/
|
|
2342
2321
|
activity: number;
|
|
2343
2322
|
/**
|
|
2344
|
-
* The available amount for '
|
|
2323
|
+
* The available amount for 'Ready to Assign'
|
|
2345
2324
|
* @type {number}
|
|
2346
2325
|
* @memberof MonthDetail
|
|
2347
2326
|
*/
|
package/dist/esm/api.js
CHANGED
|
@@ -59,11 +59,16 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
59
59
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
|
+
// Polyfill fetch globally - this makes it easier to override with modules like fetch-mock.
|
|
63
|
+
var fetchPonyfill = require("fetch-ponyfill")();
|
|
64
|
+
if (!globalThis.fetch) {
|
|
65
|
+
globalThis.fetch = fetchPonyfill.fetch;
|
|
66
|
+
globalThis.Response = fetchPonyfill.Response;
|
|
67
|
+
globalThis.Headers = fetchPonyfill.Headers;
|
|
68
|
+
globalThis.Request = fetchPonyfill.Request;
|
|
69
|
+
}
|
|
62
70
|
import * as url from "url";
|
|
63
|
-
|
|
64
|
-
// That makes it easier to override with modules like fetch-mock
|
|
65
|
-
require("portable-fetch");
|
|
66
|
-
var USER_AGENT = "api_client/js/1.24.0";
|
|
71
|
+
var USER_AGENT = "api_client/js/1.29.0";
|
|
67
72
|
function convertDateToFullDateStringFormat(date) {
|
|
68
73
|
// Convert to RFC 3339 "full-date" format, like "2017-11-27"
|
|
69
74
|
if (date instanceof Date) {
|
|
@@ -115,30 +120,26 @@ var RequiredError = /** @class */ (function (_super) {
|
|
|
115
120
|
}(Error));
|
|
116
121
|
export { RequiredError };
|
|
117
122
|
/**
|
|
123
|
+
* The type of account
|
|
118
124
|
* @export
|
|
119
|
-
* @
|
|
125
|
+
* @enum {string}
|
|
120
126
|
*/
|
|
121
|
-
export var
|
|
122
|
-
(function (
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
TypeEnum[TypeEnum["MerchantAccount"] = 'merchantAccount'] = "MerchantAccount";
|
|
138
|
-
TypeEnum[TypeEnum["InvestmentAccount"] = 'investmentAccount'] = "InvestmentAccount";
|
|
139
|
-
TypeEnum[TypeEnum["Mortgage"] = 'mortgage'] = "Mortgage";
|
|
140
|
-
})(TypeEnum = Account.TypeEnum || (Account.TypeEnum = {}));
|
|
141
|
-
})(Account || (Account = {}));
|
|
127
|
+
export var AccountType;
|
|
128
|
+
(function (AccountType) {
|
|
129
|
+
AccountType[AccountType["Checking"] = 'checking'] = "Checking";
|
|
130
|
+
AccountType[AccountType["Savings"] = 'savings'] = "Savings";
|
|
131
|
+
AccountType[AccountType["Cash"] = 'cash'] = "Cash";
|
|
132
|
+
AccountType[AccountType["CreditCard"] = 'creditCard'] = "CreditCard";
|
|
133
|
+
AccountType[AccountType["LineOfCredit"] = 'lineOfCredit'] = "LineOfCredit";
|
|
134
|
+
AccountType[AccountType["OtherAsset"] = 'otherAsset'] = "OtherAsset";
|
|
135
|
+
AccountType[AccountType["OtherLiability"] = 'otherLiability'] = "OtherLiability";
|
|
136
|
+
AccountType[AccountType["Mortgage"] = 'mortgage'] = "Mortgage";
|
|
137
|
+
AccountType[AccountType["AutoLoan"] = 'autoLoan'] = "AutoLoan";
|
|
138
|
+
AccountType[AccountType["StudentLoan"] = 'studentLoan'] = "StudentLoan";
|
|
139
|
+
AccountType[AccountType["PersonalLoan"] = 'personalLoan'] = "PersonalLoan";
|
|
140
|
+
AccountType[AccountType["MedicalDebt"] = 'medicalDebt'] = "MedicalDebt";
|
|
141
|
+
AccountType[AccountType["OtherDebt"] = 'otherDebt'] = "OtherDebt";
|
|
142
|
+
})(AccountType || (AccountType = {}));
|
|
142
143
|
/**
|
|
143
144
|
* @export
|
|
144
145
|
* @namespace Category
|
|
@@ -155,29 +156,9 @@ export var Category;
|
|
|
155
156
|
GoalTypeEnum[GoalTypeEnum["TBD"] = 'TBD'] = "TBD";
|
|
156
157
|
GoalTypeEnum[GoalTypeEnum["MF"] = 'MF'] = "MF";
|
|
157
158
|
GoalTypeEnum[GoalTypeEnum["NEED"] = 'NEED'] = "NEED";
|
|
159
|
+
GoalTypeEnum[GoalTypeEnum["DEBT"] = 'DEBT'] = "DEBT";
|
|
158
160
|
})(GoalTypeEnum = Category.GoalTypeEnum || (Category.GoalTypeEnum = {}));
|
|
159
161
|
})(Category || (Category = {}));
|
|
160
|
-
/**
|
|
161
|
-
* @export
|
|
162
|
-
* @namespace SaveAccount
|
|
163
|
-
*/
|
|
164
|
-
export var SaveAccount;
|
|
165
|
-
(function (SaveAccount) {
|
|
166
|
-
/**
|
|
167
|
-
* @export
|
|
168
|
-
* @enum {string}
|
|
169
|
-
*/
|
|
170
|
-
var TypeEnum;
|
|
171
|
-
(function (TypeEnum) {
|
|
172
|
-
TypeEnum[TypeEnum["Checking"] = 'checking'] = "Checking";
|
|
173
|
-
TypeEnum[TypeEnum["Savings"] = 'savings'] = "Savings";
|
|
174
|
-
TypeEnum[TypeEnum["CreditCard"] = 'creditCard'] = "CreditCard";
|
|
175
|
-
TypeEnum[TypeEnum["Cash"] = 'cash'] = "Cash";
|
|
176
|
-
TypeEnum[TypeEnum["LineOfCredit"] = 'lineOfCredit'] = "LineOfCredit";
|
|
177
|
-
TypeEnum[TypeEnum["OtherAsset"] = 'otherAsset'] = "OtherAsset";
|
|
178
|
-
TypeEnum[TypeEnum["OtherLiability"] = 'otherLiability'] = "OtherLiability";
|
|
179
|
-
})(TypeEnum = SaveAccount.TypeEnum || (SaveAccount.TypeEnum = {}));
|
|
180
|
-
})(SaveAccount || (SaveAccount = {}));
|
|
181
162
|
/**
|
|
182
163
|
* @export
|
|
183
164
|
* @namespace SaveTransaction
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ynab",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.0",
|
|
4
4
|
"description": "YNAB API Javascript (Node) Library",
|
|
5
5
|
"author": "You Need a Budget, LLC",
|
|
6
6
|
"keywords": [
|
|
@@ -22,32 +22,35 @@
|
|
|
22
22
|
"type": "git",
|
|
23
23
|
"url": "https://github.com/ynab/ynab-sdk-js.git"
|
|
24
24
|
},
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": "<17.0.0"
|
|
27
|
+
},
|
|
25
28
|
"scripts": {
|
|
26
|
-
"generate": "npx
|
|
27
|
-
"build": "tsc -b src/ test/ examples/ && tsc -
|
|
29
|
+
"generate": "npx jsh ./.swagger-codegen/generate.js",
|
|
30
|
+
"build": "tsc -b src/ test/ examples/ && tsc -b src/tsconfig.esm.json && webpack --mode production && npm run build_examples",
|
|
28
31
|
"build_examples": "tsc -b examples/",
|
|
29
32
|
"test": "TS_NODE_PROJECT=./test/tsconfig.json mocha --reporter spec --require ts-node/register/type-check 'test/**/*.ts'",
|
|
30
33
|
"release": "npm run build && npm run test && git add dist/* && git commit -m 'Build dist/'; npm-github-release"
|
|
31
34
|
},
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"portable-fetch": "^3.0.0"
|
|
34
|
-
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/chai": "^4.2.12",
|
|
37
37
|
"@types/fetch-mock": "^7.3.2",
|
|
38
|
-
"@types/isomorphic-fetch": "0.0.35",
|
|
39
38
|
"@types/mocha": "^8.0.2",
|
|
40
39
|
"@types/node": "^14.0.27",
|
|
41
40
|
"chai": "^4.2.0",
|
|
42
41
|
"fetch-mock": "^9.10.6",
|
|
43
|
-
"
|
|
42
|
+
"jsh": "0.34.0",
|
|
44
43
|
"mocha": "^8.1.1",
|
|
45
44
|
"npm-github-release": "^0.13.0",
|
|
46
45
|
"swagger-model-validator": "^3.0.19",
|
|
47
46
|
"ts-loader": "^8.0.2",
|
|
48
47
|
"ts-node": "^8.10.2",
|
|
49
48
|
"typescript": "^3.9.7",
|
|
50
|
-
"
|
|
49
|
+
"url": "^0.11.0",
|
|
50
|
+
"webpack": "^5.74.0",
|
|
51
51
|
"webpack-cli": "^3.3.12"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"fetch-ponyfill": "^7.1.0"
|
|
52
55
|
}
|
|
53
56
|
}
|