New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bitbar/cloud-api-client

Package Overview
Dependencies
Maintainers
0
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bitbar/cloud-api-client - npm Package Compare versions

Comparing version 1.2.7 to 1.2.8

11

dist/API.d.ts

@@ -22,3 +22,3 @@ import { AxiosInstance } from 'axios';

import { Cluster } from './api/models/Cluster';
import { NoQueryParams } from './api/models/HTTP';
import { NoQueryParams, QueryParams } from './api/models/HTTP';
import { License } from './api/models/License';

@@ -30,2 +30,3 @@ import { Project } from './api/models/Project';

import './finka';
import { LabelGroup } from './api/models/LabelGroup';
export declare class API {

@@ -49,9 +50,9 @@ private config;

deviceStatistics(): APIList<any, import("./api/models/HTTP").CollectionQueryParams, any>;
enums(): APIResource<any, import("./api/models/HTTP").QueryParams, import("./api/models/HTTP").QueryParams>;
enums(): APIResource<any, QueryParams, QueryParams>;
files(): APIList<UserFile, UserFileParams, UserFileData>;
file(id: number): APIResourceFile;
labelGroups(): APIList<any, import("./api/models/HTTP").CollectionQueryParams, any>;
labelGroups(): APIList<LabelGroup, QueryParams, void>;
labelGroup(id: number): APIResourceLabelGroup;
labels(): APIList<any, import("./api/models/HTTP").CollectionQueryParams, any>;
licenses(): APIResource<any, import("./api/models/HTTP").QueryParams, import("./api/models/HTTP").QueryParams>;
licenses(): APIResource<any, QueryParams, QueryParams>;
license(): APIResource<License, NoQueryParams, void>;

@@ -63,3 +64,3 @@ ma(): APIAdminResource | APIResourceUser;

properties(): APIListProperties;
property(id: number): APIResource<Property, import("./api/models/HTTP").QueryParams, import("./api/models/HTTP").QueryParams>;
property(id: number): APIResource<Property, QueryParams, QueryParams>;
run(id: number): APIResourceRun;

@@ -66,0 +67,0 @@ services(): APIListServices;

@@ -1,2 +0,2 @@

/* @bitbar/cloud-api-client v1.2.7 | Copyright 2024 (c) SmartBear Software and contributors | .git/blob/master/LICENSE */
/* @bitbar/cloud-api-client v1.2.8 | Copyright 2024 (c) SmartBear Software and contributors | .git/blob/master/LICENSE */
!function(e,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports,require("axios"),require("@bitbar/finka"),require("qs"),require("node-abort-controller")):"function"==typeof define&&define.amd?define(["exports","axios","@bitbar/finka","qs","node-abort-controller"],s):s((e="undefined"!=typeof globalThis?globalThis:e||self)["bitbar-cloud-api-client"]={},e.axios,e["@bitbar/finka"],e.qs,e["node-abort-controller"])}(this,(function(e,s,t,r,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=i(s),o=i(t);

@@ -17,3 +17,3 @@ /******************************************************************************

***************************************************************************** */
function a(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}class h{constructor(e,s,t){this.name=e,this.value=s,this.operand=t}}o.default();class c{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 i=!1;if(r){for(const e of n)null===e&&(i=!0);i&&(n=n.filter((e=>null!==e)),t+="ornull")}return t.endsWith("ornull")&&0===n.length&&(t="isnull"),this.filters.push(new h(e,n,t)),this}}const l=["GET","POST","DELETE"];var p;e.APIOrder=void 0,(p=e.APIOrder||(e.APIOrder={})).asc="a",p.desc="d";class E{constructor(e){this.stack=[],this.requestConfig={},this.ALLOWED_HTTP_METHODS=l,e instanceof E?(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 n.AbortController}abortRequest(){this.abortController.abort(),this.abortController=new n.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 r.stringify(e,{arrayFormat:"brackets"})}}class d extends E{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 c))throw new Error("Filter must be either string or instance of FilterBuilder");return this.params({filter:e.toString()})}}class w extends E{}class T extends d{constructor(e){super(e),this.push("cleanup-configurations")}specific(){return new w(this).push("specific")}}class I extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("cleanup-configurations",s)}devices(){return new w(this).push("devices")}}class N extends d{constructor(e){super(e),this.push("admin","devices")}cleanupConfigurations(){return new T(this)}cleanupConfiguration(e){return new I(this,e)}}class A extends d{constructor(e){super(e),this.push("admin","notification-plans")}channels(){return new d(this).push("channels")}scopes(){return new d(this).push("scopes")}}class R extends d{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["GET"],this.push("admin","runs")}config(){const e=new w(this);return e.restack("runs","config"),e}}class S extends d{constructor(e){super(e),this.push("admin","services")}active(){const e=new d(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 d(this);return e.params({inUse:!0,limit:0,sort:"name_a"}),e}byPrice(){const e=new d(this);return e.params({sort:"centPrice_a"}),e}}function f(e){return class extends e{send(){return Promise.reject()}}}let O=class extends d{constructor(e){super(e),this.push("admin","statistics")}deviceSessions(){return new d(this).push("device-sessions")}frameworks(){return new d(this).push("frameworks")}};O=a([f],O);class L extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","accounts",s)}roles(){return new d(this).push("roles")}role(e){return new w(this).push("roles",e)}accountServices(){return new d(this).push("account-services")}preferences(){return new w(this).push("preferences")}}class m extends w{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 w(this).push("activate").post()}deactivate(){return new w(this).push("deactivate").post()}}class _ extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("clusters",s)}devices(){return new d(this).push("devices")}}class C extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","devices",s)}cleanupConfiguration(){return new w(this).push("cleanup-configuration")}labels(){return new d(this).push("labels")}label(e){return new w(this).push("labels",e)}queue(){return new d(this).push("queue")}}class v extends w{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 d(this).push("browsers")}}e.InputFileset=class extends w{constructor(e){super(e),this.push("input-file-set")}files(){return new d(this).push("files")}filesZip(){return new w(this).push("files.zip")}},e.InputFileset=a([f],e.InputFileset);const D=new c;D.eq("state","READY"),D.in("mimetype",["image/png","image/jpg","image/jpeg","image/webp","image/gif"]),D.notlike("name","action-%%");const U=new c;U.eq("state","READY"),U.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 w{constructor(e){super(e),this.push("output-file-set")}files(){return new d(this).push("files")}file(e){return new w(this).push("files",e)}filesZip(){return new w(this).push("files.zip")}screenshots(){return new d(this).push("screenshots")}screenshot(e){return new w(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(U)}performance(){return this.files().params({tag:["performance"]})}images(){return this.files().filter(D)}},e.OutputFileset=a([f],e.OutputFileset);class b extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-sessions",s)}commands(){return new d(this).push("commands")}input(){return new e.InputFileset(this)}output(){return new e.OutputFileset(this)}release(){return new w(this).push("release").post()}screenshots(){return new d(this).push("screenshots")}screenshot(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("screenshots",e)}steps(){return new d(this).push("steps")}step(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("steps",e)}currentStep(){return this.step("current")}testCaseRuns(){return new d(this).push("test-case-runs")}connections(){return new d(this).push("connections")}logs(){return new w(this).push("logs").setRequestConfig({responseType:"text"})}clusterLogs(){return new w(this).push("cluster-logs").setRequestConfig({responseType:"text"})}}class g extends b{changeBillable(e){return function(e,s){const t=new w(e),r=t.last;return t.restack("admin","device-sessions",r,"changebillable").params({billable:s}).post()}(this,e)}}class P extends d{constructor(e){super(e),this.push("admin","device-time")}countSessionReport(){return new d(this).push("count-session-report")}stepTimeReport(){return new d(this).push("step-time-report")}}class y extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","frameworks",s)}config(){return new w(this).push("config")}requiredRoles(){return new d(this).push("required-roles")}}class F extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","licenses",s)}activate(){return new w(this).push("activate")}deactivate(){return new w(this).push("deactivate")}resend(){return new w(this).push("resend")}download(){return new w(this).push("download")}}class M extends w{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 d(this).push("check")}test(){return new w(this).push("test")}execute(){return new w(this).push("execute")}}function G(e,s,t){const r=new w(e).push(s);return null!=t&&r.params({deviceRunIds:t}),r.post()}class x extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","runs",s)}abort(){return new w(this).push("abort").post()}changeBillable(e){return new w(this).push("changebillable").post().params({billable:e})}changePriority(e){const s=new w(this).push("changepriority");return e&&s.post().data({priority:e}),s}retry(e){return G(this,"retry",e).setRequestConfig({timeout:0})}}class B extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","services",s)}activate(){return new w(this).push("activate").post()}}let k=class extends w{constructor(e){super(e),this.push("account")}roles(){return new d(this).push("roles")}role(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("roles",e)}services(){const e=new d(this);return e.last+="-services",e}update(){const e=new w(this);return e.last="update-account",e.post()}};k=a([f],k);class H extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-sessions",s)}connections(){return new d(this).push("connections")}connection(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("connections",e)}input(){return new e.InputFileset(this)}output(){return new e.OutputFileset(this)}release(){return new w(this).push("release").post()}visualTestImages(){return new d(this).push("visualtest","images")}}let q=class extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","users",s)}disable(){return new w(this).push("disable")}enable(){return new w(this).push("enable")}licenses(){return new d(this).push("licenses")}resendActivation(){return new w(this).push("resend-activation").post()}account(){return new k(this)}deviceSession(e){return new H(this,e)}roles(){return new d(this).push("roles")}role(e){return new w(this).push("roles",e)}};q=a([f],q);class W extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("access-groups",s)}users(){return new d(this).push("users")}user(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("users",e)}resources(){return new d(this).push("resources")}resource(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("resources",e)}}class K extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-groups",s)}devices(){return new d(this).push("devices")}device(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("devices",e)}selectors(){return new d(this).push("selectors")}selector(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("selectors",e)}share(){return new d(this).push("share")}}class V extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("files",s)}file(){return new w(this).push("file")}icon(){return new w(this).push("icon")}tags(){return new d(this).push("tags")}share(){return new d(this).push("share")}property(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("properties",e)}}class Y extends b{abort(){return new w(this).push("abort").post()}retry(){return new w(this).push("retry").post()}}class j extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("runs",s)}abort(){return new w(this).push("abort").post()}buildLogsZip(e){return G(this,"build-logs.zip",e)}dataAvailability(){return new w(this).push("data-availability")}deviceSessions(){return new d(this).push("device-sessions")}filesZip(e){return G(this,"files.zip",e)}logsZip(e){return G(this,"logs.zip",e)}performanceZip(e){return G(this,"performance.zip",e)}retry(e){return G(this,"retry",e).setRequestConfig({timeout:0})}screenshotNames(){return new d(this).push("screenshot-names")}screenshots(){return new d(this).push("screenshots")}screenshotsZip(e){return G(this,"screenshots.zip",e)}steps(){return new d(this).push("steps")}tags(){return new d(this).push("tags")}tag(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("tags",e)}}class $ extends j{deviceSession(e){return new Y(this,e)}}class z extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("projects",s)}runs(){return new d(this).push("runs")}run(e){return new $(this,e)}share(){return new d(this).push("share")}unarchive(){return new w(this).push("unarchive")}}let X=class extends w{constructor(e){super(e)}accessGroups(){return new d(this).push("access-groups")}accessGroup(e){return new W(this,e)}accounts(){return new d(this).push("admin","accounts")}account(e){if(null==e)throw new Error("Resource ID cannot be null!");return new L(this,e)}accountServices(){return new d(this).push("admin","account-services")}accountService(e){return new m(this,e)}activities(){return new d(this).push("admin","activities")}administrators(){return new d(this).push("admin","administrators")}billingPeriods(){return new d(this).push("admin","billing-periods")}billingPeriod(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("admin","billing-periods",e)}browsers(){return new d(this).push("admin","browsers")}browser(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("admin","browsers",e)}clusters(){return new d(this).push("clusters")}cluster(e){return new _(this,e)}countryVatRates(){return new d(this).push("admin","country-vat-rates")}countryVatRate(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("admin","country-vat-rates",e)}devices(){return new N(this)}device(e){return new C(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 d(this).push("admin","device","statuses")}deviceModels(){return new d(this).push("admin","device-models")}deviceModel(e){return new v(this,e)}deviceProblems(){return new d(this).push("admin","device-problems")}deviceModelCriterias(){return new d(this).push("admin","device-model-criteria")}deviceModelCriteria(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("admin","device-model-criteria",e)}deviceSessions(){return new d(this).push("admin","device-sessions")}deviceSession(e){return new g(this,e)}deviceTime(){return new P(this)}deviceTimeSummary(){return new d(this).push("admin","device-time-summary")}deviceTypes(){return new d(this).push("admin","device-types")}deviceType(e){return new w(this).push("admin","device-types",e)}deviceGroups(){return new d(this).push("device-groups")}deviceGroup(e){return new K(this,e)}emails(){return new d(this).push("admin","emails")}resendEmail(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("admin","emails",e,"resend").post()}errors(){return new d(this).push("admin","errors")}files(){return new d(this).push("files")}file(e){return new V(this,e)}frameworks(){return new d(this).push("admin","frameworks")}framework(e){return new y(this,e)}frameworkAvailableLabels(){const e=this.frameworks();return e.push("available-labels"),e}interactiveQueue(){return new d(this).push("admin","interactive-queue")}licenses(){return new d(this).push("admin","licenses")}license(e){return new F(this,e)}maintenance(){return new w(this).push("admin","maintenance")}notificationPlans(){return new A(this)}notificationPlan(e){return new M(this,e)}overview(){return new w(this).push("admin","overview")}pools(){return new d(this).push("admin","pools")}pool(e){return new w(this).push("admin","pools",e)}projects(){return new d(this).push("projects")}project(e){return new z(this,e)}roles(){return new d(this).push("admin","roles")}runs(){return new R(this)}run(e){return new x(this,e)}samples(){return new d(this).push("admin","samples")}sample(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("admin","samples",e)}services(){return new S(this)}service(e){return new B(this,e)}settings(){return new w(this).push("admin","settings")}statistics(){return new O(this)}users(){return new d(this).push("users")}createUser(){return new d(this).push("admin","users").post()}user(e){return new q(this,e)}};X=a([f],X);class J extends d{constructor(e){super(e),this.push("devices")}filters(){return new w(this).push("filters")}desktopBrowserCapabilities(){return new w(this).push("desktop-browser-capabilities")}}class Z extends d{constructor(e){super(e),this.push("properties")}maintenance(){return new d(this).params({filter:"name_eq_CLOUD_HEADER_ANNOUNCEMENT",limit:1,sort:"updateTime_d"})}}class Q extends d{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["POST"],this.push("services")}available(){return new d(this).push("available")}active(){const e=new d(this);return"me"===this.first?e.push("active"):e.params({notArchived:!0}),e}byPrice(){return new d(this).sort("centPrice")}availableByPrice(){return new d(this).push("available").sort("centPrice")}}class ee extends d{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["GET","POST"],this.push("users")}activate(){return new w(this).push("activate").post()}recoveries(){return new w(this).push("recoveries")}passwordRecovery(){return new w(this).push("password-recovery")}}class se extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("billing-periods",s)}receipt(){return new w(this).push("receipt").setRequestConfig({responseType:"arraybuffer"})}}class te extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("accounts",s)}concurrencyStatus(){return new w(this).push("concurrency-status")}deviceTime(){return new d(this).push("device-time")}deviceTimeSummary(){return new d(this).push("device-time-summary")}preferences(){return new w(this).push("preferences")}users(){return new d(this).push("users")}removeUser(e){return new w(this).push("users",e)}disableUser(e){return new w(this).push("users",e,"disable").post()}enableUser(e){return new w(this).push("users",e,"enable").post()}resendActivation(e){return new w(this).push("users",e,"resend-activation").post()}billingPeriods(){return new d(this).push("billing-periods")}billingPeriod(e){return new se(this,e)}serviceBillingPeriod(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("account-services",e,"billing-period")}visualTestAccess(){return new w(this).push("visual-tests","access")}accountServices(){return new d(this).push("account-services")}}class re extends w{constructor(e){super(e),this.push("broker")}hubs(){return new d(this).push("hubs")}}class ne extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("devices",s)}properties(){return new d(this).push("properties")}browsers(){return new d(this).push("browsers")}}class ie extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("label-groups",s)}labels(){return new d(this).push("labels")}label(e){return new w(this).push("labels",e)}}class ue extends d{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 oe extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("channels",s)}scopes(){return new d(this).push("scopes")}}class ae extends d{constructor(e){super(e),this.push("notifications")}scopes(){return new d(this).push("scopes")}channels(){return new d(this).push("channels")}channel(e){return new oe(this,e)}}class he extends d{constructor(e){super(e),this.push("runs")}config(){return new w(this).push("config")}}class ce extends d{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["GET"],this.push("tunnels")}active(e){return this.params({active:e})}}class le extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("notifications",s)}test(){return new w(this).push("test")}}class pe extends w{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 Q(this)}service(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("services",e)}deviceGroups(){return new d(this).push("device-groups")}deviceGroup(e){return new K(this,e)}deviceSessions(){return new d(this).push("device-sessions")}deviceSession(e){return new H(this,e)}markAccountOwner(){return new w(this).push("mark-account-owner").post()}projects(){return new d(this).push("projects")}project(e){return new z(this,e)}files(){return new ue(this)}file(e){return new V(this,e)}runs(){return new he(this)}availableFrameworks(){return new d(this).push("available-frameworks")}resetApiKey(){return new w(this).push("reset-api-key")}restore(){return new w(this).push("restore")}feedback(){return new w(this).push("feedback")}notifications(){return new ae(this)}notification(e){return new le(this,e)}preferences(){return new w(this).push("preferences")}uiPreferences(){return new w(this).push("ui-preferences")}deviceUsage(){return new d(this).push("device-usage")}statistics(){return new w(this).push("statistics")}deviceStatistics(){return new d(this).push("device-statistics")}accessGroups(){return new d(this).push("access-groups")}accessGroup(e){return new W(this,e)}smartbearTunnel(e){return new w(this).push("tunnels",e)}smartbearTunnels(){return new ce(this)}deleteAccount(){return new w(this).push("delete")}}class Ee extends w{constructor(e){super(e),this.push("user-sessions")}login(e){return new w(this).push("login").post().data(e)}logout(){return new w(this).push("logout").post()}sso(e){return new w(this).push("oauth","authorize",e+"-login")}portalLogin(){return new w(this).push("portal-login").post()}sbidCallbackUrl(){return new w(this).push("oauth","authorize","sbid-login").toUrl(!0)}}globalThis.isNodeJs&&(u.default.defaults.headers.common["User-Agent"]="Bitbar Cloud API Client for JavaScript v1.2.7"),u.default.defaults.maxContentLength=1073741824;class de{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=u.default.create(this.axiosConfig)}get baseUrl(){return this.axiosConfig.baseURL}account(e){return new te(this,e)}admin(){return new X(this)}broker(){return new re(this)}clusters(){return new d(this).push("clusters")}cluster(e){return new _(this,e)}device(e){return new ne(this,e)}deviceGroup(e){return new K(this,e)}deviceGroups(){return new d(this).push("device-groups")}devices(){return new J(this)}deviceSession(e){return new Y(this,e)}deviceSessions(){return new d(this).push("device-sessions")}deviceStatistics(){return new d(this).push("device-statistics")}enums(){return new w(this).push("enums")}files(){return new d(this).push("files")}file(e){return new V(this,e)}labelGroups(){return new d(this).push("label-groups")}labelGroup(e){return new ie(this,e)}labels(){return new d(this).push("labels")}licenses(){return new w(this).push("licenses")}license(){return new w(this).push("license")}ma(){throw new Error("Requires prototype extension covering ACL check")}me(){return this.user("me")}projects(){return new d(this).push("projects")}project(e){return new z(this,e)}properties(){return new Z(this)}property(e){return new w(this).push("properties",e)}run(e){return new $(this,e)}services(){return new Q(this)}user(e){return new pe(this,e)}users(){return new ee(this)}userSession(){return new Ee(this)}}const we={API:de,FilterBuilder:c};var Te,Ie,Ne,Ae,Re,Se,fe,Oe,Le,me,_e,Ce,ve,De,Ue,be,ge,Pe,ye,Fe,Me,Ge,xe,Be,ke,He,qe,We,Ke,Ve,Ye,je,$e,ze,Xe,Je,Ze,Qe,es,ss,ts,rs;e.AccessGroupScope=void 0,(Te=e.AccessGroupScope||(e.AccessGroupScope={})).USER="USER",Te.ACCOUNT="ACCOUNT",Te.GLOBAL="GLOBAL",e.PaymentStatus=void 0,(Ie=e.PaymentStatus||(e.PaymentStatus={})).SUCCEEDED="SUCCEEDED",Ie.FAILED="FAILED",Ie.REDIRECTED="REDIRECTED",e.PaymentMethod=void 0,(Ne=e.PaymentMethod||(e.PaymentMethod={})).PAYPAL="PAYPAL",Ne.BRAINTREE="BRAINTREE",Ne.STRIPE="STRIPE",Ne.INVOICE="INVOICE",Ne.PROMOTION="PROMOTION",Ne.AWS="AWS",e.ChargeType=void 0,(Ae=e.ChargeType||(e.ChargeType={})).USAGE_MOBILE="USAGE_MOBILE",Ae.CONCURRENCY_MOBILE="CONCURRENCY_MOBILE",Ae.CONCURRENCY_DESKTOP="CONCURRENCY_DESKTOP",e.DeactivateReason=void 0,(Re=e.DeactivateReason||(e.DeactivateReason={})).INITIAL_FAILURE="INITIAL_FAILURE",Re.SCA_FAILURE="SCA_FAILURE",Re.CHARGE_FAILURE="CHARGE_FAILURE",Re.CANCEL="CANCEL",Re.SUSPENDED="SUSPENDED",Re.ANOTHER_PURCHASE="ANOTHER_PURCHASE",e.InitStep=void 0,(Se=e.InitStep||(e.InitStep={})).SKIP="SKIP",Se.REBOOT="REBOOT",Se.REBOOT_WITH_UNLOCK="REBOOT_WITH_UNLOCK",Se.UNLOCK_ONLY="UNLOCK_ONLY",e.DeviceState=void 0,(fe=e.DeviceState||(e.DeviceState={})).OFFLINE_CLEANING="OFFLINE_CLEANING",fe.OFFLINE_DIRTY="OFFLINE_DIRTY",fe.OFFLINE_FREE="OFFLINE_FREE",fe.OFFLINE_TESTING="OFFLINE_TESTING",fe.ONLINE_CLEANING="ONLINE_CLEANING",fe.ONLINE_DIRTY="ONLINE_DIRTY",fe.ONLINE_FREE="ONLINE_FREE",fe.ONLINE_TESTING="ONLINE_TESTING",e.AdminErrorType=void 0,(Oe=e.AdminErrorType||(e.AdminErrorType={})).ABORT_REQUEST="ABORT_REQUEST",Oe.ADB_COMMAND_REJECTED="ADB_COMMAND_REJECTED",Oe.ADB_SHELL_COMMAND_FAILED="ADB_SHELL_COMMAND_FAILED",Oe.APP_LOCK_NOT_INSTALLED="APP_LOCK_NOT_INSTALLED",Oe.DEVICE_OFFLINE="DEVICE_OFFLINE",Oe.DEVICE_OUTPUT_NULL="DEVICE_OUTPUT_NULL",Oe.GAMEBENCH_ERROR="GAMEBENCH_ERROR",Oe.GAMEBENCH_NOT_SUPPORTED="GAMEBENCH_NOT_SUPPORTED",Oe.GRANT_FAILED="GRANT_FAILED",Oe.INSTALL_FAILED="INSTALL_FAILED",Oe.INTERACTIVE_SETUP_FAILED="INTERACTIVE_SETUP_FAILED",Oe.INTERNAL_INSTALL_FAILED="INTERNAL_INSTALL_FAILED",Oe.INVALID_TEST_SESSION_FILE="INVALID_TEST_SESSION_FILE",Oe.LOCK_EXPIRED="LOCK_EXPIRED",Oe.LOCK_TIMEOUT="LOCK_TIMEOUT",Oe.NO_NETWORK_CONNECTION="NO_NETWORK_CONNECTION",Oe.OTHER="OTHER",Oe.REBOOTING_TIMEOUT="REBOOTING_TIMEOUT",Oe.REPACKAGING="REPACKAGING",Oe.RESULTS_PREPARING="RESULTS_PREPARING",Oe.RESULTS_PROCESSING="RESULTS_PROCESSING",Oe.RESULTS_SENDING="RESULTS_SENDING",Oe.STEP_TIMEOUT="STEP_TIMEOUT",Oe.SYSTEM_FAILURE="SYSTEM_FAILURE",Oe.TEST_RUN_FAILED="TEST_RUN_FAILED",Oe.TEST_RUN_INTERRUPTED="TEST_RUN_INTERRUPTED",Oe.TEST_RUN_TIMEOUT="TEST_RUN_TIMEOUT",Oe.TEST_RUN_WARNED="TEST_RUN_WARNED",Oe.TEST_TIMEOUT="TEST_TIMEOUT",Oe.VNC_CONNECTION_SETUP_FAILED="VNC_CONNECTION_SETUP_FAILED",Oe.XCRUN_INSTRUMENTS_COMMAND_FAILED="XCRUN_INSTRUMENTS_COMMAND_FAILED",Oe.XCRUN_INSTRUMENTS_JS_ERROR="XCRUN_INSTRUMENTS_JS_ERROR",e.FrameworkType=void 0,(Le=e.FrameworkType||(e.FrameworkType={})).AUTOMATIC="AUTOMATIC",Le.MANUAL_APP="MANUAL_APP",Le.MANUAL_WEB="MANUAL_WEB",Le.REMOTE="REMOTE",e.BillingType=void 0,(me=e.BillingType||(e.BillingType={})).BUY="BUY",me.CHARGE="CHARGE",me.CANCEL="CANCEL",e.BrokerType=void 0,(_e=e.BrokerType||(e.BrokerType={})).MOBILE="MOBILE",_e.DESKTOP="DESKTOP",e.ClusterState=void 0,(Ce=e.ClusterState||(e.ClusterState={}))[Ce.OFFLINE=0]="OFFLINE",Ce.ONLINE="ONLINE",Ce.RESTARTING="RESTARTING",Ce.QUIET_DOWN="QUIET_DOWN",Ce.MAINTENANCE="MAINTENANCE",e.DeviceGroupOrigin=void 0,(ve=e.DeviceGroupOrigin||(e.DeviceGroupOrigin={})).STATIC="STATIC",ve.DYNAMIC="DYNAMIC",ve.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,(Ue=e.SupportedCreators||(e.SupportedCreators={})).MANUAL="MANUAL",Ue.ROBOT="ROBOT",Ue.AUTOMATIC="AUTOMATIC",e.CriterionField=void 0,(be=e.CriterionField||(e.CriterionField={})).NAME="NAME",be.FINGERPRINT="FINGERPRINT",be.SERIAL_ID="SERIAL_ID",be.UNLOCK_GESTURE="UNLOCK_GESTURE",be.SOFTWARE_VERSION="SOFTWARE_VERSION",be.INIT_STEP="INIT_STEP",be.ACCOUNT="ACCOUNT",be.BROWSERS="BROWSERS",e.RetentionStrategy=void 0,(ge=e.RetentionStrategy||(e.RetentionStrategy={})).CLUSTER_ON_OFF="CLUSTER_ON_OFF",ge.MIN_FREE_MAX_TOTAL="MIN_FREE_MAX_TOTAL",ge.POOL_MANAGER_AWARE="POOL_MANAGER_AWARE",e.ProblemType=void 0,(Pe=e.ProblemType||(e.ProblemType={})).CLEANING="CLEANING",Pe.DIRTY="DIRTY",Pe.OFFLINE="OFFLINE",Pe.LOW_BATTERY="LOW_BATTERY",Pe.HIGH_FAIL_RATE="HIGH_FAIL_RATE",Pe.NO_INTERNET_CONNECTION="NO_INTERNET_CONNECTION",e.DeviceSessionType=void 0,(ye=e.DeviceSessionType||(e.DeviceSessionType={})).AUTOMATIC="AUTOMATIC",ye.MANUAL="MANUAL",ye.MANUAL_APP="MANUAL_APP",ye.MANUAL_WEB="MANUAL_WEB",ye.REMOTE="REMOTE",e.RetryState=void 0,(Fe=e.RetryState||(e.RetryState={})).NONE="NONE",Fe.MANUAL="MANUAL",Fe.AUTO="AUTO",e.DeviceSessionState=void 0,(Me=e.DeviceSessionState||(e.DeviceSessionState={})).ABORTED="ABORTED",Me.EXCLUDED="EXCLUDED",Me.FAILED="FAILED",Me.RUNNING="RUNNING",Me.SUCCEEDED="SUCCEEDED",Me.TIMEOUT="TIMEOUT",Me.WAITING="WAITING",Me.WARNING="WARNING",e.DeviceSessionStepType=void 0,(Ge=e.DeviceSessionStepType||(e.DeviceSessionStepType={})).WAITING="WAITING",Ge.PREPARING="PREPARING",Ge.UNINSTALL="UNINSTALL",Ge.INSTALL="INSTALL",Ge.RUNNING="RUNNING",Ge.SENDING_RESULTS="SENDING_RESULTS",Ge.PROCESSING_RESULTS="PROCESSING_RESULTS",e.SessionReleaseReason=void 0,(xe=e.SessionReleaseReason||(e.SessionReleaseReason={})).INACTIVITY="INACTIVITY",xe.TIMEOUT="TIMEOUT",xe.USER_ACTION="USER_ACTION",xe.CHANGE_DEVICE="CHANGE_DEVICE",xe.WEBSOCKET_CLOSED="WEBSOCKET_CLOSED",e.OsType=void 0,(Be=e.OsType||(e.OsType={})).IOS="IOS",Be.ANDROID="ANDROID",Be.DESKTOP="DESKTOP",Be.UNDEFINED="UNDEFINED",e.LicenseStatus=void 0,(ke=e.LicenseStatus||(e.LicenseStatus={})).ACTIVE="ACTIVE",ke.EXPIRED="EXPIRED",ke.INACTIVE="INACTIVE",ke.CLOSED="CLOSED",e.MaintenanceType=void 0,(He=e.MaintenanceType||(e.MaintenanceType={})).BARE_METAL="BARE_METAL",He.EC2="EC2",He.VM="VM",e.NotificationChannel=void 0,(qe=e.NotificationChannel||(e.NotificationChannel={})).SLACK="SLACK",qe.EMAIL="EMAIL",qe.WEBHOOK="WEBHOOK",e.NotificationScope=void 0,(We=e.NotificationScope||(e.NotificationScope={})).ALL="ALL",We.TEST_RUN="TEST_RUN",We.TEST_RUN_FAILURE="TEST_RUN_FAILURE",We.TEST_RUN_SUCCEEDED="TEST_RUN_SUCCEEDED",We.MAINTENANCE="MAINTENANCE",We.MAINTENANCE_RELEASE="MAINTENANCE_RELEASE",We.CUSTOM="CUSTOM",We.NEWS="NEWS",We.SYSTEM="SYSTEM",We.CHECK="CHECK",We.PLAN_LIMIT_REACHED="PLAN_LIMIT_REACHED",We.PLAN_INVOICE="PLAN_INVOICE",e.ArchivingStrategy=void 0,(Ke=e.ArchivingStrategy||(e.ArchivingStrategy={})).NEVER="NEVER",Ke.DAYS="DAYS",Ke.RUNS="RUNS",e.ScreenshotType=void 0,(Ve=e.ScreenshotType||(e.ScreenshotType={})).LANDSCAPE="LANDSCAPE",Ve.PORTRAIT="PORTRAIT",e.ServiceUnit=void 0,(Ye=e.ServiceUnit||(e.ServiceUnit={})).DAY="DAY",Ye.HOUR="HOUR",Ye.MONTH="MONTH",Ye.PROJECT="PROJECT",Ye.RUN="RUN",Ye.YEAR="YEAR",e.SharedResourceType=void 0,(je=e.SharedResourceType||(e.SharedResourceType={})).DEVICE_GROUP="DEVICE_GROUP",je.FILE="FILE",je.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,(ze=e.LimitationType||(e.LimitationType={})).PACKAGE="PACKAGE",ze.CLASS="CLASS",e.TestScheduler=void 0,(Xe=e.TestScheduler||(e.TestScheduler={})).PARALLEL="PARALLEL",Xe.SERIAL="SERIAL",Xe.SINGLE="SINGLE",Xe.ALL_INSTANCES="ALL_INSTANCES",e.TestState=void 0,(Je=e.TestState||(e.TestState={})).WAITING="WAITING",Je.RUNNING="RUNNING",Je.FINISHED="FINISHED",e.MfaStatus=void 0,(Ze=e.MfaStatus||(e.MfaStatus={})).VERIFICATION_NEED="VERIFICATION_NEED",Ze.DISABLED="DISABLED",Ze.ENABLED="ENABLED",e.UserStatus=void 0,(Qe=e.UserStatus||(e.UserStatus={})).INACTIVE="INACTIVE",Qe.DISABLED="DISABLED",Qe.ENABLED="ENABLED",e.FileDirection=void 0,(es=e.FileDirection||(e.FileDirection={})).INPUT="INPUT",es.OUTPUT="OUTPUT",e.FileInputType=void 0,(ss=e.FileInputType||(e.FileInputType={})).APPLICATION="APPLICATION",ss.TEST="TEST",ss.DATA="DATA",e.FileState=void 0,(ts=e.FileState||(e.FileState={})).PREPARING="PREPARING",ts.READY="READY",e.VisualTestImageType=void 0,(rs=e.VisualTestImageType||(e.VisualTestImageType={})).FULL_PAGE="FULL_PAGE",rs.VIEWPORT="VIEWPORT",rs.ELEMENT_SCREENSHOT="ELEMENT_SCREENSHOT",e.ALLOWED_HTTP_METHODS=l,e.API=de,e.CloudAPIClient=we,e.FilterBuilder=c,e.IMAGE_FILES_FILTER=D,e.NON_MEDIA_FILES_FILTER=U,e.default=we,Object.defineProperty(e,"__esModule",{value:!0})}));
function a(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}class h{constructor(e,s,t){this.name=e,this.value=s,this.operand=t}}o.default();class c{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 i=!1;if(r){for(const e of n)null===e&&(i=!0);i&&(n=n.filter((e=>null!==e)),t+="ornull")}return t.endsWith("ornull")&&0===n.length&&(t="isnull"),this.filters.push(new h(e,n,t)),this}}const l=["GET","POST","DELETE"];var p;e.APIOrder=void 0,(p=e.APIOrder||(e.APIOrder={})).asc="a",p.desc="d";class E{constructor(e){this.stack=[],this.requestConfig={},this.ALLOWED_HTTP_METHODS=l,e instanceof E?(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 n.AbortController}abortRequest(){this.abortController.abort(),this.abortController=new n.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 r.stringify(e,{arrayFormat:"brackets"})}}class d extends E{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 c))throw new Error("Filter must be either string or instance of FilterBuilder");return this.params({filter:e.toString()})}}class w extends E{}class T extends d{constructor(e){super(e),this.push("cleanup-configurations")}specific(){return new w(this).push("specific")}}class I extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("cleanup-configurations",s)}devices(){return new w(this).push("devices")}}class N extends d{constructor(e){super(e),this.push("admin","devices")}cleanupConfigurations(){return new T(this)}cleanupConfiguration(e){return new I(this,e)}}class A extends d{constructor(e){super(e),this.push("admin","notification-plans")}channels(){return new d(this).push("channels")}scopes(){return new d(this).push("scopes")}}class R extends d{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["GET"],this.push("admin","runs")}config(){const e=new w(this);return e.restack("runs","config"),e}}class S extends d{constructor(e){super(e),this.push("admin","services")}active(){const e=new d(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 d(this);return e.params({inUse:!0,limit:0,sort:"name_a"}),e}byPrice(){const e=new d(this);return e.params({sort:"centPrice_a"}),e}}function f(e){return class extends e{send(){return Promise.reject()}}}let O=class extends d{constructor(e){super(e),this.push("admin","statistics")}deviceSessions(){return new d(this).push("device-sessions")}frameworks(){return new d(this).push("frameworks")}};O=a([f],O);class L extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","accounts",s)}roles(){return new d(this).push("roles")}role(e){return new w(this).push("roles",e)}accountServices(){return new d(this).push("account-services")}preferences(){return new w(this).push("preferences")}}class m extends w{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 w(this).push("activate").post()}deactivate(){return new w(this).push("deactivate").post()}}class _ extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("clusters",s)}devices(){return new d(this).push("devices")}}class C extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","devices",s)}cleanupConfiguration(){return new w(this).push("cleanup-configuration")}labels(){return new d(this).push("labels")}label(e){return new w(this).push("labels",e)}queue(){return new d(this).push("queue")}}class v extends w{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 d(this).push("browsers")}}e.InputFileset=class extends w{constructor(e){super(e),this.push("input-file-set")}files(){return new d(this).push("files")}filesZip(){return new w(this).push("files.zip")}},e.InputFileset=a([f],e.InputFileset);const D=new c;D.eq("state","READY"),D.in("mimetype",["image/png","image/jpg","image/jpeg","image/webp","image/gif"]),D.notlike("name","action-%%");const U=new c;U.eq("state","READY"),U.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 w{constructor(e){super(e),this.push("output-file-set")}files(){return new d(this).push("files")}file(e){return new w(this).push("files",e)}filesZip(){return new w(this).push("files.zip")}screenshots(){return new d(this).push("screenshots")}screenshot(e){return new w(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(U)}performance(){return this.files().params({tag:["performance"]})}images(){return this.files().filter(D)}},e.OutputFileset=a([f],e.OutputFileset);class b extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-sessions",s)}commands(){return new d(this).push("commands")}input(){return new e.InputFileset(this)}output(){return new e.OutputFileset(this)}release(){return new w(this).push("release").post()}screenshots(){return new d(this).push("screenshots")}screenshot(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("screenshots",e)}steps(){return new d(this).push("steps")}step(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("steps",e)}currentStep(){return this.step("current")}testCaseRuns(){return new d(this).push("test-case-runs")}connections(){return new d(this).push("connections")}logs(){return new w(this).push("logs").setRequestConfig({responseType:"text"})}clusterLogs(){return new w(this).push("cluster-logs").setRequestConfig({responseType:"text"})}}class g extends b{changeBillable(e){return function(e,s){const t=new w(e),r=t.last;return t.restack("admin","device-sessions",r,"changebillable").params({billable:s}).post()}(this,e)}}class P extends d{constructor(e){super(e),this.push("admin","device-time")}countSessionReport(){return new d(this).push("count-session-report")}stepTimeReport(){return new d(this).push("step-time-report")}}class y extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","frameworks",s)}config(){return new w(this).push("config")}requiredRoles(){return new d(this).push("required-roles")}}class F extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","licenses",s)}activate(){return new w(this).push("activate")}deactivate(){return new w(this).push("deactivate")}resend(){return new w(this).push("resend")}download(){return new w(this).push("download")}}class M extends w{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 d(this).push("check")}test(){return new w(this).push("test")}execute(){return new w(this).push("execute")}}function G(e,s,t){const r=new w(e).push(s);return null!=t&&r.params({deviceRunIds:t}),r.post()}class x extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","runs",s)}abort(){return new w(this).push("abort").post()}changeBillable(e){return new w(this).push("changebillable").post().params({billable:e})}changePriority(e){const s=new w(this).push("changepriority");return e&&s.post().data({priority:e}),s}retry(e){return G(this,"retry",e).setRequestConfig({timeout:0})}}class B extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","services",s)}activate(){return new w(this).push("activate").post()}}let k=class extends w{constructor(e){super(e),this.push("account")}roles(){return new d(this).push("roles")}role(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("roles",e)}services(){const e=new d(this);return e.last+="-services",e}update(){const e=new w(this);return e.last="update-account",e.post()}};k=a([f],k);class H extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-sessions",s)}connections(){return new d(this).push("connections")}connection(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("connections",e)}input(){return new e.InputFileset(this)}output(){return new e.OutputFileset(this)}release(){return new w(this).push("release").post()}visualTestImages(){return new d(this).push("visualtest","images")}}let q=class extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","users",s)}disable(){return new w(this).push("disable")}enable(){return new w(this).push("enable")}licenses(){return new d(this).push("licenses")}resendActivation(){return new w(this).push("resend-activation").post()}account(){return new k(this)}deviceSession(e){return new H(this,e)}roles(){return new d(this).push("roles")}role(e){return new w(this).push("roles",e)}};q=a([f],q);class W extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("access-groups",s)}users(){return new d(this).push("users")}user(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("users",e)}resources(){return new d(this).push("resources")}resource(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("resources",e)}}class K extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-groups",s)}devices(){return new d(this).push("devices")}device(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("devices",e)}selectors(){return new d(this).push("selectors")}selector(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("selectors",e)}share(){return new d(this).push("share")}}class V extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("files",s)}file(){return new w(this).push("file")}icon(){return new w(this).push("icon")}tags(){return new d(this).push("tags")}share(){return new d(this).push("share")}property(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("properties",e)}}class Y extends b{abort(){return new w(this).push("abort").post()}retry(){return new w(this).push("retry").post()}}class j extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("runs",s)}abort(){return new w(this).push("abort").post()}buildLogsZip(e){return G(this,"build-logs.zip",e)}dataAvailability(){return new w(this).push("data-availability")}deviceSessions(){return new d(this).push("device-sessions")}filesZip(e){return G(this,"files.zip",e)}logsZip(e){return G(this,"logs.zip",e)}performanceZip(e){return G(this,"performance.zip",e)}retry(e){return G(this,"retry",e).setRequestConfig({timeout:0})}screenshotNames(){return new d(this).push("screenshot-names")}screenshots(){return new d(this).push("screenshots")}screenshotsZip(e){return G(this,"screenshots.zip",e)}steps(){return new d(this).push("steps")}tags(){return new d(this).push("tags")}tag(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("tags",e)}}class $ extends j{deviceSession(e){return new Y(this,e)}}class z extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("projects",s)}runs(){return new d(this).push("runs")}run(e){return new $(this,e)}share(){return new d(this).push("share")}unarchive(){return new w(this).push("unarchive")}}let X=class extends w{constructor(e){super(e)}accessGroups(){return new d(this).push("access-groups")}accessGroup(e){return new W(this,e)}accounts(){return new d(this).push("admin","accounts")}account(e){if(null==e)throw new Error("Resource ID cannot be null!");return new L(this,e)}accountServices(){return new d(this).push("admin","account-services")}accountService(e){return new m(this,e)}activities(){return new d(this).push("admin","activities")}administrators(){return new d(this).push("admin","administrators")}billingPeriods(){return new d(this).push("admin","billing-periods")}billingPeriod(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("admin","billing-periods",e)}browsers(){return new d(this).push("admin","browsers")}browser(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("admin","browsers",e)}clusters(){return new d(this).push("clusters")}cluster(e){return new _(this,e)}countryVatRates(){return new d(this).push("admin","country-vat-rates")}countryVatRate(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("admin","country-vat-rates",e)}devices(){return new N(this)}device(e){return new C(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 d(this).push("admin","device","statuses")}deviceModels(){return new d(this).push("admin","device-models")}deviceModel(e){return new v(this,e)}deviceProblems(){return new d(this).push("admin","device-problems")}deviceModelCriterias(){return new d(this).push("admin","device-model-criteria")}deviceModelCriteria(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("admin","device-model-criteria",e)}deviceSessions(){return new d(this).push("admin","device-sessions")}deviceSession(e){return new g(this,e)}deviceTime(){return new P(this)}deviceTimeSummary(){return new d(this).push("admin","device-time-summary")}deviceTypes(){return new d(this).push("admin","device-types")}deviceType(e){return new w(this).push("admin","device-types",e)}deviceGroups(){return new d(this).push("device-groups")}deviceGroup(e){return new K(this,e)}emails(){return new d(this).push("admin","emails")}resendEmail(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("admin","emails",e,"resend").post()}errors(){return new d(this).push("admin","errors")}files(){return new d(this).push("files")}file(e){return new V(this,e)}frameworks(){return new d(this).push("admin","frameworks")}framework(e){return new y(this,e)}frameworkAvailableLabels(){const e=this.frameworks();return e.push("available-labels"),e}interactiveQueue(){return new d(this).push("admin","interactive-queue")}licenses(){return new d(this).push("admin","licenses")}license(e){return new F(this,e)}maintenance(){return new w(this).push("admin","maintenance")}notificationPlans(){return new A(this)}notificationPlan(e){return new M(this,e)}overview(){return new w(this).push("admin","overview")}pools(){return new d(this).push("admin","pools")}pool(e){return new w(this).push("admin","pools",e)}projects(){return new d(this).push("projects")}project(e){return new z(this,e)}roles(){return new d(this).push("admin","roles")}runs(){return new R(this)}run(e){return new x(this,e)}samples(){return new d(this).push("admin","samples")}sample(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("admin","samples",e)}services(){return new S(this)}service(e){return new B(this,e)}settings(){return new w(this).push("admin","settings")}statistics(){return new O(this)}users(){return new d(this).push("users")}createUser(){return new d(this).push("admin","users").post()}user(e){return new q(this,e)}};X=a([f],X);class J extends d{constructor(e){super(e),this.push("devices")}filters(){return new w(this).push("filters")}desktopBrowserCapabilities(){return new w(this).push("desktop-browser-capabilities")}}class Z extends d{constructor(e){super(e),this.push("properties")}maintenance(){return new d(this).params({filter:"name_eq_CLOUD_HEADER_ANNOUNCEMENT",limit:1,sort:"updateTime_d"})}}class Q extends d{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["POST"],this.push("services")}available(){return new d(this).push("available")}active(){const e=new d(this);return"me"===this.first?e.push("active"):e.params({notArchived:!0}),e}byPrice(){return new d(this).sort("centPrice")}availableByPrice(){return new d(this).push("available").sort("centPrice")}}class ee extends d{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["GET","POST"],this.push("users")}activate(){return new w(this).push("activate").post()}recoveries(){return new w(this).push("recoveries")}passwordRecovery(){return new w(this).push("password-recovery")}}class se extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("billing-periods",s)}receipt(){return new w(this).push("receipt").setRequestConfig({responseType:"arraybuffer"})}}class te extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("accounts",s)}concurrencyStatus(){return new w(this).push("concurrency-status")}deviceTime(){return new d(this).push("device-time")}deviceTimeSummary(){return new d(this).push("device-time-summary")}preferences(){return new w(this).push("preferences")}users(){return new d(this).push("users")}removeUser(e){return new w(this).push("users",e)}disableUser(e){return new w(this).push("users",e,"disable").post()}enableUser(e){return new w(this).push("users",e,"enable").post()}resendActivation(e){return new w(this).push("users",e,"resend-activation").post()}billingPeriods(){return new d(this).push("billing-periods")}billingPeriod(e){return new se(this,e)}serviceBillingPeriod(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("account-services",e,"billing-period")}visualTestAccess(){return new w(this).push("visual-tests","access")}accountServices(){return new d(this).push("account-services")}}class re extends w{constructor(e){super(e),this.push("broker")}hubs(){return new d(this).push("hubs")}}class ne extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("devices",s)}properties(){return new d(this).push("properties")}browsers(){return new d(this).push("browsers")}}class ie extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("label-groups",s)}labels(){return new d(this).push("labels")}label(e){return new w(this).push("labels",e)}}class ue extends d{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 oe extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("channels",s)}scopes(){return new d(this).push("scopes")}}class ae extends d{constructor(e){super(e),this.push("notifications")}scopes(){return new d(this).push("scopes")}channels(){return new d(this).push("channels")}channel(e){return new oe(this,e)}}class he extends d{constructor(e){super(e),this.push("runs")}config(){return new w(this).push("config")}}class ce extends d{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["GET"],this.push("tunnels")}active(e){return this.params({active:e})}}class le extends w{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("notifications",s)}test(){return new w(this).push("test")}}class pe extends w{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 Q(this)}service(e){if(null==e)throw new Error("Resource ID cannot be null!");return new w(this).push("services",e)}deviceGroups(){return new d(this).push("device-groups")}deviceGroup(e){return new K(this,e)}deviceSessions(){return new d(this).push("device-sessions")}deviceSession(e){return new H(this,e)}markAccountOwner(){return new w(this).push("mark-account-owner").post()}projects(){return new d(this).push("projects")}project(e){return new z(this,e)}files(){return new ue(this)}file(e){return new V(this,e)}runs(){return new he(this)}availableFrameworks(){return new d(this).push("available-frameworks")}resetApiKey(){return new w(this).push("reset-api-key")}restore(){return new w(this).push("restore")}feedback(){return new w(this).push("feedback")}notifications(){return new ae(this)}notification(e){return new le(this,e)}preferences(){return new w(this).push("preferences")}uiPreferences(){return new w(this).push("ui-preferences")}deviceUsage(){return new d(this).push("device-usage")}statistics(){return new w(this).push("statistics")}deviceStatistics(){return new d(this).push("device-statistics")}accessGroups(){return new d(this).push("access-groups")}accessGroup(e){return new W(this,e)}smartbearTunnel(e){return new w(this).push("tunnels",e)}smartbearTunnels(){return new ce(this)}deleteAccount(){return new w(this).push("delete")}}class Ee extends w{constructor(e){super(e),this.push("user-sessions")}login(e){return new w(this).push("login").post().data(e)}logout(){return new w(this).push("logout").post()}sso(e){return new w(this).push("oauth","authorize",e+"-login")}portalLogin(){return new w(this).push("portal-login").post()}sbidCallbackUrl(){return new w(this).push("oauth","authorize","sbid-login").toUrl(!0)}}globalThis.isNodeJs&&(u.default.defaults.headers.common["User-Agent"]="Bitbar Cloud API Client for JavaScript v1.2.8"),u.default.defaults.maxContentLength=1073741824;class de{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=u.default.create(this.axiosConfig)}get baseUrl(){return this.axiosConfig.baseURL}account(e){return new te(this,e)}admin(){return new X(this)}broker(){return new re(this)}clusters(){return new d(this).push("clusters")}cluster(e){return new _(this,e)}device(e){return new ne(this,e)}deviceGroup(e){return new K(this,e)}deviceGroups(){return new d(this).push("device-groups")}devices(){return new J(this)}deviceSession(e){return new Y(this,e)}deviceSessions(){return new d(this).push("device-sessions")}deviceStatistics(){return new d(this).push("device-statistics")}enums(){return new w(this).push("enums")}files(){return new d(this).push("files")}file(e){return new V(this,e)}labelGroups(){return new d(this).push("label-groups")}labelGroup(e){return new ie(this,e)}labels(){return new d(this).push("labels")}licenses(){return new w(this).push("licenses")}license(){return new w(this).push("license")}ma(){throw new Error("Requires prototype extension covering ACL check")}me(){return this.user("me")}projects(){return new d(this).push("projects")}project(e){return new z(this,e)}properties(){return new Z(this)}property(e){return new w(this).push("properties",e)}run(e){return new $(this,e)}services(){return new Q(this)}user(e){return new pe(this,e)}users(){return new ee(this)}userSession(){return new Ee(this)}}const we={API:de,FilterBuilder:c};var Te,Ie,Ne,Ae,Re,Se,fe,Oe,Le,me,_e,Ce,ve,De,Ue,be,ge,Pe,ye,Fe,Me,Ge,xe,Be,ke,He,qe,We,Ke,Ve,Ye,je,$e,ze,Xe,Je,Ze,Qe,es,ss,ts,rs;e.AccessGroupScope=void 0,(Te=e.AccessGroupScope||(e.AccessGroupScope={})).USER="USER",Te.ACCOUNT="ACCOUNT",Te.GLOBAL="GLOBAL",e.PaymentStatus=void 0,(Ie=e.PaymentStatus||(e.PaymentStatus={})).SUCCEEDED="SUCCEEDED",Ie.FAILED="FAILED",Ie.REDIRECTED="REDIRECTED",e.PaymentMethod=void 0,(Ne=e.PaymentMethod||(e.PaymentMethod={})).PAYPAL="PAYPAL",Ne.BRAINTREE="BRAINTREE",Ne.STRIPE="STRIPE",Ne.INVOICE="INVOICE",Ne.PROMOTION="PROMOTION",Ne.AWS="AWS",e.ChargeType=void 0,(Ae=e.ChargeType||(e.ChargeType={})).USAGE_MOBILE="USAGE_MOBILE",Ae.CONCURRENCY_MOBILE="CONCURRENCY_MOBILE",Ae.CONCURRENCY_DESKTOP="CONCURRENCY_DESKTOP",e.DeactivateReason=void 0,(Re=e.DeactivateReason||(e.DeactivateReason={})).INITIAL_FAILURE="INITIAL_FAILURE",Re.SCA_FAILURE="SCA_FAILURE",Re.CHARGE_FAILURE="CHARGE_FAILURE",Re.CANCEL="CANCEL",Re.SUSPENDED="SUSPENDED",Re.ANOTHER_PURCHASE="ANOTHER_PURCHASE",e.InitStep=void 0,(Se=e.InitStep||(e.InitStep={})).SKIP="SKIP",Se.REBOOT="REBOOT",Se.REBOOT_WITH_UNLOCK="REBOOT_WITH_UNLOCK",Se.UNLOCK_ONLY="UNLOCK_ONLY",e.DeviceState=void 0,(fe=e.DeviceState||(e.DeviceState={})).OFFLINE_CLEANING="OFFLINE_CLEANING",fe.OFFLINE_DIRTY="OFFLINE_DIRTY",fe.OFFLINE_FREE="OFFLINE_FREE",fe.OFFLINE_TESTING="OFFLINE_TESTING",fe.ONLINE_CLEANING="ONLINE_CLEANING",fe.ONLINE_DIRTY="ONLINE_DIRTY",fe.ONLINE_FREE="ONLINE_FREE",fe.ONLINE_TESTING="ONLINE_TESTING",e.AdminErrorType=void 0,(Oe=e.AdminErrorType||(e.AdminErrorType={})).ABORT_REQUEST="ABORT_REQUEST",Oe.ADB_COMMAND_REJECTED="ADB_COMMAND_REJECTED",Oe.ADB_SHELL_COMMAND_FAILED="ADB_SHELL_COMMAND_FAILED",Oe.APP_LOCK_NOT_INSTALLED="APP_LOCK_NOT_INSTALLED",Oe.DEVICE_OFFLINE="DEVICE_OFFLINE",Oe.DEVICE_OUTPUT_NULL="DEVICE_OUTPUT_NULL",Oe.GAMEBENCH_ERROR="GAMEBENCH_ERROR",Oe.GAMEBENCH_NOT_SUPPORTED="GAMEBENCH_NOT_SUPPORTED",Oe.GRANT_FAILED="GRANT_FAILED",Oe.INSTALL_FAILED="INSTALL_FAILED",Oe.INTERACTIVE_SETUP_FAILED="INTERACTIVE_SETUP_FAILED",Oe.INTERNAL_INSTALL_FAILED="INTERNAL_INSTALL_FAILED",Oe.INVALID_TEST_SESSION_FILE="INVALID_TEST_SESSION_FILE",Oe.LOCK_EXPIRED="LOCK_EXPIRED",Oe.LOCK_TIMEOUT="LOCK_TIMEOUT",Oe.NO_NETWORK_CONNECTION="NO_NETWORK_CONNECTION",Oe.OTHER="OTHER",Oe.REBOOTING_TIMEOUT="REBOOTING_TIMEOUT",Oe.REPACKAGING="REPACKAGING",Oe.RESULTS_PREPARING="RESULTS_PREPARING",Oe.RESULTS_PROCESSING="RESULTS_PROCESSING",Oe.RESULTS_SENDING="RESULTS_SENDING",Oe.STEP_TIMEOUT="STEP_TIMEOUT",Oe.SYSTEM_FAILURE="SYSTEM_FAILURE",Oe.TEST_RUN_FAILED="TEST_RUN_FAILED",Oe.TEST_RUN_INTERRUPTED="TEST_RUN_INTERRUPTED",Oe.TEST_RUN_TIMEOUT="TEST_RUN_TIMEOUT",Oe.TEST_RUN_WARNED="TEST_RUN_WARNED",Oe.TEST_TIMEOUT="TEST_TIMEOUT",Oe.VNC_CONNECTION_SETUP_FAILED="VNC_CONNECTION_SETUP_FAILED",Oe.XCRUN_INSTRUMENTS_COMMAND_FAILED="XCRUN_INSTRUMENTS_COMMAND_FAILED",Oe.XCRUN_INSTRUMENTS_JS_ERROR="XCRUN_INSTRUMENTS_JS_ERROR",e.FrameworkType=void 0,(Le=e.FrameworkType||(e.FrameworkType={})).AUTOMATIC="AUTOMATIC",Le.MANUAL_APP="MANUAL_APP",Le.MANUAL_WEB="MANUAL_WEB",Le.REMOTE="REMOTE",e.BillingType=void 0,(me=e.BillingType||(e.BillingType={})).BUY="BUY",me.CHARGE="CHARGE",me.CANCEL="CANCEL",e.BrokerType=void 0,(_e=e.BrokerType||(e.BrokerType={})).MOBILE="MOBILE",_e.DESKTOP="DESKTOP",e.ClusterState=void 0,(Ce=e.ClusterState||(e.ClusterState={}))[Ce.OFFLINE=0]="OFFLINE",Ce.ONLINE="ONLINE",Ce.RESTARTING="RESTARTING",Ce.QUIET_DOWN="QUIET_DOWN",Ce.MAINTENANCE="MAINTENANCE",e.DeviceGroupOrigin=void 0,(ve=e.DeviceGroupOrigin||(e.DeviceGroupOrigin={})).STATIC="STATIC",ve.DYNAMIC="DYNAMIC",ve.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,(Ue=e.SupportedCreators||(e.SupportedCreators={})).MANUAL="MANUAL",Ue.ROBOT="ROBOT",Ue.AUTOMATIC="AUTOMATIC",e.CriterionField=void 0,(be=e.CriterionField||(e.CriterionField={})).NAME="NAME",be.FINGERPRINT="FINGERPRINT",be.SERIAL_ID="SERIAL_ID",be.UNLOCK_GESTURE="UNLOCK_GESTURE",be.SOFTWARE_VERSION="SOFTWARE_VERSION",be.INIT_STEP="INIT_STEP",be.ACCOUNT="ACCOUNT",be.BROWSERS="BROWSERS",e.RetentionStrategy=void 0,(ge=e.RetentionStrategy||(e.RetentionStrategy={})).CLUSTER_ON_OFF="CLUSTER_ON_OFF",ge.MIN_FREE_MAX_TOTAL="MIN_FREE_MAX_TOTAL",ge.POOL_MANAGER_AWARE="POOL_MANAGER_AWARE",e.ProblemType=void 0,(Pe=e.ProblemType||(e.ProblemType={})).CLEANING="CLEANING",Pe.DIRTY="DIRTY",Pe.OFFLINE="OFFLINE",Pe.LOW_BATTERY="LOW_BATTERY",Pe.HIGH_FAIL_RATE="HIGH_FAIL_RATE",Pe.NO_INTERNET_CONNECTION="NO_INTERNET_CONNECTION",e.DeviceSessionType=void 0,(ye=e.DeviceSessionType||(e.DeviceSessionType={})).AUTOMATIC="AUTOMATIC",ye.MANUAL="MANUAL",ye.MANUAL_APP="MANUAL_APP",ye.MANUAL_WEB="MANUAL_WEB",ye.REMOTE="REMOTE",e.RetryState=void 0,(Fe=e.RetryState||(e.RetryState={})).NONE="NONE",Fe.MANUAL="MANUAL",Fe.AUTO="AUTO",e.DeviceSessionState=void 0,(Me=e.DeviceSessionState||(e.DeviceSessionState={})).ABORTED="ABORTED",Me.EXCLUDED="EXCLUDED",Me.FAILED="FAILED",Me.RUNNING="RUNNING",Me.SUCCEEDED="SUCCEEDED",Me.TIMEOUT="TIMEOUT",Me.WAITING="WAITING",Me.WARNING="WARNING",e.DeviceSessionStepType=void 0,(Ge=e.DeviceSessionStepType||(e.DeviceSessionStepType={})).WAITING="WAITING",Ge.PREPARING="PREPARING",Ge.UNINSTALL="UNINSTALL",Ge.INSTALL="INSTALL",Ge.RUNNING="RUNNING",Ge.SENDING_RESULTS="SENDING_RESULTS",Ge.PROCESSING_RESULTS="PROCESSING_RESULTS",e.SessionReleaseReason=void 0,(xe=e.SessionReleaseReason||(e.SessionReleaseReason={})).INACTIVITY="INACTIVITY",xe.TIMEOUT="TIMEOUT",xe.USER_ACTION="USER_ACTION",xe.CHANGE_DEVICE="CHANGE_DEVICE",xe.WEBSOCKET_CLOSED="WEBSOCKET_CLOSED",e.OsType=void 0,(Be=e.OsType||(e.OsType={})).IOS="IOS",Be.ANDROID="ANDROID",Be.DESKTOP="DESKTOP",Be.UNDEFINED="UNDEFINED",e.LicenseStatus=void 0,(ke=e.LicenseStatus||(e.LicenseStatus={})).ACTIVE="ACTIVE",ke.EXPIRED="EXPIRED",ke.INACTIVE="INACTIVE",ke.CLOSED="CLOSED",e.MaintenanceType=void 0,(He=e.MaintenanceType||(e.MaintenanceType={})).BARE_METAL="BARE_METAL",He.EC2="EC2",He.VM="VM",e.NotificationChannel=void 0,(qe=e.NotificationChannel||(e.NotificationChannel={})).SLACK="SLACK",qe.EMAIL="EMAIL",qe.WEBHOOK="WEBHOOK",e.NotificationScope=void 0,(We=e.NotificationScope||(e.NotificationScope={})).ALL="ALL",We.TEST_RUN="TEST_RUN",We.TEST_RUN_FAILURE="TEST_RUN_FAILURE",We.TEST_RUN_SUCCEEDED="TEST_RUN_SUCCEEDED",We.MAINTENANCE="MAINTENANCE",We.MAINTENANCE_RELEASE="MAINTENANCE_RELEASE",We.CUSTOM="CUSTOM",We.NEWS="NEWS",We.SYSTEM="SYSTEM",We.CHECK="CHECK",We.PLAN_LIMIT_REACHED="PLAN_LIMIT_REACHED",We.PLAN_INVOICE="PLAN_INVOICE",e.ArchivingStrategy=void 0,(Ke=e.ArchivingStrategy||(e.ArchivingStrategy={})).NEVER="NEVER",Ke.DAYS="DAYS",Ke.RUNS="RUNS",e.ScreenshotType=void 0,(Ve=e.ScreenshotType||(e.ScreenshotType={})).LANDSCAPE="LANDSCAPE",Ve.PORTRAIT="PORTRAIT",e.ServiceUnit=void 0,(Ye=e.ServiceUnit||(e.ServiceUnit={})).DAY="DAY",Ye.HOUR="HOUR",Ye.MONTH="MONTH",Ye.PROJECT="PROJECT",Ye.RUN="RUN",Ye.YEAR="YEAR",e.SharedResourceType=void 0,(je=e.SharedResourceType||(e.SharedResourceType={})).DEVICE_GROUP="DEVICE_GROUP",je.FILE="FILE",je.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,(ze=e.LimitationType||(e.LimitationType={})).PACKAGE="PACKAGE",ze.CLASS="CLASS",e.TestScheduler=void 0,(Xe=e.TestScheduler||(e.TestScheduler={})).PARALLEL="PARALLEL",Xe.SERIAL="SERIAL",Xe.SINGLE="SINGLE",Xe.ALL_INSTANCES="ALL_INSTANCES",e.TestState=void 0,(Je=e.TestState||(e.TestState={})).WAITING="WAITING",Je.RUNNING="RUNNING",Je.FINISHED="FINISHED",e.MfaStatus=void 0,(Ze=e.MfaStatus||(e.MfaStatus={})).VERIFICATION_NEED="VERIFICATION_NEED",Ze.DISABLED="DISABLED",Ze.ENABLED="ENABLED",e.UserStatus=void 0,(Qe=e.UserStatus||(e.UserStatus={})).INACTIVE="INACTIVE",Qe.DISABLED="DISABLED",Qe.ENABLED="ENABLED",e.FileDirection=void 0,(es=e.FileDirection||(e.FileDirection={})).INPUT="INPUT",es.OUTPUT="OUTPUT",e.FileInputType=void 0,(ss=e.FileInputType||(e.FileInputType={})).APPLICATION="APPLICATION",ss.TEST="TEST",ss.DATA="DATA",e.FileState=void 0,(ts=e.FileState||(e.FileState={})).PREPARING="PREPARING",ts.READY="READY",e.VisualTestImageType=void 0,(rs=e.VisualTestImageType||(e.VisualTestImageType={})).FULL_PAGE="FULL_PAGE",rs.VIEWPORT="VIEWPORT",rs.ELEMENT_SCREENSHOT="ELEMENT_SCREENSHOT",e.ALLOWED_HTTP_METHODS=l,e.API=de,e.CloudAPIClient=we,e.FilterBuilder=c,e.IMAGE_FILES_FILTER=D,e.NON_MEDIA_FILES_FILTER=U,e.default=we,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=bitbar-cloud-api-client.min.js.map
{
"name": "@bitbar/cloud-api-client",
"version": "1.2.7",
"version": "1.2.8",
"description": "Bitbar Cloud API Client for JavaScript",

@@ -5,0 +5,0 @@ "main": "dist/bitbar-cloud-api-client.min.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc