@bitbar/cloud-api-client 1.4.7 → 1.4.9

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,4 +1,4 @@
1
- /* @bitbar/cloud-api-client v1.4.7 | Copyright 2025 (c) SmartBear Software and contributors | .git/blob/master/LICENSE */
1
+ /* @bitbar/cloud-api-client v1.4.9 | Copyright 2025 (c) SmartBear Software and contributors | .git/blob/master/LICENSE */
2
2
  !function(e,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports,require("@bitbar/finka"),require("qs"),require("node-abort-controller")):"function"==typeof define&&define.amd?define(["exports","@bitbar/finka","qs","node-abort-controller"],s):s((e="undefined"!=typeof globalThis?globalThis:e||self)["bitbar-cloud-api-client"]={},e["@bitbar/finka"],e.qs,e["node-abort-controller"])}(this,(function(e,s,t,r){"use strict";
3
3
  /******************************************************************************
4
4
  Copyright (c) Microsoft Corporation.
@@ -14,5 +14,5 @@
14
14
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
15
  PERFORMANCE OF THIS SOFTWARE.
16
16
  ***************************************************************************** */
17
- function n(e,s,t,r){var n,i=arguments.length,u=i<3?s:null===r?r=Object.getOwnPropertyDescriptor(s,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,s,t,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(u=(i<3?n(u):i>3?n(s,t,u):n(s,t))||u);return i>3&&u&&Object.defineProperty(s,t,u),u}"function"==typeof SuppressedError&&SuppressedError;class i{constructor(e,s,t){this.name=e,this.value=s,this.operand=t}}s();class u{constructor(){this.filters=[]}gt(e,s){return this.add(e,s,"gt")}lt(e,s){return this.add(e,s,"lt")}after(e,s){return this.add(e,s,"after",!0)}afterorequal(e,s){return this.add(e,s,"afterorequal",!0)}before(e,s){return this.add(e,s,"before",!0)}beforeorequal(e,s){return this.add(e,s,"beforeorequal",!0)}on(e,s){return this.add(e,s,"on")}eq(e,s){return this.add(e,s,"eq")}contains(e,s){return this.add(e,s,"contains")}like(e,s){return this.add(e,s,"like")}notlike(e,s){return this.add(e,s,"notlike")}isnull(e){return this.add(e,void 0,"isnull")}isnotnull(e){return this.add(e,void 0,"isnotnull")}in(e,s){return this.add(e,s,"in",!0)}notin(e,s){return this.add(e,s,"notin",!0)}raw(e){const s=Array.wrap(e);for(const e of s){if(!this.isFilterPart(e))throw new SyntaxError(`Filter ${e} has invalid syntax`);this.filters.push(e)}}isFilterPart(e){return/^[a-zA-Z0-9.]{2,12}_(?:isnull$|(?:gt|lt|(?:after|before)(?:orequal)?|on|eq|contains|like|(?:not)?in)_)/.test(e)}toString(){const e=[];let s,t;for(const r of this.filters)"string"==typeof r?s=r:(t="",(r.value.length>1||void 0!==r.value[0])&&(t=`_${r.value.join("|")}`),s=`${r.name}_${r.operand}${t}`),e.push(s);return e.join(";")}add(e,s,t,r=!1){let n=Array.wrap(s);if(0===n.length)return this;for(let e=0;e<n.length;e++){const s=n[e];"object"==typeof s&&s instanceof Date&&(n[e]=s.getTime())}let u=!1;if(r){for(const e of n)null===e&&(u=!0);u&&(n=n.filter((e=>null!==e)),t+="ornull")}return t.endsWith("ornull")&&0===n.length&&(t="isnull"),this.filters.push(new i(e,n,t)),this}}const o=["GET","POST","DELETE"];var a;e.APIOrder=void 0,(a=e.APIOrder||(e.APIOrder={})).asc="a",a.desc="d";class h{constructor(e){this.stack=[],this.requestConfig={},this.ALLOWED_HTTP_METHODS=o,e instanceof h?(this.root=e.root,Array.isArray(e.stack)&&this.push(...e.stack),null!=e.requestConfig&&this.setRequestConfig(e.requestConfig)):this.root=e,this.abortController=new r.AbortController}abortRequest(){this.abortController.abort(),this.abortController=new r.AbortController}push(...e){return this.stack=this.stack.concat(e),this}shift(){return this.stack.shift(),this}restack(...e){return this.stack=e,this}get first(){return this.stack[0]}get last(){return this.stack[this.stack.length-1]}set last(e){this.stack[this.stack.length-1]=e}toUrl(e=!1){let s=`/${this.stack.join("/")}`;return e&&(s=this.root.baseUrl+s),s}setRequestConfig(e){return Object.deepAssign(this.requestConfig,e),this}removeRequestConfig(e){return delete this.requestConfig[e],this}headers(e){const s={};for(const t in e){s[t.replace(/(?:^|-)([a-z])/g,(e=>e.toUpperCase()))]=e[t]}return this.setRequestConfig({headers:s})}method(e){const s=e.toLocaleUpperCase();if(!(this.ALLOWED_HTTP_METHODS.indexOf(s)>-1))throw new Error(`Method '${s}' is not allowed! You can use: ${this.ALLOWED_HTTP_METHODS.join(", ")}`);return this.setRequestConfig({method:s})}get(){return this.method("GET")}post(){return this.method("POST")}delete(){return this.method("DELETE")}params(e){return this.setRequestConfig({params:e}),this}getParams(){return null==this.requestConfig.params?{}:this.requestConfig.params}removeParam(e){return delete this.requestConfig.params[e],this}data(e){return this.setRequestConfig({data:e}),this}jsonData(e){return this.headers({"Content-Type":"application/json"}).data(e),this}formData(e){return this.headers({"Content-Type":"multipart/form-data"}).data(e),this}send(){const e=Object.deepAssign({},this.requestConfig,{url:`/${this.stack.join("/")}`,signal:this.abortController.signal});return null==e.headers&&(e.headers={}),null==e.headers["Content-Type"]&&(e.headers["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),"POST"===e.method&&e.headers["Content-Type"].startsWith("application/x-www-form-urlencoded")&&null!=e.data&&(e.data=this.paramsSerializer(e.data)),e.params&&(e.paramsSerializer=this.paramsSerializer),this.root.axios.request(e)}paramsSerializer(e){return t.stringify(e,{arrayFormat:"brackets"})}}class c extends h{constructor(){super(...arguments),this.all=this.noLimit,this.cut=this.between}create(e){return this.post().data(e).send()}sort(s,t=e.APIOrder.asc){return this.params({sort:`${s}_${t}`})}limit(e=20){if(!Number.isNatural(e))throw new Error(`Limit '${e}' is invalid!`);return this.params({limit:e})}getLimit(){const e=this.getParams();return null==e.limit?20:e.limit}noLimit(){return this.limit(0)}offset(e=0){if(!Number.isNatural(e))throw new Error(`Offset '${e}' is invalid!`);return this.params({offset:e})}between(e,s){if(!Number.isNatural(e))throw new Error(`From '${e}' is invalid!`);if(!Number.isNatural(s))throw new Error(`To '${s}' is invalid!`);return this.params({offset:e,limit:s-e+1})}only(e){if(!Number.isNatural(e))throw new Error(`Index '${e}' is invalid!`);return this.params({offset:e,limit:1})}page(e=1){if(!Number.isNatural(e)||0==e)throw new Error(`Page '${e}' is invalid!`);const s=this.getLimit(),t=(e-1)*s;return this.params({offset:t,limit:s})}search(e){if("string"!=typeof e)throw new Error("Search query must be a string!");return this.params({search:e})}filter(e){if("string"!=typeof e&&!(e instanceof u))throw new Error("Filter must be either string or instance of FilterBuilder");return this.params({filter:e.toString()})}}class l extends h{}class p extends c{constructor(e){super(e),this.push("cleanup-configurations")}specific(){return new l(this).push("specific")}}class E extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("cleanup-configurations",s)}devices(){return new c(this).push("devices")}}class d extends c{constructor(e){super(e),this.push("admin","devices")}cleanupConfigurations(){return new p(this)}cleanupConfiguration(e){return new E(this,e)}}class w extends c{constructor(e){super(e),this.push("admin","notification-plans")}channels(){return new c(this).push("channels")}scopes(){return new c(this).push("scopes")}}class T extends c{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["GET"],this.push("admin","runs")}config(){const e=new l(this);return e.restack("runs","config"),e}}class I extends c{constructor(e){super(e),this.push("admin","services")}active(){const e=new c(this);return e.params({notArchived:!0}),e}activated(){const e=this.active();return e.params({filter:"activated_eq_true",limit:0,sort:"name_a"}),e}inUse(){const e=new c(this);return e.params({inUse:!0,limit:0,sort:"name_a"}),e}byPrice(){const e=new c(this);return e.params({sort:"centPrice_a"}),e}}function N(e){return class extends e{send(){return Promise.reject()}}}let A=class extends c{constructor(e){super(e),this.push("admin","statistics")}deviceSessions(){return new c(this).push("device-sessions")}frameworks(){return new c(this).push("frameworks")}};A=n([N],A);class R extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","accounts",s)}roles(){return new c(this).push("roles")}role(e){return new l(this).push("roles",e)}accountServices(){return new c(this).push("account-services")}preferences(){return new l(this).push("preferences")}}class S extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","account-services",s)}activate(){return new l(this).push("activate").post()}deactivate(){return new l(this).push("deactivate").post()}}class f extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("clusters",s)}devices(){return new c(this).push("devices")}}class O extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","devices",s)}cleanupConfiguration(){return new l(this).push("cleanup-configuration")}labels(){return new c(this).push("labels")}label(e){return new l(this).push("labels",e)}queue(){return new c(this).push("queue")}}class L extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","device-models",s)}browsers(){return new c(this).push("browsers")}}e.InputFileset=class extends l{constructor(e){super(e),this.push("input-file-set")}files(){return new c(this).push("files")}filesZip(){return new l(this).push("files.zip")}},e.InputFileset=n([N],e.InputFileset);const _=new u;_.eq("state","READY"),_.in("mimetype",["image/png","image/jpg","image/jpeg","image/webp","image/gif"]),_.notlike("name","action-%%");const C=new u;C.eq("state","READY"),C.notin("mimetype",["image/png","image/jpg","image/jpeg","image/webp","image/gif","video/mp4","video/avi","video/webm","video/ogg","video/mpeg"]),e.OutputFileset=class extends l{constructor(e){super(e),this.push("output-file-set")}files(){return new c(this).push("files")}file(e){return new l(this).push("files",e)}filesZip(){return new l(this).push("files.zip")}screenshots(){return new c(this).push("screenshots")}screenshot(e){return new l(this).push("screenshots",e)}screenshotFile(e){return this.screenshot(e).push("file")}videos(){return this.files().params({filter:"s_state_eq_READY",tag:["video"]})}nonMediaFiles(){return this.files().filter(C)}performance(){return this.files().params({tag:["performance"]})}images(){return this.files().filter(_)}},e.OutputFileset=n([N],e.OutputFileset);class m extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-sessions",s)}commands(){return new c(this).push("commands")}input(){return new e.InputFileset(this)}output(){return new e.OutputFileset(this)}release(){return new l(this).push("release").post()}screenshots(){return new c(this).push("screenshots")}screenshot(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("screenshots",e)}steps(){return new c(this).push("steps")}step(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("steps",e)}currentStep(){return this.step("current")}testCaseRuns(){return new c(this).push("test-case-runs")}connections(){return new c(this).push("connections")}logs(){return new l(this).push("logs").setRequestConfig({responseType:"text"})}clusterLogs(){return new l(this).push("cluster-logs").setRequestConfig({responseType:"text"})}}class v extends m{changeBillable(e){return function(e,s){const t=new l(e),r=t.last;return t.restack("admin","device-sessions",r,"changebillable").params({billable:s}).post()}(this,e)}}class D extends c{constructor(e){super(e),this.push("admin","device-time")}countSessionReport(){return new c(this).push("count-session-report")}stepTimeReport(){return new c(this).push("step-time-report")}}class U extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","frameworks",s)}config(){return new l(this).push("config")}requiredRoles(){return new c(this).push("required-roles")}}class g extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","licenses",s)}activate(){return new l(this).push("activate")}deactivate(){return new l(this).push("deactivate")}resend(){return new l(this).push("resend")}download(){return new l(this).push("download")}}class b extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","notification-plans",s)}check(){return new c(this).push("check")}test(){return new l(this).push("test")}execute(){return new l(this).push("execute")}}function P(e,s,t){const r=new l(e).push(s);return null!=t&&r.params({deviceRunIds:t}),r.post()}class y extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","runs",s)}abort(){return new l(this).push("abort").post()}changeBillable(e){return new l(this).push("changebillable").post().params({billable:e})}changePriority(e){const s=new l(this).push("changepriority");return e&&s.post().data({priority:e}),s}retry(e){return P(this,"retry",e).setRequestConfig({timeout:0})}}class F extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","services",s)}activate(){return new l(this).push("activate").post()}}let M=class extends l{constructor(e){super(e),this.push("account")}roles(){return new c(this).push("roles")}role(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("roles",e)}services(){const e=new c(this);return e.last+="-services",e}update(){const e=new l(this);return e.last="update-account",e.post()}};M=n([N],M);class G extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-sessions",s)}connections(){return new c(this).push("connections")}connection(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("connections",e)}input(){return new e.InputFileset(this)}output(){return new e.OutputFileset(this)}release(){return new l(this).push("release").post()}visualTestsImages(){return new c(this).push("visual-tests","images")}}let x=class extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","users",s)}disable(){return new l(this).push("disable")}enable(){return new l(this).push("enable")}licenses(){return new c(this).push("licenses")}resendActivation(){return new l(this).push("resend-activation").post()}account(){return new M(this)}deviceSession(e){return new G(this,e)}roles(){return new c(this).push("roles")}role(e){return new l(this).push("roles",e)}};x=n([N],x);class B extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("access-groups",s)}users(){return new c(this).push("users")}user(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("users",e)}resources(){return new c(this).push("resources")}resource(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("resources",e)}}class k extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-groups",s)}devices(){return new c(this).push("devices")}device(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("devices",e)}selectors(){return new c(this).push("selectors")}selector(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("selectors",e)}share(){return new c(this).push("share")}}class H extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("files",s)}file(){return new l(this).push("file")}icon(){return new l(this).push("icon")}tags(){return new c(this).push("tags")}share(){return new c(this).push("share")}property(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("properties",e)}}class q extends m{abort(){return new l(this).push("abort").post()}retry(){return new l(this).push("retry").post()}}class W extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("runs",s)}abort(){return new l(this).push("abort").post()}buildLogsZip(e){return P(this,"build-logs.zip",e)}dataAvailability(){return new l(this).push("data-availability")}deviceSessions(){return new c(this).push("device-sessions")}filesZip(e){return P(this,"files.zip",e)}logsZip(e){return P(this,"logs.zip",e)}performanceZip(e){return P(this,"performance.zip",e)}retry(e){return P(this,"retry",e).setRequestConfig({timeout:0})}screenshotNames(){return new c(this).push("screenshot-names")}screenshots(){return new c(this).push("screenshots")}screenshotsZip(e){return P(this,"screenshots.zip",e)}steps(){return new c(this).push("steps")}tags(){return new c(this).push("tags")}tag(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("tags",e)}}class K extends W{deviceSession(e){return new q(this,e)}}class V extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("projects",s)}runs(){return new c(this).push("runs")}run(e){return new K(this,e)}share(){return new c(this).push("share")}unarchive(){return new l(this).push("unarchive")}}let Y=class extends l{constructor(e){super(e)}accessGroups(){return new c(this).push("access-groups")}accessGroup(e){return new B(this,e)}accounts(){return new c(this).push("admin","accounts")}account(e){if(null==e)throw new Error("Resource ID cannot be null!");return new R(this,e)}accountServices(){return new c(this).push("admin","account-services")}accountService(e){return new S(this,e)}activities(){return new c(this).push("admin","activities")}administrators(){return new c(this).push("admin","administrators")}billingPeriods(){return new c(this).push("admin","billing-periods")}billingPeriod(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("admin","billing-periods",e)}browsers(){return new c(this).push("admin","browsers")}browser(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("admin","browsers",e)}clusters(){return new c(this).push("clusters")}cluster(e){return new f(this,e)}countryVatRates(){return new c(this).push("admin","country-vat-rates")}countryVatRate(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("admin","country-vat-rates",e)}devices(){return new d(this)}device(e){return new O(this,e)}devicesForModel(e){if(null==e)throw new Error("Resource ID cannot be null!");const s=this.devices();return s.params({filter:"deviceModelId_eq_"+e}),s}deviceStatuses(){return new c(this).push("admin","device","statuses")}deviceModels(){return new c(this).push("admin","device-models")}deviceModel(e){return new L(this,e)}deviceProblems(){return new c(this).push("admin","device-problems")}deviceModelCriterias(){return new c(this).push("admin","device-model-criteria")}deviceModelCriteria(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("admin","device-model-criteria",e)}deviceSessions(){return new c(this).push("admin","device-sessions")}deviceSession(e){return new v(this,e)}deviceTime(){return new D(this)}deviceTimeSummary(){return new c(this).push("admin","device-time-summary")}deviceTypes(){return new c(this).push("admin","device-types")}deviceType(e){return new l(this).push("admin","device-types",e)}deviceGroups(){return new c(this).push("device-groups")}deviceGroup(e){return new k(this,e)}emails(){return new c(this).push("admin","emails")}resendEmail(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("admin","emails",e,"resend").post()}errors(){return new c(this).push("admin","errors")}files(){return new c(this).push("files")}file(e){return new H(this,e)}frameworks(){return new c(this).push("admin","frameworks")}framework(e){return new U(this,e)}frameworkAvailableLabels(){const e=this.frameworks();return e.push("available-labels"),e}interactiveQueue(){return new c(this).push("admin","interactive-queue")}licenses(){return new c(this).push("admin","licenses")}license(e){return new g(this,e)}maintenance(){return new l(this).push("admin","maintenance")}notificationPlans(){return new w(this)}notificationPlan(e){return new b(this,e)}overview(){return new l(this).push("admin","overview")}pools(){return new c(this).push("admin","pools")}pool(e){return new l(this).push("admin","pools",e)}projects(){return new c(this).push("projects")}project(e){return new V(this,e)}roles(){return new c(this).push("admin","roles")}runs(){return new T(this)}run(e){return new y(this,e)}samples(){return new c(this).push("admin","samples")}sample(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("admin","samples",e)}services(){return new I(this)}service(e){return new F(this,e)}settings(){return new l(this).push("admin","settings")}statistics(){return new A(this)}users(){return new c(this).push("users")}createUser(){return new c(this).push("admin","users").post()}user(e){return new x(this,e)}};Y=n([N],Y);class j extends c{constructor(e){super(e),this.push("devices")}filters(){return new l(this).push("filters")}desktopBrowserCapabilities(){return new l(this).push("desktop-browser-capabilities")}}class $ extends c{constructor(e){super(e),this.push("properties")}maintenance(){return new c(this).params({filter:"name_eq_CLOUD_HEADER_ANNOUNCEMENT",limit:1,sort:"updateTime_d"})}}class z extends c{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["POST"],this.push("services")}available(){return new c(this).push("available")}active(){const e=new c(this);return"me"===this.first?e.push("active"):e.params({notArchived:!0}),e}byPrice(){return new c(this).sort("centPrice")}availableByPrice(){return new c(this).push("available").sort("centPrice")}}class X extends c{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["GET","POST"],this.push("users")}activate(){return new l(this).push("activate").post()}recoveries(){return new l(this).push("recoveries")}passwordRecovery(){return new l(this).push("password-recovery")}}class J extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("billing-periods",s)}receipt(){return new l(this).push("receipt").setRequestConfig({responseType:"arraybuffer"})}}class Z extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("accounts",s)}concurrencyStatus(){return new l(this).push("concurrency-status")}deviceTime(){return new c(this).push("device-time")}deviceTimeSummary(){return new c(this).push("device-time-summary")}preferences(){return new l(this).push("preferences")}users(){return new c(this).push("users")}removeUser(e){return new l(this).push("users",e)}disableUser(e){return new l(this).push("users",e,"disable").post()}enableUser(e){return new l(this).push("users",e,"enable").post()}resendActivation(e){return new l(this).push("users",e,"resend-activation").post()}billingPeriods(){return new c(this).push("billing-periods")}billingPeriod(e){return new J(this,e)}serviceBillingPeriod(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("account-services",e,"billing-period")}visualTestAccess(){return new l(this).push("visual-tests","access")}accountServices(){return new c(this).push("account-services")}accountService(e){return new c(this).push("account-services",e)}}class Q extends l{constructor(e){super(e),this.push("broker")}hubs(){return new c(this).push("hubs")}}class ee extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("devices",s)}properties(){return new c(this).push("properties")}browsers(){return new c(this).push("browsers")}}class se extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("label-groups",s)}labels(){return new c(this).push("labels")}label(e){return new l(this).push("labels",e)}}class te extends c{constructor(e){super(e),this.push("files")}upload(e){if(global.isNodeJs)return this.nodeUpload(e);throw new Error("Not supported yet!")}nodeUpload(e){const s=require("fs"),t=new(require("form-data"));return t.append("file",s.createReadStream(e.dir+"/"+e.filename),{filename:e.filename}),this.post().headers(t.getHeaders()).data(t)}}class re extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("channels",s)}scopes(){return new c(this).push("scopes")}}class ne extends c{constructor(e){super(e),this.push("notifications")}scopes(){return new c(this).push("scopes")}channels(){return new c(this).push("channels")}channel(e){return new re(this,e)}}class ie extends c{constructor(e){super(e),this.push("runs")}config(){return new l(this).push("config")}}class ue extends c{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["GET"],this.push("tunnels")}active(e){return this.params({active:e})}}class oe extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("notifications",s)}test(){return new l(this).push("test")}}class ae extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");if(super(e),"me"===s)this.push("me");else{if("number"!=typeof s)throw new TypeError("id is not a number");this.push("users",s)}}services(){return new z(this)}deviceGroups(){return new c(this).push("device-groups")}deviceGroup(e){return new k(this,e)}deviceSessions(){return new c(this).push("device-sessions")}deviceSession(e){return new G(this,e)}markAccountOwner(){return new l(this).push("mark-account-owner").post()}projects(){return new c(this).push("projects")}project(e){return new V(this,e)}files(){return new te(this)}file(e){return new H(this,e)}runs(){return new ie(this)}availableFrameworks(){return new c(this).push("available-frameworks")}resetApiKey(){return new l(this).push("reset-api-key")}restore(){return new l(this).push("restore")}feedback(){return new l(this).push("feedback")}notifications(){return new ne(this)}notification(e){return new oe(this,e)}preferences(){return new l(this).push("preferences")}uiPreferences(){return new l(this).push("ui-preferences")}deviceUsage(){return new c(this).push("device-usage")}statistics(){return new l(this).push("statistics")}deviceStatistics(){return new c(this).push("device-statistics")}accessGroups(){return new c(this).push("access-groups")}accessGroup(e){return new B(this,e)}smartbearTunnel(e){return new l(this).push("tunnels",e)}smartbearTunnels(){return new ue(this)}deleteAccount(){return new l(this).push("delete")}}class he extends l{constructor(e){super(e),this.push("user-sessions")}login(e){return new l(this).push("login").post().data(e)}logout(){return new l(this).push("logout").post()}sso(e){return new l(this).push("oauth","authorize",e+"-login")}portalLogin(){return new l(this).push("portal-login").post()}sbidCallbackUrl(){return new l(this).push("oauth","authorize","sbid-login").toUrl(!0)}}const ce=require("axios").default;globalThis.isNodeJs&&(ce.defaults.headers.common["User-Agent"]="Bitbar Cloud API Client for JavaScript v1.4.7"),ce.defaults.maxContentLength=1073741824;class le{get baseUrl(){return this.axiosConfig.baseURL}constructor(e){if(this.config=e,this.axiosConfig={},null==e)throw new Error("config cannot be empty");if(null==this.config.cloudUrl)throw new TypeError("cloudUrl cannot be empty");if("string"!=typeof this.config.cloudUrl)throw new TypeError("cloudUrl must be a string");if(!/^https?:\/\/.{2,}/.test(this.config.cloudUrl))throw new Error("cloudUrl doesn't look like a URL");if(this.axiosConfig.baseURL=this.config.cloudUrl.replace(/\/+$/,"")+"/api",this.config.v2=!!this.config.v2,this.config.v2&&(this.axiosConfig.baseURL+="/v2"),this.config.apiKey){if("string"!=typeof this.config.apiKey)throw new TypeError("apiKey must be a string");if(!/^[A-Za-z0-9]{32}$/.test(this.config.apiKey))throw new Error("apiKey is in the wrong format");this.axiosConfig.auth={username:this.config.apiKey,password:""}}this.axiosConfig.withCredentials=null!=e.withCredentials&&e.withCredentials,this.axios=ce.create(this.axiosConfig)}account(e){return new Z(this,e)}admin(){return new Y(this)}broker(){return new Q(this)}clusters(){return new c(this).push("clusters")}cluster(e){return new f(this,e)}device(e){return new ee(this,e)}deviceGroup(e){return new k(this,e)}deviceGroups(){return new c(this).push("device-groups")}devices(){return new j(this)}deviceSession(e){return new q(this,e)}deviceSessions(){return new c(this).push("device-sessions")}deviceStatistics(){return new c(this).push("device-statistics")}enums(){return new l(this).push("enums")}files(){return new c(this).push("files")}file(e){return new H(this,e)}labelGroups(){return new c(this).push("label-groups")}labelGroup(e){return new se(this,e)}labels(){return new c(this).push("labels")}licenses(){return new l(this).push("licenses")}license(){return new l(this).push("license")}ma(){throw new Error("Requires prototype extension covering ACL check")}me(){return this.user("me")}projects(){return new c(this).push("projects")}project(e){return new V(this,e)}properties(){return new $(this)}property(e){return new l(this).push("properties",e)}run(e){return new K(this,e)}services(){return new z(this)}user(e){return new ae(this,e)}users(){return new X(this)}userSession(){return new he(this)}}const pe={API:le,FilterBuilder:u};var Ee,de,we,Te,Ie,Ne,Ae,Re,Se,fe,Oe,Le,_e,Ce,me,ve,De,Ue,ge,be,Pe,ye,Fe,Me,Ge,xe,Be,ke,He,qe,We,Ke,Ve,Ye,je,$e,ze,Xe,Je,Ze,Qe,es,ss;e.AccessGroupScope=void 0,(Ee=e.AccessGroupScope||(e.AccessGroupScope={})).USER="USER",Ee.ACCOUNT="ACCOUNT",Ee.GLOBAL="GLOBAL",e.PaymentStatus=void 0,(de=e.PaymentStatus||(e.PaymentStatus={})).SUCCEEDED="SUCCEEDED",de.FAILED="FAILED",de.REDIRECTED="REDIRECTED",e.PaymentMethod=void 0,(we=e.PaymentMethod||(e.PaymentMethod={})).PAYPAL="PAYPAL",we.BRAINTREE="BRAINTREE",we.STRIPE="STRIPE",we.INVOICE="INVOICE",we.PROMOTION="PROMOTION",we.AWS="AWS",e.ChargeType=void 0,(Te=e.ChargeType||(e.ChargeType={})).USAGE_MOBILE="USAGE_MOBILE",Te.CONCURRENCY_MOBILE="CONCURRENCY_MOBILE",Te.CONCURRENCY_DESKTOP="CONCURRENCY_DESKTOP",e.DeactivateReason=void 0,(Ie=e.DeactivateReason||(e.DeactivateReason={})).INITIAL_FAILURE="INITIAL_FAILURE",Ie.SCA_FAILURE="SCA_FAILURE",Ie.CHARGE_FAILURE="CHARGE_FAILURE",Ie.CANCEL="CANCEL",Ie.SUSPENDED="SUSPENDED",Ie.ANOTHER_PURCHASE="ANOTHER_PURCHASE",e.InitStep=void 0,(Ne=e.InitStep||(e.InitStep={})).SKIP="SKIP",Ne.REBOOT="REBOOT",Ne.REBOOT_WITH_UNLOCK="REBOOT_WITH_UNLOCK",Ne.UNLOCK_ONLY="UNLOCK_ONLY",e.DeviceState=void 0,(Ae=e.DeviceState||(e.DeviceState={})).OFFLINE_CLEANING="OFFLINE_CLEANING",Ae.OFFLINE_DIRTY="OFFLINE_DIRTY",Ae.OFFLINE_FREE="OFFLINE_FREE",Ae.OFFLINE_TESTING="OFFLINE_TESTING",Ae.ONLINE_CLEANING="ONLINE_CLEANING",Ae.ONLINE_DIRTY="ONLINE_DIRTY",Ae.ONLINE_FREE="ONLINE_FREE",Ae.ONLINE_TESTING="ONLINE_TESTING",e.AdminErrorType=void 0,(Re=e.AdminErrorType||(e.AdminErrorType={})).ABORT_REQUEST="ABORT_REQUEST",Re.ADB_COMMAND_REJECTED="ADB_COMMAND_REJECTED",Re.ADB_SHELL_COMMAND_FAILED="ADB_SHELL_COMMAND_FAILED",Re.APP_LOCK_NOT_INSTALLED="APP_LOCK_NOT_INSTALLED",Re.DEVICE_OFFLINE="DEVICE_OFFLINE",Re.DEVICE_OUTPUT_NULL="DEVICE_OUTPUT_NULL",Re.GAMEBENCH_ERROR="GAMEBENCH_ERROR",Re.GAMEBENCH_NOT_SUPPORTED="GAMEBENCH_NOT_SUPPORTED",Re.GRANT_FAILED="GRANT_FAILED",Re.INSTALL_FAILED="INSTALL_FAILED",Re.INTERACTIVE_SETUP_FAILED="INTERACTIVE_SETUP_FAILED",Re.INTERNAL_INSTALL_FAILED="INTERNAL_INSTALL_FAILED",Re.INVALID_TEST_SESSION_FILE="INVALID_TEST_SESSION_FILE",Re.LOCK_EXPIRED="LOCK_EXPIRED",Re.LOCK_TIMEOUT="LOCK_TIMEOUT",Re.NO_NETWORK_CONNECTION="NO_NETWORK_CONNECTION",Re.OTHER="OTHER",Re.REBOOTING_TIMEOUT="REBOOTING_TIMEOUT",Re.REPACKAGING="REPACKAGING",Re.RESULTS_PREPARING="RESULTS_PREPARING",Re.RESULTS_PROCESSING="RESULTS_PROCESSING",Re.RESULTS_SENDING="RESULTS_SENDING",Re.STEP_TIMEOUT="STEP_TIMEOUT",Re.SYSTEM_FAILURE="SYSTEM_FAILURE",Re.TEST_RUN_FAILED="TEST_RUN_FAILED",Re.TEST_RUN_INTERRUPTED="TEST_RUN_INTERRUPTED",Re.TEST_RUN_TIMEOUT="TEST_RUN_TIMEOUT",Re.TEST_RUN_WARNED="TEST_RUN_WARNED",Re.TEST_TIMEOUT="TEST_TIMEOUT",Re.VNC_CONNECTION_SETUP_FAILED="VNC_CONNECTION_SETUP_FAILED",Re.XCRUN_INSTRUMENTS_COMMAND_FAILED="XCRUN_INSTRUMENTS_COMMAND_FAILED",Re.XCRUN_INSTRUMENTS_JS_ERROR="XCRUN_INSTRUMENTS_JS_ERROR",e.FrameworkType=void 0,(Se=e.FrameworkType||(e.FrameworkType={})).AUTOMATIC="AUTOMATIC",Se.MANUAL_APP="MANUAL_APP",Se.MANUAL_WEB="MANUAL_WEB",Se.REMOTE="REMOTE",e.BillingType=void 0,(fe=e.BillingType||(e.BillingType={})).BUY="BUY",fe.CHARGE="CHARGE",fe.CANCEL="CANCEL",e.BrokerType=void 0,(Oe=e.BrokerType||(e.BrokerType={})).MOBILE="MOBILE",Oe.DESKTOP="DESKTOP",e.ClusterState=void 0,(Le=e.ClusterState||(e.ClusterState={}))[Le.OFFLINE=0]="OFFLINE",Le.ONLINE="ONLINE",Le.RESTARTING="RESTARTING",Le.QUIET_DOWN="QUIET_DOWN",Le.MAINTENANCE="MAINTENANCE",e.DeviceGroupOrigin=void 0,(_e=e.DeviceGroupOrigin||(e.DeviceGroupOrigin={})).STATIC="STATIC",_e.DYNAMIC="DYNAMIC",_e.HYBRID="HYBRID",e.Platform=void 0,(Ce=e.Platform||(e.Platform={})).IOS="IOS",Ce.ANDROID="ANDROID",Ce.WINDOWS="WINDOWS",Ce.MAC="MAC",Ce.LINUX="LINUX",Ce.UNDEFINED="UNDEFINED",e.SupportedCreators=void 0,(me=e.SupportedCreators||(e.SupportedCreators={})).MANUAL="MANUAL",me.ROBOT="ROBOT",me.AUTOMATIC="AUTOMATIC",e.LockReason=void 0,(ve=e.LockReason||(e.LockReason={})).TESTING="TESTING",ve.CLEANING="CLEANING",ve.NOT_OPERATIONAL="NOT_OPERATIONAL",e.CriterionField=void 0,(De=e.CriterionField||(e.CriterionField={})).NAME="NAME",De.FINGERPRINT="FINGERPRINT",De.SERIAL_ID="SERIAL_ID",De.UNLOCK_GESTURE="UNLOCK_GESTURE",De.SOFTWARE_VERSION="SOFTWARE_VERSION",De.INIT_STEP="INIT_STEP",De.ACCOUNT="ACCOUNT",De.BROWSERS="BROWSERS",e.RetentionStrategy=void 0,(Ue=e.RetentionStrategy||(e.RetentionStrategy={})).CLUSTER_ON_OFF="CLUSTER_ON_OFF",Ue.MIN_FREE_MAX_TOTAL="MIN_FREE_MAX_TOTAL",Ue.POOL_MANAGER_AWARE="POOL_MANAGER_AWARE",e.ProblemType=void 0,(ge=e.ProblemType||(e.ProblemType={})).CLEANING="CLEANING",ge.DIRTY="DIRTY",ge.OFFLINE="OFFLINE",ge.LOW_BATTERY="LOW_BATTERY",ge.HIGH_FAIL_RATE="HIGH_FAIL_RATE",ge.NO_INTERNET_CONNECTION="NO_INTERNET_CONNECTION",e.DeviceSessionType=void 0,(be=e.DeviceSessionType||(e.DeviceSessionType={})).AUTOMATIC="AUTOMATIC",be.MANUAL="MANUAL",be.MANUAL_APP="MANUAL_APP",be.MANUAL_WEB="MANUAL_WEB",be.REMOTE="REMOTE",e.RetryState=void 0,(Pe=e.RetryState||(e.RetryState={})).NONE="NONE",Pe.MANUAL="MANUAL",Pe.AUTO="AUTO",e.DeviceSessionState=void 0,(ye=e.DeviceSessionState||(e.DeviceSessionState={})).ABORTED="ABORTED",ye.EXCLUDED="EXCLUDED",ye.FAILED="FAILED",ye.RUNNING="RUNNING",ye.SUCCEEDED="SUCCEEDED",ye.TIMEOUT="TIMEOUT",ye.WAITING="WAITING",ye.WARNING="WARNING",e.DeviceSessionStepType=void 0,(Fe=e.DeviceSessionStepType||(e.DeviceSessionStepType={})).WAITING="WAITING",Fe.PREPARING="PREPARING",Fe.UNINSTALL="UNINSTALL",Fe.INSTALL="INSTALL",Fe.RUNNING="RUNNING",Fe.SENDING_RESULTS="SENDING_RESULTS",Fe.PROCESSING_RESULTS="PROCESSING_RESULTS",e.SessionReleaseReason=void 0,(Me=e.SessionReleaseReason||(e.SessionReleaseReason={})).INACTIVITY="INACTIVITY",Me.TIMEOUT="TIMEOUT",Me.USER_ACTION="USER_ACTION",Me.CHANGE_DEVICE="CHANGE_DEVICE",Me.WEBSOCKET_CLOSED="WEBSOCKET_CLOSED",e.OsType=void 0,(Ge=e.OsType||(e.OsType={})).IOS="IOS",Ge.ANDROID="ANDROID",Ge.DESKTOP="DESKTOP",Ge.UNDEFINED="UNDEFINED",e.LicenseStatus=void 0,(xe=e.LicenseStatus||(e.LicenseStatus={})).ACTIVE="ACTIVE",xe.EXPIRED="EXPIRED",xe.INACTIVE="INACTIVE",xe.CLOSED="CLOSED",e.MaintenanceType=void 0,(Be=e.MaintenanceType||(e.MaintenanceType={})).BARE_METAL="BARE_METAL",Be.EC2="EC2",Be.VM="VM",e.NotificationChannel=void 0,(ke=e.NotificationChannel||(e.NotificationChannel={})).SLACK="SLACK",ke.EMAIL="EMAIL",ke.WEBHOOK="WEBHOOK",e.NotificationScope=void 0,(He=e.NotificationScope||(e.NotificationScope={})).ALL="ALL",He.TEST_RUN="TEST_RUN",He.TEST_RUN_FAILURE="TEST_RUN_FAILURE",He.TEST_RUN_SUCCEEDED="TEST_RUN_SUCCEEDED",He.MAINTENANCE="MAINTENANCE",He.MAINTENANCE_RELEASE="MAINTENANCE_RELEASE",He.CUSTOM="CUSTOM",He.NEWS="NEWS",He.SYSTEM="SYSTEM",He.CHECK="CHECK",He.PLAN_LIMIT_REACHED="PLAN_LIMIT_REACHED",He.PLAN_INVOICE="PLAN_INVOICE",e.ArchivingStrategy=void 0,(qe=e.ArchivingStrategy||(e.ArchivingStrategy={})).NEVER="NEVER",qe.DAYS="DAYS",qe.RUNS="RUNS",e.ScreenshotType=void 0,(We=e.ScreenshotType||(e.ScreenshotType={})).LANDSCAPE="LANDSCAPE",We.PORTRAIT="PORTRAIT",e.ServiceUnit=void 0,(Ke=e.ServiceUnit||(e.ServiceUnit={})).DAY="DAY",Ke.HOUR="HOUR",Ke.MONTH="MONTH",Ke.PROJECT="PROJECT",Ke.RUN="RUN",Ke.YEAR="YEAR",e.SharedResourceType=void 0,(Ve=e.SharedResourceType||(e.SharedResourceType={})).DEVICE_GROUP="DEVICE_GROUP",Ve.FILE="FILE",Ve.PROJECT="PROJECT",e.TestResult=void 0,(Ye=e.TestResult||(e.TestResult={})).PASSED="PASSED",Ye.FAILED="FAILED",Ye.SKIPPED="SKIPPED",Ye.NOT_AVAILABLE="NOT_AVAILABLE",e.LimitationType=void 0,(je=e.LimitationType||(e.LimitationType={})).PACKAGE="PACKAGE",je.CLASS="CLASS",e.TestScheduler=void 0,($e=e.TestScheduler||(e.TestScheduler={})).PARALLEL="PARALLEL",$e.SERIAL="SERIAL",$e.SINGLE="SINGLE",$e.ALL_INSTANCES="ALL_INSTANCES",e.TestState=void 0,(ze=e.TestState||(e.TestState={})).WAITING="WAITING",ze.RUNNING="RUNNING",ze.FINISHED="FINISHED",e.TestRunConfigFileAction=void 0,(Xe=e.TestRunConfigFileAction||(e.TestRunConfigFileAction={})).COPY_TO_DEVICE="COPY_TO_DEVICE",Xe.INSTALL="INSTALL",Xe.RUN_TEST="RUN_TEST",e.UserStatus=void 0,(Je=e.UserStatus||(e.UserStatus={})).INACTIVE="INACTIVE",Je.DISABLED="DISABLED",Je.ENABLED="ENABLED",e.FileDirection=void 0,(Ze=e.FileDirection||(e.FileDirection={})).INPUT="INPUT",Ze.OUTPUT="OUTPUT",e.FileInputType=void 0,(Qe=e.FileInputType||(e.FileInputType={})).APPLICATION="APPLICATION",Qe.TEST="TEST",Qe.DATA="DATA",e.FileState=void 0,(es=e.FileState||(e.FileState={})).PREPARING="PREPARING",es.READY="READY",e.VisualTestImageType=void 0,(ss=e.VisualTestImageType||(e.VisualTestImageType={})).FULL_PAGE="FULL_PAGE",ss.VIEWPORT="VIEWPORT",ss.ELEMENT_SCREENSHOT="ELEMENT_SCREENSHOT",e.ALLOWED_HTTP_METHODS=o,e.API=le,e.CloudAPIClient=pe,e.FilterBuilder=u,e.IMAGE_FILES_FILTER=_,e.NON_MEDIA_FILES_FILTER=C,e.default=pe,Object.defineProperty(e,"__esModule",{value:!0})}));
17
+ function n(e,s,t,r){var n,i=arguments.length,u=i<3?s:null===r?r=Object.getOwnPropertyDescriptor(s,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,s,t,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(u=(i<3?n(u):i>3?n(s,t,u):n(s,t))||u);return i>3&&u&&Object.defineProperty(s,t,u),u}"function"==typeof SuppressedError&&SuppressedError;class i{constructor(e,s,t){this.name=e,this.value=s,this.operand=t}}s();class u{constructor(){this.filters=[]}gt(e,s){return this.add(e,s,"gt")}lt(e,s){return this.add(e,s,"lt")}after(e,s){return this.add(e,s,"after",!0)}afterorequal(e,s){return this.add(e,s,"afterorequal",!0)}before(e,s){return this.add(e,s,"before",!0)}beforeorequal(e,s){return this.add(e,s,"beforeorequal",!0)}on(e,s){return this.add(e,s,"on")}eq(e,s){return this.add(e,s,"eq")}contains(e,s){return this.add(e,s,"contains")}like(e,s){return this.add(e,s,"like")}notlike(e,s){return this.add(e,s,"notlike")}isnull(e){return this.add(e,void 0,"isnull")}isnotnull(e){return this.add(e,void 0,"isnotnull")}in(e,s){return this.add(e,s,"in",!0)}notin(e,s){return this.add(e,s,"notin",!0)}raw(e){const s=Array.wrap(e);for(const e of s){if(!this.isFilterPart(e))throw new SyntaxError(`Filter ${e} has invalid syntax`);this.filters.push(e)}}isFilterPart(e){return/^[a-zA-Z0-9.]{2,12}_(?:isnull$|(?:gt|lt|(?:after|before)(?:orequal)?|on|eq|contains|like|(?:not)?in)_)/.test(e)}toString(){const e=[];let s,t;for(const r of this.filters)"string"==typeof r?s=r:(t="",(r.value.length>1||void 0!==r.value[0])&&(t=`_${r.value.join("|")}`),s=`${r.name}_${r.operand}${t}`),e.push(s);return e.join(";")}add(e,s,t,r=!1){let n=Array.wrap(s);if(0===n.length)return this;for(let e=0;e<n.length;e++){const s=n[e];"object"==typeof s&&s instanceof Date&&(n[e]=s.getTime())}let u=!1;if(r){for(const e of n)null===e&&(u=!0);u&&(n=n.filter((e=>null!==e)),t+="ornull")}return t.endsWith("ornull")&&0===n.length&&(t="isnull"),this.filters.push(new i(e,n,t)),this}}const o=["GET","POST","DELETE"];var a;e.APIOrder=void 0,(a=e.APIOrder||(e.APIOrder={})).asc="a",a.desc="d";class h{constructor(e){this.stack=[],this.requestConfig={},this.ALLOWED_HTTP_METHODS=o,e instanceof h?(this.root=e.root,Array.isArray(e.stack)&&this.push(...e.stack),null!=e.requestConfig&&this.setRequestConfig(e.requestConfig)):this.root=e,this.abortController=new r.AbortController}abortRequest(){this.abortController.abort(),this.abortController=new r.AbortController}push(...e){return this.stack=this.stack.concat(e),this}shift(){return this.stack.shift(),this}restack(...e){return this.stack=e,this}get first(){return this.stack[0]}get last(){return this.stack[this.stack.length-1]}set last(e){this.stack[this.stack.length-1]=e}toUrl(e=!1){let s=`/${this.stack.join("/")}`;return e&&(s=this.root.baseUrl+s),s}setRequestConfig(e){return Object.deepAssign(this.requestConfig,e),this}removeRequestConfig(e){return delete this.requestConfig[e],this}headers(e){const s={};for(const t in e){s[t.replace(/(?:^|-)([a-z])/g,(e=>e.toUpperCase()))]=e[t]}return this.setRequestConfig({headers:s})}method(e){const s=e.toLocaleUpperCase();if(!(this.ALLOWED_HTTP_METHODS.indexOf(s)>-1))throw new Error(`Method '${s}' is not allowed! You can use: ${this.ALLOWED_HTTP_METHODS.join(", ")}`);return this.setRequestConfig({method:s})}get(){return this.method("GET")}post(){return this.method("POST")}delete(){return this.method("DELETE")}params(e){return this.setRequestConfig({params:e}),this}getParams(){return null==this.requestConfig.params?{}:this.requestConfig.params}removeParam(e){return delete this.requestConfig.params[e],this}data(e){return this.setRequestConfig({data:e}),this}jsonData(e){return this.headers({"Content-Type":"application/json"}).data(e),this}formData(e){return this.headers({"Content-Type":"multipart/form-data"}).data(e),this}send(){const e=Object.deepAssign({},this.requestConfig,{url:`/${this.stack.join("/")}`,signal:this.abortController.signal});return null==e.headers&&(e.headers={}),null==e.headers["Content-Type"]&&(e.headers["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),"POST"===e.method&&e.headers["Content-Type"].startsWith("application/x-www-form-urlencoded")&&null!=e.data&&(e.data=this.paramsSerializer(e.data)),e.params&&(e.paramsSerializer=this.paramsSerializer),this.root.axios.request(e)}paramsSerializer(e){return t.stringify(e,{arrayFormat:"brackets"})}}class c extends h{constructor(){super(...arguments),this.all=this.noLimit,this.cut=this.between}create(e){return this.post().data(e).send()}sort(s,t=e.APIOrder.asc){return this.params({sort:`${s}_${t}`})}limit(e=20){if(!Number.isNatural(e))throw new Error(`Limit '${e}' is invalid!`);return this.params({limit:e})}getLimit(){const e=this.getParams();return null==e.limit?20:e.limit}noLimit(){return this.limit(0)}offset(e=0){if(!Number.isNatural(e))throw new Error(`Offset '${e}' is invalid!`);return this.params({offset:e})}between(e,s){if(!Number.isNatural(e))throw new Error(`From '${e}' is invalid!`);if(!Number.isNatural(s))throw new Error(`To '${s}' is invalid!`);return this.params({offset:e,limit:s-e+1})}only(e){if(!Number.isNatural(e))throw new Error(`Index '${e}' is invalid!`);return this.params({offset:e,limit:1})}page(e=1){if(!Number.isNatural(e)||0==e)throw new Error(`Page '${e}' is invalid!`);const s=this.getLimit(),t=(e-1)*s;return this.params({offset:t,limit:s})}search(e){if("string"!=typeof e)throw new Error("Search query must be a string!");return this.params({search:e})}filter(e){if("string"!=typeof e&&!(e instanceof u))throw new Error("Filter must be either string or instance of FilterBuilder");return this.params({filter:e.toString()})}}class l extends h{}class p extends c{constructor(e){super(e),this.push("cleanup-configurations")}specific(){return new l(this).push("specific")}}class E extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("cleanup-configurations",s)}devices(){return new c(this).push("devices")}}class d extends c{constructor(e){super(e),this.push("admin","devices")}cleanupConfigurations(){return new p(this)}cleanupConfiguration(e){return new E(this,e)}}class T extends c{constructor(e){super(e),this.push("admin","notification-plans")}channels(){return new c(this).push("channels")}scopes(){return new c(this).push("scopes")}}class w extends c{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["GET"],this.push("admin","runs")}config(){const e=new l(this);return e.restack("runs","config"),e}}class I extends c{constructor(e){super(e),this.push("admin","services")}active(){const e=new c(this);return e.params({notArchived:!0}),e}activated(){const e=this.active();return e.params({filter:"activated_eq_true",limit:0,sort:"name_a"}),e}inUse(){const e=new c(this);return e.params({inUse:!0,limit:0,sort:"name_a"}),e}byPrice(){const e=new c(this);return e.params({sort:"centPrice_a"}),e}}function N(e){return class extends e{send(){return Promise.reject()}}}let A=class extends c{constructor(e){super(e),this.push("admin","statistics")}deviceSessions(){return new c(this).push("device-sessions")}frameworks(){return new c(this).push("frameworks")}};A=n([N],A);class R extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","accounts",s)}roles(){return new c(this).push("roles")}role(e){return new l(this).push("roles",e)}accountServices(){return new c(this).push("account-services")}preferences(){return new l(this).push("preferences")}}class S extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","account-services",s)}activate(){return new l(this).push("activate").post()}deactivate(){return new l(this).push("deactivate").post()}}class f extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("clusters",s)}devices(){return new c(this).push("devices")}}class O extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","devices",s)}cleanupConfiguration(){return new l(this).push("cleanup-configuration")}labels(){return new c(this).push("labels")}label(e){return new l(this).push("labels",e)}queue(){return new c(this).push("queue")}}class L extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","device-models",s)}browsers(){return new c(this).push("browsers")}}e.InputFileset=class extends l{constructor(e){super(e),this.push("input-file-set")}files(){return new c(this).push("files")}filesZip(){return new l(this).push("files.zip")}},e.InputFileset=n([N],e.InputFileset);const _=new u;_.eq("state","READY"),_.in("mimetype",["image/png","image/jpg","image/jpeg","image/webp","image/gif"]),_.notlike("name","action-%%");const C=new u;C.eq("state","READY"),C.notin("mimetype",["image/png","image/jpg","image/jpeg","image/webp","image/gif","video/mp4","video/avi","video/webm","video/ogg","video/mpeg"]),e.OutputFileset=class extends l{constructor(e){super(e),this.push("output-file-set")}files(){return new c(this).push("files")}file(e){return new l(this).push("files",e)}filesZip(){return new l(this).push("files.zip")}screenshots(){return new c(this).push("screenshots")}screenshot(e){return new l(this).push("screenshots",e)}screenshotFile(e){return this.screenshot(e).push("file")}videos(){return this.files().params({filter:"s_state_eq_READY",tag:["video"]})}nonMediaFiles(){return this.files().filter(C)}performance(){return this.files().params({tag:["performance"]})}images(){return this.files().filter(_)}},e.OutputFileset=n([N],e.OutputFileset);class m extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-sessions",s)}commands(){return new c(this).push("commands")}input(){return new e.InputFileset(this)}output(){return new e.OutputFileset(this)}release(){return new l(this).push("release").post()}screenshots(){return new c(this).push("screenshots")}screenshot(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("screenshots",e)}steps(){return new c(this).push("steps")}step(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("steps",e)}currentStep(){return this.step("current")}testCaseRuns(){return new c(this).push("test-case-runs")}connections(){return new c(this).push("connections")}logs(){return new l(this).push("logs").setRequestConfig({responseType:"text"})}clusterLogs(){return new l(this).push("cluster-logs").setRequestConfig({responseType:"text"})}}class v extends m{changeBillable(e){return function(e,s){const t=new l(e),r=t.last;return t.restack("admin","device-sessions",r,"changebillable").params({billable:s}).post()}(this,e)}}class D extends c{constructor(e){super(e),this.push("admin","device-time")}countSessionReport(){return new c(this).push("count-session-report")}stepTimeReport(){return new c(this).push("step-time-report")}}class U extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","frameworks",s)}config(){return new l(this).push("config")}requiredRoles(){return new c(this).push("required-roles")}}class g extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","licenses",s)}activate(){return new l(this).push("activate")}deactivate(){return new l(this).push("deactivate")}resend(){return new l(this).push("resend")}download(){return new l(this).push("download")}}class b extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","notification-plans",s)}check(){return new c(this).push("check")}test(){return new l(this).push("test")}execute(){return new l(this).push("execute")}}function P(e,s,t){const r=new l(e).push(s);return null!=t&&r.params({deviceRunIds:t}),r.post()}class y extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","runs",s)}abort(){return new l(this).push("abort").post()}changeBillable(e){return new l(this).push("changebillable").post().params({billable:e})}changePriority(e){const s=new l(this).push("changepriority");return e&&s.post().data({priority:e}),s}retry(e){return P(this,"retry",e).setRequestConfig({timeout:0})}}class F extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","services",s)}activate(){return new l(this).push("activate").post()}}let M=class extends l{constructor(e){super(e),this.push("account")}roles(){return new c(this).push("roles")}role(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("roles",e)}services(){const e=new c(this);return e.last+="-services",e}update(){const e=new l(this);return e.last="update-account",e.post()}};M=n([N],M);class G extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-sessions",s)}connections(){return new c(this).push("connections")}connection(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("connections",e)}input(){return new e.InputFileset(this)}output(){return new e.OutputFileset(this)}release(){return new l(this).push("release").post()}visualTestsImages(){return new c(this).push("visual-tests","images")}}let x=class extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","users",s)}disable(){return new l(this).push("disable")}enable(){return new l(this).push("enable")}licenses(){return new c(this).push("licenses")}resendActivation(){return new l(this).push("resend-activation").post()}account(){return new M(this)}deviceSession(e){return new G(this,e)}roles(){return new c(this).push("roles")}role(e){return new l(this).push("roles",e)}};x=n([N],x);class B extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("access-groups",s)}users(){return new c(this).push("users")}user(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("users",e)}resources(){return new c(this).push("resources")}resource(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("resources",e)}}class k extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-groups",s)}devices(){return new c(this).push("devices")}device(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("devices",e)}selectors(){return new c(this).push("selectors")}selector(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("selectors",e)}share(){return new c(this).push("share")}}class H extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("files",s)}file(){return new l(this).push("file")}icon(){return new l(this).push("icon")}tags(){return new c(this).push("tags")}share(){return new c(this).push("share")}property(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("properties",e)}}class q extends m{abort(){return new l(this).push("abort").post()}retry(){return new l(this).push("retry").post()}}class W extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("runs",s)}abort(){return new l(this).push("abort").post()}buildLogsZip(e){return P(this,"build-logs.zip",e)}dataAvailability(){return new l(this).push("data-availability")}deviceSessions(){return new c(this).push("device-sessions")}filesZip(e){return P(this,"files.zip",e)}logsZip(e){return P(this,"logs.zip",e)}performanceZip(e){return P(this,"performance.zip",e)}retry(e){return P(this,"retry",e).setRequestConfig({timeout:0})}screenshotNames(){return new c(this).push("screenshot-names")}screenshots(){return new c(this).push("screenshots")}screenshotsZip(e){return P(this,"screenshots.zip",e)}steps(){return new c(this).push("steps")}tags(){return new c(this).push("tags")}tag(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("tags",e)}}class K extends W{deviceSession(e){return new q(this,e)}}class V extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("projects",s)}runs(){return new c(this).push("runs")}run(e){return new K(this,e)}share(){return new c(this).push("share")}unarchive(){return new l(this).push("unarchive")}}let Y=class extends l{constructor(e){super(e)}accessGroups(){return new c(this).push("access-groups")}accessGroup(e){return new B(this,e)}accounts(){return new c(this).push("admin","accounts")}account(e){if(null==e)throw new Error("Resource ID cannot be null!");return new R(this,e)}accountServices(){return new c(this).push("admin","account-services")}accountService(e){return new S(this,e)}activities(){return new c(this).push("admin","activities")}administrators(){return new c(this).push("admin","administrators")}billingPeriods(){return new c(this).push("admin","billing-periods")}billingPeriod(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("admin","billing-periods",e)}browsers(){return new c(this).push("admin","browsers")}browser(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("admin","browsers",e)}clusters(){return new c(this).push("clusters")}cluster(e){return new f(this,e)}countryVatRates(){return new c(this).push("admin","country-vat-rates")}countryVatRate(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("admin","country-vat-rates",e)}devices(){return new d(this)}device(e){return new O(this,e)}devicesForModel(e){if(null==e)throw new Error("Resource ID cannot be null!");const s=this.devices();return s.params({filter:"deviceModelId_eq_"+e}),s}deviceStatuses(){return new c(this).push("admin","device","statuses")}deviceModels(){return new c(this).push("admin","device-models")}deviceModel(e){return new L(this,e)}deviceProblems(){return new c(this).push("admin","device-problems")}deviceModelCriterias(){return new c(this).push("admin","device-model-criteria")}deviceModelCriteria(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("admin","device-model-criteria",e)}deviceSessions(){return new c(this).push("admin","device-sessions")}deviceSession(e){return new v(this,e)}deviceTime(){return new D(this)}deviceTimeSummary(){return new c(this).push("admin","device-time-summary")}deviceTypes(){return new c(this).push("admin","device-types")}deviceType(e){return new l(this).push("admin","device-types",e)}deviceGroups(){return new c(this).push("device-groups")}deviceGroup(e){return new k(this,e)}emails(){return new c(this).push("admin","emails")}resendEmail(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("admin","emails",e,"resend").post()}errors(){return new c(this).push("admin","errors")}files(){return new c(this).push("files")}file(e){return new H(this,e)}frameworks(){return new c(this).push("admin","frameworks")}framework(e){return new U(this,e)}frameworkAvailableLabels(){const e=this.frameworks();return e.push("available-labels"),e}interactiveQueue(){return new c(this).push("admin","interactive-queue")}licenses(){return new c(this).push("admin","licenses")}license(e){return new g(this,e)}maintenance(){return new l(this).push("admin","maintenance")}notificationPlans(){return new T(this)}notificationPlan(e){return new b(this,e)}overview(){return new l(this).push("admin","overview")}pools(){return new c(this).push("admin","pools")}pool(e){return new l(this).push("admin","pools",e)}projects(){return new c(this).push("projects")}project(e){return new V(this,e)}roles(){return new c(this).push("admin","roles")}runs(){return new w(this)}run(e){return new y(this,e)}samples(){return new c(this).push("admin","samples")}sample(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("admin","samples",e)}services(){return new I(this)}service(e){return new F(this,e)}settings(){return new l(this).push("admin","settings")}statistics(){return new A(this)}users(){return new c(this).push("users")}createUser(){return new c(this).push("admin","users").post()}user(e){return new x(this,e)}};Y=n([N],Y);class j extends c{constructor(e){super(e),this.push("devices")}filters(){return new l(this).push("filters")}desktopBrowserCapabilities(){return new l(this).push("desktop-browser-capabilities")}}class $ extends c{constructor(e){super(e),this.push("properties")}maintenance(){return new c(this).params({filter:"name_eq_CLOUD_HEADER_ANNOUNCEMENT",limit:1,sort:"updateTime_d"})}}class z extends c{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["POST"],this.push("services")}available(){return new c(this).push("available")}active(){const e=new c(this);return"me"===this.first?e.push("active"):e.params({notArchived:!0}),e}byPrice(){return new c(this).sort("centPrice")}availableByPrice(){return new c(this).push("available").sort("centPrice")}}class X extends c{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["GET","POST"],this.push("users")}activate(){return new l(this).push("activate").post()}recoveries(){return new l(this).push("recoveries")}passwordRecovery(){return new l(this).push("password-recovery")}}class J extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("billing-periods",s)}receipt(){return new l(this).push("receipt").setRequestConfig({responseType:"arraybuffer"})}}class Z extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("accounts",s)}concurrencyStatus(){return new l(this).push("concurrency-status")}deviceTime(){return new c(this).push("device-time")}deviceTimeSummary(){return new c(this).push("device-time-summary")}preferences(){return new l(this).push("preferences")}users(){return new c(this).push("users")}removeUser(e){return new l(this).push("users",e)}disableUser(e){return new l(this).push("users",e,"disable").post()}enableUser(e){return new l(this).push("users",e,"enable").post()}resendActivation(e){return new l(this).push("users",e,"resend-activation").post()}billingPeriods(){return new c(this).push("billing-periods")}billingPeriod(e){return new J(this,e)}serviceBillingPeriod(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("account-services",e,"billing-period")}visualTestAccess(){return new l(this).push("visual-tests","access")}accountServices(){return new c(this).push("account-services")}accountService(e){return new c(this).push("account-services",e)}}class Q extends l{constructor(e){super(e),this.push("broker")}hubs(){return new c(this).push("hubs")}}class ee extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("devices",s)}properties(){return new c(this).push("properties")}browsers(){return new c(this).push("browsers")}}class se extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("label-groups",s)}labels(){return new c(this).push("labels")}label(e){return new l(this).push("labels",e)}}class te extends c{constructor(e){super(e),this.push("files")}upload(e){if(global.isNodeJs)return this.nodeUpload(e);throw new Error("Not supported yet!")}nodeUpload(e){const s=require("fs"),t=new(require("form-data"));return t.append("file",s.createReadStream(e.dir+"/"+e.filename),{filename:e.filename}),this.post().headers(t.getHeaders()).data(t)}}class re extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("channels",s)}scopes(){return new c(this).push("scopes")}}class ne extends c{constructor(e){super(e),this.push("notifications")}scopes(){return new c(this).push("scopes")}channels(){return new c(this).push("channels")}channel(e){return new re(this,e)}}class ie extends c{constructor(e){super(e),this.push("runs")}config(){return new l(this).push("config")}}class ue extends c{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["GET"],this.push("tunnels")}active(e){return this.params({active:e})}}class oe extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("notifications",s)}test(){return new l(this).push("test")}}class ae extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");if(super(e),"me"===s)this.push("me");else{if("number"!=typeof s)throw new TypeError("id is not a number");this.push("users",s)}}services(){return new z(this)}deviceGroups(){return new c(this).push("device-groups")}deviceGroup(e){return new k(this,e)}deviceSessions(){return new c(this).push("device-sessions")}deviceSession(e){return new G(this,e)}markAccountOwner(){return new l(this).push("mark-account-owner").post()}projects(){return new c(this).push("projects")}project(e){return new V(this,e)}files(){return new te(this)}file(e){return new H(this,e)}runs(){return new ie(this)}availableFrameworks(){return new c(this).push("available-frameworks")}resetApiKey(){return new l(this).push("reset-api-key")}restore(){return new l(this).push("restore")}feedback(){return new l(this).push("feedback")}notifications(){return new ne(this)}notification(e){return new oe(this,e)}preferences(){return new l(this).push("preferences")}uiPreferences(){return new l(this).push("ui-preferences")}deviceUsage(){return new c(this).push("device-usage")}statistics(){return new l(this).push("statistics")}deviceStatistics(){return new c(this).push("device-statistics")}accessGroups(){return new c(this).push("access-groups")}accessGroup(e){return new B(this,e)}smartbearTunnel(e){return new l(this).push("tunnels",e)}smartbearTunnels(){return new ue(this)}deleteAccount(){return new l(this).push("delete")}}class he extends l{constructor(e){super(e),this.push("user-sessions")}login(e){return new l(this).push("login").post().data(e)}logout(){return new l(this).push("logout").post()}sso(e){return new l(this).push("oauth","authorize",e+"-login")}sbidCallbackUrl(){return new l(this).push("oauth","authorize","sbid-login").toUrl(!0)}}const ce=require("axios").default;globalThis.isNodeJs&&(ce.defaults.headers.common["User-Agent"]="Bitbar Cloud API Client for JavaScript v1.4.9"),ce.defaults.maxContentLength=1073741824;class le{get baseUrl(){return this.axiosConfig.baseURL}constructor(e){if(this.config=e,this.axiosConfig={},null==e)throw new Error("config cannot be empty");if(null==this.config.cloudUrl)throw new TypeError("cloudUrl cannot be empty");if("string"!=typeof this.config.cloudUrl)throw new TypeError("cloudUrl must be a string");if(!/^https?:\/\/.{2,}/.test(this.config.cloudUrl))throw new Error("cloudUrl doesn't look like a URL");if(this.axiosConfig.baseURL=this.config.cloudUrl.replace(/\/+$/,"")+"/api",this.config.v2=!!this.config.v2,this.config.v2&&(this.axiosConfig.baseURL+="/v2"),this.config.apiKey){if("string"!=typeof this.config.apiKey)throw new TypeError("apiKey must be a string");if(!/^[A-Za-z0-9]{32}$/.test(this.config.apiKey))throw new Error("apiKey is in the wrong format");this.axiosConfig.auth={username:this.config.apiKey,password:""}}this.axiosConfig.withCredentials=null!=e.withCredentials&&e.withCredentials,this.axios=ce.create(this.axiosConfig)}account(e){return new Z(this,e)}admin(){return new Y(this)}broker(){return new Q(this)}clusters(){return new c(this).push("clusters")}cluster(e){return new f(this,e)}device(e){return new ee(this,e)}deviceGroup(e){return new k(this,e)}deviceGroups(){return new c(this).push("device-groups")}devices(){return new j(this)}deviceSession(e){return new q(this,e)}deviceSessions(){return new c(this).push("device-sessions")}deviceStatistics(){return new c(this).push("device-statistics")}enums(){return new l(this).push("enums")}files(){return new c(this).push("files")}file(e){return new H(this,e)}labelGroups(){return new c(this).push("label-groups")}labelGroup(e){return new se(this,e)}labels(){return new c(this).push("labels")}licenses(){return new l(this).push("licenses")}license(){return new l(this).push("license")}ma(){throw new Error("Requires prototype extension covering ACL check")}me(){return this.user("me")}projects(){return new c(this).push("projects")}project(e){return new V(this,e)}properties(){return new $(this)}property(e){return new l(this).push("properties",e)}run(e){return new K(this,e)}services(){return new z(this)}user(e){return new ae(this,e)}users(){return new X(this)}userSession(){return new he(this)}}const pe={API:le,FilterBuilder:u};var Ee,de,Te,we,Ie,Ne,Ae,Re,Se,fe,Oe,Le,_e,Ce,me,ve,De,Ue,ge,be,Pe,ye,Fe,Me,Ge,xe,Be,ke,He,qe,We,Ke,Ve,Ye,je,$e,ze,Xe,Je,Ze,Qe,es,ss;e.AccessGroupScope=void 0,(Ee=e.AccessGroupScope||(e.AccessGroupScope={})).USER="USER",Ee.ACCOUNT="ACCOUNT",Ee.GLOBAL="GLOBAL",e.PaymentStatus=void 0,(de=e.PaymentStatus||(e.PaymentStatus={})).SUCCEEDED="SUCCEEDED",de.FAILED="FAILED",de.REDIRECTED="REDIRECTED",e.PaymentMethod=void 0,(Te=e.PaymentMethod||(e.PaymentMethod={})).PAYPAL="PAYPAL",Te.BRAINTREE="BRAINTREE",Te.STRIPE="STRIPE",Te.INVOICE="INVOICE",Te.PROMOTION="PROMOTION",Te.AWS="AWS",e.ChargeType=void 0,(we=e.ChargeType||(e.ChargeType={})).USAGE_MOBILE="USAGE_MOBILE",we.CONCURRENCY_MOBILE="CONCURRENCY_MOBILE",we.CONCURRENCY_DESKTOP="CONCURRENCY_DESKTOP",e.DeactivateReason=void 0,(Ie=e.DeactivateReason||(e.DeactivateReason={})).INITIAL_FAILURE="INITIAL_FAILURE",Ie.SCA_FAILURE="SCA_FAILURE",Ie.CHARGE_FAILURE="CHARGE_FAILURE",Ie.CANCEL="CANCEL",Ie.SUSPENDED="SUSPENDED",Ie.ANOTHER_PURCHASE="ANOTHER_PURCHASE",e.InitStep=void 0,(Ne=e.InitStep||(e.InitStep={})).SKIP="SKIP",Ne.REBOOT="REBOOT",Ne.REBOOT_WITH_UNLOCK="REBOOT_WITH_UNLOCK",Ne.UNLOCK_ONLY="UNLOCK_ONLY",e.DeviceState=void 0,(Ae=e.DeviceState||(e.DeviceState={})).OFFLINE_CLEANING="OFFLINE_CLEANING",Ae.OFFLINE_DIRTY="OFFLINE_DIRTY",Ae.OFFLINE_FREE="OFFLINE_FREE",Ae.OFFLINE_TESTING="OFFLINE_TESTING",Ae.ONLINE_CLEANING="ONLINE_CLEANING",Ae.ONLINE_DIRTY="ONLINE_DIRTY",Ae.ONLINE_FREE="ONLINE_FREE",Ae.ONLINE_TESTING="ONLINE_TESTING",e.AdminErrorType=void 0,(Re=e.AdminErrorType||(e.AdminErrorType={})).ABORT_REQUEST="ABORT_REQUEST",Re.ADB_COMMAND_REJECTED="ADB_COMMAND_REJECTED",Re.ADB_SHELL_COMMAND_FAILED="ADB_SHELL_COMMAND_FAILED",Re.APP_LOCK_NOT_INSTALLED="APP_LOCK_NOT_INSTALLED",Re.DEVICE_OFFLINE="DEVICE_OFFLINE",Re.DEVICE_OUTPUT_NULL="DEVICE_OUTPUT_NULL",Re.GAMEBENCH_ERROR="GAMEBENCH_ERROR",Re.GAMEBENCH_NOT_SUPPORTED="GAMEBENCH_NOT_SUPPORTED",Re.GRANT_FAILED="GRANT_FAILED",Re.INSTALL_FAILED="INSTALL_FAILED",Re.INTERACTIVE_SETUP_FAILED="INTERACTIVE_SETUP_FAILED",Re.INTERNAL_INSTALL_FAILED="INTERNAL_INSTALL_FAILED",Re.INVALID_TEST_SESSION_FILE="INVALID_TEST_SESSION_FILE",Re.LOCK_EXPIRED="LOCK_EXPIRED",Re.LOCK_TIMEOUT="LOCK_TIMEOUT",Re.NO_NETWORK_CONNECTION="NO_NETWORK_CONNECTION",Re.OTHER="OTHER",Re.REBOOTING_TIMEOUT="REBOOTING_TIMEOUT",Re.REPACKAGING="REPACKAGING",Re.RESULTS_PREPARING="RESULTS_PREPARING",Re.RESULTS_PROCESSING="RESULTS_PROCESSING",Re.RESULTS_SENDING="RESULTS_SENDING",Re.STEP_TIMEOUT="STEP_TIMEOUT",Re.SYSTEM_FAILURE="SYSTEM_FAILURE",Re.TEST_RUN_FAILED="TEST_RUN_FAILED",Re.TEST_RUN_INTERRUPTED="TEST_RUN_INTERRUPTED",Re.TEST_RUN_TIMEOUT="TEST_RUN_TIMEOUT",Re.TEST_RUN_WARNED="TEST_RUN_WARNED",Re.TEST_TIMEOUT="TEST_TIMEOUT",Re.VNC_CONNECTION_SETUP_FAILED="VNC_CONNECTION_SETUP_FAILED",Re.XCRUN_INSTRUMENTS_COMMAND_FAILED="XCRUN_INSTRUMENTS_COMMAND_FAILED",Re.XCRUN_INSTRUMENTS_JS_ERROR="XCRUN_INSTRUMENTS_JS_ERROR",e.FrameworkType=void 0,(Se=e.FrameworkType||(e.FrameworkType={})).AUTOMATIC="AUTOMATIC",Se.MANUAL_APP="MANUAL_APP",Se.MANUAL_WEB="MANUAL_WEB",Se.REMOTE="REMOTE",e.BillingType=void 0,(fe=e.BillingType||(e.BillingType={})).BUY="BUY",fe.CHARGE="CHARGE",fe.CANCEL="CANCEL",e.BrokerType=void 0,(Oe=e.BrokerType||(e.BrokerType={})).MOBILE="MOBILE",Oe.DESKTOP="DESKTOP",e.ClusterState=void 0,(Le=e.ClusterState||(e.ClusterState={}))[Le.OFFLINE=0]="OFFLINE",Le.ONLINE="ONLINE",Le.RESTARTING="RESTARTING",Le.QUIET_DOWN="QUIET_DOWN",Le.MAINTENANCE="MAINTENANCE",e.DeviceGroupOrigin=void 0,(_e=e.DeviceGroupOrigin||(e.DeviceGroupOrigin={})).STATIC="STATIC",_e.DYNAMIC="DYNAMIC",_e.HYBRID="HYBRID",e.Platform=void 0,(Ce=e.Platform||(e.Platform={})).IOS="IOS",Ce.ANDROID="ANDROID",Ce.WINDOWS="WINDOWS",Ce.MAC="MAC",Ce.LINUX="LINUX",Ce.UNDEFINED="UNDEFINED",e.SupportedCreators=void 0,(me=e.SupportedCreators||(e.SupportedCreators={})).MANUAL="MANUAL",me.ROBOT="ROBOT",me.AUTOMATIC="AUTOMATIC",e.LockReason=void 0,(ve=e.LockReason||(e.LockReason={})).TESTING="TESTING",ve.CLEANING="CLEANING",ve.NOT_OPERATIONAL="NOT_OPERATIONAL",e.CriterionField=void 0,(De=e.CriterionField||(e.CriterionField={})).NAME="NAME",De.FINGERPRINT="FINGERPRINT",De.SERIAL_ID="SERIAL_ID",De.UNLOCK_GESTURE="UNLOCK_GESTURE",De.SOFTWARE_VERSION="SOFTWARE_VERSION",De.INIT_STEP="INIT_STEP",De.ACCOUNT="ACCOUNT",De.BROWSERS="BROWSERS",e.RetentionStrategy=void 0,(Ue=e.RetentionStrategy||(e.RetentionStrategy={})).CLUSTER_ON_OFF="CLUSTER_ON_OFF",Ue.MIN_FREE_MAX_TOTAL="MIN_FREE_MAX_TOTAL",Ue.POOL_MANAGER_AWARE="POOL_MANAGER_AWARE",e.ProblemType=void 0,(ge=e.ProblemType||(e.ProblemType={})).CLEANING="CLEANING",ge.DIRTY="DIRTY",ge.OFFLINE="OFFLINE",ge.LOW_BATTERY="LOW_BATTERY",ge.HIGH_FAIL_RATE="HIGH_FAIL_RATE",ge.NO_INTERNET_CONNECTION="NO_INTERNET_CONNECTION",e.DeviceSessionType=void 0,(be=e.DeviceSessionType||(e.DeviceSessionType={})).AUTOMATIC="AUTOMATIC",be.MANUAL="MANUAL",be.MANUAL_APP="MANUAL_APP",be.MANUAL_WEB="MANUAL_WEB",be.REMOTE="REMOTE",e.RetryState=void 0,(Pe=e.RetryState||(e.RetryState={})).NONE="NONE",Pe.MANUAL="MANUAL",Pe.AUTO="AUTO",e.DeviceSessionState=void 0,(ye=e.DeviceSessionState||(e.DeviceSessionState={})).ABORTED="ABORTED",ye.EXCLUDED="EXCLUDED",ye.FAILED="FAILED",ye.RUNNING="RUNNING",ye.SUCCEEDED="SUCCEEDED",ye.TIMEOUT="TIMEOUT",ye.WAITING="WAITING",ye.WARNING="WARNING",e.DeviceSessionStepType=void 0,(Fe=e.DeviceSessionStepType||(e.DeviceSessionStepType={})).WAITING="WAITING",Fe.PREPARING="PREPARING",Fe.UNINSTALL="UNINSTALL",Fe.INSTALL="INSTALL",Fe.RUNNING="RUNNING",Fe.SENDING_RESULTS="SENDING_RESULTS",Fe.PROCESSING_RESULTS="PROCESSING_RESULTS",e.SessionReleaseReason=void 0,(Me=e.SessionReleaseReason||(e.SessionReleaseReason={})).INACTIVITY="INACTIVITY",Me.TIMEOUT="TIMEOUT",Me.USER_ACTION="USER_ACTION",Me.CHANGE_DEVICE="CHANGE_DEVICE",Me.WEBSOCKET_CLOSED="WEBSOCKET_CLOSED",e.OsType=void 0,(Ge=e.OsType||(e.OsType={})).IOS="IOS",Ge.ANDROID="ANDROID",Ge.DESKTOP="DESKTOP",Ge.UNDEFINED="UNDEFINED",e.LicenseStatus=void 0,(xe=e.LicenseStatus||(e.LicenseStatus={})).ACTIVE="ACTIVE",xe.EXPIRED="EXPIRED",xe.INACTIVE="INACTIVE",xe.CLOSED="CLOSED",e.MaintenanceType=void 0,(Be=e.MaintenanceType||(e.MaintenanceType={})).BARE_METAL="BARE_METAL",Be.EC2="EC2",Be.VM="VM",e.NotificationChannel=void 0,(ke=e.NotificationChannel||(e.NotificationChannel={})).SLACK="SLACK",ke.EMAIL="EMAIL",ke.WEBHOOK="WEBHOOK",e.NotificationScope=void 0,(He=e.NotificationScope||(e.NotificationScope={})).ALL="ALL",He.TEST_RUN="TEST_RUN",He.TEST_RUN_FAILURE="TEST_RUN_FAILURE",He.TEST_RUN_SUCCEEDED="TEST_RUN_SUCCEEDED",He.MAINTENANCE="MAINTENANCE",He.MAINTENANCE_RELEASE="MAINTENANCE_RELEASE",He.CUSTOM="CUSTOM",He.NEWS="NEWS",He.SYSTEM="SYSTEM",He.CHECK="CHECK",He.PLAN_LIMIT_REACHED="PLAN_LIMIT_REACHED",He.PLAN_INVOICE="PLAN_INVOICE",e.ArchivingStrategy=void 0,(qe=e.ArchivingStrategy||(e.ArchivingStrategy={})).NEVER="NEVER",qe.DAYS="DAYS",qe.RUNS="RUNS",e.ScreenshotType=void 0,(We=e.ScreenshotType||(e.ScreenshotType={})).LANDSCAPE="LANDSCAPE",We.PORTRAIT="PORTRAIT",e.ServiceUnit=void 0,(Ke=e.ServiceUnit||(e.ServiceUnit={})).DAY="DAY",Ke.HOUR="HOUR",Ke.MONTH="MONTH",Ke.PROJECT="PROJECT",Ke.RUN="RUN",Ke.YEAR="YEAR",e.SharedResourceType=void 0,(Ve=e.SharedResourceType||(e.SharedResourceType={})).DEVICE_GROUP="DEVICE_GROUP",Ve.FILE="FILE",Ve.PROJECT="PROJECT",e.TestResult=void 0,(Ye=e.TestResult||(e.TestResult={})).PASSED="PASSED",Ye.FAILED="FAILED",Ye.SKIPPED="SKIPPED",Ye.NOT_AVAILABLE="NOT_AVAILABLE",e.LimitationType=void 0,(je=e.LimitationType||(e.LimitationType={})).PACKAGE="PACKAGE",je.CLASS="CLASS",e.TestScheduler=void 0,($e=e.TestScheduler||(e.TestScheduler={})).PARALLEL="PARALLEL",$e.SERIAL="SERIAL",$e.SINGLE="SINGLE",$e.ALL_INSTANCES="ALL_INSTANCES",e.TestState=void 0,(ze=e.TestState||(e.TestState={})).WAITING="WAITING",ze.RUNNING="RUNNING",ze.FINISHED="FINISHED",e.TestRunConfigFileAction=void 0,(Xe=e.TestRunConfigFileAction||(e.TestRunConfigFileAction={})).COPY_TO_DEVICE="COPY_TO_DEVICE",Xe.INSTALL="INSTALL",Xe.RUN_TEST="RUN_TEST",e.UserStatus=void 0,(Je=e.UserStatus||(e.UserStatus={})).INACTIVE="INACTIVE",Je.DISABLED="DISABLED",Je.ENABLED="ENABLED",e.FileDirection=void 0,(Ze=e.FileDirection||(e.FileDirection={})).INPUT="INPUT",Ze.OUTPUT="OUTPUT",e.FileInputType=void 0,(Qe=e.FileInputType||(e.FileInputType={})).APPLICATION="APPLICATION",Qe.TEST="TEST",Qe.DATA="DATA",e.FileState=void 0,(es=e.FileState||(e.FileState={})).PREPARING="PREPARING",es.READY="READY",e.VisualTestImageType=void 0,(ss=e.VisualTestImageType||(e.VisualTestImageType={})).FULL_PAGE="FULL_PAGE",ss.VIEWPORT="VIEWPORT",ss.ELEMENT_SCREENSHOT="ELEMENT_SCREENSHOT",e.ALLOWED_HTTP_METHODS=o,e.API=le,e.CloudAPIClient=pe,e.FilterBuilder=u,e.IMAGE_FILES_FILTER=_,e.NON_MEDIA_FILES_FILTER=C,e.default=pe,Object.defineProperty(e,"__esModule",{value:!0})}));
18
18
  //# sourceMappingURL=bitbar-cloud-api-client.min.js.map