@openscreen/internal-sdk 2.0.2 → 2.0.4

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 +0,0 @@
1
- import s from"axios";function t(){return t=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(s[r]=e[r])}return s},t.apply(this,arguments)}class e{constructor(s){this.session=void 0,this.routeSegments=void 0,this.session=s}async makeUri(s={}){const t=[(await this.session.getCloudConfig()).endpoint.replace(/\/+$/,"")];return this.routeSegments.forEach(e=>{if(t.push(e.routePart),e.parm){const r=s[e.parm];if(!r)throw Error(`Openscreen: missing path parameter value for '${e.parm}'`);t.push(r)}}),t.join("/")}debugRequest(s,t,e,r,a){this.session.debugRequest&&(console.debug(`Openscreen REQUEST: ${s.toUpperCase()} ${t}`),r&&console.debug(`Openscreen REQUEST: ${JSON.stringify(r,null,2)}`),e&&this.session.debugQuery&&console.debug(`Openscreen QUERY: ${JSON.stringify(e,null,2)}`),a&&this.session.debugOptions&&console.debug(`Openscreen OPTIONS: ${JSON.stringify(a,null,2)}`))}debugResponse(s){this.session.debugResponse&&console.debug(`Openscreen RESPONSE: ${JSON.stringify(s.data||{},null,2)}`)}handleAndDebugErr(s){if(s.response&&s.response.data)return this.session.debugError?console.error(`Openscreen ERROR: ${JSON.stringify(s.response.data,null,2)}`):this.session.debugResponse&&console.error(`Openscreen RESPONSE: ${JSON.stringify(s.response.data,null,2)}`),s.response.data;if(this.session.debugError)try{console.error(s)}catch(s){console.error("Openscreen: (unable to print error)")}return s}}class r extends e{async go(s,e,r){try{const a=await this.makeUri(s);this.debugRequest("delete",a,e,null,r),await this.session.authorize();const n=await this.session.getAxios(),o=await n.delete(a,t({params:e},r));return this.debugResponse(o),o.data}catch(s){throw this.handleAndDebugErr(s)}}}class a extends e{async go(s,e,r){try{const a=await this.makeUri(s);this.debugRequest("get",a,e,null,r),await this.session.authorize();const n=await this.session.getAxios(),o=await n.get(a,t({params:e},r));return this.debugResponse(o),o.data}catch(s){throw this.handleAndDebugErr(s)}}}class n extends e{async go(s,e,r,a){try{const n=await this.makeUri(s);await this.session.authorize(),this.debugRequest("patch",n,e,r,a);const o=await this.session.getAxios(),i=await o.patch(n,r,t({params:e},a));return this.debugResponse(i),i.data}catch(s){throw this.handleAndDebugErr(s)}}}class o extends e{async go(s,e,r,a){try{const n=await this.makeUri(s);await this.session.authorize(),this.debugRequest("post",n,e,r,a);const o=await this.session.getAxios(),i=await o.post(n,r,t({params:e},a));return this.debugResponse(i),i.data}catch(s){throw this.handleAndDebugErr(s)}}}class i{constructor(s,t){this.session=void 0,this.pathParameters=void 0,this.session=s,this.pathParameters=t}self(){return this}getSession(){return this.session}}class c{constructor(s,t){this.session=void 0,this.pathParameters=void 0,this.id=void 0,this.session=s,this.pathParameters=t}getSession(){return this.session}}var u,h,d,p,m,P,g,l,S,N,w,x,I,E,k,y,A,v,R,C,f;!function(s){s.ACTIVE="ACTIVE",s.SUSPENDED="SUSPENDED"}(u||(u={})),function(s){s.OWNER="OWNER",s.ADMINISTRATOR="ADMINISTRATOR",s.BILLING_CONTACT="BILLING_CONTACT",s.MEMBER="MEMBER",s.API_KEY="API_KEY",s.INVITATION_DECLINED="INVITATION_DECLINED"}(h||(h={})),function(s){s.INVALID_API_KEY="INVALID_API_KEY",s.INVALID_EMAIL="INVALID_EMAIL",s.INVALID_LEGACY_MIGRATION="INVALID_LEGACY_MIGRATION",s.INVALID_PASSWORD="INVALID_PASSWORD",s.INVALID_SCOPE="INVALID_SCOPE",s.INVALID_SECRET="INVALID_SECRET",s.INVALID_TOKEN="INVALID_TOKEN",s.MIGRATE_FROM_COGNITO="MIGRATE_FROM_COGNITO",s.NO_ACCESS_TOKEN="NO_ACCESS_TOKEN",s.NO_REFRESH_TOKEN="NO_REFRESH_TOKEN",s.RESET_PASSWORD="RESET_PASSWORD",s.RESET_SECRET="RESET_SECRET",s.SUSPENDED_OR_INACTIVE="SUSPENDED_OR_INACTIVE",s.TOKEN_EXPIRED="TOKEN_EXPIRED",s.TRY_AGAIN="TRY_AGAIN",s.UNABLE_TO_CONFIRM_EMAIL="UNABLE_TO_CONFIRM_EMAIL",s.UNCONFIRMED_EMAIL="UNCONFIRMED_EMAIL"}(d||(d={})),function(s){s.API="API",s.CONFIRM_EMAIL="CONFIRM_EMAIL",s.NEW_PASSWORD="NEW_PASSWORD",s.NO_SESSION="NO_SESSION"}(p||(p={})),function(s){s.FREE="free",s.ADVANCED="advanced",s.PRO="pro",s.ENTERPRISE_CUSTOM="enterpriseCustom",s.UNLIMITED="unlimited"}(m||(m={})),function(s){s.MONTHLY="monthly",s.ANNUAL="annual"}(P||(P={})),function(s){s.BASIC="basic",s.ADVANCED="advanced",s.basic="basic",s.advance="advanced"}(g||(g={})),function(s){s.ACTIVE="ACTIVE",s.SUSPENDED="SUSPENDED"}(l||(l={})),function(s){s.dot="dot",s.square="square"}(S||(S={})),function(s){s.dot="dot",s.square="square",s.extra_rounded="extra-rounded"}(N||(N={})),function(s){s.classy="classy",s.classy_rounded="classy-rounded",s.dots="dots",s.extra_rounded="extra-rounded",s.rounded="rounded",s.square="square"}(w||(w={})),function(s){s.NO_SCAN_ID="NO_SCAN_ID",s.SCAN_ID_IN_PATH_PARAMETER="SCAN_ID_IN_PATH_PARAMETER",s.SCAN_ID_IN_QUERY_STRING_PARAMETER="SCAN_ID_IN_QUERY_STRING_PARAMETER"}(x||(x={})),function(s){s.L="L",s.M="M",s.Q="Q",s.H="H"}(I||(I={})),function(s){s.linear="linear",s.radial="radial"}(E||(E={})),function(s){s.STATIC_REDIRECT="STATIC_REDIRECT",s.DYNAMIC_REDIRECT="DYNAMIC_REDIRECT",s.DYNAMIC_REDIRECT_TO_APP="DYNAMIC_REDIRECT_TO_APP"}(k||(k={})),function(s){s.SHORT_URL="SHORT_URL",s.HASHED_ID="HASHED_ID",s.SECURE_ID="SECURE_ID"}(y||(y={})),function(s){s.ACTIVE="ACTIVE",s.INACTIVE="INACTIVE",s.SUSPENDED="SUSPENDED"}(A||(A={})),function(s){s.PNG="PNG",s.JPEG="JPEG",s.SVG="SVG",s.png="png",s.jpeg="jpeg",s.svg="svg"}(v||(v={})),function(s){s.COMPROMISED="COMPROMISED",s.CONFIRMED="CONFIRMED",s.LEGACY="LEGACY",s.NEW_EMAIL="NEW_EMAIL",s.NEW_EMAIL_CONFIRMED="NEW_EMAIL_CONFIRMED",s.NEW_PASSWORD="NEW_PASSWORD",s.SUSPENDED="SUSPENDED",s.UNCONFIRMED="UNCONFIRMED"}(R||(R={})),function(s){s.appuser="appuser",s.appadmin="appadmin"}(C||(C={})),function(s){s.DASHBOARD="DASHBOARD"}(f||(f={}));class O extends o{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"apikeys",sdkPartName:"apikeys"}]}}class b extends o{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"invitations",sdkPartName:"invitations"}]}}class _ extends o{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"projects",sdkPartName:"projects"}]}}class T extends o{constructor(...s){super(...s),this.routeSegments=[{parm:"invitationId",routePart:"invitations",sdkPartName:"invitation"},{routePart:"users",sdkPartName:"users"}]}}class j extends r{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"}]}}class D extends r{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"contacts/batch",sdkPartName:"contactsBatch"}]}}class U extends r{constructor(...s){super(...s),this.routeSegments=[{parm:"invitationId",routePart:"invitations",sdkPartName:"invitation"}]}}class M extends r{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{parm:"userId",routePart:"users",sdkPartName:"user"}]}}class L extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"}]}}class q extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"assets/report/advanced",sdkPartName:"advancedAssetsReport"}]}}class G extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"contacts/report/advanced",sdkPartName:"advancedContactsReport"}]}}class H extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"scans/report/advanced",sdkPartName:"advancedScansReport"}]}}class V extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"apikeys",sdkPartName:"apikeys"}]}}class $ extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"assets/export",sdkPartName:"assetsExport"}]}}class B extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"assets",sdkPartName:"assets"}]}}class F extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"assets/report/basic",sdkPartName:"basicAssetsReport"}]}}class W extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"contacts/report/basic",sdkPartName:"basicContactsReport"}]}}class Y extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"scans/report/basic",sdkPartName:"basicScansReport"}]}}class K extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"contacts/export",sdkPartName:"contactsExport"}]}}class Q extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"contacts",sdkPartName:"contacts"}]}}class J extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"invitationId",routePart:"invitations",sdkPartName:"invitation"}]}}class z extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"priceplan",sdkPartName:"pricePlan"}]}}class Z extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"projects",sdkPartName:"projects"}]}}class X extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"qrcodes",sdkPartName:"qrCodes"}]}}class ss extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"scans/export",sdkPartName:"scansExport"}]}}class ts extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"scans",sdkPartName:"scans"}]}}class es extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"users",sdkPartName:"users"}]}}class rs extends n{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"}]}}class as extends n{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{routePart:"priceplan",sdkPartName:"pricePlan"}]}}class ns extends n{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"accounts",sdkPartName:"account"},{parm:"userId",routePart:"users",sdkPartName:"user"}]}}class os extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"apiKeyId",routePart:"apikeys",sdkPartName:"apikey"}]}}class is extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"apiKeyId",routePart:"apikeys",sdkPartName:"apikey"},{routePart:"secret",sdkPartName:"secret"}]}}class cs extends n{constructor(...s){super(...s),this.routeSegments=[{parm:"apiKeyId",routePart:"apikeys",sdkPartName:"apikey"},{routePart:"secret",sdkPartName:"secret"}]}}class us extends n{constructor(...s){super(...s),this.routeSegments=[{parm:"apiKeyId",routePart:"apikeys",sdkPartName:"apikey"}]}}class hs extends o{constructor(...s){super(...s),this.routeSegments=[{parm:"assetId",routePart:"assets",sdkPartName:"asset"},{routePart:"contacts",sdkPartName:"contacts"}]}}class ds extends o{constructor(...s){super(...s),this.routeSegments=[{parm:"assetId",routePart:"assets",sdkPartName:"asset"},{routePart:"qrcodes",sdkPartName:"qrCodes"}]}}class ps extends r{constructor(...s){super(...s),this.routeSegments=[{parm:"assetId",routePart:"assets",sdkPartName:"asset"}]}}class ms extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"assetId",routePart:"assets",sdkPartName:"asset"}]}}class Ps extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"assetId",routePart:"assets",sdkPartName:"asset"},{routePart:"contacts",sdkPartName:"contacts"}]}}class gs extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"assetId",routePart:"assets",sdkPartName:"asset"},{routePart:"qrcodes",sdkPartName:"qrCodes"}]}}class ls extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"assetId",routePart:"assets",sdkPartName:"asset"},{routePart:"scans",sdkPartName:"scans"}]}}class Ss extends o{constructor(...s){super(...s),this.routeSegments=[{parm:"assetId",routePart:"assets",sdkPartName:"asset"},{parm:"contactId",routePart:"contacts",sdkPartName:"contact"}]}}class Ns extends r{constructor(...s){super(...s),this.routeSegments=[{parm:"assetId",routePart:"assets",sdkPartName:"asset"},{parm:"contactId",routePart:"contacts",sdkPartName:"contact"}]}}class ws extends n{constructor(...s){super(...s),this.routeSegments=[{parm:"assetId",routePart:"assets",sdkPartName:"asset"}]}}class xs extends o{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"billing/session",sdkPartName:"billingSession"}]}}class Is extends r{constructor(...s){super(...s),this.routeSegments=[{parm:"contactId",routePart:"contacts",sdkPartName:"contact"}]}}class Es extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"contactId",routePart:"contacts",sdkPartName:"contact"}]}}class ks extends n{constructor(...s){super(...s),this.routeSegments=[{parm:"contactId",routePart:"contacts",sdkPartName:"contact"}]}}class ys extends a{constructor(...s){super(...s),this.routeSegments=[{routePart:"overview/accounts",sdkPartName:"overviewAccounts"}]}}class As extends a{constructor(...s){super(...s),this.routeSegments=[{routePart:"overview/activity",sdkPartName:"overviewActivity"}]}}class vs extends a{constructor(...s){super(...s),this.routeSegments=[{routePart:"overview/users",sdkPartName:"overviewUsers"}]}}class Rs extends a{constructor(...s){super(...s),this.routeSegments=[{routePart:"pricePlans",sdkPartName:"pricePlans"}]}}class Cs extends o{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"assets",sdkPartName:"assets"}]}}class fs extends o{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"assets/batch",sdkPartName:"assetsBatch"}]}}class Os extends o{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"contacts",sdkPartName:"contacts"}]}}class bs extends o{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"contacts/batch",sdkPartName:"contactsBatch"}]}}class _s extends o{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"qrcodes",sdkPartName:"qrCodes"}]}}class Ts extends o{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"smstemplates",sdkPartName:"smsTemplates"}]}}class js extends r{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"contacts/batch",sdkPartName:"contactsBatch"}]}}class Ds extends r{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"}]}}class Us extends r{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{parm:"smsTemplateName",routePart:"smstemplates",sdkPartName:"smsTemplate"}]}}class Ms extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"assets/report/advanced",sdkPartName:"advancedAssetsReport"}]}}class Ls extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"contacts/report/advanced",sdkPartName:"advancedContactsReport"}]}}class qs extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"scans/report/advanced",sdkPartName:"advancedScansReport"}]}}class Gs extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"assets/export",sdkPartName:"assetsExport"}]}}class Hs extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"assets",sdkPartName:"assets"}]}}class Vs extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"assets/report/basic",sdkPartName:"basicAssetsReport"}]}}class $s extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"contacts/report/basic",sdkPartName:"basicContactsReport"}]}}class Bs extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"scans/report/basic",sdkPartName:"basicScansReport"}]}}class Fs extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"contacts/export",sdkPartName:"contactsExport"}]}}class Ws extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"contacts",sdkPartName:"contacts"}]}}class Ys extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"}]}}class Ks extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"qrcodes",sdkPartName:"qrCodes"}]}}class Qs extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"scans/export",sdkPartName:"scansExport"}]}}class Js extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"scans",sdkPartName:"scans"}]}}class zs extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{parm:"smsTemplateName",routePart:"smstemplates",sdkPartName:"smsTemplate"}]}}class Zs extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{routePart:"smstemplates",sdkPartName:"smsTemplates"}]}}class Xs extends n{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"}]}}class st extends n{constructor(...s){super(...s),this.routeSegments=[{parm:"projectId",routePart:"projects",sdkPartName:"project"},{parm:"smsTemplateName",routePart:"smstemplates",sdkPartName:"smsTemplate"}]}}class tt extends r{constructor(...s){super(...s),this.routeSegments=[{parm:"qrCodeId",routePart:"qrcodes",sdkPartName:"qrCode"}]}}class et extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"qrCodeId",routePart:"qrcodes",sdkPartName:"qrCode"}]}}class rt extends n{constructor(...s){super(...s),this.routeSegments=[{parm:"qrCodeId",routePart:"qrcodes",sdkPartName:"qrCode"}]}}class at extends o{constructor(...s){super(...s),this.routeSegments=[{parm:"scanId",routePart:"scans",sdkPartName:"scan"},{routePart:"contacts",sdkPartName:"contacts"}]}}class nt extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"scanId",routePart:"scans",sdkPartName:"scan"}]}}class ot extends o{constructor(...s){super(...s),this.routeSegments=[{parm:"scanId",routePart:"scans",sdkPartName:"scan"},{routePart:"sms",sdkPartName:"sms"}]}}class it extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"accountId",routePart:"search/accounts",sdkPartName:"searchAccount"}]}}class ct extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"userId",routePart:"search/users",sdkPartName:"searchUser"}]}}class ut extends a{constructor(...s){super(...s),this.routeSegments=[{routePart:"search/accounts",sdkPartName:"searchAccounts"}]}}class ht extends o{constructor(...s){super(...s),this.routeSegments=[{parm:"userId",routePart:"users",sdkPartName:"user"},{routePart:"accounts",sdkPartName:"accounts"}]}}class dt extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"userId",routePart:"users",sdkPartName:"user"},{routePart:"accounts",sdkPartName:"accounts"}]}}class pt extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"userId",routePart:"users",sdkPartName:"user"},{routePart:"errors",sdkPartName:"errors"}]}}class mt extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"userId",routePart:"users",sdkPartName:"user"},{routePart:"invitations",sdkPartName:"invitations"}]}}class Pt extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"userId",routePart:"users",sdkPartName:"user"}]}}class gt extends a{constructor(...s){super(...s),this.routeSegments=[{parm:"userId",routePart:"users",sdkPartName:"user"},{parm:"path",routePart:"path",sdkPartName:"path"},{routePart:"settings",sdkPartName:"settings"}]}}class lt extends n{constructor(...s){super(...s),this.routeSegments=[{parm:"userId",routePart:"users",sdkPartName:"user"},{parm:"path",routePart:"path",sdkPartName:"path"},{routePart:"settings",sdkPartName:"settings"}]}}class St extends n{constructor(...s){super(...s),this.routeSegments=[{parm:"userId",routePart:"users",sdkPartName:"user"}]}}class Nt extends o{constructor(...s){super(...s),this.routeSegments=[{routePart:"webhook/sms",sdkPartName:"webhookSms"}]}}class wt extends o{constructor(...s){super(...s),this.routeSegments=[{routePart:"webhook/sms-status",sdkPartName:"webhookSmsStatus"}]}}class xt extends o{constructor(...s){super(...s),this.routeSegments=[{routePart:"auth/user/password",sdkPartName:"passwordAuthUser"}]}}class It extends a{constructor(...s){super(...s),this.routeSegments=[{routePart:"auth/confirm",sdkPartName:"authConfirm"}]}}class Et extends o{constructor(...s){super(...s),this.routeSegments=[{routePart:"auth/user",sdkPartName:"authUser"}]}}class kt extends r{constructor(...s){super(...s),this.routeSegments=[{routePart:"auth/session",sdkPartName:"authSession"}]}}class yt extends o{constructor(...s){super(...s),this.routeSegments=[{routePart:"auth/session",sdkPartName:"authSession"}]}}class At extends o{constructor(...s){super(...s),this.routeSegments=[{routePart:"auth/session/refresh",sdkPartName:"refreshAuthSession"}]}}class vt extends o{constructor(...s){super(...s),this.routeSegments=[{routePart:"auth/user/confirmation",sdkPartName:"confirmationAuthUser"}]}}class Rt extends o{constructor(...s){super(...s),this.routeSegments=[{routePart:"auth/user/reset",sdkPartName:"resetAuthUser"}]}}class Ct extends i{async create(s,t){return new O(this.session).go(this.pathParameters,void 0,s,t)}async get(s,t){return new V(this.session).go(this.pathParameters,s,t)}}class ft extends i{async create(s,t){return new b(this.session).go(this.pathParameters,void 0,s,t)}}class Ot extends i{async create(s,t){return new _(this.session).go(this.pathParameters,void 0,s,t)}async get(s,t){return new Z(this.session).go(this.pathParameters,s,t)}}class bt extends i{async delete(s,t){return new D(this.session).go(this.pathParameters,s,t)}}class _t extends c{async delete(s){return new M(this.session).go(this.pathParameters,void 0,s)}async update(s,t){return new ns(this.session).go(this.pathParameters,void 0,s,t)}}class Tt extends i{async get(s,t){return new q(this.session).go(this.pathParameters,s,t)}}class jt extends i{async get(s,t){return new G(this.session).go(this.pathParameters,s,t)}}class Dt extends i{async get(s,t){return new H(this.session).go(this.pathParameters,s,t)}}class Ut extends i{async get(s,t){return new $(this.session).go(this.pathParameters,s,t)}}class Mt extends i{async get(s,t){return new B(this.session).go(this.pathParameters,s,t)}}class Lt extends i{async get(s){return new F(this.session).go(this.pathParameters,void 0,s)}}class qt extends i{async get(s){return new W(this.session).go(this.pathParameters,void 0,s)}}class Gt extends i{async get(s){return new Y(this.session).go(this.pathParameters,void 0,s)}}class Ht extends i{async get(s,t){return new K(this.session).go(this.pathParameters,s,t)}}class Vt extends i{async get(s,t){return new Q(this.session).go(this.pathParameters,s,t)}}class $t extends i{async get(s){return new z(this.session).go(this.pathParameters,void 0,s)}async update(s,t){return new as(this.session).go(this.pathParameters,void 0,s,t)}}class Bt extends i{async get(s,t){return new X(this.session).go(this.pathParameters,s,t)}}class Ft extends i{async get(s,t){return new ss(this.session).go(this.pathParameters,s,t)}}class Wt extends i{async get(s,t){return new ts(this.session).go(this.pathParameters,s,t)}}class Yt extends i{async get(s,t){return new es(this.session).go(this.pathParameters,s,t)}}class Kt extends c{apikeys(){return new Ct(this.getSession(),this.pathParameters)}invitations(){return new ft(this.getSession(),this.pathParameters)}projects(){return new Ot(this.getSession(),this.pathParameters)}contactsBatch(){return new bt(this.getSession(),this.pathParameters)}user(s){return new _t(this.getSession(),t({},this.pathParameters,{userId:s}))}advancedAssetsReport(){return new Tt(this.getSession(),this.pathParameters)}advancedContactsReport(){return new jt(this.getSession(),this.pathParameters)}advancedScansReport(){return new Dt(this.getSession(),this.pathParameters)}assetsExport(){return new Ut(this.getSession(),this.pathParameters)}assets(){return new Mt(this.getSession(),this.pathParameters)}basicAssetsReport(){return new Lt(this.getSession(),this.pathParameters)}basicContactsReport(){return new qt(this.getSession(),this.pathParameters)}basicScansReport(){return new Gt(this.getSession(),this.pathParameters)}contactsExport(){return new Ht(this.getSession(),this.pathParameters)}contacts(){return new Vt(this.getSession(),this.pathParameters)}pricePlan(){return new $t(this.getSession(),this.pathParameters)}qrCodes(){return new Bt(this.getSession(),this.pathParameters)}scansExport(){return new Ft(this.getSession(),this.pathParameters)}scans(){return new Wt(this.getSession(),this.pathParameters)}users(){return new Yt(this.getSession(),this.pathParameters)}async delete(s){return new j(this.session).go(this.pathParameters,void 0,s)}async get(s){return new L(this.session).go(this.pathParameters,void 0,s)}async update(s,t){return new rs(this.session).go(this.pathParameters,void 0,s,t)}}class Qt extends i{async create(s){return new T(this.session).go(this.pathParameters,void 0,s)}}class Jt extends c{users(){return new Qt(this.getSession(),this.pathParameters)}async delete(s){return new U(this.session).go(this.pathParameters,void 0,s)}async get(s){return new J(this.session).go(this.pathParameters,void 0,s)}}class zt extends i{async get(s){return new is(this.session).go(this.pathParameters,void 0,s)}async update(s){return new cs(this.session).go(this.pathParameters,void 0,s)}}class Zt extends c{secret(){return new zt(this.getSession(),this.pathParameters)}async get(s){return new os(this.session).go(this.pathParameters,void 0,s)}async update(s,t){return new us(this.session).go(this.pathParameters,void 0,s,t)}}class Xt extends i{async create(s,t){return new hs(this.session).go(this.pathParameters,void 0,s,t)}async get(s,t){return new Ps(this.session).go(this.pathParameters,s,t)}}class se extends i{async create(s,t){return new ds(this.session).go(this.pathParameters,void 0,s,t)}async get(s,t){return new gs(this.session).go(this.pathParameters,s,t)}}class te extends i{async get(s,t){return new ls(this.session).go(this.pathParameters,s,t)}}class ee extends c{async link(s,t){return new Ss(this.session).go(this.pathParameters,void 0,s,t)}async unlink(s){return new Ns(this.session).go(this.pathParameters,void 0,s)}}class re extends c{contacts(){return new Xt(this.getSession(),this.pathParameters)}qrCodes(){return new se(this.getSession(),this.pathParameters)}scans(){return new te(this.getSession(),this.pathParameters)}contact(s){return new ee(this.getSession(),t({},this.pathParameters,{contactId:s}))}async delete(s){return new ps(this.session).go(this.pathParameters,void 0,s)}async get(s,t){return new ms(this.session).go(this.pathParameters,s,t)}async update(s,t){return new ws(this.session).go(this.pathParameters,void 0,s,t)}}class ae extends c{async create(s,t){return new xs(this.session).go(this.pathParameters,void 0,s,t)}}class ne extends c{async delete(s){return new Is(this.session).go(this.pathParameters,void 0,s)}async get(s){return new Es(this.session).go(this.pathParameters,void 0,s)}async update(s,t){return new ks(this.session).go(this.pathParameters,void 0,s,t)}}class oe extends i{async get(s){return new ys(this.session).go(this.pathParameters,void 0,s)}}class ie extends i{async get(s){return new As(this.session).go(this.pathParameters,void 0,s)}}class ce extends i{async get(s){return new vs(this.session).go(this.pathParameters,void 0,s)}}class ue extends i{async get(s){return new Rs(this.session).go(this.pathParameters,void 0,s)}}class he extends i{async create(s,t){return new Cs(this.session).go(this.pathParameters,void 0,s,t)}async get(s,t){return new Hs(this.session).go(this.pathParameters,s,t)}}class de extends i{async create(s,t){return new fs(this.session).go(this.pathParameters,void 0,s,t)}}class pe extends i{async create(s,t){return new Os(this.session).go(this.pathParameters,void 0,s,t)}async get(s,t){return new Ws(this.session).go(this.pathParameters,s,t)}}class me extends i{async create(s,t){return new bs(this.session).go(this.pathParameters,void 0,s,t)}async delete(s,t){return new js(this.session).go(this.pathParameters,s,t)}}class Pe extends i{async create(s,t){return new _s(this.session).go(this.pathParameters,void 0,s,t)}async get(s,t){return new Ks(this.session).go(this.pathParameters,s,t)}}class ge extends i{async create(s,t){return new Ts(this.session).go(this.pathParameters,void 0,s,t)}async get(s,t){return new Zs(this.session).go(this.pathParameters,s,t)}}class le extends c{async delete(s){return new Us(this.session).go(this.pathParameters,void 0,s)}async get(s){return new zs(this.session).go(this.pathParameters,void 0,s)}async update(s,t){return new st(this.session).go(this.pathParameters,void 0,s,t)}}class Se extends i{async get(s,t){return new Ms(this.session).go(this.pathParameters,s,t)}}class Ne extends i{async get(s,t){return new Ls(this.session).go(this.pathParameters,s,t)}}class we extends i{async get(s,t){return new qs(this.session).go(this.pathParameters,s,t)}}class xe extends i{async get(s,t){return new Gs(this.session).go(this.pathParameters,s,t)}}class Ie extends i{async get(s){return new Vs(this.session).go(this.pathParameters,void 0,s)}}class Ee extends i{async get(s){return new $s(this.session).go(this.pathParameters,void 0,s)}}class ke extends i{async get(s){return new Bs(this.session).go(this.pathParameters,void 0,s)}}class ye extends i{async get(s,t){return new Fs(this.session).go(this.pathParameters,s,t)}}class Ae extends i{async get(s,t){return new Qs(this.session).go(this.pathParameters,s,t)}}class ve extends i{async get(s,t){return new Js(this.session).go(this.pathParameters,s,t)}}class Re extends c{assets(){return new he(this.getSession(),this.pathParameters)}assetsBatch(){return new de(this.getSession(),this.pathParameters)}contacts(){return new pe(this.getSession(),this.pathParameters)}contactsBatch(){return new me(this.getSession(),this.pathParameters)}qrCodes(){return new Pe(this.getSession(),this.pathParameters)}smsTemplates(){return new ge(this.getSession(),this.pathParameters)}smsTemplate(s){return new le(this.getSession(),t({},this.pathParameters,{smsTemplateName:s}))}advancedAssetsReport(){return new Se(this.getSession(),this.pathParameters)}advancedContactsReport(){return new Ne(this.getSession(),this.pathParameters)}advancedScansReport(){return new we(this.getSession(),this.pathParameters)}assetsExport(){return new xe(this.getSession(),this.pathParameters)}basicAssetsReport(){return new Ie(this.getSession(),this.pathParameters)}basicContactsReport(){return new Ee(this.getSession(),this.pathParameters)}basicScansReport(){return new ke(this.getSession(),this.pathParameters)}contactsExport(){return new ye(this.getSession(),this.pathParameters)}scansExport(){return new Ae(this.getSession(),this.pathParameters)}scans(){return new ve(this.getSession(),this.pathParameters)}async delete(s){return new Ds(this.session).go(this.pathParameters,void 0,s)}async get(s){return new Ys(this.session).go(this.pathParameters,void 0,s)}async update(s,t){return new Xs(this.session).go(this.pathParameters,void 0,s,t)}}class Ce extends c{async delete(s){return new tt(this.session).go(this.pathParameters,void 0,s)}async get(s,t){return new et(this.session).go(this.pathParameters,s,t)}async update(s,t){return new rt(this.session).go(this.pathParameters,void 0,s,t)}}class fe extends i{async create(s,t){return new at(this.session).go(this.pathParameters,void 0,s,t)}}class Oe extends i{async send(s,t){return new ot(this.session).go(this.pathParameters,void 0,s,t)}}class be extends c{contacts(){return new fe(this.getSession(),this.pathParameters)}sms(){return new Oe(this.getSession(),this.pathParameters)}async get(s){return new nt(this.session).go(this.pathParameters,void 0,s)}}class _e extends c{async get(s){return new it(this.session).go(this.pathParameters,void 0,s)}}class Te extends c{async get(s){return new ct(this.session).go(this.pathParameters,void 0,s)}}class je extends i{async get(s,t){return new ut(this.session).go(this.pathParameters,s,t)}}class De extends i{async create(s,t){return new ht(this.session).go(this.pathParameters,void 0,s,t)}async get(s,t){return new dt(this.session).go(this.pathParameters,s,t)}}class Ue extends i{async get(s,t){return new pt(this.session).go(this.pathParameters,s,t)}}class Me extends i{async get(s,t){return new mt(this.session).go(this.pathParameters,s,t)}}class Le extends i{async get(s){return new gt(this.session).go(this.pathParameters,void 0,s)}async update(s,t){return new lt(this.session).go(this.pathParameters,void 0,s,t)}}class qe extends c{settings(){return new Le(this.getSession(),this.pathParameters)}}class Ge extends c{accounts(){return new De(this.getSession(),this.pathParameters)}errors(){return new Ue(this.getSession(),this.pathParameters)}invitations(){return new Me(this.getSession(),this.pathParameters)}path(s){return new qe(this.getSession(),t({},this.pathParameters,{path:s}))}async get(s){return new Pt(this.session).go(this.pathParameters,void 0,s)}async update(s,t){return new St(this.session).go(this.pathParameters,void 0,s,t)}}class He extends i{async create(s){return new Nt(this.session).go(this.pathParameters,void 0,s)}}class Ve extends i{async create(s){return new wt(this.session).go(this.pathParameters,void 0,s)}}class $e extends i{async create(s,t){return new xt(this.session).go(this.pathParameters,void 0,s,t)}}class Be extends i{async get(s,t){return new It(this.session).go(this.pathParameters,s,t)}}class Fe extends i{async create(s,t){return new Et(this.session).go(this.pathParameters,void 0,s,t)}}class We extends i{async delete(s){return new kt(this.session).go(this.pathParameters,void 0,s)}async create(s,t){return new yt(this.session).go(this.pathParameters,void 0,s,t)}}class Ye extends i{async create(s){return new At(this.session).go(this.pathParameters,void 0,s)}}class Ke extends i{async resend(s,t){return new vt(this.session).go(this.pathParameters,void 0,s,t)}}class Qe extends i{async reset(s,t){return new Rt(this.session).go(this.pathParameters,void 0,s,t)}}class Je extends i{account(s){return new Kt(this.getSession(),t({},this.pathParameters,{accountId:s}))}invitation(s){return new Jt(this.getSession(),t({},this.pathParameters,{invitationId:s}))}apikey(s){return new Zt(this.getSession(),t({},this.pathParameters,{apiKeyId:s}))}asset(s){return new re(this.getSession(),t({},this.pathParameters,{assetId:s}))}billingSession(s){return new ae(this.getSession(),t({},this.pathParameters,{accountId:s}))}contact(s){return new ne(this.getSession(),t({},this.pathParameters,{contactId:s}))}overviewAccounts(){return new oe(this.getSession(),this.pathParameters)}overviewActivity(){return new ie(this.getSession(),this.pathParameters)}overviewUsers(){return new ce(this.getSession(),this.pathParameters)}pricePlans(){return new ue(this.getSession(),this.pathParameters)}project(s){return new Re(this.getSession(),t({},this.pathParameters,{projectId:s}))}qrCode(s){return new Ce(this.getSession(),t({},this.pathParameters,{qrCodeId:s}))}scan(s){return new be(this.getSession(),t({},this.pathParameters,{scanId:s}))}searchAccount(s){return new _e(this.getSession(),t({},this.pathParameters,{accountId:s}))}searchUser(s){return new Te(this.getSession(),t({},this.pathParameters,{userId:s}))}searchAccounts(){return new je(this.getSession(),this.pathParameters)}user(s){return new Ge(this.getSession(),t({},this.pathParameters,{userId:s}))}webhookSms(){return new He(this.getSession(),this.pathParameters)}webhookSmsStatus(){return new Ve(this.getSession(),this.pathParameters)}passwordAuthUser(){return new $e(this.getSession(),this.pathParameters)}authConfirm(){return new Be(this.getSession(),this.pathParameters)}authUser(){return new Fe(this.getSession(),this.pathParameters)}authSession(){return new We(this.getSession(),this.pathParameters)}refreshAuthSession(){return new Ye(this.getSession(),this.pathParameters)}confirmationAuthUser(){return new Ke(this.getSession(),this.pathParameters)}resetAuthUser(){return new Qe(this.getSession(),this.pathParameters)}}class ze{constructor(){this.debugConfig=!1,this.debugAuth=!1,this.debugRequest=!1,this.debugResponse=!1,this.debugError=!1,this.debugQuery=!1,this.debugOptions=!1,this.exp=0}getConfig(){throw Error("no session")}getCloudConfig(){throw Error("no session")}getAxios(){throw Error("no session")}authorize(){throw Error("no session")}getUser(){throw Error("no session")}getSignedInUser(){throw Error("no session")}signUpUser(){throw Error("no session")}changePassword(){throw Error("no session")}signOut(){throw Error("no session")}}class Ze extends Je{constructor(){super(new ze,{}),this._config=void 0,this.cloudConfigName=void 0,this.cloudConfig=void 0,this.axios=void 0,this.debugConfig=!1,this.debugAuth=!1,this.debugRequest=!1,this.debugResponse=!1,this.debugError=!1,this.debugQuery=!1,this.debugOptions=!1,this.exp=void 0,this._user=void 0,this.exp=0;let{OS_DEBUG:s}=process.env;if(s){let t;switch(console.log(`OS_DEBUG=${s}`),s=s.toLowerCase(),s){case"all":this.debugConfig=!0,this.debugAuth=!0,this.debugRequest=!0,this.debugResponse=!0,this.debugError=!0,this.debugQuery=!0,this.debugOptions=!0;break;case"none":case"off":case"false":case"":this.debugConfig=!1,this.debugAuth=!1,this.debugRequest=!1,this.debugResponse=!1,this.debugError=!1,this.debugQuery=!1,this.debugOptions=!1;break;default:t=s.split(","),this.debugConfig=t.includes("config"),this.debugAuth=t.includes("auth"),this.debugRequest=t.includes("request"),this.debugResponse=t.includes("response"),this.debugError=t.includes("error"),this.debugQuery=t.includes("query"),this.debugOptions=t.includes("options"),this.debugConfig||this.debugAuth||this.debugRequest||this.debugResponse||this.debugError||this.debugQuery||this.debugOptions||console.warn(`Openscreen: OS_DEBUG environment var has invalid value: '${process.env.OS_DEBUG}'`)}}}getSession(){return this}config(s){if(this._config)throw Error("Openscreen: client is already configured");if(!s.key)throw Error("Openscreen: invalid config, provide API key and secret, or email and password");if(!s.secret)throw Error("Openscreen: invalid config, secret is missing");return"string"==typeof s.environment?this.cloudConfigName=s.environment:"object"==typeof s.environment?this.cloudConfig=Promise.resolve(s.environment):this.cloudConfigName="internal-JG0adajZUHU",this._config=s,this}getConfig(){if(!this._config)throw Error("Openscreen: client must be configured before accessing resources");return this._config}async getSignedInUser(s){this.cloudConfigName=s||"internal-JG0adajZUHU";const t=await this.getCloudConfig();this.debugAuth&&console.info("Openscreen AUTH: refreshing using axios cookie"),await this.getAxios();const e=await this.axios.post(`${t.endpoint}/auth/session/refresh`);if(403===e.status||500===e.status)throw Error("Openscreen AUTH: User is not signed in");if(200===e.status){const{expires:s,user:t}=e.data;return this._user=t,this.debugAuth&&console.info(`Openscreen AUTH: authorized '${t.userId}' until expiry=${s}`),this.exp=s,t}}async signUpUser(s,t){this.cloudConfigName=t||"internal-JG0adajZUHU";const e=await this.getCloudConfig();this.debugAuth&&console.info("Openscreen AUTH: signing up User"),await this.getAxios();const r=await this.axios.post(`${e.endpoint}/auth/user`,s);if(403===r.status||500===r.status)throw Error("Openscreen AUTH: User Sign Up failed");return(200===r.status||204===r.status)&&(this.debugAuth&&console.info("Openscreen AUTH: Signed up user"),!0)}async authorize(){const s=await this.getCloudConfig();if(this.exp>(new Date).getTime())return;if(0!==this.exp){this.debugAuth&&console.info("Openscreen AUTH: refreshing using axios cookie"),await this.getAxios();const t=await this.axios.post(`${s.endpoint}/auth/session/refresh`);if(403===t.status||500===t.status)throw Error("Openscreen AUTH: Refreshing failed, exiting");if(200===t.status){const{expires:s,user:e}=t.data;return this._user=e,this.debugAuth&&console.info(`Openscreen AUTH: authorized '${e.userId}' until expiry=${s}`),void(this.exp=s)}}const e=this.getConfig();if(this.debugConfig){const s=t({},e);s.secret&&(s.secret="*".repeat(s.secret.length)),console.debug(`Openscreen CONFIG: ${JSON.stringify(s,null,2)}`)}let r,a;this.debugConfig&&console.debug(`Openscreen CONFIG: (environment) ${JSON.stringify(s,null,2)}`),r=e.key,a=e.secret,this.debugAuth&&console.info(`Openscreen AUTH: authorizing '${r}'`),await this.getAxios();const n=await this.axios.post(`${s.endpoint}/auth/session`,{email:r,password:a});if(403===n.status||500===n.status)throw Error("Openscreen AUTH: authentication failed");if(200===n.status){const{expires:s,user:t}=n.data;this._user=t,this.debugAuth&&console.info(`Openscreen AUTH: authorized '${r}' until expiry=${s}`),this.exp=s}}getUser(){return this._user}async getCloudConfig(){if(!this.cloudConfig){if(!this.cloudConfigName)throw Error("Openscreen: environment name missing");this.cloudConfig=async function(t){const e=s.create({baseURL:"https://config.openscreen.com",timeout:25e3,responseType:"json",maxContentLength:10240,maxBodyLength:10240,maxRedirects:1,decompress:!0}),r=await e.get(`${t}.json`).catch(s=>{throw new Error(`Openscreen: unable to load cloud configuration '${t}': ${s.message}`)}),{data:a}=r;return a}(this.cloudConfigName)}return this.cloudConfig}async getAxios(){if(this.axios)return this.axios;const t=await this.getCloudConfig();return this.axios=s.create(t.axios||{timeout:25e3,responseType:"json",maxContentLength:1048576,maxBodyLength:1048576,maxRedirects:1,decompress:!0}),s}async changePassword(s,t){const e=await this.getCloudConfig();await this.getAxios();const r=await this.axios.post(`${e.endpoint}/auth/user/password`,{password:s,newPassword:t});if(200===r.status)return!0;throw this.debugAuth&&console.log("password change failed for the current user, got the error",r.data),new Error("Failed to change password")}async signOut(){const s=await this.getCloudConfig();await this.getAxios();const t=await this.axios.delete(`${s.endpoint}/auth/session`);if(200!==t.status)throw this.debugAuth&&console.log("Sign out failed, response body is ",t.data),new Error("Failed to sign out")}}export{u as AccountStatus,h as AccountUserRole,d as AuthMessageId,p as AuthTokenScope,xt as ChangePasswordRequest,It as ConfirmRequest,ht as CreateAccountByUserIdRequest,O as CreateApiKeyByAccountIdRequest,Cs as CreateAssetByProjectIdRequest,fs as CreateAssetsByProjectIdRequest,hs as CreateContactByAssetIdRequest,Os as CreateContactByProjectIdRequest,at as CreateContactByScanIdRequest,bs as CreateContactsByProjectIdRequest,xs as CreateCustomerPortalSessionRequest,b as CreateInvitationByAccountIdRequest,_ as CreateProjectByAccountIdRequest,ds as CreateQrCodeByAssetIdRequest,_s as CreateQrCodeByProjectIdRequest,Nt as CreateSmsResponseRequest,Ts as CreateSmsTemplateByProjectIdRequest,T as CreateUserByInvitationIdRequest,Et as CreateUserRequest,j as DeleteAccountRequest,ps as DeleteAssetRequest,Is as DeleteContactRequest,D as DeleteContactsByAccountIdRequest,js as DeleteContactsByProjectIdRequest,U as DeleteInvitationRequest,Ds as DeleteProjectRequest,tt as DeleteQrCodeRequest,kt as DeleteSessionRequest,Us as DeleteSmsTemplateByProjectIdRequest,M as DeleteUserByAccountIdRequest,it as GetAccountDetailsRequest,L as GetAccountRequest,dt as GetAccountsByUserIdRequest,ys as GetAccountsOverviewRequest,As as GetActivityOverviewRequest,q as GetAdvancedAssetReportByAccountIdRequest,Ms as GetAdvancedAssetReportByProjectIdRequest,G as GetAdvancedContactReportByAccountIdRequest,Ls as GetAdvancedContactReportByProjectIdRequest,H as GetAdvancedScanReportByAccountIdRequest,qs as GetAdvancedScanReportByProjectIdRequest,os as GetApiKeyRequest,is as GetApiKeySecretRequest,V as GetApiKeysByAccountIdRequest,$ as GetAssetExportByAccountIdRequest,Gs as GetAssetExportByProjectIdRequest,ms as GetAssetRequest,B as GetAssetsByAccountIdRequest,Hs as GetAssetsByProjectIdRequest,F as GetBasicAssetReportByAccountIdRequest,Vs as GetBasicAssetReportByProjectIdRequest,W as GetBasicContactReportByAccountIdRequest,$s as GetBasicContactReportByProjectIdRequest,Y as GetBasicScanReportByAccountIdRequest,Bs as GetBasicScanReportByProjectIdRequest,K as GetContactExportByAccountIdRequest,Fs as GetContactExportByProjectIdRequest,Es as GetContactRequest,Q as GetContactsByAccountIdRequest,Ps as GetContactsByAssetIdRequest,Ws as GetContactsByProjectIdRequest,pt as GetErrorsByUserIdRequest,J as GetInvitationRequest,mt as GetInvitationsByUserIdRequest,z as GetPricePlanByAccountIdRequest,Rs as GetPricePlansRequest,Ys as GetProjectByProjectIdRequest,Z as GetProjectsByAccountIdRequest,et as GetQrCodeRequest,X as GetQrCodesByAccountIdRequest,gs as GetQrCodesByAssetIdRequest,Ks as GetQrCodesByProjectIdRequest,ss as GetScanExportByAccountIdRequest,Qs as GetScanExportByProjectIdRequest,nt as GetScanRequest,ts as GetScansByAccountIdRequest,ls as GetScansByAssetIdRequest,Js as GetScansByProjectIdRequest,At as GetSessionRefreshRequest,yt as GetSessionRequest,zs as GetSmsTemplateByProjectIdRequest,Zs as GetSmsTemplatesByProjectIdRequest,ct as GetUserDetailsRequest,Pt as GetUserRequest,gt as GetUserSettingsByUserIdRequest,es as GetUsersByAccountIdRequest,vs as GetUsersOverviewRequest,Ss as LinkContactToAssetRequest,Ze as Openscreen,m as PricePlanName,P as PricePlanPaymentPeriod,g as PricePlanReporting,l as ProjectStatus,S as QrCodeCornerDotTypes,N as QrCodeCornerSquareTypes,w as QrCodeDotTypes,x as QrCodeDynamicRedirectType,I as QrCodeErrorCorrectionLevel,E as QrCodeGradientTypes,k as QrCodeIntentType,y as QrCodeLocatorKeyType,A as QrCodeStatus,v as QrCodeType,vt as ResendConfirmationRequest,cs as ResetApiKeySecretRequest,Rt as ResetPasswordRequest,Tt as SdkAccountAdvancedAssetsReportResources,jt as SdkAccountAdvancedContactsReportResources,Dt as SdkAccountAdvancedScansReportResources,Ct as SdkAccountApikeysResources,Ut as SdkAccountAssetsExportResources,Mt as SdkAccountAssetsResources,Lt as SdkAccountBasicAssetsReportResources,qt as SdkAccountBasicContactsReportResources,Gt as SdkAccountBasicScansReportResources,bt as SdkAccountContactsBatchResources,Ht as SdkAccountContactsExportResources,Vt as SdkAccountContactsResources,ft as SdkAccountInvitationsResources,$t as SdkAccountPricePlanResources,Ot as SdkAccountProjectsResources,Bt as SdkAccountQrCodesResources,Kt as SdkAccountResource,Ft as SdkAccountScansExportResources,Wt as SdkAccountScansResources,_t as SdkAccountUserResource,Yt as SdkAccountUsersResources,Zt as SdkApikeyResource,zt as SdkApikeySecretResources,ee as SdkAssetContactResource,Xt as SdkAssetContactsResources,se as SdkAssetQrCodesResources,re as SdkAssetResource,te as SdkAssetScansResources,Be as SdkAuthConfirmResources,We as SdkAuthSessionResources,Fe as SdkAuthUserResources,ae as SdkBillingSessionResource,Ke as SdkConfirmationAuthUserResources,ne as SdkContactResource,Jt as SdkInvitationResource,Qt as SdkInvitationUsersResources,oe as SdkOverviewAccountsResources,ie as SdkOverviewActivityResources,ce as SdkOverviewUsersResources,$e as SdkPasswordAuthUserResources,ue as SdkPricePlansResources,Se as SdkProjectAdvancedAssetsReportResources,Ne as SdkProjectAdvancedContactsReportResources,we as SdkProjectAdvancedScansReportResources,de as SdkProjectAssetsBatchResources,xe as SdkProjectAssetsExportResources,he as SdkProjectAssetsResources,Ie as SdkProjectBasicAssetsReportResources,Ee as SdkProjectBasicContactsReportResources,ke as SdkProjectBasicScansReportResources,me as SdkProjectContactsBatchResources,ye as SdkProjectContactsExportResources,pe as SdkProjectContactsResources,Pe as SdkProjectQrCodesResources,Re as SdkProjectResource,Ae as SdkProjectScansExportResources,ve as SdkProjectScansResources,le as SdkProjectSmsTemplateResource,ge as SdkProjectSmsTemplatesResources,Ce as SdkQrCodeResource,Ye as SdkRefreshAuthSessionResources,Qe as SdkResetAuthUserResources,Je as SdkResources,fe as SdkScanContactsResources,be as SdkScanResource,Oe as SdkScanSmsResources,_e as SdkSearchAccountResource,je as SdkSearchAccountsResources,Te as SdkSearchUserResource,De as SdkUserAccountsResources,Ue as SdkUserErrorsResources,Me as SdkUserInvitationsResources,qe as SdkUserPathResource,Le as SdkUserPathSettingsResources,Ge as SdkUserResource,He as SdkWebhookSmsResources,Ve as SdkWebhookSmsStatusResources,ut as SearchAccountsRequest,ot as SendSmsByScanIdRequest,lt as SetUserSettingsByUserIdRequest,wt as SmsStatusUpdateRequest,Ns as UnlinkContactToAssetRequest,rs as UpdateAccountRequest,us as UpdateApiKeyRequest,ws as UpdateAssetRequest,ks as UpdateContactRequest,as as UpdatePricePlanByAccountIdRequest,Xs as UpdateProjectByProjectIdRequest,rt as UpdateQrCodeRequest,st as UpdateSmsTemplateRequest,ns as UpdateUserByAccountIdRequest,St as UpdateUserRequest,R as UserCredentialsStatus,C as UserGroups,f as UserSettingsDomain};
2
- //# sourceMappingURL=index.esm.mjs.map