@bitbar/cloud-api-client 1.6.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/APIResourceUser.d.ts +2 -2
- package/dist/api/models/AdminDevice.d.ts +1 -0
- package/dist/api/models/User.d.ts +3 -0
- package/dist/bitbar-cloud-api-client.js +2 -2
- package/dist/bitbar-cloud-api-client.js.map +1 -1
- package/dist/bitbar-cloud-api-client.min.js +2 -2
- package/dist/bitbar-cloud-api-client.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @bitbar/cloud-api-client v1.6.
|
|
1
|
+
/* @bitbar/cloud-api-client v1.6.2 | Copyright 2026 (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={indexes:!1}),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 S 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 m 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 c{constructor(e){super(e),this.push("screenshots")}}class D 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)}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")}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 g extends D{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 b extends c{constructor(e){super(e),this.push("admin","device-time")}}class U extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","frameworks",s)}config(){return new l(this).push("config")}requiredRoles(){return new c(this).push("required-roles")}}class _ 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 y(e,s,t){const r=new l(e).push(s);return null!=t&&r.params({deviceRunIds:t}),r.post()}class P 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 y(this,"retry",e).setRequestConfig({timeout:0})}}class F extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","services",s)}activate(){return new l(this).push("activate").post()}}let M=class extends l{constructor(e){super(e),this.push("account")}roles(){return new c(this).push("roles")}role(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("roles",e)}services(){const e=new c(this);return e.last+="-services",e}update(){const e=new l(this);return e.last="update-account",e.post()}};M=n([I],M);class G extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-sessions",s)}connections(){return new c(this).push("connections")}connection(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("connections",e)}input(){return new e.InputFileset(this)}output(){return new e.OutputFileset(this)}release(){return new l(this).push("release").post()}visualTestsImages(){return new c(this).push("visual-tests","images")}}let x=class extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","users",s)}disable(){return new l(this).push("disable")}enable(){return new l(this).push("enable")}licenses(){return new c(this).push("licenses")}resendActivation(){return new l(this).push("resend-activation").post()}account(){return new M(this)}deviceSession(e){return new G(this,e)}roles(){return new c(this).push("roles")}role(e){return new l(this).push("roles",e)}};x=n([I],x);class k 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 B 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 q 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 H extends c{constructor(e){super(e),this.push("test-case-runs")}}class W extends D{abort(){return new l(this).push("abort").post()}retry(){return new l(this).push("retry").post()}testCaseRuns(){return new H(this)}}class Y extends c{constructor(e){super(e),this.push("device-sessions")}}class K 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 y(this,"build-logs.zip",e)}dataAvailability(){return new l(this).push("data-availability")}deviceSessions(){return new Y(this)}filesZip(e){return y(this,"files.zip",e)}logsZip(e){return y(this,"logs.zip",e)}performanceZip(e){return y(this,"performance.zip",e)}retry(e){return y(this,"retry",e).setRequestConfig({timeout:0})}screenshotsZip(e){return y(this,"screenshots.zip",e)}steps(){return new c(this).push("steps")}}class j extends K{deviceSession(e){return new W(this,e)}}class V extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("projects",s)}runs(){return new c(this).push("runs")}run(e){return new j(this,e)}share(){return new c(this).push("share")}unarchive(){return new l(this).push("unarchive")}}let z=class extends l{constructor(e){super(e)}accessGroups(){return new c(this).push("access-groups")}accessGroup(e){return new k(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")}clusters(){return new c(this).push("clusters")}cluster(e){return new S(this,e)}devices(){return new E(this)}device(e){return new m(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 g(this,e)}deviceTime(){return new b(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 B(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 q(this,e)}frameworks(){return new c(this).push("admin","frameworks")}framework(e){return new U(this,e)}frameworkAvailableLabels(){const e=this.frameworks();return e.push("available-labels"),e}interactiveQueue(){return new c(this).push("admin","interactive-queue")}licenses(){return new c(this).push("admin","licenses")}license(e){return new _(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 V(this,e)}roles(){return new c(this).push("admin","roles")}runs(){return new w(this)}run(e){return new P(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 F(this,e)}settings(){return new l(this).push("admin","settings")}statistics(){return new A(this)}users(){return new c(this).push("users")}createUser(){return new c(this).push("admin","users").post()}user(e){return new x(this,e)}};z=n([I],z);class $ 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 X 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 J 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 Q 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 ee 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 Q(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 se extends l{constructor(e){super(e),this.push("broker")}hubs(){return new c(this).push("hubs")}}class te 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 re 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 ne 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 ie 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 ue 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 ie(this,e)}}class oe extends c{constructor(e){super(e),this.push("runs")}config(){return new l(this).push("config")}}class ae extends c{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["GET"],this.push("tunnels")}active(e){return this.params({active:e})}}class he 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 ce 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 B(this,e)}deviceSessions(){return new c(this).push("device-sessions")}deviceSession(e){return new G(this,e)}markAccountOwner(){return new l(this).push("mark-account-owner").post()}projects(){return new c(this).push("projects")}project(e){return new V(this,e)}files(){return new ne(this)}file(e){return new q(this,e)}runs(){return new oe(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 ue(this)}notification(e){return new he(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 k(this,e)}smartbearTunnel(e){return new l(this).push("tunnels",e)}smartbearTunnels(){return new ae(this)}deleteAccount(){return new l(this).push("delete")}}class le 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 pe=require("axios").default;globalThis.isNodeJs&&(pe.defaults.headers.common["User-Agent"]="Bitbar Cloud API Client for JavaScript v1.6.0"),pe.defaults.maxContentLength=1073741824;class de{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.withXSRFToken=!0,this.axiosConfig.withCredentials=null!=e.withCredentials&&e.withCredentials,this.axios=pe.create(this.axiosConfig)}account(e){return new ee(this,e)}admin(){return new z(this)}broker(){return new se(this)}clusters(){return new c(this).push("clusters")}cluster(e){return new S(this,e)}device(e){return new te(this,e)}deviceGroup(e){return new B(this,e)}deviceGroups(){return new c(this).push("device-groups")}devices(){return new $(this)}deviceSession(e){return new W(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 q(this,e)}labelGroups(){return new c(this).push("label-groups")}labelGroup(e){return new re(this,e)}labels(){return new c(this).push("labels")}licenses(){return new l(this).push("licenses")}license(){return new l(this).push("license")}ma(){throw new Error("Requires prototype extension covering ACL check")}me(){return this.user("me")}projects(){return new c(this).push("projects")}project(e){return new V(this,e)}properties(){return new X(this)}property(e){return new l(this).push("properties",e)}run(e){return new j(this,e)}services(){return new Z(this)}user(e){return new ce(this,e)}users(){return new J(this)}userSession(){return new le(this)}}const Ee={API:de,FilterBuilder:u};var we,Te,Ie,Ae,fe,Ne,Se,me,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,is,us,os;e.AccessGroupScope=void 0,(we=e.AccessGroupScope||(e.AccessGroupScope={})).USER="USER",we.ACCOUNT="ACCOUNT",we.GLOBAL="GLOBAL",e.SessionUsageType=void 0,(Te=e.SessionUsageType||(e.SessionUsageType={})).AUTOMATIC="AUTOMATIC",Te.MANUAL="MANUAL",Te.DEDICATED_AUTOMATIC="DEDICATED_AUTOMATIC",Te.DEDICATED_MANUAL="DEDICATED_MANUAL",e.UtilizationType=void 0,(Ie=e.UtilizationType||(e.UtilizationType={})).ALL="all",Ie.PUBLIC="public",Ie.DEDICATED="dedicated",e.SessionType=void 0,(Ae=e.SessionType||(e.SessionType={})).ALL="all",Ae.AUTOMATED="automated",Ae.MANUAL="manual",e.TimeResolution=void 0,(fe=e.TimeResolution||(e.TimeResolution={})).HOUR="hour",fe.DAY="day",e.PaymentStatus=void 0,(Ne=e.PaymentStatus||(e.PaymentStatus={})).SUCCEEDED="SUCCEEDED",Ne.FAILED="FAILED",Ne.REDIRECTED="REDIRECTED",e.PaymentMethod=void 0,(Se=e.PaymentMethod||(e.PaymentMethod={})).PAYPAL="PAYPAL",Se.BRAINTREE="BRAINTREE",Se.STRIPE="STRIPE",Se.INVOICE="INVOICE",Se.PROMOTION="PROMOTION",Se.AWS="AWS",e.DeactivateReason=void 0,(me=e.DeactivateReason||(e.DeactivateReason={})).INITIAL_FAILURE="INITIAL_FAILURE",me.SCA_FAILURE="SCA_FAILURE",me.CHARGE_FAILURE="CHARGE_FAILURE",me.CANCEL="CANCEL",me.SUSPENDED="SUSPENDED",me.ANOTHER_PURCHASE="ANOTHER_PURCHASE",e.InitStep=void 0,(Re=e.InitStep||(e.InitStep={})).SKIP="SKIP",Re.REBOOT="REBOOT",Re.REBOOT_WITH_UNLOCK="REBOOT_WITH_UNLOCK",Re.UNLOCK_ONLY="UNLOCK_ONLY",e.DeviceState=void 0,(ve=e.DeviceState||(e.DeviceState={})).OFFLINE_CLEANING="OFFLINE_CLEANING",ve.OFFLINE_DIRTY="OFFLINE_DIRTY",ve.OFFLINE_FREE="OFFLINE_FREE",ve.OFFLINE_TESTING="OFFLINE_TESTING",ve.ONLINE_CLEANING="ONLINE_CLEANING",ve.ONLINE_DIRTY="ONLINE_DIRTY",ve.ONLINE_FREE="ONLINE_FREE",ve.ONLINE_TESTING="ONLINE_TESTING",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,(Oe=e.BillingType||(e.BillingType={})).BUY="BUY",Oe.CHARGE="CHARGE",Oe.CANCEL="CANCEL",e.BrokerType=void 0,(Ce=e.BrokerType||(e.BrokerType={})).MOBILE="MOBILE",Ce.DESKTOP="DESKTOP",e.ClusterState=void 0,(De=e.ClusterState||(e.ClusterState={}))[De.OFFLINE=0]="OFFLINE",De.ONLINE="ONLINE",De.RESTARTING="RESTARTING",De.QUIET_DOWN="QUIET_DOWN",De.MAINTENANCE="MAINTENANCE",e.ClusterType=void 0,(ge=e.ClusterType||(e.ClusterType={})).BARE_METAL="BARE_METAL",ge.EC2="EC2",ge.VM="VM",e.DeviceGroupOrigin=void 0,(be=e.DeviceGroupOrigin||(e.DeviceGroupOrigin={})).STATIC="STATIC",be.DYNAMIC="DYNAMIC",be.HYBRID="HYBRID",e.Platform=void 0,(Ue=e.Platform||(e.Platform={})).IOS="IOS",Ue.ANDROID="ANDROID",Ue.WINDOWS="WINDOWS",Ue.MAC="MAC",Ue.LINUX="LINUX",Ue.UNDEFINED="UNDEFINED",e.SupportedCreators=void 0,(_e=e.SupportedCreators||(e.SupportedCreators={})).MANUAL="MANUAL",_e.ROBOT="ROBOT",_e.AUTOMATIC="AUTOMATIC",e.PoolSize=void 0,(ye=e.PoolSize||(e.PoolSize={})).XL="XL",ye.L="L",ye.M="M",ye.S="S",e.Code=void 0,(Pe=e.Code||(e.Code={})).HIGH="HIGH",Pe.MODERATE="MODERATE",Pe.LOW="LOW",Pe.NONE="NONE",e.LockReason=void 0,(Fe=e.LockReason||(e.LockReason={})).TESTING="TESTING",Fe.CLEANING="CLEANING",Fe.NOT_OPERATIONAL="NOT_OPERATIONAL",e.CriterionField=void 0,(Me=e.CriterionField||(e.CriterionField={})).NAME="NAME",Me.FINGERPRINT="FINGERPRINT",Me.SERIAL_ID="SERIAL_ID",Me.UNLOCK_GESTURE="UNLOCK_GESTURE",Me.SOFTWARE_VERSION="SOFTWARE_VERSION",Me.INIT_STEP="INIT_STEP",Me.ACCOUNT="ACCOUNT",Me.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,(xe=e.ProblemType||(e.ProblemType={})).CLEANING="CLEANING",xe.DIRTY="DIRTY",xe.OFFLINE="OFFLINE",xe.LOW_BATTERY="LOW_BATTERY",xe.HIGH_FAIL_RATE="HIGH_FAIL_RATE",xe.NO_INTERNET_CONNECTION="NO_INTERNET_CONNECTION",e.DeviceSessionType=void 0,(ke=e.DeviceSessionType||(e.DeviceSessionType={})).AUTOMATIC="AUTOMATIC",ke.MANUAL_APP="MANUAL_APP",ke.MANUAL_WEB="MANUAL_WEB",e.RetryState=void 0,(Be=e.RetryState||(e.RetryState={})).NONE="NONE",Be.MANUAL="MANUAL",Be.AUTO="AUTO",e.DeviceSessionState=void 0,(qe=e.DeviceSessionState||(e.DeviceSessionState={})).ABORTED="ABORTED",qe.EXCLUDED="EXCLUDED",qe.FAILED="FAILED",qe.RUNNING="RUNNING",qe.SUCCEEDED="SUCCEEDED",qe.TIMEOUT="TIMEOUT",qe.WAITING="WAITING",qe.WARNING="WARNING",e.DeviceSessionStepType=void 0,(He=e.DeviceSessionStepType||(e.DeviceSessionStepType={})).WAITING="WAITING",He.PREPARING="PREPARING",He.UNINSTALL="UNINSTALL",He.INSTALL="INSTALL",He.RUNNING="RUNNING",He.SENDING_RESULTS="SENDING_RESULTS",He.PROCESSING_RESULTS="PROCESSING_RESULTS",e.SessionReleaseReason=void 0,(We=e.SessionReleaseReason||(e.SessionReleaseReason={})).INACTIVITY="INACTIVITY",We.TIMEOUT="TIMEOUT",We.USER_ACTION="USER_ACTION",We.CHANGE_DEVICE="CHANGE_DEVICE",We.WEBSOCKET_CLOSED="WEBSOCKET_CLOSED",e.OsType=void 0,(Ye=e.OsType||(e.OsType={})).IOS="IOS",Ye.ANDROID="ANDROID",Ye.DESKTOP="DESKTOP",Ye.UNDEFINED="UNDEFINED",e.LicenseStatus=void 0,(Ke=e.LicenseStatus||(e.LicenseStatus={})).ACTIVE="ACTIVE",Ke.EXPIRED="EXPIRED",Ke.INACTIVE="INACTIVE",Ke.CLOSED="CLOSED",e.NotificationChannel=void 0,(je=e.NotificationChannel||(e.NotificationChannel={})).SLACK="SLACK",je.EMAIL="EMAIL",je.WEBHOOK="WEBHOOK",e.NotificationScope=void 0,(Ve=e.NotificationScope||(e.NotificationScope={})).ALL="ALL",Ve.TEST_RUN="TEST_RUN",Ve.TEST_RUN_FAILURE="TEST_RUN_FAILURE",Ve.TEST_RUN_SUCCEEDED="TEST_RUN_SUCCEEDED",Ve.SYSTEM="SYSTEM",Ve.CHECK="CHECK",e.ArchivingStrategy=void 0,(ze=e.ArchivingStrategy||(e.ArchivingStrategy={})).NEVER="NEVER",ze.DAYS="DAYS",ze.RUNS="RUNS",e.ScreenshotType=void 0,($e=e.ScreenshotType||(e.ScreenshotType={})).LANDSCAPE="LANDSCAPE",$e.PORTRAIT="PORTRAIT",e.ServiceUnit=void 0,(Xe=e.ServiceUnit||(e.ServiceUnit={})).DAY="DAY",Xe.HOUR="HOUR",Xe.MONTH="MONTH",Xe.PROJECT="PROJECT",Xe.RUN="RUN",Xe.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,(Je=e.TestResult||(e.TestResult={})).PASSED="PASSED",Je.FAILED="FAILED",Je.SKIPPED="SKIPPED",Je.NOT_AVAILABLE="NOT_AVAILABLE",e.LimitationType=void 0,(Qe=e.LimitationType||(e.LimitationType={})).PACKAGE="PACKAGE",Qe.CLASS="CLASS",e.TestScheduler=void 0,(es=e.TestScheduler||(e.TestScheduler={})).PARALLEL="PARALLEL",es.SERIAL="SERIAL",es.SINGLE="SINGLE",es.ALL_INSTANCES="ALL_INSTANCES",e.TestState=void 0,(ss=e.TestState||(e.TestState={})).WAITING="WAITING",ss.RUNNING="RUNNING",ss.FINISHED="FINISHED",e.TestRunConfigFileAction=void 0,(ts=e.TestRunConfigFileAction||(e.TestRunConfigFileAction={})).COPY_TO_DEVICE="COPY_TO_DEVICE",ts.INSTALL="INSTALL",ts.RUN_TEST="RUN_TEST",e.UserStatus=void 0,(rs=e.UserStatus||(e.UserStatus={})).INACTIVE="INACTIVE",rs.DISABLED="DISABLED",rs.ENABLED="ENABLED",e.FileDirection=void 0,(ns=e.FileDirection||(e.FileDirection={})).INPUT="INPUT",ns.OUTPUT="OUTPUT",e.FileInputType=void 0,(is=e.FileInputType||(e.FileInputType={})).APPLICATION="APPLICATION",is.TEST="TEST",is.DATA="DATA",e.FileState=void 0,(us=e.FileState||(e.FileState={})).PREPARING="PREPARING",us.READY="READY",e.VisualTestImageType=void 0,(os=e.VisualTestImageType||(e.VisualTestImageType={})).FULL_PAGE="FULL_PAGE",os.VIEWPORT="VIEWPORT",os.ELEMENT_SCREENSHOT="ELEMENT_SCREENSHOT",e.ALLOWED_HTTP_METHODS=o,e.API=de,e.CloudAPIClient=Ee,e.FilterBuilder=u,e.IMAGE_FILES_FILTER=v,e.NON_MEDIA_FILES_FILTER=L,e.default=Ee,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={indexes:!1}),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 S 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 m 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 c{constructor(e){super(e),this.push("screenshots")}}class D 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)}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")}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 g extends D{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 b extends c{constructor(e){super(e),this.push("admin","device-time")}}class U extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","frameworks",s)}config(){return new l(this).push("config")}requiredRoles(){return new c(this).push("required-roles")}}class _ 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 y(e,s,t){const r=new l(e).push(s);return null!=t&&r.params({deviceRunIds:t}),r.post()}class P 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 y(this,"retry",e).setRequestConfig({timeout:0})}}class F extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","services",s)}activate(){return new l(this).push("activate").post()}}let M=class extends l{constructor(e){super(e),this.push("account")}roles(){return new c(this).push("roles")}role(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("roles",e)}services(){const e=new c(this);return e.last+="-services",e}update(){const e=new l(this);return e.last="update-account",e.post()}};M=n([I],M);class G extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-sessions",s)}connections(){return new c(this).push("connections")}connection(e){if(null==e)throw new Error("Resource ID cannot be null!");return new l(this).push("connections",e)}input(){return new e.InputFileset(this)}output(){return new e.OutputFileset(this)}release(){return new l(this).push("release").post()}visualTestsImages(){return new c(this).push("visual-tests","images")}}let x=class extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin","users",s)}disable(){return new l(this).push("disable")}enable(){return new l(this).push("enable")}licenses(){return new c(this).push("licenses")}resendActivation(){return new l(this).push("resend-activation").post()}account(){return new M(this)}deviceSession(e){return new G(this,e)}roles(){return new c(this).push("roles")}role(e){return new l(this).push("roles",e)}};x=n([I],x);class k 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 B 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 q 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 H extends c{constructor(e){super(e),this.push("test-case-runs")}}class W extends D{abort(){return new l(this).push("abort").post()}retry(){return new l(this).push("retry").post()}testCaseRuns(){return new H(this)}}class Y extends c{constructor(e){super(e),this.push("device-sessions")}}class K 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 y(this,"build-logs.zip",e)}dataAvailability(){return new l(this).push("data-availability")}deviceSessions(){return new Y(this)}filesZip(e){return y(this,"files.zip",e)}logsZip(e){return y(this,"logs.zip",e)}performanceZip(e){return y(this,"performance.zip",e)}retry(e){return y(this,"retry",e).setRequestConfig({timeout:0})}screenshotsZip(e){return y(this,"screenshots.zip",e)}steps(){return new c(this).push("steps")}}class j extends K{deviceSession(e){return new W(this,e)}}class V extends l{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("projects",s)}runs(){return new c(this).push("runs")}run(e){return new j(this,e)}share(){return new c(this).push("share")}unarchive(){return new l(this).push("unarchive")}}let z=class extends l{constructor(e){super(e)}accessGroups(){return new c(this).push("access-groups")}accessGroup(e){return new k(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")}clusters(){return new c(this).push("clusters")}cluster(e){return new S(this,e)}devices(){return new E(this)}device(e){return new m(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 g(this,e)}deviceTime(){return new b(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 B(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 q(this,e)}frameworks(){return new c(this).push("admin","frameworks")}framework(e){return new U(this,e)}frameworkAvailableLabels(){const e=this.frameworks();return e.push("available-labels"),e}interactiveQueue(){return new c(this).push("admin","interactive-queue")}licenses(){return new c(this).push("admin","licenses")}license(e){return new _(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 V(this,e)}roles(){return new c(this).push("admin","roles")}runs(){return new w(this)}run(e){return new P(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 F(this,e)}settings(){return new l(this).push("admin","settings")}statistics(){return new A(this)}users(){return new c(this).push("users")}createUser(){return new c(this).push("admin","users").post()}user(e){return new x(this,e)}};z=n([I],z);class $ 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 X 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 J 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 Q 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 ee 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 Q(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 se extends l{constructor(e){super(e),this.push("broker")}hubs(){return new c(this).push("hubs")}}class te 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 re 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 ne 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 ie 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 ue 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 ie(this,e)}}class oe extends c{constructor(e){super(e),this.push("runs")}config(){return new l(this).push("config")}}class ae extends c{constructor(e){super(e),this.ALLOWED_HTTP_METHODS=["GET"],this.push("tunnels")}active(e){return this.params({active:e})}}class he 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 ce 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 B(this,e)}deviceSessions(){return new c(this).push("device-sessions")}deviceSession(e){return new G(this,e)}markAccountOwner(){return new l(this).push("mark-account-owner").post()}projects(){return new c(this).push("projects")}project(e){return new V(this,e)}files(){return new ne(this)}file(e){return new q(this,e)}runs(){return new oe(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 ue(this)}notification(e){return new he(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 k(this,e)}smartbearTunnel(e){return new l(this).push("tunnels",e)}smartbearTunnels(){return new ae(this)}deleteAccount(){return new l(this).push("delete")}}class le 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 pe=require("axios").default;globalThis.isNodeJs&&(pe.defaults.headers.common["User-Agent"]="Bitbar Cloud API Client for JavaScript v1.6.2"),pe.defaults.maxContentLength=1073741824;class de{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.withXSRFToken=!0,this.axiosConfig.withCredentials=null!=e.withCredentials&&e.withCredentials,this.axios=pe.create(this.axiosConfig)}account(e){return new ee(this,e)}admin(){return new z(this)}broker(){return new se(this)}clusters(){return new c(this).push("clusters")}cluster(e){return new S(this,e)}device(e){return new te(this,e)}deviceGroup(e){return new B(this,e)}deviceGroups(){return new c(this).push("device-groups")}devices(){return new $(this)}deviceSession(e){return new W(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 q(this,e)}labelGroups(){return new c(this).push("label-groups")}labelGroup(e){return new re(this,e)}labels(){return new c(this).push("labels")}licenses(){return new l(this).push("licenses")}license(){return new l(this).push("license")}ma(){throw new Error("Requires prototype extension covering ACL check")}me(){return this.user("me")}projects(){return new c(this).push("projects")}project(e){return new V(this,e)}properties(){return new X(this)}property(e){return new l(this).push("properties",e)}run(e){return new j(this,e)}services(){return new Z(this)}user(e){return new ce(this,e)}users(){return new J(this)}userSession(){return new le(this)}}const Ee={API:de,FilterBuilder:u};var we,Te,Ie,Ae,fe,Ne,Se,me,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,is,us,os;e.AccessGroupScope=void 0,(we=e.AccessGroupScope||(e.AccessGroupScope={})).USER="USER",we.ACCOUNT="ACCOUNT",we.GLOBAL="GLOBAL",e.SessionUsageType=void 0,(Te=e.SessionUsageType||(e.SessionUsageType={})).AUTOMATIC="AUTOMATIC",Te.MANUAL="MANUAL",Te.DEDICATED_AUTOMATIC="DEDICATED_AUTOMATIC",Te.DEDICATED_MANUAL="DEDICATED_MANUAL",e.UtilizationType=void 0,(Ie=e.UtilizationType||(e.UtilizationType={})).ALL="all",Ie.PUBLIC="public",Ie.DEDICATED="dedicated",e.SessionType=void 0,(Ae=e.SessionType||(e.SessionType={})).ALL="all",Ae.AUTOMATED="automated",Ae.MANUAL="manual",e.TimeResolution=void 0,(fe=e.TimeResolution||(e.TimeResolution={})).HOUR="hour",fe.DAY="day",e.PaymentStatus=void 0,(Ne=e.PaymentStatus||(e.PaymentStatus={})).SUCCEEDED="SUCCEEDED",Ne.FAILED="FAILED",Ne.REDIRECTED="REDIRECTED",e.PaymentMethod=void 0,(Se=e.PaymentMethod||(e.PaymentMethod={})).PAYPAL="PAYPAL",Se.BRAINTREE="BRAINTREE",Se.STRIPE="STRIPE",Se.INVOICE="INVOICE",Se.PROMOTION="PROMOTION",Se.AWS="AWS",e.DeactivateReason=void 0,(me=e.DeactivateReason||(e.DeactivateReason={})).INITIAL_FAILURE="INITIAL_FAILURE",me.SCA_FAILURE="SCA_FAILURE",me.CHARGE_FAILURE="CHARGE_FAILURE",me.CANCEL="CANCEL",me.SUSPENDED="SUSPENDED",me.ANOTHER_PURCHASE="ANOTHER_PURCHASE",e.InitStep=void 0,(Re=e.InitStep||(e.InitStep={})).SKIP="SKIP",Re.REBOOT="REBOOT",Re.REBOOT_WITH_UNLOCK="REBOOT_WITH_UNLOCK",Re.UNLOCK_ONLY="UNLOCK_ONLY",e.DeviceState=void 0,(ve=e.DeviceState||(e.DeviceState={})).OFFLINE_CLEANING="OFFLINE_CLEANING",ve.OFFLINE_DIRTY="OFFLINE_DIRTY",ve.OFFLINE_FREE="OFFLINE_FREE",ve.OFFLINE_TESTING="OFFLINE_TESTING",ve.ONLINE_CLEANING="ONLINE_CLEANING",ve.ONLINE_DIRTY="ONLINE_DIRTY",ve.ONLINE_FREE="ONLINE_FREE",ve.ONLINE_TESTING="ONLINE_TESTING",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,(Oe=e.BillingType||(e.BillingType={})).BUY="BUY",Oe.CHARGE="CHARGE",Oe.CANCEL="CANCEL",e.BrokerType=void 0,(Ce=e.BrokerType||(e.BrokerType={})).MOBILE="MOBILE",Ce.DESKTOP="DESKTOP",e.ClusterState=void 0,(De=e.ClusterState||(e.ClusterState={}))[De.OFFLINE=0]="OFFLINE",De.ONLINE="ONLINE",De.RESTARTING="RESTARTING",De.QUIET_DOWN="QUIET_DOWN",De.MAINTENANCE="MAINTENANCE",e.ClusterType=void 0,(ge=e.ClusterType||(e.ClusterType={})).BARE_METAL="BARE_METAL",ge.EC2="EC2",ge.VM="VM",e.DeviceGroupOrigin=void 0,(be=e.DeviceGroupOrigin||(e.DeviceGroupOrigin={})).STATIC="STATIC",be.DYNAMIC="DYNAMIC",be.HYBRID="HYBRID",e.Platform=void 0,(Ue=e.Platform||(e.Platform={})).IOS="IOS",Ue.ANDROID="ANDROID",Ue.WINDOWS="WINDOWS",Ue.MAC="MAC",Ue.LINUX="LINUX",Ue.UNDEFINED="UNDEFINED",e.SupportedCreators=void 0,(_e=e.SupportedCreators||(e.SupportedCreators={})).MANUAL="MANUAL",_e.ROBOT="ROBOT",_e.AUTOMATIC="AUTOMATIC",e.PoolSize=void 0,(ye=e.PoolSize||(e.PoolSize={})).XL="XL",ye.L="L",ye.M="M",ye.S="S",e.Code=void 0,(Pe=e.Code||(e.Code={})).HIGH="HIGH",Pe.MODERATE="MODERATE",Pe.LOW="LOW",Pe.NONE="NONE",e.LockReason=void 0,(Fe=e.LockReason||(e.LockReason={})).TESTING="TESTING",Fe.CLEANING="CLEANING",Fe.NOT_OPERATIONAL="NOT_OPERATIONAL",e.CriterionField=void 0,(Me=e.CriterionField||(e.CriterionField={})).NAME="NAME",Me.FINGERPRINT="FINGERPRINT",Me.SERIAL_ID="SERIAL_ID",Me.UNLOCK_GESTURE="UNLOCK_GESTURE",Me.SOFTWARE_VERSION="SOFTWARE_VERSION",Me.INIT_STEP="INIT_STEP",Me.ACCOUNT="ACCOUNT",Me.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,(xe=e.ProblemType||(e.ProblemType={})).CLEANING="CLEANING",xe.DIRTY="DIRTY",xe.OFFLINE="OFFLINE",xe.LOW_BATTERY="LOW_BATTERY",xe.HIGH_FAIL_RATE="HIGH_FAIL_RATE",xe.NO_INTERNET_CONNECTION="NO_INTERNET_CONNECTION",e.DeviceSessionType=void 0,(ke=e.DeviceSessionType||(e.DeviceSessionType={})).AUTOMATIC="AUTOMATIC",ke.MANUAL_APP="MANUAL_APP",ke.MANUAL_WEB="MANUAL_WEB",e.RetryState=void 0,(Be=e.RetryState||(e.RetryState={})).NONE="NONE",Be.MANUAL="MANUAL",Be.AUTO="AUTO",e.DeviceSessionState=void 0,(qe=e.DeviceSessionState||(e.DeviceSessionState={})).ABORTED="ABORTED",qe.EXCLUDED="EXCLUDED",qe.FAILED="FAILED",qe.RUNNING="RUNNING",qe.SUCCEEDED="SUCCEEDED",qe.TIMEOUT="TIMEOUT",qe.WAITING="WAITING",qe.WARNING="WARNING",e.DeviceSessionStepType=void 0,(He=e.DeviceSessionStepType||(e.DeviceSessionStepType={})).WAITING="WAITING",He.PREPARING="PREPARING",He.UNINSTALL="UNINSTALL",He.INSTALL="INSTALL",He.RUNNING="RUNNING",He.SENDING_RESULTS="SENDING_RESULTS",He.PROCESSING_RESULTS="PROCESSING_RESULTS",e.SessionReleaseReason=void 0,(We=e.SessionReleaseReason||(e.SessionReleaseReason={})).INACTIVITY="INACTIVITY",We.TIMEOUT="TIMEOUT",We.USER_ACTION="USER_ACTION",We.CHANGE_DEVICE="CHANGE_DEVICE",We.WEBSOCKET_CLOSED="WEBSOCKET_CLOSED",e.OsType=void 0,(Ye=e.OsType||(e.OsType={})).IOS="IOS",Ye.ANDROID="ANDROID",Ye.DESKTOP="DESKTOP",Ye.UNDEFINED="UNDEFINED",e.LicenseStatus=void 0,(Ke=e.LicenseStatus||(e.LicenseStatus={})).ACTIVE="ACTIVE",Ke.EXPIRED="EXPIRED",Ke.INACTIVE="INACTIVE",Ke.CLOSED="CLOSED",e.NotificationChannel=void 0,(je=e.NotificationChannel||(e.NotificationChannel={})).SLACK="SLACK",je.EMAIL="EMAIL",je.WEBHOOK="WEBHOOK",e.NotificationScope=void 0,(Ve=e.NotificationScope||(e.NotificationScope={})).ALL="ALL",Ve.TEST_RUN="TEST_RUN",Ve.TEST_RUN_FAILURE="TEST_RUN_FAILURE",Ve.TEST_RUN_SUCCEEDED="TEST_RUN_SUCCEEDED",Ve.SYSTEM="SYSTEM",Ve.CHECK="CHECK",e.ArchivingStrategy=void 0,(ze=e.ArchivingStrategy||(e.ArchivingStrategy={})).NEVER="NEVER",ze.DAYS="DAYS",ze.RUNS="RUNS",e.ScreenshotType=void 0,($e=e.ScreenshotType||(e.ScreenshotType={})).LANDSCAPE="LANDSCAPE",$e.PORTRAIT="PORTRAIT",e.ServiceUnit=void 0,(Xe=e.ServiceUnit||(e.ServiceUnit={})).DAY="DAY",Xe.HOUR="HOUR",Xe.MONTH="MONTH",Xe.PROJECT="PROJECT",Xe.RUN="RUN",Xe.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,(Je=e.TestResult||(e.TestResult={})).PASSED="PASSED",Je.FAILED="FAILED",Je.SKIPPED="SKIPPED",Je.NOT_AVAILABLE="NOT_AVAILABLE",e.LimitationType=void 0,(Qe=e.LimitationType||(e.LimitationType={})).PACKAGE="PACKAGE",Qe.CLASS="CLASS",e.TestScheduler=void 0,(es=e.TestScheduler||(e.TestScheduler={})).PARALLEL="PARALLEL",es.SERIAL="SERIAL",es.SINGLE="SINGLE",es.ALL_INSTANCES="ALL_INSTANCES",e.TestState=void 0,(ss=e.TestState||(e.TestState={})).WAITING="WAITING",ss.RUNNING="RUNNING",ss.FINISHED="FINISHED",e.TestRunConfigFileAction=void 0,(ts=e.TestRunConfigFileAction||(e.TestRunConfigFileAction={})).COPY_TO_DEVICE="COPY_TO_DEVICE",ts.INSTALL="INSTALL",ts.RUN_TEST="RUN_TEST",e.UserStatus=void 0,(rs=e.UserStatus||(e.UserStatus={})).INACTIVE="INACTIVE",rs.DISABLED="DISABLED",rs.ENABLED="ENABLED",e.FileDirection=void 0,(ns=e.FileDirection||(e.FileDirection={})).INPUT="INPUT",ns.OUTPUT="OUTPUT",e.FileInputType=void 0,(is=e.FileInputType||(e.FileInputType={})).APPLICATION="APPLICATION",is.TEST="TEST",is.DATA="DATA",e.FileState=void 0,(us=e.FileState||(e.FileState={})).PREPARING="PREPARING",us.READY="READY",e.VisualTestImageType=void 0,(os=e.VisualTestImageType||(e.VisualTestImageType={})).FULL_PAGE="FULL_PAGE",os.VIEWPORT="VIEWPORT",os.ELEMENT_SCREENSHOT="ELEMENT_SCREENSHOT",e.ALLOWED_HTTP_METHODS=o,e.API=de,e.CloudAPIClient=Ee,e.FilterBuilder=u,e.IMAGE_FILES_FILTER=v,e.NON_MEDIA_FILES_FILTER=L,e.default=Ee,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
18
18
|
//# sourceMappingURL=bitbar-cloud-api-client.min.js.map
|