@orbis-systems/orbis-api-clients 0.4.3 → 0.4.5

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.
@@ -1,2 +1,1063 @@
1
- import e from"auto-bind";import{jwtDecode as t}from"jwt-decode";import s,{isAxiosError as r}from"axios";import a from"axios-better-stacktrace";import{isNil as i,merge as n}from"lodash";function o(e,t,s,r){Object.defineProperty(e,t,{get:s,set:r,enumerable:!0,configurable:!0})}function u(e,t){return Object.keys(t).forEach(function(s){"default"===s||"__esModule"===s||Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[s]}})}),e}o({},"MiddlewareApi",()=>J);class c{constructor(t){this.apiClient=t,e(this)}getApiClient(){return this.apiClient}}var h,l,p=((h={}).Json="application/json",h.FormData="multipart/form-data",h.UrlEncoded="application/x-www-form-urlencoded",h.Text="text/plain",h);class d{constructor(t){this.config=t,e(this),this.storage=t.storage??sessionStorage,this.axiosInstance=s.create({baseURL:t.baseUrl,headers:{"Content-Type":"application/json",...t.defaultHeaders}}),a(this.axiosInstance)}stringifyFormItem(e){return"object"==typeof e&&null!==e?JSON.stringify(e):`${e}`}createFormData(e){return e instanceof FormData?e:Object.keys(e).reduce((t,s)=>{let r=e[s];for(let e of r instanceof Array?r:[r]){let r=e instanceof Blob||e instanceof File;t.append(s,r?e:this.stringifyFormItem(e))}return t},new FormData)}async request(e){let{contentType:t,data:s}=e;i(s)||("multipart/form-data"===t&&"object"==typeof s&&(e.data=this.createFormData(s)),"text/plain"===t&&"string"!=typeof s&&(e.data=JSON.stringify(s)));let a=n(e.secure??this.config.defaultSecure?this.prepareAuthRequestConfig():{},t?{headers:{"Content-Type":t}}:{},e);try{let{data:e,status:t,statusText:s}=await this.axiosInstance.request(a);return{success:!0,data:e,status:t,statusText:s}}catch(t){if(!this.config.errorHandling)throw t;let e={success:!1,status:-1,statusText:String(t),error:t};return r(t)&&(this.config.onAxiosError?.(t),e.data=t.response?.data,e.status=t.response?.status??e.status,e.statusText=t.response?.statusText??e.statusText),this.config.onError?.(t),e}}get(e,t){return this.request({...t,method:"GET",url:e})}delete(e,t){return this.request({...t,method:"DELETE",url:e})}head(e,t){return this.request({...t,method:"HEAD",url:e})}options(e,t){return this.request({...t,method:"OPTIONS",url:e})}post(e,t,s){return this.request({...s,method:"POST",url:e,data:t})}put(e,t,s){return this.request({...s,method:"PUT",url:e,data:t})}patch(e,t,s){return this.request({...s,method:"PATCH",url:e,data:t})}getAxios(){return this.axiosInstance}setAuthData(e){this.storage.setItem(this.config.authDataStorageKey||"auth",JSON.stringify(e))}getAuthData(){let e=this.storage.getItem(this.config.authDataStorageKey||"auth");return e?JSON.parse(e):null}getConfig(){return this.config}}class T extends d{constructor(e){super(e),this.config=e}getConfig(){return super.getConfig()}prepareAuthRequestConfig(){let{accessToken:e}=this.getAuthData()||{};return e?{headers:{Authorization:`${this.config.authSchema??"Bearer"} ${e}`}}:(console.warn("No access token found. Please set auth data after authorization."),{})}scheduleTokenRenewal(e){let s;this.cancelTokenRenewal();let r=this.getAuthData();try{s=t(r?.accessToken||"")}catch(e){console.error(e)}if(!s||!s.exp){console.warn("Could not schedule token renewal: invalid expiration time.");return}let a=1e3*s.exp-Date.now();this.tokenRenewalTimeout=setTimeout(async()=>{let t=await e();this.setAuthData(t),this.scheduleTokenRenewal(e)},a-6e4)}cancelTokenRenewal(){clearTimeout(this.tokenRenewalTimeout)}}var m={},f={};o(f,"AttributeApi",()=>C);class C{constructor(t){this.apiClient=t,e(this)}getAttributeValues(e){return this.apiClient.request({...e,url:"/v1/attributes",method:"GET",secure:!0,responseType:"json"})}getPublicAttributeValue(e,t){return this.apiClient.request({...t,url:`/v1/attributes/${e}`,method:"GET",secure:!0,responseType:"json"})}}var y={};o(y,"AuthenticationApi",()=>g);class g{constructor(t){this.apiClient=t,e(this)}authenticate(e,t){return this.apiClient.request({...t,url:"/v1/authenticate",method:"POST",secure:!1,headers:e,responseType:"json"})}refresh(e){return this.apiClient.request({...e,url:"/v1/refresh",method:"POST",secure:!0,responseType:"json"})}invalidate(e){return this.apiClient.request({...e,url:"/v1/invalidate",method:"POST",secure:!0})}}var v={};o(v,"AvatarApi",()=>A);class A{constructor(t){this.apiClient=t,e(this)}getUserAvatar(e,t){return this.apiClient.request({...t,url:`/v1/avatars/users/${e}`,method:"GET",secure:!0,responseType:"blob"})}uploadUserAvatar(e,t,s){return this.apiClient.request({...s,url:`/v1/avatars/users/${e}`,method:"POST",data:t,secure:!0,contentType:p.FormData})}deleteUserAvatar(e,t){return this.apiClient.request({...t,url:`/v1/avatars/users/${e}`,method:"DELETE",secure:!0})}getAccountAvatar(e,t){return this.apiClient.request({...t,url:`/v1/avatars/accounts/${e}`,method:"GET",secure:!0,responseType:"blob"})}uploadAccountAvatar(e,t,s){return this.apiClient.request({...s,url:`/v1/avatars/accounts/${e}`,method:"POST",data:t,secure:!0,contentType:p.FormData})}deleteAccountAvatar(e,t){return this.apiClient.request({...t,url:`/v1/avatars/accounts/${e}`,method:"DELETE",secure:!0})}}var $={};o($,"ChartApi",()=>w);class w{constructor(t){this.apiClient=t,e(this)}getChartLayouts(e){return this.apiClient.request({...e,url:"/v1/charts/layouts",method:"GET",secure:!0,responseType:"json"})}updateChartLayout(e,t){return this.apiClient.request({...t,url:"/v1/charts/layouts",method:"PUT",data:e,secure:!0,contentType:p.Json,responseType:"json"})}getChartLayoutDetails(e,t){return this.apiClient.request({...t,url:`/v1/charts/layouts/${e}`,method:"GET",secure:!0,responseType:"json"})}deleteChartLayout(e,t){return this.apiClient.request({...t,url:`/v1/charts/layouts/${e}`,method:"DELETE",secure:!0})}getIndicatorTemplates(e){return this.apiClient.request({...e,url:"/v1/charts/indicator-templates",method:"GET",secure:!0,responseType:"json"})}updateIndicatorTemplate(e,t){return this.apiClient.request({...t,url:"/v1/charts/indicator-templates",method:"PUT",data:e,secure:!0,contentType:p.Json,responseType:"json"})}getIndicatorTemplateDetails(e,t){return this.apiClient.request({...t,url:`/v1/charts/indicator-templates/${e}`,method:"GET",secure:!0,responseType:"json"})}deleteIndicatorTemplate(e,t){return this.apiClient.request({...t,url:`/v1/charts/indicator-templates/${e}`,method:"DELETE",secure:!0})}getChartTemplates(e){return this.apiClient.request({...e,url:"/v1/charts/templates",method:"GET",secure:!0,responseType:"json"})}updateChartTemplate(e,t){return this.apiClient.request({...t,url:"/v1/charts/templates",method:"PUT",data:e,secure:!0,contentType:p.Json,responseType:"json"})}getChartTemplateDetails(e,t){return this.apiClient.request({...t,url:`/v1/charts/templates/${e}`,method:"GET",secure:!0,responseType:"json"})}deleteChartTemplate(e,t){return this.apiClient.request({...t,url:`/v1/charts/templates/${e}`,method:"DELETE",secure:!0})}}var E={};o(E,"MessageApi",()=>q);class q{constructor(t){this.apiClient=t,e(this)}getMessages(e,t){return this.apiClient.request({...t,url:"/v1/messages",method:"GET",params:e,secure:!0,responseType:"json"})}markAsSeen(e){return this.apiClient.request({...e,url:"/v1/messages/mark-as-seen",method:"PATCH",secure:!0})}}var b={};o(b,"PreferenceApi",()=>x);class x{constructor(t){this.apiClient=t,e(this)}getPreferences(e){return this.apiClient.request({...e,url:"/v1/preferences",method:"GET",secure:!0,responseType:"json"})}savePreferences(e){return this.apiClient.request({...e,url:"/v1/preferences",method:"POST",secure:!0,responseType:"json"})}}var j={};o(j,"MiddlewareWatchlistEntryDtoTypeEnum",()=>D);var D=((l={}).Equity="equity",l.Option="option",l.Crypto="crypto",l.Bond="bond",l.MutualFund="mutualFund",l),P={};o(P,"VersioningApi",()=>k);class k{constructor(t){this.apiClient=t,e(this)}getAppVersion(e,t){return this.apiClient.request({...t,url:`/versioning/${e}`,method:"GET",secure:!1,responseType:"json"})}updateAppVersion(e,t,s){return this.apiClient.request({...s,url:`/versioning/${e}`,method:"POST",data:t,secure:!1,contentType:p.Json})}}var O={};o(O,"WatchlistApi",()=>S);class S{constructor(t){this.apiClient=t,e(this)}getAllWatchlists(e){return this.apiClient.request({...e,url:"/v1/watchlists",method:"GET",secure:!0,responseType:"json"})}createWatchlist(e,t){return this.apiClient.request({...t,url:"/v1/watchlists",method:"POST",data:e,secure:!0,contentType:p.Json,responseType:"json"})}getWatchlist(e,t){return this.apiClient.request({...t,url:`/v1/watchlists/${e}`,method:"GET",secure:!0,responseType:"json"})}updateWatchlist(e,t,s){return this.apiClient.request({...s,url:`/v1/watchlists/${e}`,method:"PUT",data:t,secure:!0,contentType:p.Json,responseType:"json"})}deleteWatchlist(e,t){return this.apiClient.request({...t,url:`/v1/watchlists/${e}`,method:"DELETE",secure:!0})}addWatchlistEntries(e,t,s){return this.apiClient.request({...s,url:`/v1/watchlists/${e}/entries`,method:"POST",data:t,secure:!0,contentType:p.Json,responseType:"json"})}removeWatchlistEntries(e,t,s){return this.apiClient.request({...s,url:`/v1/watchlists/${e}/entries`,method:"DELETE",data:t,secure:!0,contentType:p.Json,responseType:"json"})}updateWatchlistEntries(e,t,s){return this.apiClient.request({...s,url:`/v1/watchlists/${e}/entries`,method:"PUT",data:t,secure:!0,contentType:p.Json,responseType:"json"})}updateWatchlistOrders(e,t){return this.apiClient.request({...t,url:"/v1/watchlists/orders",method:"POST",data:e,secure:!0,contentType:p.Json})}importWatchmenWatchlists(e){return this.apiClient.request({...e,url:"/v1/watchlists/import",method:"POST",secure:!0})}}u(m,f),u(m,y),u(m,v),u(m,$),u(m,E),u(m,b),u(m,j),u(m,P),u(m,O);class G extends g{constructor(e){super(e),this.apiClient.scheduleTokenRenewal(this.renewToken)}async authenticate(e,t){let s=await super.authenticate(e,{...t,withCredentials:!0});return s.success&&(this.apiClient.setAuthData(s.data),this.apiClient.scheduleTokenRenewal(this.renewToken)),s}async renewToken(){let e=this.apiClient.getAuthData()?.refreshToken;if(!e)throw Error("Refresh token not found");let t=await this.refresh({withCredentials:!0,headers:{Authorization:`${this.apiClient.getConfig().authSchema??"Bearer"} ${e}`}});if(t.success)return{accessToken:t.data.accessToken,refreshToken:t.data.refreshToken};throw Error(`Could not renew token: ${String(t.error)}`)}}class J extends c{constructor(e){super(new T(e)),this.config=e,this.attribute=new C(this.apiClient),this.authentication=new G(this.apiClient),this.avatar=new A(this.apiClient),this.chart=new w(this.apiClient),this.message=new q(this.apiClient),this.preference=new x(this.apiClient),this.versioning=new k(this.apiClient),this.watchlist=new S(this.apiClient)}}export{J as MiddlewareApi,C as AttributeApi,g as AuthenticationApi,A as AvatarApi,w as ChartApi,q as MessageApi,x as PreferenceApi,D as MiddlewareWatchlistEntryDtoTypeEnum,k as VersioningApi,S as WatchlistApi};
1
+ import $cAFGd$autobind from "auto-bind";
2
+ import {Mutex as $cAFGd$Mutex, E_CANCELED as $cAFGd$E_CANCELED} from "async-mutex";
3
+ import {consola as $cAFGd$consola} from "consola";
4
+ import {isBefore as $cAFGd$isBefore, subMinutes as $cAFGd$subMinutes} from "date-fns";
5
+ import {jwtDecode as $cAFGd$jwtDecode} from "jwt-decode";
6
+ import $cAFGd$axios, {isAxiosError as $cAFGd$isAxiosError} from "axios";
7
+ import $cAFGd$axiosbetterstacktrace from "axios-better-stacktrace";
8
+ import {isNil as $cAFGd$isNil, merge as $cAFGd$merge} from "lodash";
9
+
10
+
11
+ function $parcel$export(e, n, v, s) {
12
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
13
+ }
14
+
15
+ function $parcel$exportWildcard(dest, source) {
16
+ Object.keys(source).forEach(function(key) {
17
+ if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {
18
+ return;
19
+ }
20
+
21
+ Object.defineProperty(dest, key, {
22
+ enumerable: true,
23
+ get: function get() {
24
+ return source[key];
25
+ }
26
+ });
27
+ });
28
+
29
+ return dest;
30
+ }
31
+ var $59a349f17b48d4fa$exports = {};
32
+
33
+ $parcel$export($59a349f17b48d4fa$exports, "MiddlewareApi", () => $59a349f17b48d4fa$export$634e9891177d90f1);
34
+
35
+ class $001a7a5b1ca54b2d$export$3ad201792064a82b {
36
+ // request: ApiClient['request'];
37
+ // get: ApiClient['get'];
38
+ // delete: ApiClient['delete'];
39
+ // head: ApiClient['head'];
40
+ // options: ApiClient['options'];
41
+ // post: ApiClient['post'];
42
+ // put: ApiClient['put'];
43
+ // patch: ApiClient['patch'];
44
+ constructor(apiClient){
45
+ this.apiClient = apiClient;
46
+ (0, $cAFGd$autobind)(this);
47
+ // this.request = this.client.request;
48
+ // this.get = this.client.get;
49
+ // this.delete = this.client.delete;
50
+ // this.head = this.client.head;
51
+ // this.options = this.client.options;
52
+ // this.post = this.client.post;
53
+ // this.put = this.client.put;
54
+ // this.patch = this.client.patch;
55
+ // this.get = this.client.get;
56
+ }
57
+ getApiClient() {
58
+ return this.apiClient;
59
+ }
60
+ }
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+ var $e176194f300187e4$export$e2e108cbe2e4f865 = /*#__PURE__*/ function(ContentType) {
72
+ ContentType["Json"] = "application/json";
73
+ ContentType["FormData"] = "multipart/form-data";
74
+ ContentType["UrlEncoded"] = "application/x-www-form-urlencoded";
75
+ ContentType["Text"] = "text/plain";
76
+ return ContentType;
77
+ }({});
78
+ class $e176194f300187e4$export$4f22f74eddb7716a {
79
+ constructor(config){
80
+ this.config = config;
81
+ (0, $cAFGd$autobind)(this);
82
+ this.storage = config.storage ?? sessionStorage;
83
+ this.axiosInstance = (0, $cAFGd$axios).create({
84
+ baseURL: config.baseUrl,
85
+ headers: {
86
+ 'Content-Type': 'application/json',
87
+ ...config.defaultHeaders
88
+ }
89
+ });
90
+ (0, $cAFGd$axiosbetterstacktrace)(this.axiosInstance);
91
+ }
92
+ stringifyFormItem(formItem) {
93
+ if (typeof formItem === 'object' && formItem !== null) return JSON.stringify(formItem);
94
+ else return `${formItem}`;
95
+ }
96
+ createFormData(input) {
97
+ if (input instanceof FormData) return input;
98
+ return Object.keys(input).reduce((formData, key)=>{
99
+ const property = input[key];
100
+ const propertyContent = property instanceof Array ? property : [
101
+ property
102
+ ];
103
+ for (const formItem of propertyContent){
104
+ const isFileType = formItem instanceof Blob || formItem instanceof File;
105
+ formData.append(key, isFileType ? formItem : this.stringifyFormItem(formItem));
106
+ }
107
+ return formData;
108
+ }, new FormData());
109
+ }
110
+ async request(requestConfig) {
111
+ const { contentType: contentType, data: data } = requestConfig;
112
+ if (!(0, $cAFGd$isNil)(data)) {
113
+ if (contentType === "multipart/form-data" && typeof data === 'object') requestConfig.data = this.createFormData(data);
114
+ if (contentType === "text/plain" && typeof data !== 'string') requestConfig.data = JSON.stringify(data);
115
+ }
116
+ const mergedConfig = (0, $cAFGd$merge)(requestConfig.secure ?? this.config.defaultSecure ? await this.prepareAuthRequestConfig() : {}, contentType ? {
117
+ headers: {
118
+ 'Content-Type': contentType
119
+ }
120
+ } : {}, requestConfig);
121
+ try {
122
+ const { data: data, status: status, statusText: statusText } = await this.axiosInstance.request(mergedConfig);
123
+ return {
124
+ success: true,
125
+ data: data,
126
+ status: status,
127
+ statusText: statusText
128
+ };
129
+ } catch (error) {
130
+ if (!this.config.handleError && !requestConfig.handleError) throw error;
131
+ const result = {
132
+ success: false,
133
+ status: -1,
134
+ statusText: String(error),
135
+ error: error
136
+ };
137
+ if ((0, $cAFGd$isAxiosError)(error)) {
138
+ this.config.onAxiosError?.(error);
139
+ result.data = error.response?.data;
140
+ result.status = error.response?.status ?? result.status;
141
+ result.statusText = error.response?.statusText ?? result.statusText;
142
+ }
143
+ this.config.onError?.(error);
144
+ return result;
145
+ }
146
+ }
147
+ get(url, config) {
148
+ return this.request({
149
+ ...config,
150
+ method: 'GET',
151
+ url: url
152
+ });
153
+ }
154
+ delete(url, config) {
155
+ return this.request({
156
+ ...config,
157
+ method: 'DELETE',
158
+ url: url
159
+ });
160
+ }
161
+ head(url, config) {
162
+ return this.request({
163
+ ...config,
164
+ method: 'HEAD',
165
+ url: url
166
+ });
167
+ }
168
+ options(url, config) {
169
+ return this.request({
170
+ ...config,
171
+ method: 'OPTIONS',
172
+ url: url
173
+ });
174
+ }
175
+ post(url, data, config) {
176
+ return this.request({
177
+ ...config,
178
+ method: 'POST',
179
+ url: url,
180
+ data: data
181
+ });
182
+ }
183
+ put(url, data, config) {
184
+ return this.request({
185
+ ...config,
186
+ method: 'PUT',
187
+ url: url,
188
+ data: data
189
+ });
190
+ }
191
+ patch(url, data, config) {
192
+ return this.request({
193
+ ...config,
194
+ method: 'PATCH',
195
+ url: url,
196
+ data: data
197
+ });
198
+ }
199
+ getAxios() {
200
+ return this.axiosInstance;
201
+ }
202
+ setAuthData(data) {
203
+ this.storage.setItem(this.config.authDataStorageKey || 'auth', JSON.stringify(data));
204
+ }
205
+ getAuthData() {
206
+ const data = this.storage.getItem(this.config.authDataStorageKey || 'auth');
207
+ return data ? JSON.parse(data) : null;
208
+ }
209
+ getConfig() {
210
+ return this.config;
211
+ }
212
+ }
213
+
214
+
215
+ class $584c124673bb843e$export$f280b732bbc5934b extends (0, $e176194f300187e4$export$4f22f74eddb7716a) {
216
+ constructor(config){
217
+ super(config), this.config = config, this.lock = new (0, $cAFGd$Mutex)();
218
+ }
219
+ getConfig() {
220
+ return super.getConfig();
221
+ }
222
+ setRenewTokenCallback(renewTokenCallback) {
223
+ this.renewTokenCallback = renewTokenCallback;
224
+ }
225
+ async prepareAuthRequestConfig() {
226
+ let { accessToken: accessToken } = this.getAuthData() || {};
227
+ if (!accessToken) {
228
+ (0, $cAFGd$consola).warn('No access token found. Please set auth data after authorization.');
229
+ return {};
230
+ }
231
+ if (this.config.autoRenewToken !== false && this.isTokenExpired(accessToken)) try {
232
+ await this.lock.runExclusive(async ()=>{
233
+ (0, $cAFGd$consola).info("Token expired. Renewing\u2026");
234
+ await this.renewToken();
235
+ this.lock.cancel();
236
+ });
237
+ } catch (error) {
238
+ if (error === (0, $cAFGd$E_CANCELED)) accessToken = this.getAuthData()?.accessToken;
239
+ else throw error;
240
+ }
241
+ return {
242
+ headers: {
243
+ Authorization: `${this.config.authSchema ?? 'Bearer'} ${accessToken}`
244
+ }
245
+ };
246
+ }
247
+ isTokenExpired(token) {
248
+ const payload = (0, $cAFGd$jwtDecode)(token);
249
+ if (!payload.exp) return true;
250
+ return (0, $cAFGd$isBefore)((0, $cAFGd$subMinutes)(payload.exp * 1000, 5), Date.now());
251
+ }
252
+ async renewToken() {
253
+ if (!this.renewTokenCallback) throw new Error('No renew token callback provided');
254
+ const authData = await this.renewTokenCallback();
255
+ this.setAuthData(authData);
256
+ }
257
+ }
258
+
259
+
260
+ var $3bf589023d5ae0e7$exports = {};
261
+ var $baddfe4aead00de2$exports = {};
262
+
263
+ $parcel$export($baddfe4aead00de2$exports, "AttributeApi", () => $baddfe4aead00de2$export$4b5ccf64eb32db90);
264
+ /* eslint-disable */ /* tslint:disable */ /*
265
+ * ---------------------------------------------------------------
266
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
267
+ * ## ##
268
+ * ## AUTHOR: acacode ##
269
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
270
+ * ---------------------------------------------------------------
271
+ */
272
+ class $baddfe4aead00de2$export$4b5ccf64eb32db90 {
273
+ constructor(apiClient){
274
+ this.apiClient = apiClient;
275
+ (0, $cAFGd$autobind)(this);
276
+ }
277
+ /**
278
+ * @tags AttributeApi
279
+ * @name GetAttributeValues
280
+ * @request GET:/api/v1/attributes
281
+ * @secure
282
+ */ getAttributeValues(config) {
283
+ return this.apiClient.request({
284
+ ...config,
285
+ url: `/v1/attributes`,
286
+ method: 'GET',
287
+ secure: true,
288
+ responseType: 'json'
289
+ });
290
+ }
291
+ /**
292
+ * @tags AttributeApi
293
+ * @name GetPublicAttributeValue
294
+ * @request GET:/api/v1/attributes/{attributePublicId}
295
+ * @secure
296
+ */ getPublicAttributeValue(attributePublicId, config) {
297
+ return this.apiClient.request({
298
+ ...config,
299
+ url: `/v1/attributes/${attributePublicId}`,
300
+ method: 'GET',
301
+ secure: true,
302
+ responseType: 'json'
303
+ });
304
+ }
305
+ }
306
+
307
+
308
+ var $e8246e3069d2d6d5$exports = {};
309
+
310
+ $parcel$export($e8246e3069d2d6d5$exports, "AuthenticationApi", () => $e8246e3069d2d6d5$export$762f992a2f2efa56);
311
+ /* eslint-disable */ /* tslint:disable */ /*
312
+ * ---------------------------------------------------------------
313
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
314
+ * ## ##
315
+ * ## AUTHOR: acacode ##
316
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
317
+ * ---------------------------------------------------------------
318
+ */
319
+ class $e8246e3069d2d6d5$export$762f992a2f2efa56 {
320
+ constructor(apiClient){
321
+ this.apiClient = apiClient;
322
+ (0, $cAFGd$autobind)(this);
323
+ }
324
+ /**
325
+ * @tags AuthenticationApi
326
+ * @name Authenticate
327
+ * @request POST:/api/v1/authenticate
328
+ */ authenticate(headers, config) {
329
+ return this.apiClient.request({
330
+ ...config,
331
+ url: `/v1/authenticate`,
332
+ method: 'POST',
333
+ secure: false,
334
+ headers: headers,
335
+ responseType: 'json'
336
+ });
337
+ }
338
+ /**
339
+ * @description Must use `refreshToken` instead of `accessToken` in `Authorization` header
340
+ * @tags AuthenticationApi
341
+ * @name Refresh
342
+ * @request POST:/api/v1/refresh
343
+ * @secure
344
+ */ refresh(config) {
345
+ return this.apiClient.request({
346
+ ...config,
347
+ url: `/v1/refresh`,
348
+ method: 'POST',
349
+ secure: true,
350
+ responseType: 'json'
351
+ });
352
+ }
353
+ /**
354
+ * @tags AuthenticationApi
355
+ * @name Invalidate
356
+ * @request POST:/api/v1/invalidate
357
+ * @secure
358
+ */ invalidate(config) {
359
+ return this.apiClient.request({
360
+ ...config,
361
+ url: `/v1/invalidate`,
362
+ method: 'POST',
363
+ secure: true
364
+ });
365
+ }
366
+ }
367
+
368
+
369
+ var $eb0d2d1d09761fc9$exports = {};
370
+
371
+ $parcel$export($eb0d2d1d09761fc9$exports, "AvatarApi", () => $eb0d2d1d09761fc9$export$35ebcbc76ff5f1ef);
372
+ /* eslint-disable */ /* tslint:disable */ /*
373
+ * ---------------------------------------------------------------
374
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
375
+ * ## ##
376
+ * ## AUTHOR: acacode ##
377
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
378
+ * ---------------------------------------------------------------
379
+ */
380
+ /* eslint-disable */ /* tslint:disable */ /*
381
+ * ---------------------------------------------------------------
382
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
383
+ * ## ##
384
+ * ## AUTHOR: acacode ##
385
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
386
+ * ---------------------------------------------------------------
387
+ */
388
+
389
+
390
+ class $eb0d2d1d09761fc9$export$35ebcbc76ff5f1ef {
391
+ constructor(apiClient){
392
+ this.apiClient = apiClient;
393
+ (0, $cAFGd$autobind)(this);
394
+ }
395
+ /**
396
+ * @tags AvatarApi
397
+ * @name GetUserAvatar
398
+ * @request GET:/api/v1/avatars/users/{userId}
399
+ * @secure
400
+ */ getUserAvatar(userId, config) {
401
+ return this.apiClient.request({
402
+ ...config,
403
+ url: `/v1/avatars/users/${userId}`,
404
+ method: 'GET',
405
+ secure: true,
406
+ responseType: 'blob'
407
+ });
408
+ }
409
+ /**
410
+ * @tags AvatarApi
411
+ * @name UploadUserAvatar
412
+ * @request POST:/api/v1/avatars/users/{userId}
413
+ * @secure
414
+ */ uploadUserAvatar(userId, data, config) {
415
+ return this.apiClient.request({
416
+ ...config,
417
+ url: `/v1/avatars/users/${userId}`,
418
+ method: 'POST',
419
+ data: data,
420
+ secure: true,
421
+ contentType: (0, $e176194f300187e4$export$e2e108cbe2e4f865).FormData
422
+ });
423
+ }
424
+ /**
425
+ * @tags AvatarApi
426
+ * @name DeleteUserAvatar
427
+ * @request DELETE:/api/v1/avatars/users/{userId}
428
+ * @secure
429
+ */ deleteUserAvatar(userId, config) {
430
+ return this.apiClient.request({
431
+ ...config,
432
+ url: `/v1/avatars/users/${userId}`,
433
+ method: 'DELETE',
434
+ secure: true
435
+ });
436
+ }
437
+ /**
438
+ * @tags AvatarApi
439
+ * @name GetAccountAvatar
440
+ * @request GET:/api/v1/avatars/accounts/{accountId}
441
+ * @secure
442
+ */ getAccountAvatar(accountId, config) {
443
+ return this.apiClient.request({
444
+ ...config,
445
+ url: `/v1/avatars/accounts/${accountId}`,
446
+ method: 'GET',
447
+ secure: true,
448
+ responseType: 'blob'
449
+ });
450
+ }
451
+ /**
452
+ * @tags AvatarApi
453
+ * @name UploadAccountAvatar
454
+ * @request POST:/api/v1/avatars/accounts/{accountId}
455
+ * @secure
456
+ */ uploadAccountAvatar(accountId, data, config) {
457
+ return this.apiClient.request({
458
+ ...config,
459
+ url: `/v1/avatars/accounts/${accountId}`,
460
+ method: 'POST',
461
+ data: data,
462
+ secure: true,
463
+ contentType: (0, $e176194f300187e4$export$e2e108cbe2e4f865).FormData
464
+ });
465
+ }
466
+ /**
467
+ * @tags AvatarApi
468
+ * @name DeleteAccountAvatar
469
+ * @request DELETE:/api/v1/avatars/accounts/{accountId}
470
+ * @secure
471
+ */ deleteAccountAvatar(accountId, config) {
472
+ return this.apiClient.request({
473
+ ...config,
474
+ url: `/v1/avatars/accounts/${accountId}`,
475
+ method: 'DELETE',
476
+ secure: true
477
+ });
478
+ }
479
+ }
480
+
481
+
482
+ var $79142c23ace4c0bc$exports = {};
483
+
484
+ $parcel$export($79142c23ace4c0bc$exports, "ChartApi", () => $79142c23ace4c0bc$export$449dbf88fe955d16);
485
+ /* eslint-disable */ /* tslint:disable */ /*
486
+ * ---------------------------------------------------------------
487
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
488
+ * ## ##
489
+ * ## AUTHOR: acacode ##
490
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
491
+ * ---------------------------------------------------------------
492
+ */
493
+
494
+ class $79142c23ace4c0bc$export$449dbf88fe955d16 {
495
+ constructor(apiClient){
496
+ this.apiClient = apiClient;
497
+ (0, $cAFGd$autobind)(this);
498
+ }
499
+ /**
500
+ * @tags ChartApi
501
+ * @name GetChartLayouts
502
+ * @request GET:/api/v1/charts/layouts
503
+ * @secure
504
+ */ getChartLayouts(config) {
505
+ return this.apiClient.request({
506
+ ...config,
507
+ url: `/v1/charts/layouts`,
508
+ method: 'GET',
509
+ secure: true,
510
+ responseType: 'json'
511
+ });
512
+ }
513
+ /**
514
+ * @tags ChartApi
515
+ * @name UpdateChartLayout
516
+ * @request PUT:/api/v1/charts/layouts
517
+ * @secure
518
+ */ updateChartLayout(data, config) {
519
+ return this.apiClient.request({
520
+ ...config,
521
+ url: `/v1/charts/layouts`,
522
+ method: 'PUT',
523
+ data: data,
524
+ secure: true,
525
+ contentType: (0, $e176194f300187e4$export$e2e108cbe2e4f865).Json,
526
+ responseType: 'json'
527
+ });
528
+ }
529
+ /**
530
+ * @tags ChartApi
531
+ * @name GetChartLayoutDetails
532
+ * @request GET:/api/v1/charts/layouts/{chartId}
533
+ * @secure
534
+ */ getChartLayoutDetails(chartId, config) {
535
+ return this.apiClient.request({
536
+ ...config,
537
+ url: `/v1/charts/layouts/${chartId}`,
538
+ method: 'GET',
539
+ secure: true,
540
+ responseType: 'json'
541
+ });
542
+ }
543
+ /**
544
+ * @tags ChartApi
545
+ * @name DeleteChartLayout
546
+ * @request DELETE:/api/v1/charts/layouts/{chartId}
547
+ * @secure
548
+ */ deleteChartLayout(chartId, config) {
549
+ return this.apiClient.request({
550
+ ...config,
551
+ url: `/v1/charts/layouts/${chartId}`,
552
+ method: 'DELETE',
553
+ secure: true
554
+ });
555
+ }
556
+ /**
557
+ * @tags ChartApi
558
+ * @name GetIndicatorTemplates
559
+ * @request GET:/api/v1/charts/indicator-templates
560
+ * @secure
561
+ */ getIndicatorTemplates(config) {
562
+ return this.apiClient.request({
563
+ ...config,
564
+ url: `/v1/charts/indicator-templates`,
565
+ method: 'GET',
566
+ secure: true,
567
+ responseType: 'json'
568
+ });
569
+ }
570
+ /**
571
+ * @tags ChartApi
572
+ * @name UpdateIndicatorTemplate
573
+ * @request PUT:/api/v1/charts/indicator-templates
574
+ * @secure
575
+ */ updateIndicatorTemplate(data, config) {
576
+ return this.apiClient.request({
577
+ ...config,
578
+ url: `/v1/charts/indicator-templates`,
579
+ method: 'PUT',
580
+ data: data,
581
+ secure: true,
582
+ contentType: (0, $e176194f300187e4$export$e2e108cbe2e4f865).Json,
583
+ responseType: 'json'
584
+ });
585
+ }
586
+ /**
587
+ * @tags ChartApi
588
+ * @name GetIndicatorTemplateDetails
589
+ * @request GET:/api/v1/charts/indicator-templates/{templateName}
590
+ * @secure
591
+ */ getIndicatorTemplateDetails(templateName, config) {
592
+ return this.apiClient.request({
593
+ ...config,
594
+ url: `/v1/charts/indicator-templates/${templateName}`,
595
+ method: 'GET',
596
+ secure: true,
597
+ responseType: 'json'
598
+ });
599
+ }
600
+ /**
601
+ * @tags ChartApi
602
+ * @name DeleteIndicatorTemplate
603
+ * @request DELETE:/api/v1/charts/indicator-templates/{templateName}
604
+ * @secure
605
+ */ deleteIndicatorTemplate(templateName, config) {
606
+ return this.apiClient.request({
607
+ ...config,
608
+ url: `/v1/charts/indicator-templates/${templateName}`,
609
+ method: 'DELETE',
610
+ secure: true
611
+ });
612
+ }
613
+ /**
614
+ * @tags ChartApi
615
+ * @name GetChartTemplates
616
+ * @request GET:/api/v1/charts/templates
617
+ * @secure
618
+ */ getChartTemplates(config) {
619
+ return this.apiClient.request({
620
+ ...config,
621
+ url: `/v1/charts/templates`,
622
+ method: 'GET',
623
+ secure: true,
624
+ responseType: 'json'
625
+ });
626
+ }
627
+ /**
628
+ * @tags ChartApi
629
+ * @name UpdateChartTemplate
630
+ * @request PUT:/api/v1/charts/templates
631
+ * @secure
632
+ */ updateChartTemplate(data, config) {
633
+ return this.apiClient.request({
634
+ ...config,
635
+ url: `/v1/charts/templates`,
636
+ method: 'PUT',
637
+ data: data,
638
+ secure: true,
639
+ contentType: (0, $e176194f300187e4$export$e2e108cbe2e4f865).Json,
640
+ responseType: 'json'
641
+ });
642
+ }
643
+ /**
644
+ * @tags ChartApi
645
+ * @name GetChartTemplateDetails
646
+ * @request GET:/api/v1/charts/templates/{templateName}
647
+ * @secure
648
+ */ getChartTemplateDetails(templateName, config) {
649
+ return this.apiClient.request({
650
+ ...config,
651
+ url: `/v1/charts/templates/${templateName}`,
652
+ method: 'GET',
653
+ secure: true,
654
+ responseType: 'json'
655
+ });
656
+ }
657
+ /**
658
+ * @tags ChartApi
659
+ * @name DeleteChartTemplate
660
+ * @request DELETE:/api/v1/charts/templates/{templateName}
661
+ * @secure
662
+ */ deleteChartTemplate(templateName, config) {
663
+ return this.apiClient.request({
664
+ ...config,
665
+ url: `/v1/charts/templates/${templateName}`,
666
+ method: 'DELETE',
667
+ secure: true
668
+ });
669
+ }
670
+ }
671
+
672
+
673
+ var $5d1dcff56264ccdd$exports = {};
674
+
675
+ $parcel$export($5d1dcff56264ccdd$exports, "MessageApi", () => $5d1dcff56264ccdd$export$adfa0441784b848e);
676
+ /* eslint-disable */ /* tslint:disable */ /*
677
+ * ---------------------------------------------------------------
678
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
679
+ * ## ##
680
+ * ## AUTHOR: acacode ##
681
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
682
+ * ---------------------------------------------------------------
683
+ */
684
+ class $5d1dcff56264ccdd$export$adfa0441784b848e {
685
+ constructor(apiClient){
686
+ this.apiClient = apiClient;
687
+ (0, $cAFGd$autobind)(this);
688
+ }
689
+ /**
690
+ * @tags MessageApi
691
+ * @name GetMessages
692
+ * @request GET:/api/v1/messages
693
+ * @secure
694
+ */ getMessages(query, config) {
695
+ return this.apiClient.request({
696
+ ...config,
697
+ url: `/v1/messages`,
698
+ method: 'GET',
699
+ params: query,
700
+ secure: true,
701
+ responseType: 'json'
702
+ });
703
+ }
704
+ /**
705
+ * @tags MessageApi
706
+ * @name MarkAsSeen
707
+ * @request PATCH:/api/v1/messages/mark-as-seen
708
+ * @secure
709
+ */ markAsSeen(config) {
710
+ return this.apiClient.request({
711
+ ...config,
712
+ url: `/v1/messages/mark-as-seen`,
713
+ method: 'PATCH',
714
+ secure: true
715
+ });
716
+ }
717
+ }
718
+
719
+
720
+ var $13db695db15b59e8$exports = {};
721
+
722
+ $parcel$export($13db695db15b59e8$exports, "PreferenceApi", () => $13db695db15b59e8$export$ee36c1f919e724be);
723
+ /* eslint-disable */ /* tslint:disable */ /*
724
+ * ---------------------------------------------------------------
725
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
726
+ * ## ##
727
+ * ## AUTHOR: acacode ##
728
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
729
+ * ---------------------------------------------------------------
730
+ */
731
+ class $13db695db15b59e8$export$ee36c1f919e724be {
732
+ constructor(apiClient){
733
+ this.apiClient = apiClient;
734
+ (0, $cAFGd$autobind)(this);
735
+ }
736
+ /**
737
+ * @tags PreferenceApi
738
+ * @name GetPreferences
739
+ * @request GET:/api/v1/preferences
740
+ * @secure
741
+ */ getPreferences(config) {
742
+ return this.apiClient.request({
743
+ ...config,
744
+ url: `/v1/preferences`,
745
+ method: 'GET',
746
+ secure: true,
747
+ responseType: 'json'
748
+ });
749
+ }
750
+ /**
751
+ * @tags PreferenceApi
752
+ * @name SavePreferences
753
+ * @request POST:/api/v1/preferences
754
+ * @secure
755
+ */ savePreferences(config) {
756
+ return this.apiClient.request({
757
+ ...config,
758
+ url: `/v1/preferences`,
759
+ method: 'POST',
760
+ secure: true,
761
+ responseType: 'json'
762
+ });
763
+ }
764
+ }
765
+
766
+
767
+ var $8fe9008dd804475c$exports = {};
768
+
769
+ $parcel$export($8fe9008dd804475c$exports, "MiddlewareWatchlistEntryDtoTypeEnum", () => $8fe9008dd804475c$export$3f452a1c96052217);
770
+ /* eslint-disable */ /* tslint:disable */ /*
771
+ * ---------------------------------------------------------------
772
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
773
+ * ## ##
774
+ * ## AUTHOR: acacode ##
775
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
776
+ * ---------------------------------------------------------------
777
+ */ var $8fe9008dd804475c$export$3f452a1c96052217 = /*#__PURE__*/ function(MiddlewareWatchlistEntryDtoTypeEnum) {
778
+ MiddlewareWatchlistEntryDtoTypeEnum["Equity"] = "equity";
779
+ MiddlewareWatchlistEntryDtoTypeEnum["Option"] = "option";
780
+ MiddlewareWatchlistEntryDtoTypeEnum["Crypto"] = "crypto";
781
+ MiddlewareWatchlistEntryDtoTypeEnum["Bond"] = "bond";
782
+ MiddlewareWatchlistEntryDtoTypeEnum["MutualFund"] = "mutualFund";
783
+ return MiddlewareWatchlistEntryDtoTypeEnum;
784
+ }({});
785
+
786
+
787
+ var $acf59887331dcbd1$exports = {};
788
+
789
+ $parcel$export($acf59887331dcbd1$exports, "VersioningApi", () => $acf59887331dcbd1$export$a04b2e4c36dfcee7);
790
+ /* eslint-disable */ /* tslint:disable */ /*
791
+ * ---------------------------------------------------------------
792
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
793
+ * ## ##
794
+ * ## AUTHOR: acacode ##
795
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
796
+ * ---------------------------------------------------------------
797
+ */
798
+
799
+ class $acf59887331dcbd1$export$a04b2e4c36dfcee7 {
800
+ constructor(apiClient){
801
+ this.apiClient = apiClient;
802
+ (0, $cAFGd$autobind)(this);
803
+ }
804
+ /**
805
+ * @tags VersioningApi
806
+ * @name GetAppVersion
807
+ * @request GET:/api/versioning/{appId}
808
+ */ getAppVersion(appId, config) {
809
+ return this.apiClient.request({
810
+ ...config,
811
+ url: `/versioning/${appId}`,
812
+ method: 'GET',
813
+ secure: false,
814
+ responseType: 'json'
815
+ });
816
+ }
817
+ /**
818
+ * @tags VersioningApi
819
+ * @name UpdateAppVersion
820
+ * @request POST:/api/versioning/{appId}
821
+ */ updateAppVersion(appId, data, config) {
822
+ return this.apiClient.request({
823
+ ...config,
824
+ url: `/versioning/${appId}`,
825
+ method: 'POST',
826
+ data: data,
827
+ secure: false,
828
+ contentType: (0, $e176194f300187e4$export$e2e108cbe2e4f865).Json
829
+ });
830
+ }
831
+ }
832
+
833
+
834
+ var $e3077392348b7887$exports = {};
835
+
836
+ $parcel$export($e3077392348b7887$exports, "WatchlistApi", () => $e3077392348b7887$export$8476017e5fc20c1b);
837
+ /* eslint-disable */ /* tslint:disable */ /*
838
+ * ---------------------------------------------------------------
839
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
840
+ * ## ##
841
+ * ## AUTHOR: acacode ##
842
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
843
+ * ---------------------------------------------------------------
844
+ */
845
+
846
+ class $e3077392348b7887$export$8476017e5fc20c1b {
847
+ constructor(apiClient){
848
+ this.apiClient = apiClient;
849
+ (0, $cAFGd$autobind)(this);
850
+ }
851
+ /**
852
+ * @tags WatchlistApi
853
+ * @name GetAllWatchlists
854
+ * @request GET:/api/v1/watchlists
855
+ * @secure
856
+ */ getAllWatchlists(config) {
857
+ return this.apiClient.request({
858
+ ...config,
859
+ url: `/v1/watchlists`,
860
+ method: 'GET',
861
+ secure: true,
862
+ responseType: 'json'
863
+ });
864
+ }
865
+ /**
866
+ * @tags WatchlistApi
867
+ * @name CreateWatchlist
868
+ * @request POST:/api/v1/watchlists
869
+ * @secure
870
+ */ createWatchlist(data, config) {
871
+ return this.apiClient.request({
872
+ ...config,
873
+ url: `/v1/watchlists`,
874
+ method: 'POST',
875
+ data: data,
876
+ secure: true,
877
+ contentType: (0, $e176194f300187e4$export$e2e108cbe2e4f865).Json,
878
+ responseType: 'json'
879
+ });
880
+ }
881
+ /**
882
+ * @tags WatchlistApi
883
+ * @name GetWatchlist
884
+ * @request GET:/api/v1/watchlists/{watchlistId}
885
+ * @secure
886
+ */ getWatchlist(watchlistId, config) {
887
+ return this.apiClient.request({
888
+ ...config,
889
+ url: `/v1/watchlists/${watchlistId}`,
890
+ method: 'GET',
891
+ secure: true,
892
+ responseType: 'json'
893
+ });
894
+ }
895
+ /**
896
+ * @tags WatchlistApi
897
+ * @name UpdateWatchlist
898
+ * @request PUT:/api/v1/watchlists/{watchlistId}
899
+ * @secure
900
+ */ updateWatchlist(watchlistId, data, config) {
901
+ return this.apiClient.request({
902
+ ...config,
903
+ url: `/v1/watchlists/${watchlistId}`,
904
+ method: 'PUT',
905
+ data: data,
906
+ secure: true,
907
+ contentType: (0, $e176194f300187e4$export$e2e108cbe2e4f865).Json,
908
+ responseType: 'json'
909
+ });
910
+ }
911
+ /**
912
+ * @tags WatchlistApi
913
+ * @name DeleteWatchlist
914
+ * @request DELETE:/api/v1/watchlists/{watchlistId}
915
+ * @secure
916
+ */ deleteWatchlist(watchlistId, config) {
917
+ return this.apiClient.request({
918
+ ...config,
919
+ url: `/v1/watchlists/${watchlistId}`,
920
+ method: 'DELETE',
921
+ secure: true
922
+ });
923
+ }
924
+ /**
925
+ * @tags WatchlistApi
926
+ * @name AddWatchlistEntries
927
+ * @request POST:/api/v1/watchlists/{watchlistId}/entries
928
+ * @secure
929
+ */ addWatchlistEntries(watchlistId, data, config) {
930
+ return this.apiClient.request({
931
+ ...config,
932
+ url: `/v1/watchlists/${watchlistId}/entries`,
933
+ method: 'POST',
934
+ data: data,
935
+ secure: true,
936
+ contentType: (0, $e176194f300187e4$export$e2e108cbe2e4f865).Json,
937
+ responseType: 'json'
938
+ });
939
+ }
940
+ /**
941
+ * @tags WatchlistApi
942
+ * @name RemoveWatchlistEntries
943
+ * @request DELETE:/api/v1/watchlists/{watchlistId}/entries
944
+ * @secure
945
+ */ removeWatchlistEntries(watchlistId, data, config) {
946
+ return this.apiClient.request({
947
+ ...config,
948
+ url: `/v1/watchlists/${watchlistId}/entries`,
949
+ method: 'DELETE',
950
+ data: data,
951
+ secure: true,
952
+ contentType: (0, $e176194f300187e4$export$e2e108cbe2e4f865).Json,
953
+ responseType: 'json'
954
+ });
955
+ }
956
+ /**
957
+ * @tags WatchlistApi
958
+ * @name UpdateWatchlistEntries
959
+ * @request PUT:/api/v1/watchlists/{watchlistId}/entries
960
+ * @secure
961
+ */ updateWatchlistEntries(watchlistId, data, config) {
962
+ return this.apiClient.request({
963
+ ...config,
964
+ url: `/v1/watchlists/${watchlistId}/entries`,
965
+ method: 'PUT',
966
+ data: data,
967
+ secure: true,
968
+ contentType: (0, $e176194f300187e4$export$e2e108cbe2e4f865).Json,
969
+ responseType: 'json'
970
+ });
971
+ }
972
+ /**
973
+ * @tags WatchlistApi
974
+ * @name UpdateWatchlistOrders
975
+ * @request POST:/api/v1/watchlists/orders
976
+ * @secure
977
+ */ updateWatchlistOrders(data, config) {
978
+ return this.apiClient.request({
979
+ ...config,
980
+ url: `/v1/watchlists/orders`,
981
+ method: 'POST',
982
+ data: data,
983
+ secure: true,
984
+ contentType: (0, $e176194f300187e4$export$e2e108cbe2e4f865).Json
985
+ });
986
+ }
987
+ /**
988
+ * @tags WatchlistApi
989
+ * @name ImportWatchmenWatchlists
990
+ * @request POST:/api/v1/watchlists/import
991
+ * @secure
992
+ */ importWatchmenWatchlists(config) {
993
+ return this.apiClient.request({
994
+ ...config,
995
+ url: `/v1/watchlists/import`,
996
+ method: 'POST',
997
+ secure: true
998
+ });
999
+ }
1000
+ }
1001
+
1002
+
1003
+ $parcel$exportWildcard($3bf589023d5ae0e7$exports, $baddfe4aead00de2$exports);
1004
+ $parcel$exportWildcard($3bf589023d5ae0e7$exports, $e8246e3069d2d6d5$exports);
1005
+ $parcel$exportWildcard($3bf589023d5ae0e7$exports, $eb0d2d1d09761fc9$exports);
1006
+ $parcel$exportWildcard($3bf589023d5ae0e7$exports, $79142c23ace4c0bc$exports);
1007
+ $parcel$exportWildcard($3bf589023d5ae0e7$exports, $5d1dcff56264ccdd$exports);
1008
+ $parcel$exportWildcard($3bf589023d5ae0e7$exports, $13db695db15b59e8$exports);
1009
+ $parcel$exportWildcard($3bf589023d5ae0e7$exports, $8fe9008dd804475c$exports);
1010
+ $parcel$exportWildcard($3bf589023d5ae0e7$exports, $acf59887331dcbd1$exports);
1011
+ $parcel$exportWildcard($3bf589023d5ae0e7$exports, $e3077392348b7887$exports);
1012
+
1013
+
1014
+ class $59a349f17b48d4fa$var$AuthenticationApiWrapper extends (0, $e8246e3069d2d6d5$export$762f992a2f2efa56) {
1015
+ constructor(apiClient){
1016
+ super(apiClient);
1017
+ this.apiClient.setRenewTokenCallback(this.renewToken);
1018
+ }
1019
+ async authenticate(headers, config) {
1020
+ const response = await super.authenticate(headers, {
1021
+ ...config,
1022
+ withCredentials: true
1023
+ });
1024
+ if (response.success) this.apiClient.setAuthData(response.data);
1025
+ return response;
1026
+ }
1027
+ async renewToken() {
1028
+ const refreshToken = this.apiClient.getAuthData()?.refreshToken;
1029
+ if (!refreshToken) throw new Error('Refresh token not found');
1030
+ const response = await this.refresh({
1031
+ handleError: true,
1032
+ withCredentials: true,
1033
+ headers: {
1034
+ Authorization: `${this.apiClient.getConfig().authSchema ?? 'Bearer'} ${refreshToken}`
1035
+ }
1036
+ });
1037
+ if (response.success) return {
1038
+ accessToken: response.data.accessToken,
1039
+ refreshToken: response.data.refreshToken
1040
+ };
1041
+ else throw new Error(`Could not renew token: ${String(response.error)}`);
1042
+ }
1043
+ }
1044
+ class $59a349f17b48d4fa$export$634e9891177d90f1 extends (0, $001a7a5b1ca54b2d$export$3ad201792064a82b) {
1045
+ constructor(config){
1046
+ super(new (0, $584c124673bb843e$export$f280b732bbc5934b)(config)), this.config = config;
1047
+ this.attribute = new (0, $baddfe4aead00de2$export$4b5ccf64eb32db90)(this.apiClient);
1048
+ this.authentication = new $59a349f17b48d4fa$var$AuthenticationApiWrapper(this.apiClient);
1049
+ this.avatar = new (0, $eb0d2d1d09761fc9$export$35ebcbc76ff5f1ef)(this.apiClient);
1050
+ this.chart = new (0, $79142c23ace4c0bc$export$449dbf88fe955d16)(this.apiClient);
1051
+ this.message = new (0, $5d1dcff56264ccdd$export$adfa0441784b848e)(this.apiClient);
1052
+ this.preference = new (0, $13db695db15b59e8$export$ee36c1f919e724be)(this.apiClient);
1053
+ this.versioning = new (0, $acf59887331dcbd1$export$a04b2e4c36dfcee7)(this.apiClient);
1054
+ this.watchlist = new (0, $e3077392348b7887$export$8476017e5fc20c1b)(this.apiClient);
1055
+ }
1056
+ }
1057
+
1058
+
1059
+
1060
+
1061
+
1062
+ export {$59a349f17b48d4fa$export$634e9891177d90f1 as MiddlewareApi, $baddfe4aead00de2$export$4b5ccf64eb32db90 as AttributeApi, $e8246e3069d2d6d5$export$762f992a2f2efa56 as AuthenticationApi, $eb0d2d1d09761fc9$export$35ebcbc76ff5f1ef as AvatarApi, $79142c23ace4c0bc$export$449dbf88fe955d16 as ChartApi, $5d1dcff56264ccdd$export$adfa0441784b848e as MessageApi, $13db695db15b59e8$export$ee36c1f919e724be as PreferenceApi, $8fe9008dd804475c$export$3f452a1c96052217 as MiddlewareWatchlistEntryDtoTypeEnum, $acf59887331dcbd1$export$a04b2e4c36dfcee7 as VersioningApi, $e3077392348b7887$export$8476017e5fc20c1b as WatchlistApi};
2
1063
  //# sourceMappingURL=index.esm.js.map