@bitbar/cloud-api-client 1.5.9 → 1.5.11

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.5.9 | Copyright 2025 (c) SmartBear Software and contributors | .git/blob/master/LICENSE */
1
+ /* @bitbar/cloud-api-client v1.5.11 | 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 d 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 E extends c{constructor(e){super(e),this.push("admin","devices")}cleanupConfigurations(){return new p(this)}cleanupConfiguration(e){return new d(this,e)}}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 T 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 I(e){return class extends e{send(){return Promise.reject()}}}let A=class extends c{constructor(e){super(e),this.push("admin","statistics")}frameworks(){return new c(this).push("frameworks")}};A=n([I],A);class f 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")}usage(){return new c(this).push("usage")}usageSummary(){return new l(this).push("usage-summary")}}class N 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 m 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 S 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 R 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([I],e.InputFileset);const v=new u;v.eq("state","READY"),v.in("mimetype",["image/png","image/jpg","image/jpeg","image/webp","image/gif"]),v.notlike("name","action-%%");const L=new u;L.eq("state","READY"),L.notin("mimetype",["image/png","image/jpg","image/jpeg","image/webp","image/gif","video/mp4","video/avi","video/webm","video/ogg","video/mpeg"]);class O extends c{constructor(e){super(e),this.push("files")}performance(){return this.params({tag:["performance"]})}images(){return this.filter(v)}nonMediaFiles(){return this.filter(L)}videos(){return this.params({filter:"s_state_eq_READY",tag:["video"]})}}e.OutputFileset=class extends l{constructor(e){super(e),this.push("output-file-set")}files(){return new O(this)}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")}},e.OutputFileset=n([I],e.OutputFileset);class C 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 D extends C{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 g extends c{constructor(e){super(e),this.push("admin","device-time")}}class b 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 U 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")}}function _(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 _(this,"retry",e).setRequestConfig({timeout:0})}}class P 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 F=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()}};F=n([I],F);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)}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 G=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 F(this)}deviceSession(e){return new M(this,e)}roles(){return new c(this).push("roles")}role(e){return new l(this).push("roles",e)}};G=n([I],G);class x 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 B 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 C{abort(){return new l(this).push("abort").post()}retry(){return new l(this).push("retry").post()}}class H 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 _(this,"build-logs.zip",e)}dataAvailability(){return new l(this).push("data-availability")}deviceSessions(){return new c(this).push("device-sessions")}filesZip(e){return _(this,"files.zip",e)}logsZip(e){return _(this,"logs.zip",e)}performanceZip(e){return _(this,"performance.zip",e)}retry(e){return _(this,"retry",e).setRequestConfig({timeout:0})}screenshotsZip(e){return _(this,"screenshots.zip",e)}steps(){return new c(this).push("steps")}}class W extends H{deviceSession(e){return new q(this,e)}}class Y 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 W(this,e)}share(){return new c(this).push("share")}unarchive(){return new l(this).push("unarchive")}}let K=class extends l{constructor(e){super(e)}accessGroups(){return new c(this).push("access-groups")}accessGroup(e){return new x(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 f(this,e)}accountServices(){return new c(this).push("admin","account-services")}accountService(e){return new N(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 m(this,e)}devices(){return new E(this)}device(e){return new S(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 R(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 D(this,e)}deviceTime(){return new g(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()}files(){return new c(this).push("files")}file(e){return new B(this,e)}frameworks(){return new c(this).push("admin","frameworks")}framework(e){return new b(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 U(this,e)}maintenance(){return new l(this).push("admin","maintenance")}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 Y(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 T(this)}service(e){return new P(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 G(this,e)}};K=n([I],K);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 V 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 $ 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 X 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 X(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)}services(){return new l(this).push("services")}userUsageDetails(){return new c(this).push("user-usage-details")}usageDetails(){return new c(this).push("usage-details")}usageDetailsSummary(){return new l(this).push("usage-details-summary")}}class J extends l{constructor(e){super(e),this.push("broker")}hubs(){return new c(this).push("hubs")}}class Q 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 ee 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 se 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 te 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 re 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 te(this,e)}}class ne extends c{constructor(e){super(e),this.push("runs")}config(){return new l(this).push("config")}}class ie extends c{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["GET"],this.push("tunnels")}active(e){return this.params({active:e})}}class ue 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 oe 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 M(this,e)}markAccountOwner(){return new l(this).push("mark-account-owner").post()}projects(){return new c(this).push("projects")}project(e){return new Y(this,e)}files(){return new se(this)}file(e){return new B(this,e)}runs(){return new ne(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 re(this)}notification(e){return new ue(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 x(this,e)}smartbearTunnel(e){return new l(this).push("tunnels",e)}smartbearTunnels(){return new ie(this)}deleteAccount(){return new l(this).push("delete")}}class ae 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 he=require("axios").default;globalThis.isNodeJs&&(he.defaults.headers.common["User-Agent"]="Bitbar Cloud API Client for JavaScript v1.5.9"),he.defaults.maxContentLength=1073741824;class ce{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=he.create(this.axiosConfig)}account(e){return new Z(this,e)}admin(){return new K(this)}broker(){return new J(this)}clusters(){return new c(this).push("clusters")}cluster(e){return new m(this,e)}device(e){return new Q(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 B(this,e)}labelGroups(){return new c(this).push("label-groups")}labelGroup(e){return new ee(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 Y(this,e)}properties(){return new V(this)}property(e){return new l(this).push("properties",e)}run(e){return new W(this,e)}services(){return new z(this)}user(e){return new oe(this,e)}users(){return new $(this)}userSession(){return new ae(this)}}const le={API:ce,FilterBuilder:u};var pe,de,Ee,we,Te,Ie,Ae,fe,Ne,me,Se,Re,ve,Le,Oe,Ce,De,ge,be,Ue,_e,ye,Pe,Fe,Me,Ge,xe,ke,Be,qe,He,We,Ye,Ke,je,Ve,ze,$e,Xe,Ze,Je,Qe,es,ss,ts,rs,ns;e.AccessGroupScope=void 0,(pe=e.AccessGroupScope||(e.AccessGroupScope={})).USER="USER",pe.ACCOUNT="ACCOUNT",pe.GLOBAL="GLOBAL",e.SessionUsageType=void 0,(de=e.SessionUsageType||(e.SessionUsageType={})).AUTOMATIC="AUTOMATIC",de.MANUAL="MANUAL",de.DEDICATED_AUTOMATIC="DEDICATED_AUTOMATIC",de.DEDICATED_MANUAL="DEDICATED_MANUAL",e.UtilizationType=void 0,(Ee=e.UtilizationType||(e.UtilizationType={})).ALL="all",Ee.PUBLIC="public",Ee.DEDICATED="dedicated",e.SessionType=void 0,(we=e.SessionType||(e.SessionType={})).ALL="all",we.AUTOMATED="automated",we.MANUAL="manual",e.TimeResolution=void 0,(Te=e.TimeResolution||(e.TimeResolution={})).HOUR="hour",Te.DAY="day",e.PaymentStatus=void 0,(Ie=e.PaymentStatus||(e.PaymentStatus={})).SUCCEEDED="SUCCEEDED",Ie.FAILED="FAILED",Ie.REDIRECTED="REDIRECTED",e.PaymentMethod=void 0,(Ae=e.PaymentMethod||(e.PaymentMethod={})).PAYPAL="PAYPAL",Ae.BRAINTREE="BRAINTREE",Ae.STRIPE="STRIPE",Ae.INVOICE="INVOICE",Ae.PROMOTION="PROMOTION",Ae.AWS="AWS",e.DeactivateReason=void 0,(fe=e.DeactivateReason||(e.DeactivateReason={})).INITIAL_FAILURE="INITIAL_FAILURE",fe.SCA_FAILURE="SCA_FAILURE",fe.CHARGE_FAILURE="CHARGE_FAILURE",fe.CANCEL="CANCEL",fe.SUSPENDED="SUSPENDED",fe.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,(me=e.DeviceState||(e.DeviceState={})).OFFLINE_CLEANING="OFFLINE_CLEANING",me.OFFLINE_DIRTY="OFFLINE_DIRTY",me.OFFLINE_FREE="OFFLINE_FREE",me.OFFLINE_TESTING="OFFLINE_TESTING",me.ONLINE_CLEANING="ONLINE_CLEANING",me.ONLINE_DIRTY="ONLINE_DIRTY",me.ONLINE_FREE="ONLINE_FREE",me.ONLINE_TESTING="ONLINE_TESTING",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,(Re=e.BillingType||(e.BillingType={})).BUY="BUY",Re.CHARGE="CHARGE",Re.CANCEL="CANCEL",e.BrokerType=void 0,(ve=e.BrokerType||(e.BrokerType={})).MOBILE="MOBILE",ve.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.ClusterType=void 0,(Oe=e.ClusterType||(e.ClusterType={})).BARE_METAL="BARE_METAL",Oe.EC2="EC2",Oe.VM="VM",e.DeviceGroupOrigin=void 0,(Ce=e.DeviceGroupOrigin||(e.DeviceGroupOrigin={})).STATIC="STATIC",Ce.DYNAMIC="DYNAMIC",Ce.HYBRID="HYBRID",e.Platform=void 0,(De=e.Platform||(e.Platform={})).IOS="IOS",De.ANDROID="ANDROID",De.WINDOWS="WINDOWS",De.MAC="MAC",De.LINUX="LINUX",De.UNDEFINED="UNDEFINED",e.SupportedCreators=void 0,(ge=e.SupportedCreators||(e.SupportedCreators={})).MANUAL="MANUAL",ge.ROBOT="ROBOT",ge.AUTOMATIC="AUTOMATIC",e.PoolSize=void 0,(be=e.PoolSize||(e.PoolSize={})).XL="XL",be.L="L",be.M="M",be.S="S",e.Code=void 0,(Ue=e.Code||(e.Code={})).HIGH="HIGH",Ue.MODERATE="MODERATE",Ue.LOW="LOW",Ue.NONE="NONE",e.LockReason=void 0,(_e=e.LockReason||(e.LockReason={})).TESTING="TESTING",_e.CLEANING="CLEANING",_e.NOT_OPERATIONAL="NOT_OPERATIONAL",e.CriterionField=void 0,(ye=e.CriterionField||(e.CriterionField={})).NAME="NAME",ye.FINGERPRINT="FINGERPRINT",ye.SERIAL_ID="SERIAL_ID",ye.UNLOCK_GESTURE="UNLOCK_GESTURE",ye.SOFTWARE_VERSION="SOFTWARE_VERSION",ye.INIT_STEP="INIT_STEP",ye.ACCOUNT="ACCOUNT",ye.BROWSERS="BROWSERS",e.RetentionStrategy=void 0,(Pe=e.RetentionStrategy||(e.RetentionStrategy={})).CLUSTER_ON_OFF="CLUSTER_ON_OFF",Pe.MIN_FREE_MAX_TOTAL="MIN_FREE_MAX_TOTAL",Pe.POOL_MANAGER_AWARE="POOL_MANAGER_AWARE",e.ProblemType=void 0,(Fe=e.ProblemType||(e.ProblemType={})).CLEANING="CLEANING",Fe.DIRTY="DIRTY",Fe.OFFLINE="OFFLINE",Fe.LOW_BATTERY="LOW_BATTERY",Fe.HIGH_FAIL_RATE="HIGH_FAIL_RATE",Fe.NO_INTERNET_CONNECTION="NO_INTERNET_CONNECTION",e.DeviceSessionType=void 0,(Me=e.DeviceSessionType||(e.DeviceSessionType={})).AUTOMATIC="AUTOMATIC",Me.MANUAL_APP="MANUAL_APP",Me.MANUAL_WEB="MANUAL_WEB",e.RetryState=void 0,(Ge=e.RetryState||(e.RetryState={})).NONE="NONE",Ge.MANUAL="MANUAL",Ge.AUTO="AUTO",e.DeviceSessionState=void 0,(xe=e.DeviceSessionState||(e.DeviceSessionState={})).ABORTED="ABORTED",xe.EXCLUDED="EXCLUDED",xe.FAILED="FAILED",xe.RUNNING="RUNNING",xe.SUCCEEDED="SUCCEEDED",xe.TIMEOUT="TIMEOUT",xe.WAITING="WAITING",xe.WARNING="WARNING",e.DeviceSessionStepType=void 0,(ke=e.DeviceSessionStepType||(e.DeviceSessionStepType={})).WAITING="WAITING",ke.PREPARING="PREPARING",ke.UNINSTALL="UNINSTALL",ke.INSTALL="INSTALL",ke.RUNNING="RUNNING",ke.SENDING_RESULTS="SENDING_RESULTS",ke.PROCESSING_RESULTS="PROCESSING_RESULTS",e.SessionReleaseReason=void 0,(Be=e.SessionReleaseReason||(e.SessionReleaseReason={})).INACTIVITY="INACTIVITY",Be.TIMEOUT="TIMEOUT",Be.USER_ACTION="USER_ACTION",Be.CHANGE_DEVICE="CHANGE_DEVICE",Be.WEBSOCKET_CLOSED="WEBSOCKET_CLOSED",e.OsType=void 0,(qe=e.OsType||(e.OsType={})).IOS="IOS",qe.ANDROID="ANDROID",qe.DESKTOP="DESKTOP",qe.UNDEFINED="UNDEFINED",e.LicenseStatus=void 0,(He=e.LicenseStatus||(e.LicenseStatus={})).ACTIVE="ACTIVE",He.EXPIRED="EXPIRED",He.INACTIVE="INACTIVE",He.CLOSED="CLOSED",e.NotificationChannel=void 0,(We=e.NotificationChannel||(e.NotificationChannel={})).SLACK="SLACK",We.EMAIL="EMAIL",We.WEBHOOK="WEBHOOK",e.NotificationScope=void 0,(Ye=e.NotificationScope||(e.NotificationScope={})).ALL="ALL",Ye.TEST_RUN="TEST_RUN",Ye.TEST_RUN_FAILURE="TEST_RUN_FAILURE",Ye.TEST_RUN_SUCCEEDED="TEST_RUN_SUCCEEDED",Ye.SYSTEM="SYSTEM",Ye.CHECK="CHECK",e.ArchivingStrategy=void 0,(Ke=e.ArchivingStrategy||(e.ArchivingStrategy={})).NEVER="NEVER",Ke.DAYS="DAYS",Ke.RUNS="RUNS",e.ScreenshotType=void 0,(je=e.ScreenshotType||(e.ScreenshotType={})).LANDSCAPE="LANDSCAPE",je.PORTRAIT="PORTRAIT",e.ServiceUnit=void 0,(Ve=e.ServiceUnit||(e.ServiceUnit={})).DAY="DAY",Ve.HOUR="HOUR",Ve.MONTH="MONTH",Ve.PROJECT="PROJECT",Ve.RUN="RUN",Ve.YEAR="YEAR",e.SharedResourceType=void 0,(ze=e.SharedResourceType||(e.SharedResourceType={})).DEVICE_GROUP="DEVICE_GROUP",ze.FILE="FILE",ze.PROJECT="PROJECT",e.TestResult=void 0,($e=e.TestResult||(e.TestResult={})).PASSED="PASSED",$e.FAILED="FAILED",$e.SKIPPED="SKIPPED",$e.NOT_AVAILABLE="NOT_AVAILABLE",e.LimitationType=void 0,(Xe=e.LimitationType||(e.LimitationType={})).PACKAGE="PACKAGE",Xe.CLASS="CLASS",e.TestScheduler=void 0,(Ze=e.TestScheduler||(e.TestScheduler={})).PARALLEL="PARALLEL",Ze.SERIAL="SERIAL",Ze.SINGLE="SINGLE",Ze.ALL_INSTANCES="ALL_INSTANCES",e.TestState=void 0,(Je=e.TestState||(e.TestState={})).WAITING="WAITING",Je.RUNNING="RUNNING",Je.FINISHED="FINISHED",e.TestRunConfigFileAction=void 0,(Qe=e.TestRunConfigFileAction||(e.TestRunConfigFileAction={})).COPY_TO_DEVICE="COPY_TO_DEVICE",Qe.INSTALL="INSTALL",Qe.RUN_TEST="RUN_TEST",e.UserStatus=void 0,(es=e.UserStatus||(e.UserStatus={})).INACTIVE="INACTIVE",es.DISABLED="DISABLED",es.ENABLED="ENABLED",e.FileDirection=void 0,(ss=e.FileDirection||(e.FileDirection={})).INPUT="INPUT",ss.OUTPUT="OUTPUT",e.FileInputType=void 0,(ts=e.FileInputType||(e.FileInputType={})).APPLICATION="APPLICATION",ts.TEST="TEST",ts.DATA="DATA",e.FileState=void 0,(rs=e.FileState||(e.FileState={})).PREPARING="PREPARING",rs.READY="READY",e.VisualTestImageType=void 0,(ns=e.VisualTestImageType||(e.VisualTestImageType={})).FULL_PAGE="FULL_PAGE",ns.VIEWPORT="VIEWPORT",ns.ELEMENT_SCREENSHOT="ELEMENT_SCREENSHOT",e.ALLOWED_HTTP_METHODS=o,e.API=ce,e.CloudAPIClient=le,e.FilterBuilder=u,e.IMAGE_FILES_FILTER=v,e.NON_MEDIA_FILES_FILTER=L,e.default=le,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 d 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 E extends c{constructor(e){super(e),this.push("admin","devices")}cleanupConfigurations(){return new p(this)}cleanupConfiguration(e){return new d(this,e)}}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 T 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 I(e){return class extends e{send(){return Promise.reject()}}}let A=class extends c{constructor(e){super(e),this.push("admin","statistics")}frameworks(){return new c(this).push("frameworks")}};A=n([I],A);class f 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")}usage(){return new c(this).push("usage")}usageSummary(){return new l(this).push("usage-summary")}}class N 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 m 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 S 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 R 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([I],e.InputFileset);const v=new u;v.eq("state","READY"),v.in("mimetype",["image/png","image/jpg","image/jpeg","image/webp","image/gif"]),v.notlike("name","action-%%");const L=new u;L.eq("state","READY"),L.notin("mimetype",["image/png","image/jpg","image/jpeg","image/webp","image/gif","video/mp4","video/avi","video/webm","video/ogg","video/mpeg"]);class O extends c{constructor(e){super(e),this.push("files")}performance(){return this.params({tag:["performance"]})}images(){return this.filter(v)}nonMediaFiles(){return this.filter(L)}videos(){return this.params({filter:"s_state_eq_READY",tag:["video"]})}}e.OutputFileset=class extends l{constructor(e){super(e),this.push("output-file-set")}files(){return new O(this)}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")}},e.OutputFileset=n([I],e.OutputFileset);class C 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 D extends C{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 g extends c{constructor(e){super(e),this.push("admin","device-time")}}class b 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 U 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")}}function _(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 _(this,"retry",e).setRequestConfig({timeout:0})}}class P 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 F=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()}};F=n([I],F);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)}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 G=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 F(this)}deviceSession(e){return new M(this,e)}roles(){return new c(this).push("roles")}role(e){return new l(this).push("roles",e)}};G=n([I],G);class x 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 B 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 C{abort(){return new l(this).push("abort").post()}retry(){return new l(this).push("retry").post()}}class H 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 _(this,"build-logs.zip",e)}dataAvailability(){return new l(this).push("data-availability")}deviceSessions(){return new c(this).push("device-sessions")}filesZip(e){return _(this,"files.zip",e)}logsZip(e){return _(this,"logs.zip",e)}performanceZip(e){return _(this,"performance.zip",e)}retry(e){return _(this,"retry",e).setRequestConfig({timeout:0})}screenshotsZip(e){return _(this,"screenshots.zip",e)}steps(){return new c(this).push("steps")}}class W extends H{deviceSession(e){return new q(this,e)}}class Y 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 W(this,e)}share(){return new c(this).push("share")}unarchive(){return new l(this).push("unarchive")}}let K=class extends l{constructor(e){super(e)}accessGroups(){return new c(this).push("access-groups")}accessGroup(e){return new x(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 f(this,e)}accountServices(){return new c(this).push("admin","account-services")}accountService(e){return new N(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 m(this,e)}devices(){return new E(this)}device(e){return new S(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 R(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 D(this,e)}deviceTime(){return new g(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()}files(){return new c(this).push("files")}file(e){return new B(this,e)}frameworks(){return new c(this).push("admin","frameworks")}framework(e){return new b(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 U(this,e)}maintenance(){return new l(this).push("admin","maintenance")}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 Y(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 T(this)}service(e){return new P(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 G(this,e)}};K=n([I],K);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 V 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 $ 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 X 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 X(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)}services(){return new l(this).push("services")}userUsageDetails(){return new c(this).push("user-usage-details")}usageDetails(){return new c(this).push("usage-details")}usageDetailsSummary(){return new l(this).push("usage-details-summary")}}class J extends l{constructor(e){super(e),this.push("broker")}hubs(){return new c(this).push("hubs")}}class Q 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 ee 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 se 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 te 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 re 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 te(this,e)}}class ne extends c{constructor(e){super(e),this.push("runs")}config(){return new l(this).push("config")}}class ie extends c{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["GET"],this.push("tunnels")}active(e){return this.params({active:e})}}class ue 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 oe 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 M(this,e)}markAccountOwner(){return new l(this).push("mark-account-owner").post()}projects(){return new c(this).push("projects")}project(e){return new Y(this,e)}files(){return new se(this)}file(e){return new B(this,e)}runs(){return new ne(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 re(this)}notification(e){return new ue(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 x(this,e)}smartbearTunnel(e){return new l(this).push("tunnels",e)}smartbearTunnels(){return new ie(this)}deleteAccount(){return new l(this).push("delete")}}class ae 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 he=require("axios").default;globalThis.isNodeJs&&(he.defaults.headers.common["User-Agent"]="Bitbar Cloud API Client for JavaScript v1.5.11"),he.defaults.maxContentLength=1073741824;class ce{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=he.create(this.axiosConfig)}account(e){return new Z(this,e)}admin(){return new K(this)}broker(){return new J(this)}clusters(){return new c(this).push("clusters")}cluster(e){return new m(this,e)}device(e){return new Q(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 B(this,e)}labelGroups(){return new c(this).push("label-groups")}labelGroup(e){return new ee(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 Y(this,e)}properties(){return new V(this)}property(e){return new l(this).push("properties",e)}run(e){return new W(this,e)}services(){return new z(this)}user(e){return new oe(this,e)}users(){return new $(this)}userSession(){return new ae(this)}}const le={API:ce,FilterBuilder:u};var pe,de,Ee,we,Te,Ie,Ae,fe,Ne,me,Se,Re,ve,Le,Oe,Ce,De,ge,be,Ue,_e,ye,Pe,Fe,Me,Ge,xe,ke,Be,qe,He,We,Ye,Ke,je,Ve,ze,$e,Xe,Ze,Je,Qe,es,ss,ts,rs,ns;e.AccessGroupScope=void 0,(pe=e.AccessGroupScope||(e.AccessGroupScope={})).USER="USER",pe.ACCOUNT="ACCOUNT",pe.GLOBAL="GLOBAL",e.SessionUsageType=void 0,(de=e.SessionUsageType||(e.SessionUsageType={})).AUTOMATIC="AUTOMATIC",de.MANUAL="MANUAL",de.DEDICATED_AUTOMATIC="DEDICATED_AUTOMATIC",de.DEDICATED_MANUAL="DEDICATED_MANUAL",e.UtilizationType=void 0,(Ee=e.UtilizationType||(e.UtilizationType={})).ALL="all",Ee.PUBLIC="public",Ee.DEDICATED="dedicated",e.SessionType=void 0,(we=e.SessionType||(e.SessionType={})).ALL="all",we.AUTOMATED="automated",we.MANUAL="manual",e.TimeResolution=void 0,(Te=e.TimeResolution||(e.TimeResolution={})).HOUR="hour",Te.DAY="day",e.PaymentStatus=void 0,(Ie=e.PaymentStatus||(e.PaymentStatus={})).SUCCEEDED="SUCCEEDED",Ie.FAILED="FAILED",Ie.REDIRECTED="REDIRECTED",e.PaymentMethod=void 0,(Ae=e.PaymentMethod||(e.PaymentMethod={})).PAYPAL="PAYPAL",Ae.BRAINTREE="BRAINTREE",Ae.STRIPE="STRIPE",Ae.INVOICE="INVOICE",Ae.PROMOTION="PROMOTION",Ae.AWS="AWS",e.DeactivateReason=void 0,(fe=e.DeactivateReason||(e.DeactivateReason={})).INITIAL_FAILURE="INITIAL_FAILURE",fe.SCA_FAILURE="SCA_FAILURE",fe.CHARGE_FAILURE="CHARGE_FAILURE",fe.CANCEL="CANCEL",fe.SUSPENDED="SUSPENDED",fe.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,(me=e.DeviceState||(e.DeviceState={})).OFFLINE_CLEANING="OFFLINE_CLEANING",me.OFFLINE_DIRTY="OFFLINE_DIRTY",me.OFFLINE_FREE="OFFLINE_FREE",me.OFFLINE_TESTING="OFFLINE_TESTING",me.ONLINE_CLEANING="ONLINE_CLEANING",me.ONLINE_DIRTY="ONLINE_DIRTY",me.ONLINE_FREE="ONLINE_FREE",me.ONLINE_TESTING="ONLINE_TESTING",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,(Re=e.BillingType||(e.BillingType={})).BUY="BUY",Re.CHARGE="CHARGE",Re.CANCEL="CANCEL",e.BrokerType=void 0,(ve=e.BrokerType||(e.BrokerType={})).MOBILE="MOBILE",ve.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.ClusterType=void 0,(Oe=e.ClusterType||(e.ClusterType={})).BARE_METAL="BARE_METAL",Oe.EC2="EC2",Oe.VM="VM",e.DeviceGroupOrigin=void 0,(Ce=e.DeviceGroupOrigin||(e.DeviceGroupOrigin={})).STATIC="STATIC",Ce.DYNAMIC="DYNAMIC",Ce.HYBRID="HYBRID",e.Platform=void 0,(De=e.Platform||(e.Platform={})).IOS="IOS",De.ANDROID="ANDROID",De.WINDOWS="WINDOWS",De.MAC="MAC",De.LINUX="LINUX",De.UNDEFINED="UNDEFINED",e.SupportedCreators=void 0,(ge=e.SupportedCreators||(e.SupportedCreators={})).MANUAL="MANUAL",ge.ROBOT="ROBOT",ge.AUTOMATIC="AUTOMATIC",e.PoolSize=void 0,(be=e.PoolSize||(e.PoolSize={})).XL="XL",be.L="L",be.M="M",be.S="S",e.Code=void 0,(Ue=e.Code||(e.Code={})).HIGH="HIGH",Ue.MODERATE="MODERATE",Ue.LOW="LOW",Ue.NONE="NONE",e.LockReason=void 0,(_e=e.LockReason||(e.LockReason={})).TESTING="TESTING",_e.CLEANING="CLEANING",_e.NOT_OPERATIONAL="NOT_OPERATIONAL",e.CriterionField=void 0,(ye=e.CriterionField||(e.CriterionField={})).NAME="NAME",ye.FINGERPRINT="FINGERPRINT",ye.SERIAL_ID="SERIAL_ID",ye.UNLOCK_GESTURE="UNLOCK_GESTURE",ye.SOFTWARE_VERSION="SOFTWARE_VERSION",ye.INIT_STEP="INIT_STEP",ye.ACCOUNT="ACCOUNT",ye.BROWSERS="BROWSERS",e.RetentionStrategy=void 0,(Pe=e.RetentionStrategy||(e.RetentionStrategy={})).CLUSTER_ON_OFF="CLUSTER_ON_OFF",Pe.MIN_FREE_MAX_TOTAL="MIN_FREE_MAX_TOTAL",Pe.POOL_MANAGER_AWARE="POOL_MANAGER_AWARE",e.ProblemType=void 0,(Fe=e.ProblemType||(e.ProblemType={})).CLEANING="CLEANING",Fe.DIRTY="DIRTY",Fe.OFFLINE="OFFLINE",Fe.LOW_BATTERY="LOW_BATTERY",Fe.HIGH_FAIL_RATE="HIGH_FAIL_RATE",Fe.NO_INTERNET_CONNECTION="NO_INTERNET_CONNECTION",e.DeviceSessionType=void 0,(Me=e.DeviceSessionType||(e.DeviceSessionType={})).AUTOMATIC="AUTOMATIC",Me.MANUAL_APP="MANUAL_APP",Me.MANUAL_WEB="MANUAL_WEB",e.RetryState=void 0,(Ge=e.RetryState||(e.RetryState={})).NONE="NONE",Ge.MANUAL="MANUAL",Ge.AUTO="AUTO",e.DeviceSessionState=void 0,(xe=e.DeviceSessionState||(e.DeviceSessionState={})).ABORTED="ABORTED",xe.EXCLUDED="EXCLUDED",xe.FAILED="FAILED",xe.RUNNING="RUNNING",xe.SUCCEEDED="SUCCEEDED",xe.TIMEOUT="TIMEOUT",xe.WAITING="WAITING",xe.WARNING="WARNING",e.DeviceSessionStepType=void 0,(ke=e.DeviceSessionStepType||(e.DeviceSessionStepType={})).WAITING="WAITING",ke.PREPARING="PREPARING",ke.UNINSTALL="UNINSTALL",ke.INSTALL="INSTALL",ke.RUNNING="RUNNING",ke.SENDING_RESULTS="SENDING_RESULTS",ke.PROCESSING_RESULTS="PROCESSING_RESULTS",e.SessionReleaseReason=void 0,(Be=e.SessionReleaseReason||(e.SessionReleaseReason={})).INACTIVITY="INACTIVITY",Be.TIMEOUT="TIMEOUT",Be.USER_ACTION="USER_ACTION",Be.CHANGE_DEVICE="CHANGE_DEVICE",Be.WEBSOCKET_CLOSED="WEBSOCKET_CLOSED",e.OsType=void 0,(qe=e.OsType||(e.OsType={})).IOS="IOS",qe.ANDROID="ANDROID",qe.DESKTOP="DESKTOP",qe.UNDEFINED="UNDEFINED",e.LicenseStatus=void 0,(He=e.LicenseStatus||(e.LicenseStatus={})).ACTIVE="ACTIVE",He.EXPIRED="EXPIRED",He.INACTIVE="INACTIVE",He.CLOSED="CLOSED",e.NotificationChannel=void 0,(We=e.NotificationChannel||(e.NotificationChannel={})).SLACK="SLACK",We.EMAIL="EMAIL",We.WEBHOOK="WEBHOOK",e.NotificationScope=void 0,(Ye=e.NotificationScope||(e.NotificationScope={})).ALL="ALL",Ye.TEST_RUN="TEST_RUN",Ye.TEST_RUN_FAILURE="TEST_RUN_FAILURE",Ye.TEST_RUN_SUCCEEDED="TEST_RUN_SUCCEEDED",Ye.SYSTEM="SYSTEM",Ye.CHECK="CHECK",e.ArchivingStrategy=void 0,(Ke=e.ArchivingStrategy||(e.ArchivingStrategy={})).NEVER="NEVER",Ke.DAYS="DAYS",Ke.RUNS="RUNS",e.ScreenshotType=void 0,(je=e.ScreenshotType||(e.ScreenshotType={})).LANDSCAPE="LANDSCAPE",je.PORTRAIT="PORTRAIT",e.ServiceUnit=void 0,(Ve=e.ServiceUnit||(e.ServiceUnit={})).DAY="DAY",Ve.HOUR="HOUR",Ve.MONTH="MONTH",Ve.PROJECT="PROJECT",Ve.RUN="RUN",Ve.YEAR="YEAR",e.SharedResourceType=void 0,(ze=e.SharedResourceType||(e.SharedResourceType={})).DEVICE_GROUP="DEVICE_GROUP",ze.FILE="FILE",ze.PROJECT="PROJECT",e.TestResult=void 0,($e=e.TestResult||(e.TestResult={})).PASSED="PASSED",$e.FAILED="FAILED",$e.SKIPPED="SKIPPED",$e.NOT_AVAILABLE="NOT_AVAILABLE",e.LimitationType=void 0,(Xe=e.LimitationType||(e.LimitationType={})).PACKAGE="PACKAGE",Xe.CLASS="CLASS",e.TestScheduler=void 0,(Ze=e.TestScheduler||(e.TestScheduler={})).PARALLEL="PARALLEL",Ze.SERIAL="SERIAL",Ze.SINGLE="SINGLE",Ze.ALL_INSTANCES="ALL_INSTANCES",e.TestState=void 0,(Je=e.TestState||(e.TestState={})).WAITING="WAITING",Je.RUNNING="RUNNING",Je.FINISHED="FINISHED",e.TestRunConfigFileAction=void 0,(Qe=e.TestRunConfigFileAction||(e.TestRunConfigFileAction={})).COPY_TO_DEVICE="COPY_TO_DEVICE",Qe.INSTALL="INSTALL",Qe.RUN_TEST="RUN_TEST",e.UserStatus=void 0,(es=e.UserStatus||(e.UserStatus={})).INACTIVE="INACTIVE",es.DISABLED="DISABLED",es.ENABLED="ENABLED",e.FileDirection=void 0,(ss=e.FileDirection||(e.FileDirection={})).INPUT="INPUT",ss.OUTPUT="OUTPUT",e.FileInputType=void 0,(ts=e.FileInputType||(e.FileInputType={})).APPLICATION="APPLICATION",ts.TEST="TEST",ts.DATA="DATA",e.FileState=void 0,(rs=e.FileState||(e.FileState={})).PREPARING="PREPARING",rs.READY="READY",e.VisualTestImageType=void 0,(ns=e.VisualTestImageType||(e.VisualTestImageType={})).FULL_PAGE="FULL_PAGE",ns.VIEWPORT="VIEWPORT",ns.ELEMENT_SCREENSHOT="ELEMENT_SCREENSHOT",e.ALLOWED_HTTP_METHODS=o,e.API=ce,e.CloudAPIClient=le,e.FilterBuilder=u,e.IMAGE_FILES_FILTER=v,e.NON_MEDIA_FILES_FILTER=L,e.default=le,Object.defineProperty(e,"__esModule",{value:!0})}));
18
18
  //# sourceMappingURL=bitbar-cloud-api-client.min.js.map