@assetsfirst/pasarguard-sdk 1.0.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/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +10328 -0
- package/dist/index.d.ts +10328 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/package.json +57 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 assetsfirst
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# pasarguard-sdk
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
'use strict';var w=require('axios'),fe=require('axios-retry');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var w__default=/*#__PURE__*/_interopDefault(w);var fe__default=/*#__PURE__*/_interopDefault(fe);var c="http://localhost".replace(/\/+$/,"");var U=class{constructor(s,t=c,e=w__default.default){this.basePath=t;this.axios=e;s&&(this.configuration=s,this.basePath=s.basePath??t);}},j=class extends Error{constructor(t,e){super(e);this.field=t;this.name="RequiredError";}},d={};var g="https://example.com",f=function(n,s,t){if(t==null)throw new j(s,`Required parameter ${s} was null or undefined when calling ${n}.`)};var y=async function(n,s,t,e){if(e&&e.accessToken){let o=typeof e.accessToken=="function"?await e.accessToken(s,t):await e.accessToken;n.Authorization="Bearer "+o;}};function Z(n,s,t=""){s!=null&&(typeof s=="object"?Array.isArray(s)?s.forEach(e=>Z(n,e,t)):Object.keys(s).forEach(e=>Z(n,s[e],`${t}${t!==""?".":""}${e}`)):n.has(t)?n.append(t,s):n.set(t,s));}var h=function(n,...s){let t=new URLSearchParams(n.search);Z(t,s),n.search=t.toString();},O=function(n,s,t){let e=typeof n!="string";return (e&&t&&t.isJsonMime?t.isJsonMime(s.headers["Content-Type"]):e)?JSON.stringify(n!==void 0?n:{}):n||""},x=function(n){return n.pathname+n.search+n.hash},A=function(n,s,t,e){return (o=s,r=t)=>{let a={...n.options,url:(o.defaults.baseURL?"":e?.basePath??r)+n.url};return o.request(a)}};var ue=function(n){return {activateAllDisabledUsers:async(s,t={})=>{f("activateAllDisabledUsers","username",s);let e="/api/admin/{username}/users/activate".replace("{username}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},adminMiniAppToken:async(s,t={})=>{f("adminMiniAppToken","xTelegramAuthorization",s);let e="/api/admin/miniapp/token",o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};s!=null&&(i["x-telegram-authorization"]=String(s)),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},adminToken:async(s,t,e,o,r,a,i={})=>{f("adminToken","username",s),f("adminToken","password",t);let l="/api/admin/token",u=new URL(l,g),m;n&&(m=n.baseOptions);let b={method:"POST",...m,...i},R={},P={},S=new URLSearchParams;e!==void 0&&S.set("grant_type",e),s!==void 0&&S.set("username",s),t!==void 0&&S.set("password",t),o!==void 0&&S.set("scope",o),r!==void 0&&S.set("client_id",r),a!==void 0&&S.set("client_secret",a),R["Content-Type"]="application/x-www-form-urlencoded",h(u,P);let v=m&&m.headers?m.headers:{};return b.headers={...R,...v,...i.headers},b.data=S.toString(),{url:x(u),options:b}},createAdmin:async(s,t={})=>{f("createAdmin","adminCreate",s);let e="/api/admin",o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),i["Content-Type"]="application/json",h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},a.data=O(s,a,n),{url:x(o),options:a}},disableAllActiveUsers:async(s,t={})=>{f("disableAllActiveUsers","username",s);let e="/api/admin/{username}/users/disable".replace("{username}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},getAdmins:async(s,t,e,o,r={})=>{let a="/api/admins",i=new URL(a,g),l;n&&(l=n.baseOptions);let u={method:"GET",...l,...r},m={},b={};await y(m,"OAuth2PasswordBearer",[],n),s!==void 0&&(b.username=s),t!==void 0&&(b.offset=t),e!==void 0&&(b.limit=e),o!==void 0&&(b.sort=o),h(i,b);let R=l&&l.headers?l.headers:{};return u.headers={...m,...R,...r.headers},{url:x(i),options:u}},getCurrentAdmin:async(s={})=>{let t="/api/admin",e=new URL(t,g),o;n&&(o=n.baseOptions);let r={method:"GET",...o,...s},a={},i={};await y(a,"OAuth2PasswordBearer",[],n),h(e,i);let l=o&&o.headers?o.headers:{};return r.headers={...a,...l,...s.headers},{url:x(e),options:r}},modifyAdmin:async(s,t,e={})=>{f("modifyAdmin","username",s),f("modifyAdmin","adminModify",t);let o="/api/admin/{username}".replace("{username}",encodeURIComponent(String(s))),r=new URL(o,g),a;n&&(a=n.baseOptions);let i={method:"PUT",...a,...e},l={},u={};await y(l,"OAuth2PasswordBearer",[],n),l["Content-Type"]="application/json",h(r,u);let m=a&&a.headers?a.headers:{};return i.headers={...l,...m,...e.headers},i.data=O(t,i,n),{url:x(r),options:i}},removeAdmin:async(s,t={})=>{f("removeAdmin","username",s);let e="/api/admin/{username}".replace("{username}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"DELETE",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},removeAllUsers:async(s,t={})=>{f("removeAllUsers","username",s);let e="/api/admin/{username}/users".replace("{username}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"DELETE",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},resetAdminUsage:async(s,t={})=>{f("resetAdminUsage","username",s);let e="/api/admin/{username}/reset".replace("{username}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}}}},I=function(n){let s=ue(n);return {async activateAllDisabledUsers(t,e){let o=await s.activateAllDisabledUsers(t,e),r=n?.serverIndex??0,a=d["AdminApi.activateAllDisabledUsers"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async adminMiniAppToken(t,e){let o=await s.adminMiniAppToken(t,e),r=n?.serverIndex??0,a=d["AdminApi.adminMiniAppToken"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async adminToken(t,e,o,r,a,i,l){let u=await s.adminToken(t,e,o,r,a,i,l),m=n?.serverIndex??0,b=d["AdminApi.adminToken"]?.[m]?.url;return (R,P)=>A(u,w__default.default,c,n)(R,b||P)},async createAdmin(t,e){let o=await s.createAdmin(t,e),r=n?.serverIndex??0,a=d["AdminApi.createAdmin"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async disableAllActiveUsers(t,e){let o=await s.disableAllActiveUsers(t,e),r=n?.serverIndex??0,a=d["AdminApi.disableAllActiveUsers"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async getAdmins(t,e,o,r,a){let i=await s.getAdmins(t,e,o,r,a),l=n?.serverIndex??0,u=d["AdminApi.getAdmins"]?.[l]?.url;return (m,b)=>A(i,w__default.default,c,n)(m,u||b)},async getCurrentAdmin(t){let e=await s.getCurrentAdmin(t),o=n?.serverIndex??0,r=d["AdminApi.getCurrentAdmin"]?.[o]?.url;return (a,i)=>A(e,w__default.default,c,n)(a,r||i)},async modifyAdmin(t,e,o){let r=await s.modifyAdmin(t,e,o),a=n?.serverIndex??0,i=d["AdminApi.modifyAdmin"]?.[a]?.url;return (l,u)=>A(r,w__default.default,c,n)(l,i||u)},async removeAdmin(t,e){let o=await s.removeAdmin(t,e),r=n?.serverIndex??0,a=d["AdminApi.removeAdmin"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async removeAllUsers(t,e){let o=await s.removeAllUsers(t,e),r=n?.serverIndex??0,a=d["AdminApi.removeAllUsers"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async resetAdminUsage(t,e){let o=await s.resetAdminUsage(t,e),r=n?.serverIndex??0,a=d["AdminApi.resetAdminUsage"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)}}};var B=class extends U{activateAllDisabledUsers(s,t){return I(this.configuration).activateAllDisabledUsers(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}adminMiniAppToken(s,t){return I(this.configuration).adminMiniAppToken(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}adminToken(s,t,e,o,r,a,i){return I(this.configuration).adminToken(s,t,e,o,r,a,i).then(l=>l(this.axios,this.basePath)).then(({data:l})=>l)}createAdmin(s,t){return I(this.configuration).createAdmin(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}disableAllActiveUsers(s,t){return I(this.configuration).disableAllActiveUsers(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}getAdmins(s,t,e,o,r){return I(this.configuration).getAdmins(s,t,e,o,r).then(a=>a(this.axios,this.basePath)).then(({data:a})=>a)}getCurrentAdmin(s){return I(this.configuration).getCurrentAdmin(s).then(t=>t(this.axios,this.basePath)).then(({data:t})=>t)}modifyAdmin(s,t,e){return I(this.configuration).modifyAdmin(s,t,e).then(o=>o(this.axios,this.basePath)).then(({data:o})=>o)}removeAdmin(s,t){return I(this.configuration).removeAdmin(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}removeAllUsers(s,t){return I(this.configuration).removeAllUsers(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}resetAdminUsage(s,t){return I(this.configuration).resetAdminUsage(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}};var pe=function(n){return {createCoreConfig:async(s,t={})=>{f("createCoreConfig","coreCreate",s);let e="/api/core",o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),i["Content-Type"]="application/json",h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},a.data=O(s,a,n),{url:x(o),options:a}},deleteCoreConfig:async(s,t,e={})=>{f("deleteCoreConfig","coreId",s);let o="/api/core/{core_id}".replace("{core_id}",encodeURIComponent(String(s))),r=new URL(o,g),a;n&&(a=n.baseOptions);let i={method:"DELETE",...a,...e},l={},u={};await y(l,"OAuth2PasswordBearer",[],n),t!==void 0&&(u.restart_nodes=t),h(r,u);let m=a&&a.headers?a.headers:{};return i.headers={...l,...m,...e.headers},{url:x(r),options:i}},getAllCores:async(s,t,e={})=>{let o="/api/cores",r=new URL(o,g),a;n&&(a=n.baseOptions);let i={method:"GET",...a,...e},l={},u={};await y(l,"OAuth2PasswordBearer",[],n),s!==void 0&&(u.offset=s),t!==void 0&&(u.limit=t),h(r,u);let m=a&&a.headers?a.headers:{};return i.headers={...l,...m,...e.headers},{url:x(r),options:i}},getCoreConfig:async(s,t={})=>{f("getCoreConfig","coreId",s);let e="/api/core/{core_id}".replace("{core_id}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"GET",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},modifyCoreConfig:async(s,t,e,o={})=>{f("modifyCoreConfig","coreId",s),f("modifyCoreConfig","restartNodes",t),f("modifyCoreConfig","coreCreate",e);let r="/api/core/{core_id}".replace("{core_id}",encodeURIComponent(String(s))),a=new URL(r,g),i;n&&(i=n.baseOptions);let l={method:"PUT",...i,...o},u={},m={};await y(u,"OAuth2PasswordBearer",[],n),t!==void 0&&(m.restart_nodes=t),u["Content-Type"]="application/json",h(a,m);let b=i&&i.headers?i.headers:{};return l.headers={...u,...b,...o.headers},l.data=O(e,l,n),{url:x(a),options:l}},restartCore:async(s,t={})=>{f("restartCore","coreId",s);let e="/api/core/{core_id}/restart".replace("{core_id}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}}}},k=function(n){let s=pe(n);return {async createCoreConfig(t,e){let o=await s.createCoreConfig(t,e),r=n?.serverIndex??0,a=d["CoreApi.createCoreConfig"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async deleteCoreConfig(t,e,o){let r=await s.deleteCoreConfig(t,e,o),a=n?.serverIndex??0,i=d["CoreApi.deleteCoreConfig"]?.[a]?.url;return (l,u)=>A(r,w__default.default,c,n)(l,i||u)},async getAllCores(t,e,o){let r=await s.getAllCores(t,e,o),a=n?.serverIndex??0,i=d["CoreApi.getAllCores"]?.[a]?.url;return (l,u)=>A(r,w__default.default,c,n)(l,i||u)},async getCoreConfig(t,e){let o=await s.getCoreConfig(t,e),r=n?.serverIndex??0,a=d["CoreApi.getCoreConfig"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async modifyCoreConfig(t,e,o,r){let a=await s.modifyCoreConfig(t,e,o,r),i=n?.serverIndex??0,l=d["CoreApi.modifyCoreConfig"]?.[i]?.url;return (u,m)=>A(a,w__default.default,c,n)(u,l||m)},async restartCore(t,e){let o=await s.restartCore(t,e),r=n?.serverIndex??0,a=d["CoreApi.restartCore"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)}}};var G=class extends U{createCoreConfig(s,t){return k(this.configuration).createCoreConfig(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}deleteCoreConfig(s,t,e){return k(this.configuration).deleteCoreConfig(s,t,e).then(o=>o(this.axios,this.basePath)).then(({data:o})=>o)}getAllCores(s,t,e){return k(this.configuration).getAllCores(s,t,e).then(o=>o(this.axios,this.basePath)).then(({data:o})=>o)}getCoreConfig(s,t){return k(this.configuration).getCoreConfig(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}modifyCoreConfig(s,t,e,o){return k(this.configuration).modifyCoreConfig(s,t,e,o).then(r=>r(this.axios,this.basePath)).then(({data:r})=>r)}restartCore(s,t){return k(this.configuration).restartCore(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}};var me=function(n){return {base:async(s={})=>{let e=new URL("/",g),o;n&&(o=n.baseOptions);let r={method:"GET",...o,...s},a={};h(e,{});let l=o&&o.headers?o.headers:{};return r.headers={...a,...l,...s.headers},{url:x(e),options:r}},getManifest:async(s,t={})=>{let e="/manifest.json",o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"GET",...r,...t},i={},l={};s!==void 0&&(l.start_url=s),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}}}},te=function(n){let s=me(n);return {async base(t){let e=await s.base(t),o=n?.serverIndex??0,r=d["DefaultApi.base"]?.[o]?.url;return (a,i)=>A(e,w__default.default,c,n)(a,r||i)},async getManifest(t,e){let o=await s.getManifest(t,e),r=n?.serverIndex??0,a=d["DefaultApi.getManifest"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)}}};var D=class extends U{base(s){return te(this.configuration).base(s).then(t=>t(this.axios,this.basePath)).then(({data:t})=>t)}getManifest(s,t){return te(this.configuration).getManifest(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}};var ce=function(n){return {clearUsageData:async(s,t,e,o={})=>{f("clearUsageData","table",s);let r="/api/nodes/clear_usage_data/{table}".replace("{table}",encodeURIComponent(String(s))),a=new URL(r,g),i;n&&(i=n.baseOptions);let l={method:"DELETE",...i,...o},u={},m={};await y(u,"OAuth2PasswordBearer",[],n),t!==void 0&&(m.start=t instanceof Date?t.toISOString():t),e!==void 0&&(m.end=e instanceof Date?e.toISOString():e),h(a,m);let b=i&&i.headers?i.headers:{};return l.headers={...u,...b,...o.headers},{url:x(a),options:l}},createNode:async(s,t={})=>{f("createNode","nodeCreate",s);let e="/api/node",o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),i["Content-Type"]="application/json",h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},a.data=O(s,a,n),{url:x(o),options:a}},getNode:async(s,t={})=>{f("getNode","nodeId",s);let e="/api/node/{node_id}".replace("{node_id}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"GET",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},getNodeSettings:async(s={})=>{let t="/api/node/settings",e=new URL(t,g),o;n&&(o=n.baseOptions);let r={method:"GET",...o,...s},a={},i={};await y(a,"OAuth2PasswordBearer",[],n),h(e,i);let l=o&&o.headers?o.headers:{};return r.headers={...a,...l,...s.headers},{url:x(e),options:r}},getNodeStatsPeriodic:async(s,t,e,o,r={})=>{f("getNodeStatsPeriodic","nodeId",s);let a="/api/node/{node_id}/stats".replace("{node_id}",encodeURIComponent(String(s))),i=new URL(a,g),l;n&&(l=n.baseOptions);let u={method:"GET",...l,...r},m={},b={};await y(m,"OAuth2PasswordBearer",[],n),t!==void 0&&(b.start=t instanceof Date?t.toISOString():t),e!==void 0&&(b.end=e instanceof Date?e.toISOString():e),o!==void 0&&(b.period=o),h(i,b);let R=l&&l.headers?l.headers:{};return u.headers={...m,...R,...r.headers},{url:x(i),options:u}},getNodes:async(s,t,e,o,r,a,i,l={})=>{let u="/api/nodes",m=new URL(u,g),b;n&&(b=n.baseOptions);let R={method:"GET",...b,...l},P={},S={};await y(P,"OAuth2PasswordBearer",[],n),s!==void 0&&(S.core_id=s),t!==void 0&&(S.offset=t),e!==void 0&&(S.limit=e),o&&(S.status=o),r!==void 0&&(S.enabled=r),a&&(S.ids=a),i!==void 0&&(S.search=i),h(m,S);let v=b&&b.headers?b.headers:{};return R.headers={...P,...v,...l.headers},{url:x(m),options:R}},getUsage:async(s,t,e,o,r,a={})=>{let i="/api/node/usage",l=new URL(i,g),u;n&&(u=n.baseOptions);let m={method:"GET",...u,...a},b={},R={};await y(b,"OAuth2PasswordBearer",[],n),s!==void 0&&(R.start=s instanceof Date?s.toISOString():s),t!==void 0&&(R.end=t instanceof Date?t.toISOString():t),e!==void 0&&(R.period=e),o!==void 0&&(R.node_id=o),r!==void 0&&(R.group_by_node=r),h(l,R);let P=u&&u.headers?u.headers:{};return m.headers={...b,...P,...a.headers},{url:x(l),options:m}},modifyNode:async(s,t,e={})=>{f("modifyNode","nodeId",s),f("modifyNode","nodeModify",t);let o="/api/node/{node_id}".replace("{node_id}",encodeURIComponent(String(s))),r=new URL(o,g),a;n&&(a=n.baseOptions);let i={method:"PUT",...a,...e},l={},u={};await y(l,"OAuth2PasswordBearer",[],n),l["Content-Type"]="application/json",h(r,u);let m=a&&a.headers?a.headers:{};return i.headers={...l,...m,...e.headers},i.data=O(t,i,n),{url:x(r),options:i}},nodeLogs:async(s,t={})=>{f("nodeLogs","nodeId",s);let e="/api/node/{node_id}/logs".replace("{node_id}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"GET",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},realtimeNodeStats:async(s,t={})=>{f("realtimeNodeStats","nodeId",s);let e="/api/node/{node_id}/realtime_stats".replace("{node_id}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"GET",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},realtimeNodesStats:async(s={})=>{let t="/api/nodes/realtime_stats",e=new URL(t,g),o;n&&(o=n.baseOptions);let r={method:"GET",...o,...s},a={},i={};await y(a,"OAuth2PasswordBearer",[],n),h(e,i);let l=o&&o.headers?o.headers:{};return r.headers={...a,...l,...s.headers},{url:x(e),options:r}},reconnectAllNode:async(s,t={})=>{let e="/api/nodes/reconnect",o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),s!==void 0&&(l.core_id=s),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},reconnectNode:async(s,t={})=>{f("reconnectNode","nodeId",s);let e="/api/node/{node_id}/reconnect".replace("{node_id}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},removeNode:async(s,t={})=>{f("removeNode","nodeId",s);let e="/api/node/{node_id}".replace("{node_id}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"DELETE",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},resetNodeUsage:async(s,t={})=>{f("resetNodeUsage","nodeId",s);let e="/api/node/{node_id}/reset".replace("{node_id}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},syncNode:async(s,t,e={})=>{f("syncNode","nodeId",s);let o="/api/node/{node_id}/sync".replace("{node_id}",encodeURIComponent(String(s))),r=new URL(o,g),a;n&&(a=n.baseOptions);let i={method:"PUT",...a,...e},l={},u={};await y(l,"OAuth2PasswordBearer",[],n),t!==void 0&&(u.flush_users=t),h(r,u);let m=a&&a.headers?a.headers:{};return i.headers={...l,...m,...e.headers},{url:x(r),options:i}},userOnlineIpList:async(s,t,e={})=>{f("userOnlineIpList","nodeId",s),f("userOnlineIpList","username",t);let o="/api/node/{node_id}/online_stats/{username}/ip".replace("{node_id}",encodeURIComponent(String(s))).replace("{username}",encodeURIComponent(String(t))),r=new URL(o,g),a;n&&(a=n.baseOptions);let i={method:"GET",...a,...e},l={},u={};await y(l,"OAuth2PasswordBearer",[],n),h(r,u);let m=a&&a.headers?a.headers:{};return i.headers={...l,...m,...e.headers},{url:x(r),options:i}},userOnlineIpListAllNodes:async(s,t={})=>{f("userOnlineIpListAllNodes","username",s);let e="/api/node/online_stats/{username}/ip".replace("{username}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"GET",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},userOnlineStats:async(s,t,e={})=>{f("userOnlineStats","nodeId",s),f("userOnlineStats","username",t);let o="/api/node/{node_id}/online_stats/{username}".replace("{node_id}",encodeURIComponent(String(s))).replace("{username}",encodeURIComponent(String(t))),r=new URL(o,g),a;n&&(a=n.baseOptions);let i={method:"GET",...a,...e},l={},u={};await y(l,"OAuth2PasswordBearer",[],n),h(r,u);let m=a&&a.headers?a.headers:{};return i.headers={...l,...m,...e.headers},{url:x(r),options:i}}}},_=function(n){let s=ce(n);return {async clearUsageData(t,e,o,r){let a=await s.clearUsageData(t,e,o,r),i=n?.serverIndex??0,l=d["NodeApi.clearUsageData"]?.[i]?.url;return (u,m)=>A(a,w__default.default,c,n)(u,l||m)},async createNode(t,e){let o=await s.createNode(t,e),r=n?.serverIndex??0,a=d["NodeApi.createNode"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async getNode(t,e){let o=await s.getNode(t,e),r=n?.serverIndex??0,a=d["NodeApi.getNode"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async getNodeSettings(t){let e=await s.getNodeSettings(t),o=n?.serverIndex??0,r=d["NodeApi.getNodeSettings"]?.[o]?.url;return (a,i)=>A(e,w__default.default,c,n)(a,r||i)},async getNodeStatsPeriodic(t,e,o,r,a){let i=await s.getNodeStatsPeriodic(t,e,o,r,a),l=n?.serverIndex??0,u=d["NodeApi.getNodeStatsPeriodic"]?.[l]?.url;return (m,b)=>A(i,w__default.default,c,n)(m,u||b)},async getNodes(t,e,o,r,a,i,l,u){let m=await s.getNodes(t,e,o,r,a,i,l,u),b=n?.serverIndex??0,R=d["NodeApi.getNodes"]?.[b]?.url;return (P,S)=>A(m,w__default.default,c,n)(P,R||S)},async getUsage(t,e,o,r,a,i){let l=await s.getUsage(t,e,o,r,a,i),u=n?.serverIndex??0,m=d["NodeApi.getUsage"]?.[u]?.url;return (b,R)=>A(l,w__default.default,c,n)(b,m||R)},async modifyNode(t,e,o){let r=await s.modifyNode(t,e,o),a=n?.serverIndex??0,i=d["NodeApi.modifyNode"]?.[a]?.url;return (l,u)=>A(r,w__default.default,c,n)(l,i||u)},async nodeLogs(t,e){let o=await s.nodeLogs(t,e),r=n?.serverIndex??0,a=d["NodeApi.nodeLogs"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async realtimeNodeStats(t,e){let o=await s.realtimeNodeStats(t,e),r=n?.serverIndex??0,a=d["NodeApi.realtimeNodeStats"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async realtimeNodesStats(t){let e=await s.realtimeNodesStats(t),o=n?.serverIndex??0,r=d["NodeApi.realtimeNodesStats"]?.[o]?.url;return (a,i)=>A(e,w__default.default,c,n)(a,r||i)},async reconnectAllNode(t,e){let o=await s.reconnectAllNode(t,e),r=n?.serverIndex??0,a=d["NodeApi.reconnectAllNode"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async reconnectNode(t,e){let o=await s.reconnectNode(t,e),r=n?.serverIndex??0,a=d["NodeApi.reconnectNode"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async removeNode(t,e){let o=await s.removeNode(t,e),r=n?.serverIndex??0,a=d["NodeApi.removeNode"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async resetNodeUsage(t,e){let o=await s.resetNodeUsage(t,e),r=n?.serverIndex??0,a=d["NodeApi.resetNodeUsage"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async syncNode(t,e,o){let r=await s.syncNode(t,e,o),a=n?.serverIndex??0,i=d["NodeApi.syncNode"]?.[a]?.url;return (l,u)=>A(r,w__default.default,c,n)(l,i||u)},async userOnlineIpList(t,e,o){let r=await s.userOnlineIpList(t,e,o),a=n?.serverIndex??0,i=d["NodeApi.userOnlineIpList"]?.[a]?.url;return (l,u)=>A(r,w__default.default,c,n)(l,i||u)},async userOnlineIpListAllNodes(t,e){let o=await s.userOnlineIpListAllNodes(t,e),r=n?.serverIndex??0,a=d["NodeApi.userOnlineIpListAllNodes"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async userOnlineStats(t,e,o){let r=await s.userOnlineStats(t,e,o),a=n?.serverIndex??0,i=d["NodeApi.userOnlineStats"]?.[a]?.url;return (l,u)=>A(r,w__default.default,c,n)(l,i||u)}}};var Q=class extends U{clearUsageData(s,t,e,o){return _(this.configuration).clearUsageData(s,t,e,o).then(r=>r(this.axios,this.basePath)).then(({data:r})=>r)}createNode(s,t){return _(this.configuration).createNode(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}getNode(s,t){return _(this.configuration).getNode(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}getNodeSettings(s){return _(this.configuration).getNodeSettings(s).then(t=>t(this.axios,this.basePath)).then(({data:t})=>t)}getNodeStatsPeriodic(s,t,e,o,r){return _(this.configuration).getNodeStatsPeriodic(s,t,e,o,r).then(a=>a(this.axios,this.basePath)).then(({data:a})=>a)}getNodes(s,t,e,o,r,a,i,l){return _(this.configuration).getNodes(s,t,e,o,r,a,i,l).then(u=>u(this.axios,this.basePath)).then(({data:u})=>u)}getUsage(s,t,e,o,r,a){return _(this.configuration).getUsage(s,t,e,o,r,a).then(i=>i(this.axios,this.basePath)).then(({data:i})=>i)}modifyNode(s,t,e){return _(this.configuration).modifyNode(s,t,e).then(o=>o(this.axios,this.basePath)).then(({data:o})=>o)}nodeLogs(s,t){return _(this.configuration).nodeLogs(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}realtimeNodeStats(s,t){return _(this.configuration).realtimeNodeStats(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}realtimeNodesStats(s){return _(this.configuration).realtimeNodesStats(s).then(t=>t(this.axios,this.basePath)).then(({data:t})=>t)}reconnectAllNode(s,t){return _(this.configuration).reconnectAllNode(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}reconnectNode(s,t){return _(this.configuration).reconnectNode(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}removeNode(s,t){return _(this.configuration).removeNode(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}resetNodeUsage(s,t){return _(this.configuration).resetNodeUsage(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}syncNode(s,t,e){return _(this.configuration).syncNode(s,t,e).then(o=>o(this.axios,this.basePath)).then(({data:o})=>o)}userOnlineIpList(s,t,e){return _(this.configuration).userOnlineIpList(s,t,e).then(o=>o(this.axios,this.basePath)).then(({data:o})=>o)}userOnlineIpListAllNodes(s,t){return _(this.configuration).userOnlineIpListAllNodes(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}userOnlineStats(s,t,e){return _(this.configuration).userOnlineStats(s,t,e).then(o=>o(this.axios,this.basePath)).then(({data:o})=>o)}};var de=function(n){return {getSubUserUsage:async(s,t,e,o,r={})=>{f("getSubUserUsage","token",s);let a="/sub/{token}/usage".replace("{token}",encodeURIComponent(String(s))),i=new URL(a,g),l;n&&(l=n.baseOptions);let u={method:"GET",...l,...r},m={},b={};t!==void 0&&(b.start=t instanceof Date?t.toISOString():t),e!==void 0&&(b.end=e instanceof Date?e.toISOString():e),o!==void 0&&(b.period=o),h(i,b);let R=l&&l.headers?l.headers:{};return u.headers={...m,...R,...r.headers},{url:x(i),options:u}},userSubscription:async(s,t,e={})=>{f("userSubscription","token",s);let o="/sub/{token}/".replace("{token}",encodeURIComponent(String(s))),r=new URL(o,g),a;n&&(a=n.baseOptions);let i={method:"GET",...a,...e},l={},u={};t!=null&&(l["user-agent"]=String(t)),h(r,u);let m=a&&a.headers?a.headers:{};return i.headers={...l,...m,...e.headers},{url:x(r),options:i}},userSubscriptionApps:async(s,t={})=>{f("userSubscriptionApps","token",s);let e="/sub/{token}/apps".replace("{token}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"GET",...r,...t},i={};h(o,{});let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},userSubscriptionInfo:async(s,t={})=>{f("userSubscriptionInfo","token",s);let e="/sub/{token}/info".replace("{token}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"GET",...r,...t},i={};h(o,{});let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},userSubscriptionWithClientType:async(s,t,e={})=>{f("userSubscriptionWithClientType","token",s),f("userSubscriptionWithClientType","clientType",t);let o="/sub/{token}/{client_type}".replace("{token}",encodeURIComponent(String(s))).replace("{client_type}",encodeURIComponent(String(t))),r=new URL(o,g),a;n&&(a=n.baseOptions);let i={method:"GET",...a,...e},l={};h(r,{});let m=a&&a.headers?a.headers:{};return i.headers={...l,...m,...e.headers},{url:x(r),options:i}}}},H=function(n){let s=de(n);return {async getSubUserUsage(t,e,o,r,a){let i=await s.getSubUserUsage(t,e,o,r,a),l=n?.serverIndex??0,u=d["SubscriptionApi.getSubUserUsage"]?.[l]?.url;return (m,b)=>A(i,w__default.default,c,n)(m,u||b)},async userSubscription(t,e,o){let r=await s.userSubscription(t,e,o),a=n?.serverIndex??0,i=d["SubscriptionApi.userSubscription"]?.[a]?.url;return (l,u)=>A(r,w__default.default,c,n)(l,i||u)},async userSubscriptionApps(t,e){let o=await s.userSubscriptionApps(t,e),r=n?.serverIndex??0,a=d["SubscriptionApi.userSubscriptionApps"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async userSubscriptionInfo(t,e){let o=await s.userSubscriptionInfo(t,e),r=n?.serverIndex??0,a=d["SubscriptionApi.userSubscriptionInfo"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async userSubscriptionWithClientType(t,e,o){let r=await s.userSubscriptionWithClientType(t,e,o),a=n?.serverIndex??0,i=d["SubscriptionApi.userSubscriptionWithClientType"]?.[a]?.url;return (l,u)=>A(r,w__default.default,c,n)(l,i||u)}}};var $=class extends U{getSubUserUsage(s,t,e,o,r){return H(this.configuration).getSubUserUsage(s,t,e,o,r).then(a=>a(this.axios,this.basePath)).then(({data:a})=>a)}userSubscription(s,t,e){return H(this.configuration).userSubscription(s,t,e).then(o=>o(this.axios,this.basePath)).then(({data:o})=>o)}userSubscriptionApps(s,t){return H(this.configuration).userSubscriptionApps(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}userSubscriptionInfo(s,t){return H(this.configuration).userSubscriptionInfo(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}userSubscriptionWithClientType(s,t,e){return H(this.configuration).userSubscriptionWithClientType(s,t,e).then(o=>o(this.axios,this.basePath)).then(({data:o})=>o)}};var ge=function(n){return {getInbounds:async(s={})=>{let t="/api/inbounds",e=new URL(t,g),o;n&&(o=n.baseOptions);let r={method:"GET",...o,...s},a={},i={};await y(a,"OAuth2PasswordBearer",[],n),h(e,i);let l=o&&o.headers?o.headers:{};return r.headers={...a,...l,...s.headers},{url:x(e),options:r}},getSystemStats:async(s,t={})=>{let e="/api/system",o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"GET",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),s!==void 0&&(l.admin_username=s),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}}}},re=function(n){let s=ge(n);return {async getInbounds(t){let e=await s.getInbounds(t),o=n?.serverIndex??0,r=d["SystemApi.getInbounds"]?.[o]?.url;return (a,i)=>A(e,w__default.default,c,n)(a,r||i)},async getSystemStats(t,e){let o=await s.getSystemStats(t,e),r=n?.serverIndex??0,a=d["SystemApi.getSystemStats"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)}}};var X=class extends U{getInbounds(s){return re(this.configuration).getInbounds(s).then(t=>t(this.axios,this.basePath)).then(({data:t})=>t)}getSystemStats(s,t){return re(this.configuration).getSystemStats(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}};var he=function(n){return {activeNextPlan:async(s,t={})=>{f("activeNextPlan","username",s);let e="/api/user/{username}/active_next".replace("{username}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},bulkModifyUsersDatalimit:async(s,t={})=>{f("bulkModifyUsersDatalimit","bulkUser",s);let e="/api/users/bulk/data_limit",o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),i["Content-Type"]="application/json",h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},a.data=O(s,a,n),{url:x(o),options:a}},bulkModifyUsersExpire:async(s,t={})=>{f("bulkModifyUsersExpire","bulkUser",s);let e="/api/users/bulk/expire",o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),i["Content-Type"]="application/json",h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},a.data=O(s,a,n),{url:x(o),options:a}},bulkModifyUsersProxySettings:async(s,t={})=>{f("bulkModifyUsersProxySettings","bulkUsersProxy",s);let e="/api/users/bulk/proxy_settings",o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),i["Content-Type"]="application/json",h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},a.data=O(s,a,n),{url:x(o),options:a}},createUser:async(s,t={})=>{f("createUser","userCreate",s);let e="/api/user",o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),i["Content-Type"]="application/json",h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},a.data=O(s,a,n),{url:x(o),options:a}},createUserFromTemplate:async(s,t={})=>{f("createUserFromTemplate","createUserFromTemplate",s);let e="/api/user/from_template",o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),i["Content-Type"]="application/json",h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},a.data=O(s,a,n),{url:x(o),options:a}},deleteExpiredUsers:async(s,t,e,o={})=>{let r="/api/users/expired",a=new URL(r,g),i;n&&(i=n.baseOptions);let l={method:"DELETE",...i,...o},u={},m={};await y(u,"OAuth2PasswordBearer",[],n),s!==void 0&&(m.admin_username=s),t!==void 0&&(m.expired_after=t instanceof Date?t.toISOString():t),e!==void 0&&(m.expired_before=e instanceof Date?e.toISOString():e),h(a,m);let b=i&&i.headers?i.headers:{};return l.headers={...u,...b,...o.headers},{url:x(a),options:l}},getExpiredUsers:async(s,t,e,o={})=>{let r="/api/users/expired",a=new URL(r,g),i;n&&(i=n.baseOptions);let l={method:"GET",...i,...o},u={},m={};await y(u,"OAuth2PasswordBearer",[],n),s!==void 0&&(m.admin_username=s),t!==void 0&&(m.expired_after=t instanceof Date?t.toISOString():t),e!==void 0&&(m.expired_before=e instanceof Date?e.toISOString():e),h(a,m);let b=i&&i.headers?i.headers:{};return l.headers={...u,...b,...o.headers},{url:x(a),options:l}},getUser:async(s,t={})=>{f("getUser","username",s);let e="/api/user/{username}".replace("{username}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"GET",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},getUserSubUpdateList:async(s,t,e,o={})=>{f("getUserSubUpdateList","username",s);let r="/api/user/{username}/sub_update".replace("{username}",encodeURIComponent(String(s))),a=new URL(r,g),i;n&&(i=n.baseOptions);let l={method:"GET",...i,...o},u={},m={};await y(u,"OAuth2PasswordBearer",[],n),t!==void 0&&(m.offset=t),e!==void 0&&(m.limit=e),h(a,m);let b=i&&i.headers?i.headers:{};return l.headers={...u,...b,...o.headers},{url:x(a),options:l}},getUserUsage:async(s,t,e,o,r,a,i={})=>{f("getUserUsage","username",s),f("getUserUsage","period",t);let l="/api/user/{username}/usage".replace("{username}",encodeURIComponent(String(s))),u=new URL(l,g),m;n&&(m=n.baseOptions);let b={method:"GET",...m,...i},R={},P={};await y(R,"OAuth2PasswordBearer",[],n),t!==void 0&&(P.period=t),e!==void 0&&(P.node_id=e),o!==void 0&&(P.group_by_node=o),r!==void 0&&(P.start=r instanceof Date?r.toISOString():r),a!==void 0&&(P.end=a instanceof Date?a.toISOString():a),h(u,P);let S=m&&m.headers?m.headers:{};return b.headers={...R,...S,...i.headers},{url:x(u),options:b}},getUsers:async(s,t,e,o,r,a,i,l,u,m,b={})=>{let R="/api/users",P=new URL(R,g),S;n&&(S=n.baseOptions);let v={method:"GET",...S,...b},F={},q={};await y(F,"OAuth2PasswordBearer",[],n),s!==void 0&&(q.offset=s),t!==void 0&&(q.limit=t),e&&(q.username=e),o&&(q.admin=o),r&&(q.group=r),a!==void 0&&(q.search=a),i!==void 0&&(q.status=i),l!==void 0&&(q.sort=l),u!==void 0&&(q.proxy_id=u),m!==void 0&&(q.load_sub=m),h(P,q);let ie=S&&S.headers?S.headers:{};return v.headers={...F,...ie,...b.headers},{url:x(P),options:v}},getUsersSubUpdateChart:async(s,t,e={})=>{let o="/api/users/sub_update/chart",r=new URL(o,g),a;n&&(a=n.baseOptions);let i={method:"GET",...a,...e},l={},u={};await y(l,"OAuth2PasswordBearer",[],n),s!==void 0&&(u.username=s),t!==void 0&&(u.admin_id=t),h(r,u);let m=a&&a.headers?a.headers:{};return i.headers={...l,...m,...e.headers},{url:x(r),options:i}},getUsersUsage:async(s,t,e,o,r,a,i={})=>{f("getUsersUsage","period",s);let l="/api/users/usage",u=new URL(l,g),m;n&&(m=n.baseOptions);let b={method:"GET",...m,...i},R={},P={};await y(R,"OAuth2PasswordBearer",[],n),s!==void 0&&(P.period=s),t!==void 0&&(P.node_id=t),e!==void 0&&(P.group_by_node=e),o!==void 0&&(P.start=o instanceof Date?o.toISOString():o),r!==void 0&&(P.end=r instanceof Date?r.toISOString():r),a&&(P.admin=a),h(u,P);let S=m&&m.headers?m.headers:{};return b.headers={...R,...S,...i.headers},{url:x(u),options:b}},modifyUser:async(s,t,e={})=>{f("modifyUser","username",s),f("modifyUser","userModify",t);let o="/api/user/{username}".replace("{username}",encodeURIComponent(String(s))),r=new URL(o,g),a;n&&(a=n.baseOptions);let i={method:"PUT",...a,...e},l={},u={};await y(l,"OAuth2PasswordBearer",[],n),l["Content-Type"]="application/json",h(r,u);let m=a&&a.headers?a.headers:{};return i.headers={...l,...m,...e.headers},i.data=O(t,i,n),{url:x(r),options:i}},modifyUserWithTemplate:async(s,t,e={})=>{f("modifyUserWithTemplate","username",s),f("modifyUserWithTemplate","modifyUserByTemplate",t);let o="/api/user/from_template/{username}".replace("{username}",encodeURIComponent(String(s))),r=new URL(o,g),a;n&&(a=n.baseOptions);let i={method:"PUT",...a,...e},l={},u={};await y(l,"OAuth2PasswordBearer",[],n),l["Content-Type"]="application/json",h(r,u);let m=a&&a.headers?a.headers:{};return i.headers={...l,...m,...e.headers},i.data=O(t,i,n),{url:x(r),options:i}},removeUser:async(s,t={})=>{f("removeUser","username",s);let e="/api/user/{username}".replace("{username}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"DELETE",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},resetUserDataUsage:async(s,t={})=>{f("resetUserDataUsage","username",s);let e="/api/user/{username}/reset".replace("{username}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},resetUsersDataUsage:async(s={})=>{let t="/api/users/reset",e=new URL(t,g),o;n&&(o=n.baseOptions);let r={method:"POST",...o,...s},a={},i={};await y(a,"OAuth2PasswordBearer",[],n),h(e,i);let l=o&&o.headers?o.headers:{};return r.headers={...a,...l,...s.headers},{url:x(e),options:r}},revokeUserSubscription:async(s,t={})=>{f("revokeUserSubscription","username",s);let e="/api/user/{username}/revoke_sub".replace("{username}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},setOwner:async(s,t,e={})=>{f("setOwner","username",s),f("setOwner","adminUsername",t);let o="/api/user/{username}/set_owner".replace("{username}",encodeURIComponent(String(s))),r=new URL(o,g),a;n&&(a=n.baseOptions);let i={method:"PUT",...a,...e},l={},u={};await y(l,"OAuth2PasswordBearer",[],n),t!==void 0&&(u.admin_username=t),h(r,u);let m=a&&a.headers?a.headers:{};return i.headers={...l,...m,...e.headers},{url:x(r),options:i}}}},C=function(n){let s=he(n);return {async activeNextPlan(t,e){let o=await s.activeNextPlan(t,e),r=n?.serverIndex??0,a=d["UserApi.activeNextPlan"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async bulkModifyUsersDatalimit(t,e){let o=await s.bulkModifyUsersDatalimit(t,e),r=n?.serverIndex??0,a=d["UserApi.bulkModifyUsersDatalimit"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async bulkModifyUsersExpire(t,e){let o=await s.bulkModifyUsersExpire(t,e),r=n?.serverIndex??0,a=d["UserApi.bulkModifyUsersExpire"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async bulkModifyUsersProxySettings(t,e){let o=await s.bulkModifyUsersProxySettings(t,e),r=n?.serverIndex??0,a=d["UserApi.bulkModifyUsersProxySettings"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async createUser(t,e){let o=await s.createUser(t,e),r=n?.serverIndex??0,a=d["UserApi.createUser"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async createUserFromTemplate(t,e){let o=await s.createUserFromTemplate(t,e),r=n?.serverIndex??0,a=d["UserApi.createUserFromTemplate"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async deleteExpiredUsers(t,e,o,r){let a=await s.deleteExpiredUsers(t,e,o,r),i=n?.serverIndex??0,l=d["UserApi.deleteExpiredUsers"]?.[i]?.url;return (u,m)=>A(a,w__default.default,c,n)(u,l||m)},async getExpiredUsers(t,e,o,r){let a=await s.getExpiredUsers(t,e,o,r),i=n?.serverIndex??0,l=d["UserApi.getExpiredUsers"]?.[i]?.url;return (u,m)=>A(a,w__default.default,c,n)(u,l||m)},async getUser(t,e){let o=await s.getUser(t,e),r=n?.serverIndex??0,a=d["UserApi.getUser"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async getUserSubUpdateList(t,e,o,r){let a=await s.getUserSubUpdateList(t,e,o,r),i=n?.serverIndex??0,l=d["UserApi.getUserSubUpdateList"]?.[i]?.url;return (u,m)=>A(a,w__default.default,c,n)(u,l||m)},async getUserUsage(t,e,o,r,a,i,l){let u=await s.getUserUsage(t,e,o,r,a,i,l),m=n?.serverIndex??0,b=d["UserApi.getUserUsage"]?.[m]?.url;return (R,P)=>A(u,w__default.default,c,n)(R,b||P)},async getUsers(t,e,o,r,a,i,l,u,m,b,R){let P=await s.getUsers(t,e,o,r,a,i,l,u,m,b,R),S=n?.serverIndex??0,v=d["UserApi.getUsers"]?.[S]?.url;return (F,q)=>A(P,w__default.default,c,n)(F,v||q)},async getUsersSubUpdateChart(t,e,o){let r=await s.getUsersSubUpdateChart(t,e,o),a=n?.serverIndex??0,i=d["UserApi.getUsersSubUpdateChart"]?.[a]?.url;return (l,u)=>A(r,w__default.default,c,n)(l,i||u)},async getUsersUsage(t,e,o,r,a,i,l){let u=await s.getUsersUsage(t,e,o,r,a,i,l),m=n?.serverIndex??0,b=d["UserApi.getUsersUsage"]?.[m]?.url;return (R,P)=>A(u,w__default.default,c,n)(R,b||P)},async modifyUser(t,e,o){let r=await s.modifyUser(t,e,o),a=n?.serverIndex??0,i=d["UserApi.modifyUser"]?.[a]?.url;return (l,u)=>A(r,w__default.default,c,n)(l,i||u)},async modifyUserWithTemplate(t,e,o){let r=await s.modifyUserWithTemplate(t,e,o),a=n?.serverIndex??0,i=d["UserApi.modifyUserWithTemplate"]?.[a]?.url;return (l,u)=>A(r,w__default.default,c,n)(l,i||u)},async removeUser(t,e){let o=await s.removeUser(t,e),r=n?.serverIndex??0,a=d["UserApi.removeUser"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async resetUserDataUsage(t,e){let o=await s.resetUserDataUsage(t,e),r=n?.serverIndex??0,a=d["UserApi.resetUserDataUsage"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async resetUsersDataUsage(t){let e=await s.resetUsersDataUsage(t),o=n?.serverIndex??0,r=d["UserApi.resetUsersDataUsage"]?.[o]?.url;return (a,i)=>A(e,w__default.default,c,n)(a,r||i)},async revokeUserSubscription(t,e){let o=await s.revokeUserSubscription(t,e),r=n?.serverIndex??0,a=d["UserApi.revokeUserSubscription"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async setOwner(t,e,o){let r=await s.setOwner(t,e,o),a=n?.serverIndex??0,i=d["UserApi.setOwner"]?.[a]?.url;return (l,u)=>A(r,w__default.default,c,n)(l,i||u)}}};var z=class extends U{activeNextPlan(s,t){return C(this.configuration).activeNextPlan(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}bulkModifyUsersDatalimit(s,t){return C(this.configuration).bulkModifyUsersDatalimit(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}bulkModifyUsersExpire(s,t){return C(this.configuration).bulkModifyUsersExpire(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}bulkModifyUsersProxySettings(s,t){return C(this.configuration).bulkModifyUsersProxySettings(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}createUser(s,t){return C(this.configuration).createUser(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}createUserFromTemplate(s,t){return C(this.configuration).createUserFromTemplate(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}deleteExpiredUsers(s,t,e,o){return C(this.configuration).deleteExpiredUsers(s,t,e,o).then(r=>r(this.axios,this.basePath)).then(({data:r})=>r)}getExpiredUsers(s,t,e,o){return C(this.configuration).getExpiredUsers(s,t,e,o).then(r=>r(this.axios,this.basePath)).then(({data:r})=>r)}getUser(s,t){return C(this.configuration).getUser(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}getUserSubUpdateList(s,t,e,o){return C(this.configuration).getUserSubUpdateList(s,t,e,o).then(r=>r(this.axios,this.basePath)).then(({data:r})=>r)}getUserUsage(s,t,e,o,r,a,i){return C(this.configuration).getUserUsage(s,t,e,o,r,a,i).then(l=>l(this.axios,this.basePath)).then(({data:l})=>l)}getUsers(s,t,e,o,r,a,i,l,u,m,b){return C(this.configuration).getUsers(s,t,e,o,r,a,i,l,u,m,b).then(R=>R(this.axios,this.basePath)).then(({data:R})=>R)}getUsersSubUpdateChart(s,t,e){return C(this.configuration).getUsersSubUpdateChart(s,t,e).then(o=>o(this.axios,this.basePath)).then(({data:o})=>o)}getUsersUsage(s,t,e,o,r,a,i){return C(this.configuration).getUsersUsage(s,t,e,o,r,a,i).then(l=>l(this.axios,this.basePath)).then(({data:l})=>l)}modifyUser(s,t,e){return C(this.configuration).modifyUser(s,t,e).then(o=>o(this.axios,this.basePath)).then(({data:o})=>o)}modifyUserWithTemplate(s,t,e){return C(this.configuration).modifyUserWithTemplate(s,t,e).then(o=>o(this.axios,this.basePath)).then(({data:o})=>o)}removeUser(s,t){return C(this.configuration).removeUser(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}resetUserDataUsage(s,t){return C(this.configuration).resetUserDataUsage(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}resetUsersDataUsage(s){return C(this.configuration).resetUsersDataUsage(s).then(t=>t(this.axios,this.basePath)).then(({data:t})=>t)}revokeUserSubscription(s,t){return C(this.configuration).revokeUserSubscription(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}setOwner(s,t,e){return C(this.configuration).setOwner(s,t,e).then(o=>o(this.axios,this.basePath)).then(({data:o})=>o)}};var xe=function(n){return {createUserTemplate:async(s,t={})=>{f("createUserTemplate","userTemplateCreate",s);let e="/api/user_template",o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"POST",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),i["Content-Type"]="application/json",h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},a.data=O(s,a,n),{url:x(o),options:a}},getUserTemplate:async(s,t={})=>{f("getUserTemplate","templateId",s);let e="/api/user_template/{template_id}".replace("{template_id}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"GET",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}},getUserTemplates:async(s,t,e={})=>{let o="/api/user_templates",r=new URL(o,g),a;n&&(a=n.baseOptions);let i={method:"GET",...a,...e},l={},u={};await y(l,"OAuth2PasswordBearer",[],n),s!==void 0&&(u.offset=s),t!==void 0&&(u.limit=t),h(r,u);let m=a&&a.headers?a.headers:{};return i.headers={...l,...m,...e.headers},{url:x(r),options:i}},modifyUserTemplate:async(s,t,e={})=>{f("modifyUserTemplate","templateId",s),f("modifyUserTemplate","userTemplateModify",t);let o="/api/user_template/{template_id}".replace("{template_id}",encodeURIComponent(String(s))),r=new URL(o,g),a;n&&(a=n.baseOptions);let i={method:"PUT",...a,...e},l={},u={};await y(l,"OAuth2PasswordBearer",[],n),l["Content-Type"]="application/json",h(r,u);let m=a&&a.headers?a.headers:{};return i.headers={...l,...m,...e.headers},i.data=O(t,i,n),{url:x(r),options:i}},removeUserTemplate:async(s,t={})=>{f("removeUserTemplate","templateId",s);let e="/api/user_template/{template_id}".replace("{template_id}",encodeURIComponent(String(s))),o=new URL(e,g),r;n&&(r=n.baseOptions);let a={method:"DELETE",...r,...t},i={},l={};await y(i,"OAuth2PasswordBearer",[],n),h(o,l);let u=r&&r.headers?r.headers:{};return a.headers={...i,...u,...t.headers},{url:x(o),options:a}}}},E=function(n){let s=xe(n);return {async createUserTemplate(t,e){let o=await s.createUserTemplate(t,e),r=n?.serverIndex??0,a=d["UserTemplateApi.createUserTemplate"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async getUserTemplate(t,e){let o=await s.getUserTemplate(t,e),r=n?.serverIndex??0,a=d["UserTemplateApi.getUserTemplate"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)},async getUserTemplates(t,e,o){let r=await s.getUserTemplates(t,e,o),a=n?.serverIndex??0,i=d["UserTemplateApi.getUserTemplates"]?.[a]?.url;return (l,u)=>A(r,w__default.default,c,n)(l,i||u)},async modifyUserTemplate(t,e,o){let r=await s.modifyUserTemplate(t,e,o),a=n?.serverIndex??0,i=d["UserTemplateApi.modifyUserTemplate"]?.[a]?.url;return (l,u)=>A(r,w__default.default,c,n)(l,i||u)},async removeUserTemplate(t,e){let o=await s.removeUserTemplate(t,e),r=n?.serverIndex??0,a=d["UserTemplateApi.removeUserTemplate"]?.[r]?.url;return (i,l)=>A(o,w__default.default,c,n)(i,a||l)}}};var W=class extends U{createUserTemplate(s,t){return E(this.configuration).createUserTemplate(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}getUserTemplate(s,t){return E(this.configuration).getUserTemplate(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}getUserTemplates(s,t,e){return E(this.configuration).getUserTemplates(s,t,e).then(o=>o(this.axios,this.basePath)).then(({data:o})=>o)}modifyUserTemplate(s,t,e){return E(this.configuration).modifyUserTemplate(s,t,e).then(o=>o(this.axios,this.basePath)).then(({data:o})=>o)}removeUserTemplate(s,t){return E(this.configuration).removeUserTemplate(s,t).then(e=>e(this.axios,this.basePath)).then(({data:e})=>e)}};var K=class{constructor(s={}){this.apiKey=s.apiKey,this.username=s.username,this.password=s.password,this.accessToken=s.accessToken,this.basePath=s.basePath,this.serverIndex=s.serverIndex,this.baseOptions={...s.baseOptions,headers:{...s.baseOptions?.headers}},this.formDataCtor=s.formDataCtor;}isJsonMime(s){let t=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return s!==null&&(t.test(s)||s.toLowerCase()==="application/json-patch+json")}};var oe=(n,s)=>{let t=w__default.default.create({baseURL:n});return fe__default.default(t,{retries:s?.retries??3,retryDelay:e=>e*1e3}),t};var Y=class extends Error{constructor(s){super(s),this.name="AuthenticationError";}},J=class{constructor(s){this.authPromise=null;this.isAuthenticating=false;this.configuration=s;}async authenticate(s,t){return this.authPromise?this.authPromise:(this.isAuthenticating=true,this.authPromise=new Promise((e,o)=>{(async()=>{try{let i=await new B(this.configuration).adminToken(s,t);i?.access_token?(this.configuration.accessToken=i.access_token,e()):(this.configuration.accessToken=void 0,o(new Y("Failed to retrieve access token")));}catch(a){console.error("Authentication failed",a),this.configuration.accessToken=void 0,o(new Y("Authentication failed"));}finally{this.authPromise=null,this.isAuthenticating=false;}})();}),this.authPromise)}async waitForAuth(){await this.authPromise;}retryAuth(){return this.authenticate(this.configuration.username,this.configuration.password)}get accessToken(){return this.configuration.accessToken?.toString()||""}set accessToken(s){this.configuration.accessToken=s;}};var ae=(n,s,t)=>{n.interceptors.request.use(async e=>{await s.waitForAuth();let o=s.accessToken;return e.headers.authorization=o?`Bearer ${o}`:void 0,e},e=>Promise.reject(e)),n.interceptors.response.use(e=>e,async e=>{let o=e?.config;if(e?.response?.status===401&&!o?.sent){o.sent=true;try{await s.authenticate(t.username,t.password);let r=s.accessToken;if(r)return o.headers.authorization=`Bearer ${r}`,n(o)}catch(r){return Promise.reject(r)}}return Promise.reject(e)});};var ne=class{constructor(s){if(!s.username||!s.password)throw new Error("No credentials provided for authentication");this.configuration=new K({basePath:s.baseUrl,username:s.username,password:s.password,accessToken:s.token}),this.client=oe(s.baseUrl,{retries:s.retries}),this.authService=new J(this.configuration),this.admin=new B(this.configuration,s.baseUrl,this.client),this.core=new G(this.configuration,s.baseUrl,this.client),this.node=new Q(this.configuration,s.baseUrl,this.client),this.user=new z(this.configuration,s.baseUrl,this.client),this.system=new X(this.configuration,s.baseUrl,this.client),this.default=new D(this.configuration,s.baseUrl,this.client),this.subscription=new $(this.configuration,s.baseUrl,this.client),this.userTemplate=new W(this.configuration,s.baseUrl,this.client),ae(this.client,this.authService,s),!s.token&&s.authenticateOnInit!==false&&this.authService.authenticate(s.username,s.password);}async getAuthToken(){return await this.authService.waitForAuth(),this.authService.accessToken}authorize(s=false){return this.authService.isAuthenticating&&!s?this.authService.authPromise:this.authService.authenticate(this.configuration.username,this.configuration.password)}};
|
|
2
|
+
exports.PasarguardSDK=ne;//# sourceMappingURL=index.cjs.map
|
|
3
|
+
//# sourceMappingURL=index.cjs.map
|