diff --git a/dist/api/APIListServices.d.ts b/dist/api/APIListServices.d.ts index 8f065719..d44cca39 100644 --- a/dist/api/APIListServices.d.ts +++ b/dist/api/APIListServices.d.ts @@ -3,6 +3,7 @@ import APIListPurchased from './APIListPurchased'; declare class APIListServices extends APIList { constructor(parent: object); purchased(): APIListPurchased; - available(): void; + available(): APIList; + active(): APIList; } export default APIListServices; diff --git a/dist/api/APIResourceAccountService.d.ts b/dist/api/APIResourceAccountService.d.ts new file mode 100644 index 00000000..4a4e9272 --- /dev/null +++ b/dist/api/APIResourceAccountService.d.ts @@ -0,0 +1,8 @@ +import APIResource from './APIResource'; +declare class APIResourceAccountService extends APIResource { + constructor(parent: object, id: number); + activate(): APIResource; + deactivate(): APIResource; + billingPeriod(): APIResource; +} +export default APIResourceAccountService; diff --git a/dist/api/APIResourceUser.d.ts b/dist/api/APIResourceUser.d.ts index 52be60a2..c8895282 100644 --- a/dist/api/APIResourceUser.d.ts +++ b/dist/api/APIResourceUser.d.ts @@ -14,6 +14,7 @@ import APIListFiles from './APIListFiles'; import APIListServices from './APIListServices'; import APIListRuns from './APIListRuns'; import APIListNotifications from './APIListNotifications'; +import APIResourceAccountService from './APIResourceAccountService'; declare class APIResourceUser extends APIResource { constructor(parent: object, id: number | 'me'); account(): APIResourceAccount; @@ -21,7 +22,8 @@ declare class APIResourceUser extends APIResource { deviceTimeSummary(): APIList; services(): APIListServices; service(id: number): APIResource; - accountServiceBillingPeriod(id: number): APIResource; + accountServices(): APIList; + accountService(id: number): APIResourceAccountService; billingPeriods(): APIList; billingPeriod(id: number): APIResourceBillingPeriod; jobs(): APIList; diff --git a/dist/bitbar-cloud-api-client.js b/dist/bitbar-cloud-api-client.js index 7e181251..290c35b2 100644 --- a/dist/bitbar-cloud-api-client.js +++ b/dist/bitbar-cloud-api-client.js @@ -1,4 +1,4 @@ -/* @bitbar/cloud-api-client v0.23.0 | Copyright 2020 (c) SmartBear Software and contributors | .git/blob/master/LICENSE */ +/* @bitbar/cloud-api-client v0.24.0 | Copyright 2020 (c) SmartBear Software and contributors | .git/blob/master/LICENSE */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@bitbar/finka'), require('axios'), require('qs')) : typeof define === 'function' && define.amd ? define(['@bitbar/finka', 'axios', 'qs'], factory) : @@ -11,7 +11,7 @@ finka(); - var version = "0.23.0"; + var version = "0.24.0"; var ALLOWED_HTTP_METHODS; (function (ALLOWED_HTTP_METHODS) { @@ -828,7 +828,19 @@ return new APIListPurchased(this); } available() { - this.push('available'); + return new APIList(this).push('available'); + } + active() { + const a = new APIList(this); + if (this.stack[0] === 'me') { + a.push('active'); + } + else { + a.params({ + notArchived: true + }); + } + return a; } } @@ -855,6 +867,25 @@ } } + class APIResourceAccountService extends APIResource { + constructor(parent, id) { + if (id == null) { + throw new Error('Resource ID cannot be null!'); + } + super(parent); + this.push('account-services', id); + } + activate() { + return new APIResource(this).push('activate'); + } + deactivate() { + return new APIResource(this).push('deactivate'); + } + billingPeriod() { + return new APIResource(this).push('billing-period'); + } + } + class APIResourceUser extends APIResource { constructor(parent, id) { if (id == null) { @@ -889,11 +920,11 @@ } return new APIResource(this).push('services', id); } - accountServiceBillingPeriod(id) { - if (id == null) { - throw new Error('Resource ID cannot be null!'); - } - return new APIResource(this).push('account-services', id, 'billing-period'); + accountServices() { + return new APIList(this).push('account-services'); + } + accountService(id) { + return new APIResourceAccountService(this, id); } billingPeriods() { return new APIList(this).push('billing-periods'); diff --git a/dist/bitbar-cloud-api-client.js.map b/dist/bitbar-cloud-api-client.js.map index 3b8b8476..50a9e40d 100644 --- a/dist/bitbar-cloud-api-client.js.map +++ b/dist/bitbar-cloud-api-client.js.map @@ -1 +1 @@ -{"version":3,"file":"bitbar-cloud-api-client.js","sources":["../src/finka.ts","../src/api/APIEntity.ts","../src/Filter.ts","../src/FilterBuilder.ts","../src/api/APIList.ts","../src/api/APIResource.ts","../src/api/APIListDevices.ts","../src/api/APIListUsers.ts","../src/api/APIResourceAdditionalUser.ts","../src/api/APIResourceAccount.ts","../src/api/APIResourceBillingPeriod.ts","../src/api/APIResourceBuild.ts","../src/api/APIResourceJob.ts","../src/api/APIResourceDeviceGroup.ts","../src/api/extra-class/InputFileset.ts","../src/api/extra-class/OutputFileset.ts","../src/api/APIResourceDeviceSession.ts","../src/api/APIResourceRun.ts","../src/api/APIResourceProject.ts","../src/api/APIResourceFile.ts","../src/api/APIResourceNotification.ts","../src/api/APIResourceAccessGroup.ts","../src/api/APIListDeviceTime.ts","../src/api/APIListFiles.ts","../src/api/APIListPurchased.ts","../src/api/APIListServices.ts","../src/api/APIListRuns.ts","../src/api/APIListNotifications.ts","../src/api/APIResourceUser.ts","../src/api/APIResourceDevice.ts","../src/api/APIResourceUserSession.ts","../src/api/APIAdminResourceCluster.ts","../src/api/APIAdminResourceDeviceTime.ts","../src/api/APIAdminResourceRun.ts","../src/api/APIAdminResourceDevice.ts","../src/api/APIAdminResourceDeviceSession.ts","../src/api/APIAdminResource.ts","../src/API.ts","../src/CloudAPIClient.ts"],"sourcesContent":["// @ts-ignore\nimport finka from '@bitbar/finka';\n\nfinka();\n\nexport default {};\n","import qs from 'qs';\nimport { AxiosRequestConfig, Method } from 'axios';\n\n\n/**\n * Allowed methods\n *\n * @constant\n * @type {Array}\n * @default\n */\nenum ALLOWED_HTTP_METHODS {\n GET = 'GET',\n POST = 'POST',\n DELETE = 'DELETE'\n};\n\n\n/**\n * APIEntity\n *\n * @class\n * @abstract\n */\nclass APIEntity {\n\n /**\n * Stack\n *\n * @public\n * @type {Array}\n */\n public stack: Array;\n\n /**\n * object of request config\n *\n * @protected\n * @type {AxiosRequestConfig}\n */\n protected requestConfig: AxiosRequestConfig;\n\n /**\n * Root\n *\n * @public\n * @type {API}\n */\n public root: object;\n\n /**\n * Constructor\n * @param {APIEntity|object} [parent] - Specifies a parent from which should be inherited properties\n */\n constructor (parent: APIEntity | object) {\n this.stack = [];\n this.requestConfig = {};\n\n if (parent instanceof APIEntity) {\n this.root = parent.root;\n\n if (Array.isArray(parent.stack)) {\n this.push(...parent.stack);\n }\n\n if (parent.requestConfig != null) {\n this.setRequestConfig(parent.requestConfig);\n }\n } else {\n this.root = parent;\n }\n }\n\n /**\n * Push\n *\n * @public\n * @param {string|number} items... - Items that should be pushed to stack\n * @returns this\n */\n public push (...items: Array) {\n for (const item of items) {\n this.stack.push(item);\n }\n return this;\n }\n\n /**\n * Pop\n *\n * @public\n * @return this\n */\n public pop () {\n this.stack.pop();\n return this;\n }\n\n /**\n * To URL\n *\n * @param {boolean} absolute\n */\n public toUrl (absolute = false) {\n let url = `/${this.stack.join('/')}`;\n\n if (absolute) {\n // @ts-ignore\n url = this.root.axiosConfig.baseURL + url;\n }\n\n return url;\n }\n\n /**\n * Set request config\n *\n * @public\n * @param {AxiosRequestConfig} requestConfig - object of request config to be set\n * @returns this\n */\n public setRequestConfig (requestConfig: AxiosRequestConfig) {\n Object.deepAssign(this.requestConfig, requestConfig);\n return this;\n }\n\n /**\n * Remove request config key\n *\n * @public\n * @param {string} key - Key to me removed from request config\n * @returns this\n */\n public removeRequestConfig (key: string) {\n // @ts-ignore\n delete this.requestConfig[key];\n return this;\n }\n\n /**\n * Set headers\n *\n * @public\n * @param {object} headers - Headers object\n * @returns this\n */\n public headers (headers: object) {\n const _headers = {};\n\n // Unify/Standarize headers keys\n for (const key in headers) {\n const newKey = key.replace(/(?:^|-)([a-z])/g, (letter) => letter.toUpperCase());\n // @ts-ignore\n _headers[newKey] = headers[key];\n }\n\n // Set\n return this.setRequestConfig({\n headers: _headers\n });\n }\n\n /**\n * Set HTTP method\n *\n * @public\n * @param {string} name - HTTP methods name\n * @returns this\n */\n public method (name: Method) {\n const NAME: Method = name.toLocaleUpperCase();\n\n // @ts-ignore\n if (!ALLOWED_HTTP_METHODS[NAME]) {\n throw new Error(`Method '${NAME}' is not allowed! You can use: ${Object.keys(ALLOWED_HTTP_METHODS).join(', ')}`);\n }\n\n return this.setRequestConfig({\n method: NAME\n });\n }\n\n /**\n * Set GET as HTTP method\n *\n * @public\n * @returns this\n */\n public get () {\n return this.method('GET');\n }\n\n /**\n * Set POST as HTTP method\n *\n * @public\n * @returns this\n */\n public post () {\n return this.method('POST');\n }\n\n /**\n * Set params\n *\n * @public\n * @param {object} params - object of params to be set\n * @returns this\n */\n public params (params: object) {\n Object.deepAssign(this.requestConfig, {\n params\n });\n return this;\n }\n\n /**\n * Get params\n *\n * @public\n * @returns object\n */\n public getParams () {\n return this.requestConfig.params == null ? {} : this.requestConfig.params;\n }\n\n /**\n * Remove params key\n *\n * @public\n * @param {string} key - Key to me removed from params\n * @returns this\n */\n public removeParam (key: string) {\n delete this.requestConfig.params[key];\n return this;\n }\n\n /**\n * Set data\n *\n * @public\n * @param {object} data - object of data to be set\n * @returns this\n */\n public data (data: object) {\n Object.deepAssign(this.requestConfig, {\n data\n });\n return this;\n }\n\n /**\n * Set JSON data\n *\n * @public\n * @param {object} data - JSON object to be set\n * @returns this\n */\n public jsonData (data: object) {\n this.headers({\n 'Content-Type': 'application/json'\n }).data(data);\n return this;\n }\n\n /**\n * Set form data\n *\n * @public\n * @param {object} data - JSON object to be set\n * @returns this\n */\n public formData (data: FormData) {\n this.headers({\n 'Content-Type': 'multipart/form-data'\n }).data(data);\n return this;\n }\n\n /**\n * Custom params serializer\n * @private\n * @param {object} params\n */\n private paramsSerializer (params: object) {\n return qs.stringify(params, {\n arrayFormat: 'brackets'\n });\n }\n\n /**\n * Send request\n *\n * @public\n * @returns Promise\n */\n public send () {\n const requestConfig = Object.deepAssign({}, this.requestConfig, {\n url: `/${this.stack.join('/')}`\n });\n\n // Set default headers\n if (requestConfig.headers == null) {\n requestConfig.headers = {};\n }\n\n // Set default Content-Type\n if (requestConfig.headers['Content-Type'] == null) {\n requestConfig.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';\n }\n\n // Convert data if needed\n if (requestConfig.method === 'POST' &&\n requestConfig.headers['Content-Type'].startsWith('application/x-www-form-urlencoded') &&\n requestConfig.data != null) {\n requestConfig.data = qs.stringify(requestConfig.data);\n }\n\n if (requestConfig.params) {\n requestConfig.paramsSerializer = this.paramsSerializer;\n }\n\n // Send request\n // @ts-ignore\n return this.root.axios.request(requestConfig);\n }\n}\n\n\nexport default APIEntity;\n","/**\n * Filter\n */\n\nclass Filter {\n public name: string;\n public value: any;\n public operand: string;\n\n constructor (name: string, value: any, operand: string) {\n this.name = name;\n this.value = value;\n this.operand = operand;\n }\n}\n\nexport default Filter;\n","import './finka';\nimport Filter from './Filter';\n\n/**\n * FilterBuilder\n *\n * Builds filter string according to Bitbar Cloud backend convention\n */\n\nclass FilterBuilder {\n\n private filters: Array;\n\n constructor () {\n this.filters = [];\n }\n\n /**\n * Add filter to filters list\n * @param name {string} Name\n * @param value {*} Value\n * @param operand {string} Operand\n * @param [checkNull=false] {boolean} Check null?\n * @returns {FilterBuilder}\n */\n private add (name: string, value: any, operand: string, checkNull = false): FilterBuilder {\n\n value = Array.wrap(value);\n\n if (value.length === 0) {\n return this;\n }\n\n // auto-convert\n for (let i = 0; i < value.length; i++) {\n const v = value[i];\n if (typeof v === 'object' && v instanceof Date) {\n value[i] = v.getTime();\n }\n }\n\n let isNull = false;\n if (checkNull) {\n // check null existence\n for (const v of value) {\n if (v !== null) {\n continue;\n isNull = true;\n }\n }\n\n if (isNull) {\n value = value.filter((item: any) => item !== null);\n operand += 'ornull';\n }\n }\n\n // @ts-ignore\n if (operand.endsWith('ornull') && value.length === 0) {\n operand = 'isnull';\n }\n\n // add filter\n this.filters.push(new Filter(name, value, operand));\n\n return this;\n }\n\n\n\n public gt (name: string, value: number) {\n return this.add(name, value, 'gt');\n }\n\n public lt (name: string, value: number) {\n return this.add(name, value, 'lt');\n }\n\n public after (name: string, value: Date | number) {\n return this.add(name, value, 'after', true);\n }\n\n public afterorequal (name: string, value: Date | number) {\n return this.add(name, value, 'afterorequal', true);\n }\n\n public before (name: string, value: Date | number) {\n return this.add(name, value, 'before', true);\n }\n\n public beforeorequal (name: string, value: Date | number) {\n return this.add(name, value, 'beforeorequal', true);\n }\n\n public on (name: string, value: any) {\n return this.add(name, value, 'on');\n }\n\n public eq (name: string, value: any) {\n return this.add(name, value, 'eq');\n }\n\n public contains (name: string, value: string) {\n return this.add(name, value, 'contains');\n }\n\n public like (name: string, value: string) {\n return this.add(name, value, 'like');\n }\n\n public isnull (name: string) {\n return this.add(name, undefined, 'isnull');\n }\n\n public in (name: string, value: Array) {\n return this.add(name, value, 'in', true);\n }\n\n public notin (name: string, value: Array) {\n return this.add(name, value, 'notin', true);\n }\n\n\n public raw (filter: Filter) {\n const filters = Array.wrap(filter);\n for (const filter of filters) {\n if (this.isFilterPart(filter)) {\n this.filters.push(filter);\n } else {\n throw new SyntaxError(`Filter ${filter} has invalid syntax`);\n }\n }\n }\n\n /**\n * Check if given string is proper filter part\n */\n public isFilterPart (str: string) {\n return /^[a-zA-Z0-9.]{2,12}_(?:isnull$|(?:gt|lt|(?:after|before)(?:orequal)?|on|eq|contains|like|(?:not)?in)_)/.test( str);\n }\n\n /**\n * To string\n */\n public toString () {\n const parts: Array = [];\n\n let part: string,\n val: string;\n\n for (const filter of this.filters) {\n if (typeof filter === 'string') {\n part = filter;\n } else {\n val = '';\n if (filter.value.length > 1 || typeof filter.value[0] !== 'undefined') {\n val = `_${filter.value.join('|')}`;\n }\n part = `${filter.name}_${filter.operand}${val}`;\n }\n parts.push(part);\n }\n\n return parts.join(';');\n }\n}\n\n\nexport default FilterBuilder;\n","import APIEntity from './APIEntity'\nimport FilterBuilder from '../FilterBuilder'\n\n\n/**\n * Default limit\n *\n * @constant\n * @type {number}\n * @default\n */\nconst DEFAULT_LIMIT = 20;\n\n/**\n * Default offset\n *\n * @constant\n * @type {number}\n * @default\n */\nconst DEFAULT_OFFSET = 0;\n\n/**\n * API Order Enum\n */\nenum APIOrder {\n 'asc' = 'a',\n 'desc' = 'd'\n};\n\n\n/**\n * APIList\n *\n * @class\n * @extends APIEntity\n */\nclass APIList extends APIEntity {\n\n /**\n * Create\n * Shortcut for sending data POST\n *\n * @param {object} data\n */\n public create (data: object) {\n return this.post().data(data).send();\n }\n\n /**\n * Sets sorting\n *\n * @public\n * @param {string} name - Name of the column according to which the data will be sorted\n * @param {string} [order=a] - Sorting order. Possibilities: 'a', 'd'\n * @returns this\n */\n public sort (name: string, order: APIOrder = APIOrder.asc) {\n // if order not in ['a', 'd']\n // throw new Error(`Order '\\${order}' is invalid! Use 'a' for ascending or 'd' for descending.`);\n\n return this.params({\n sort: `${name}_${order}`\n });\n }\n\n /**\n * Sets limit\n *\n * @public\n * @param {number} [limit=DEFAULT_LIMIT] - Limit to be set\n * @returns this\n */\n public limit (limit = DEFAULT_LIMIT) {\n if (!Number.isNatural(limit)) {\n throw new Error(`Limit '${limit}' is invalid!`);\n }\n\n return this.params({\n limit\n });\n }\n\n /**\n * Gets limit\n *\n * @public\n * @returns number\n */\n public getLimit () {\n const params = this.getParams();\n return params.limit == null ? DEFAULT_LIMIT : params.limit;\n }\n\n /**\n * Disables limit\n *\n * @public\n * @returns this\n */\n public noLimit () {\n return this.limit(0);\n }\n\n /**\n * Sets offset\n *\n * @public\n * @param {number} [offset=DEFAULT_OFFSET] - Offset to be set\n * @returns this\n */\n public offset (offset: number = DEFAULT_OFFSET) {\n if (!Number.isNatural(offset)) {\n throw new Error(`Offset '${offset}' is invalid!`);\n }\n\n return this.params({\n offset\n });\n }\n\n /**\n * Sets limit and offset so that will request from BE records between range\n *\n * @public\n * @param {number} from - From index\n * @param {number} to - To index\n * @returns this\n */\n public between (from: number, to: number) {\n if (!Number.isNatural(from)) {\n throw new Error(`From '${from}' is invalid!`);\n }\n\n if (!Number.isNatural(to)) {\n throw new Error(`To '${to}' is invalid!`);\n }\n\n return this.params({\n offset: from,\n limit: 1 + (to - from)\n });\n }\n\n /**\n * Sets limit and offset so that will request from BE one record on given index\n *\n * @public\n * @param {number} idx - Index\n * @returns this\n */\n public only (idx: number) {\n if (!Number.isNatural(idx)) {\n throw new Error(`Index '${idx}' is invalid!`);\n }\n\n return this.params({\n offset: idx,\n limit: 1\n });\n }\n\n /**\n * Gets current limit and sets offset so that will request from BE one page of records\n *\n * @public\n * @param {number} [page=1] - Page number (counted from 1)\n * @returns this\n */\n public page (page = 1) {\n if (!Number.isNatural(page) || page == 0) {\n throw new Error(`Page '${page}' is invalid!`);\n }\n\n const limit = this.getLimit();\n const offset = (page - 1) * limit;\n\n return this.params({\n offset,\n limit\n });\n }\n\n /**\n * Sets search\n *\n * query param is working like SQL LIKE. BE sets wraps around query with %, and replaces every white character\n * with %. So e.g. if query='my device', then it's searching for '%my%device%' in DB.\n *\n * @public\n * @param {string} query - Query to search for\n * @returns this\n */\n public search (query: string) {\n if (typeof query !== 'string') {\n throw new Error('Search query must be a string!');\n }\n\n return this.params({\n search: query\n });\n }\n\n /**\n * Sets filter\n *\n * @public\n * @param {FilterBuilder|string} filter - Filter\n * @returns this\n */\n public filter (filter: FilterBuilder | string) {\n const isFilterBuilder = filter instanceof FilterBuilder;\n\n if (typeof filter !== 'string' && !isFilterBuilder) {\n throw new Error('Filter must be either string or instance of FilterBuilder');\n }\n\n if (isFilterBuilder) {\n filter = filter.toString();\n }\n\n return this.params({\n filter\n });\n }\n}\n\ninterface APIList {\n\n /**\n * Alias for 'noLimit'\n *\n * @public\n * @see noLimit\n * @returns this\n */\n all: typeof APIList.prototype.noLimit;\n\n /**\n * Alias for 'between'\n *\n * @public\n * @param {number} from - From idx\n * @param {number} to - To idx\n * @returns this\n */\n cut: typeof APIList.prototype.between;\n}\n\nAPIList.prototype.all = APIList.prototype.noLimit;\nAPIList.prototype.cut = APIList.prototype.between;\n\nexport default APIList;\n","import APIEntity from './APIEntity'\n\n\n/**\n * APIResource\n *\n * @class\n * @extends APIEntity\n */\nclass APIResource extends APIEntity {\n\n /**\n * Set DELETE as HTTP method\n *\n * @public\n * @returns this\n */\n public delete () {\n return this.method('DELETE');\n }\n}\n\n\ninterface APIResource {\n\n /**\n * Alias for 'post'\n *\n * @public\n * @see post\n * @returns this\n */\n update: typeof APIResource.prototype.post;\n}\n\n\nexport default APIResource\n","import APIList from './APIList'\nimport APIResource from './APIResource'\n\n\n/**\n * APIListDevices\n *\n * @class\n * @extends APIList\n */\nclass APIListDevices extends APIList {\n\n /**\n * /devices\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('devices');\n }\n\n // /devices/filters\n public filters () {\n return new APIResource(this).push('filters');\n }\n\n // /devices/cleanup-configurations\n public cleanupConfigurations () {\n return new APIList(this).push('cleanup-configurations');\n }\n\n /**\n * /devices/cleanup-configurations/{id}\n *\n * @param {number} id - Resource ID\n */\n public cleanupConfiguration (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('cleanup-configurations', id);\n }\n\n}\n\nexport default APIListDevices;\n","import APIList from './APIList'\nimport APIResource from './APIResource'\n\n\n/**\n * APIListDevices\n *\n * @class\n * @extends APIList\n */\nclass APIListUsers extends APIList {\n\n /**\n * /users\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('users');\n }\n\n // /users/activate\n public activate () {\n return new APIResource(this).push('activate');\n }\n\n // /users/recoveries\n public recoveries () {\n return new APIResource(this).push('recoveries');\n }\n\n // /users/passwordRecovery\n public passwordRecovery () {\n return new APIResource(this).push('password-recovery');\n }\n\n // /users/resetApiKey\n public resetApiKey () {\n return new APIResource(this).push('reset-api-key');\n }\n\n // /users/resetApiKey\n public validateVatId () {\n return new APIResource(this).push('validateVatId');\n }\n\n}\n\nexport default APIListUsers;\n","import APIResource from './APIResource'\n\n/**\n * APIResourceAdditionalUser\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceAdditionalUser extends APIResource {\n\n /**\n * /additional-users/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('additional-users', id);\n }\n\n // /account/resend-activation\n public resendActivation () {\n return new APIResource(this).push('resend-activation');\n }\n\n}\n\nexport default APIResourceAdditionalUser\n","import APIResource from './APIResource'\nimport APIResourceAdditionalUser from './APIResourceAdditionalUser';\n\nimport APIList from './APIList'\n\n/**\n * APIResourceAccount\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceAccount extends APIResource {\n\n /**\n * /account\n *\n * Constructor\n */\n constructor (parent: object, id?: number) {\n super(parent);\n if(id)\n this.push('accounts', id)\n else\n this.push('account');\n }\n\n // /accounts/{id}/preferences\n public preferences () {\n return new APIResource(this).push('preferences');\n }\n\n // /accounts/{id}/concurrency-status\n public concurrencyStatus () {\n return new APIResource(this).push('concurrency-status');\n }\n\n // /account/roles\n public roles () {\n return new APIList(this).push('roles');\n }\n\n // /account/roles/{id}\n public role (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('roles', id);\n }\n\n // /account/additional-users\n public additionalUsers () {\n return new APIList(this).push('additional-users');\n }\n\n // /account/additional-users/{id}\n public additionalUser (id: number) {\n return new APIResourceAdditionalUser(this, id);\n }\n\n}\n\nexport default APIResourceAccount\n","import APIResource from './APIResource'\n\n\n/**\n * APIResourceBillingPeriod\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceBillingPeriod extends APIResource {\n\n /**\n * /billing-periods/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('billing-periods', id);\n }\n\n // /billing-periods/{id}/receipt\n public receipt () {\n return new APIResource(this).push('receipt').setRequestConfig({\n responseType: 'arraybuffer'\n });\n }\n\n}\n\nexport default APIResourceBillingPeriod\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceBuild\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceBuild extends APIResource {\n\n /**\n * /builds/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('builds', id);\n }\n\n // /builds/{id}/abort\n public abort () {\n return new APIResource(this).push('abort');\n }\n\n // /builds/{id}/output-file-set/files\n public outputFiles () {\n return new APIList(this).push('output-file-set', 'files');\n }\n\n}\n\nexport default APIResourceBuild\n","import APIResource from './APIResource'\nimport APIResourceBuild from './APIResourceBuild'\n\nimport APIList from './APIList'\n\n\n/**\n * APIResourceFile\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceJob extends APIResource {\n\n /**\n * /jobs/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('jobs', id);\n }\n\n // /jobs/{id}/builds\n public builds () {\n return new APIList(this).push('builds');\n }\n\n // /jobs/{id}/builds/{id}\n public build (id: number) {\n return new APIResourceBuild(this, id);\n }\n\n}\n\nexport default APIResourceJob\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceBillingPeriod\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceDeviceGroup extends APIResource {\n\n /**\n * /device-groups/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('device-groups', id);\n }\n\n // /device-groups/{id}/devices\n public devices () {\n return new APIList(this).push('devices');\n }\n\n // /device-groups/{id}/device/{id}\n public device (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('devices', id);\n }\n\n // /device-groups/{id}/selectors\n public selectors () {\n return new APIList(this).push('selectors');\n }\n\n // /device-groups/{id}/selectors/{id}\n public selector (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('selectors', id);\n }\n\n}\n\nexport default APIResourceDeviceGroup\n","import APIResource from '../APIResource'\nimport APIList from '../APIList'\n\n/**\n * InputFileset\n *\n * @class\n * @extends APIResource\n */\nclass InputFileset extends APIResource {\n\n /**\n * /input-file-set\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('input-file-set');\n }\n\n // /input-file-set/files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /input-file-set/files.zip\n public filesZip () {\n return new APIResource(this).push('files.zip');\n }\n}\n\nexport default InputFileset\n","import APIResource from '../APIResource'\nimport APIList from '../APIList'\n\nimport FilterBuilder from '../../FilterBuilder'\n\n// Create non-media files filter\nconst NON_MEDIA_FILES_FILTER = new FilterBuilder();\nNON_MEDIA_FILES_FILTER.eq('state', 'READY');\nNON_MEDIA_FILES_FILTER.notin('mimetype', [\n // no images\n 'image/png', 'image/jpg', 'image/jpeg', 'image/webp', 'image/gif',\n\n // no videos\n 'video/mp4', 'video/avi', 'video/webm', 'video/ogg', 'video/mpeg'\n]);\n\n/**\n * OutputFileset\n *\n * @class\n * @extends APIResource\n */\nclass OutputFileset extends APIResource {\n\n /**\n * /output-file-set\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('output-file-set');\n }\n\n // /output-file-set/files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /output-file-set/files.zip\n public filesZip () {\n return new APIResource(this).push('files.zip');\n }\n\n // /output-file-set/screenshots\n public screenshots () {\n return new APIList(this).push('screenshots');\n }\n\n // /output-file-set/screenshots/{id}\n public screenshot (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('screenshots', id);\n }\n\n // /output-file-set/screenshots/{id}/file/{id}\n public screenshotFile (id: number) {\n this.screenshot(id).push('file');\n }\n\n // Filter files out by ready videos\n public videos () {\n this.files().params({\n filter: 's_state_eq_READY',\n tag: ['video']\n });\n }\n\n // Filter files out by non-media\n nonMediaFiles () {\n return this.files().filter(NON_MEDIA_FILES_FILTER);\n }\n\n}\n\nexport default OutputFileset\n","import APIResource from './APIResource'\nimport APIList from './APIList';\n\nimport InputFileset from './extra-class/InputFileset'\nimport OutputFileset from './extra-class/OutputFileset'\n\n\n/**\n * APIResourceDeviceSession\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceDeviceSession extends APIResource {\n\n /**\n * /device-sessions/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('device-sessions', id);\n }\n\n // /device-sessions/{id}/cluster-logs\n public clusterLogs () {\n return new APIResource(this).push('cluster-logs');\n }\n\n // /device-sessions/{id}/data-availability\n public dataAvailability () {\n return new APIResource(this).push('data-availability');\n }\n\n // /device-sessions/{id}/fixtures.zip\n public fixturesZip () {\n return new APIResource(this).push('fixtures.zip');\n }\n\n // /device-sessions/{id}/junit.xml\n public junitXml () {\n return new APIResource(this).push('junit.xml');\n }\n\n // /device-sessions/{id}/logs\n public logs () {\n return new APIResource(this).push('logs');\n }\n\n // /device-sessions/{id}/performance\n public performance () {\n return new APIResource(this).push('performance');\n }\n\n // /device-sessions/{id}/release\n public release () {\n return new APIResource(this).push('release');\n }\n\n // /device-sessions/{id}/result-data.zip\n public resultDataZip () {\n return new APIResource(this).push('result-data.zip');\n }\n\n // /device-sessions/{id}/screenshots\n public screenshots () {\n return new APIList(this).push('screenshots');\n }\n\n // /device-sessions/{id}/screenshots/{id}\n public screenshot (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('screenshots', id);\n }\n\n // /device-sessions/{id}/steps\n public steps () {\n return new APIList(this).push('steps');\n }\n\n // /device-sessions/{id}/steps/{id}\n public step (id: number | 'current') {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('steps', id);\n }\n\n // /device-sessions/{id}/steps/current\n public currentStep () {\n return this.step('current');\n }\n\n // /device-sessions/{id}/test-case-runs\n public testCaseRuns () {\n return new APIList(this).push('test-case-runs');\n }\n\n // /device-sessions/{id}/retry\n public retry () {\n return new APIResource(this).push('retry').post();\n }\n\n // /device-sessions/{id}/input-file-set\n public input () {\n return new InputFileset(this);\n }\n\n // /device-sessions/{id}/output-file-set\n public output () {\n return new OutputFileset(this);\n }\n\n // Alias for output().videos();\n public videos () {\n return this.output().videos();\n }\n\n // Live Testing Connections\n public connections () {\n return new APIList(this).push('connections');\n }\n\n}\n\nexport default APIResourceDeviceSession\n","import APIResource from './APIResource'\nimport APIResourceDeviceSession from './APIResourceDeviceSession'\n\nimport APIList from './APIList'\n\n\n/**\n * APIResourceRun\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceRun extends APIResource {\n\n /**\n * /runs/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('runs', id);\n }\n\n // /runs/{id}/config\n public config () {\n return new APIResource(this).push('config');\n }\n\n // /runs/{id}/device-sessions\n public deviceSessions () {\n return new APIList(this).push('device-sessions');\n }\n\n // /runs/{id}/device-sessions/{id}\n public deviceSession (id: number) {\n return new APIResourceDeviceSession(this, id);\n }\n\n // /runs/{id}/steps\n public steps () {\n return new APIList(this).push('steps');\n }\n\n // /runs/{id}/files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /runs/{id}/files.zip\n public filesZip () {\n return new APIResource(this).push('files.zip');\n }\n\n // /runs/{id}/tags\n public tags () {\n return new APIList(this).push('tags');\n }\n\n // /runs/{id}/tag\n public tag (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('tags', id);\n }\n\n}\n\nexport default APIResourceRun\n","import APIResource from './APIResource'\nimport APIResourceRun from './APIResourceRun'\n\nimport APIList from './APIList'\n\n\n/**\n * APIResourceFile\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceProject extends APIResource {\n\n /**\n * /projects/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('projects', id);\n }\n\n // /projects/{id}/runs\n public runs () {\n return new APIList(this).push('runs');\n }\n\n // /projects/{id}/runs/{id}\n public run (id: number) {\n return new APIResourceRun(this, id);\n }\n\n // /projects/{id}/runs-extended\n public runsExtended () {\n return new APIList(this).push('runs-extended');\n }\n\n // /projects/{id}/runs-extended/{id}\n public runExtended (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('runs-extended', id);\n }\n\n // /projects/{id}/files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /projects/{id}/files.zip\n public filesZip () {\n return new APIResource(this).push('files.zip');\n }\n\n // /projects/{id}/sharings\n public sharings () {\n return new APIList(this).push('sharings');\n }\n\n // /projects/{id}/sharings/{id}\n public sharing (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('sharings', id);\n }\n\n}\n\nexport default APIResourceProject\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceFile\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceFile extends APIResource {\n\n /**\n * /files/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('files', id);\n }\n\n // use this to download file content\n public file () {\n return new APIResource(this).push('file');\n }\n\n // /files/{id}/icon\n public icon () {\n return new APIResource(this).push('icon');\n }\n\n // /files/{id}/tags\n public tags () {\n return new APIList(this).push('tags');\n }\n\n}\n\nexport default APIResourceFile\n","import APIResource from './APIResource'\n\n\n/**\n * APIResourceNotification\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceNotification extends APIResource {\n\n /**\n * /notifications/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('notifications', id);\n }\n\n // /notifications/{id}/test\n public test () {\n return new APIResource(this).push('test');\n }\n\n}\n\nexport default APIResourceNotification\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceAccessGroup\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceAccessGroup extends APIResource {\n\n /**\n * /device-groups/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('access-groups', id);\n }\n\n // /access-groups/{id}/users\n public users () {\n return new APIList(this).push('users');\n }\n\n // /access-groups/{id}/users/{id}\n public user (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('users', id);\n }\n\n // /access-groups/{id}/resources\n public resources () {\n return new APIList(this).push('resources');\n }\n\n // /access-groups/{id}/resources/{id}\n public resource (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('resources', id);\n }\n\n}\n\nexport default APIResourceAccessGroup\n","import APIList from './APIList'\n\n\n/**\n * APIListDeviceTime\n *\n * @class\n * @extends APIList\n */\nclass APIListDeviceTime extends APIList {\n\n /**\n * /device-time\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('device-time');\n }\n\n // /device-time/reserved\n public reserved () {\n return new APIList(this).push('reserved');\n }\n\n // /device-time/used\n public used () {\n return new APIList(this).push('used');\n }\n\n}\n\nexport default APIListDeviceTime;\n","import APIList from './APIList'\n\ninterface UploadObj {\n /**\n * Directory\n */\n dir: string;\n\n /**\n * Filename\n */\n filename: string;\n}\n\n/**\n * APIListFiles\n *\n * @class\n * @extends APIList\n */\nclass APIListFiles extends APIList {\n\n // Constructor\n constructor (parent: object) {\n super(parent);\n this.push('files');\n }\n\n // Siplifies process of uploading\n public upload (obj: UploadObj) {\n let form;\n\n // For NodeJS\n // @ts-ignore\n if (global.isNodeJs) {\n // @ts-ignore\n const fs = require('fs');\n // @ts-ignore\n const FormData = require('form-data');\n\n form = new FormData();\n form.append('file', fs.createReadStream(obj.dir + '/' + obj.filename), {\n filename: obj.filename\n });\n\n /**\n * Browser\n * @todo\n */\n } else {\n throw new Error('Not supported yet!');\n }\n\n this.post().headers(form.getHeaders()).data(form);\n }\n\n}\n\nexport default APIListFiles\n","import APIList from './APIList'\n\n\n/**\n * APIListPurchased\n *\n * @class\n * @extends APIList\n */\nclass APIListPurchased extends APIList {\n\n /**\n * /purchased\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('purchased');\n }\n\n}\n\nexport default APIListPurchased\n","import APIList from './APIList'\nimport APIListPurchased from './APIListPurchased'\n\n\n/**\n * APIListServices\n *\n * @class\n * @extends APIList\n */\nclass APIListServices extends APIList {\n\n // Constructor\n constructor (parent: object) {\n super(parent);\n this.push('services');\n }\n\n // /services/purchased\n public purchased () {\n return new APIListPurchased(this);\n }\n\n // /services/available\n public available () {\n this.push('available');\n }\n\n}\n\nexport default APIListServices\n","import APIList from './APIList'\nimport APIResource from './APIResource'\n\n\n/**\n * APIListRuns\n *\n * @class\n * @extends APIList\n */\nclass APIListRuns extends APIList {\n\n /**\n * /runs\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('runs');\n }\n\n // /runs/config\n public config () {\n return new APIResource(this).push('config');\n }\n\n}\n\nexport default APIListRuns\n","import APIList from './APIList'\n\n\n/**\n * APIListNotifications\n *\n * @class\n * @extends APIList\n */\nclass APIListNotifications extends APIList {\n\n /**\n * /notifications\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('notifications');\n }\n\n // /notifications/scopes\n public scopes () {\n return new APIList(this).push('scopes');\n }\n\n // /notifications/channels\n public channels () {\n return new APIList(this).push('channels');\n }\n\n}\n\nexport default APIListNotifications\n","import APIResource from './APIResource'\nimport APIResourceAccount from './APIResourceAccount';\nimport APIResourceBillingPeriod from './APIResourceBillingPeriod'\nimport APIResourceJob from './APIResourceJob'\nimport APIResourceDeviceGroup from './APIResourceDeviceGroup'\nimport APIResourceDeviceSession from './APIResourceDeviceSession'\nimport APIResourceProject from './APIResourceProject'\nimport APIResourceFile from './APIResourceFile'\nimport APIResourceNotification from './APIResourceNotification'\nimport APIResourceAccessGroup from './APIResourceAccessGroup'\n\nimport APIList from './APIList'\nimport APIListDeviceTime from './APIListDeviceTime'\nimport APIListFiles from './APIListFiles'\nimport APIListServices from './APIListServices'\nimport APIListRuns from './APIListRuns'\nimport APIListNotifications from './APIListNotifications'\n\n\n/**\n * APIResourceUser\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceUser extends APIResource {\n\n /**\n * /users/{id} | /me\n *\n * Constructor\n */\n constructor (parent: object, id: number | 'me') {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n\n if (id === 'me') {\n this.push('me');\n } else if (typeof id === 'number') {\n this.push('users', id);\n } else {\n throw new TypeError('id is not a number');\n }\n }\n\n // /users/{id}/account\n public account () {\n return new APIResourceAccount(this);\n }\n\n // /users/{id}/device-time\n public deviceTime () {\n return new APIListDeviceTime(this);\n }\n\n // /users/{id}/device-time-summary\n public deviceTimeSummary () {\n return new APIList(this).push('device-time-summary');\n }\n\n // /users/{id}/services\n public services () {\n return new APIListServices(this);\n }\n\n // /users/{id}/services/{id}\n public service (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('services', id);\n }\n\n // /users/{id}/account-services/{id}/billing-period\n public accountServiceBillingPeriod (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('account-services', id, 'billing-period');\n }\n\n // /users/{id}/billing-periods\n public billingPeriods () {\n return new APIList(this).push('billing-periods');\n }\n\n // /users/{id}/billing-periods/{id}\n public billingPeriod (id: number) {\n return new APIResourceBillingPeriod(this, id);\n }\n\n // /users/{id}/jobs\n public jobs () {\n return new APIList(this).push('jobs');\n }\n\n // /users/{id}/jobs/{id}\n public job (id: number) {\n return new APIResourceJob(this, id);\n }\n\n // /users/{id}/device-groups\n public deviceGroups () {\n return new APIList(this).push('device-groups');\n }\n\n // /users/{id}/device-groups/{id}\n public deviceGroup (id: number) {\n return new APIResourceDeviceGroup(this, id);\n }\n\n // /users/{id}/device-sessions\n public deviceSessions () {\n return new APIList(this).push('device-sessions');\n }\n\n // /users/{id}/device-sessions/{id}\n public deviceSession (id: number) {\n return new APIResourceDeviceSession(this, id);\n }\n\n // /users/{id}/projects\n public projects () {\n return new APIList(this).push('projects');\n }\n\n // /users/{id}/projects/{id}\n public project (id: number) {\n return new APIResourceProject(this, id);\n }\n\n // /users/{id}/files\n public files () {\n return new APIListFiles(this);\n }\n\n // /users/{id}/files/{id}\n public file (id: number) {\n return new APIResourceFile(this, id);\n }\n\n // /users/{id}/runs\n public runs () {\n return new APIListRuns(this);\n }\n\n // /users/{id}/available-build-executors\n public availableBuildExecutors () {\n return new APIList(this).push('available-build-executors');\n }\n\n // /users/{id}/available-frameworks\n public availableFrameworks () {\n return new APIList(this).push('available-frameworks');\n }\n\n /**\n * /users/{id}/\n * /users/{id}/reset-api-key\n */\n public resetApiKey () {\n return new APIResource(this).push('reset-api-key');\n }\n\n // /users/{id}/restore\n public restore () {\n return new APIResource(this).push('restore');\n }\n\n // /users/{id}/account/additional-users\n public accountAdditionalUsers () {\n return new APIList(this) .push('account', 'additional-users');\n }\n\n // /users/{id}/account/additional-users/{id}\n public accountAdditionalUser (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('account', 'additional-users', id);\n }\n\n // /users/{id}/feedback\n public feedback () {\n return new APIResource(this).push('feedback');\n }\n\n // /users/{id}/notifications\n public notifications () {\n return new APIListNotifications(this);\n }\n\n // /users/{id}/notifications/{id}\n public notification (id: number) {\n return new APIResourceNotification(this, id);\n }\n\n // /users/{id}/receipts\n public receipts () {\n return new APIList(this).push('receipts');\n }\n\n // /users/{id}/preferences\n public preferences () {\n return new APIResource(this).push('preferences');\n }\n\n // /users/{id}/ui-preferences\n public uiPreferences () {\n return new APIResource(this).push('ui-preferences');\n }\n\n // /users/{id}/integrations\n public integrations () {\n return new APIList(this).push('integrations');\n }\n\n // /users/{id}/integrations/{id}\n public integration (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('integrations', id);\n }\n\n // /users/{id}/device-usage\n public deviceUsage () {\n return new APIList(this).push('device-usage');\n }\n\n // /users/{id}/statistics\n public statistics () {\n return new APIList(this).push('statistics');\n }\n\n // /users/{id}/statistics\n public deviceStatistics () {\n return new APIList(this).push('device-statistics');\n }\n\n // /users/{id}/access-groups\n public accessGroups () {\n return new APIList(this).push('access-groups');\n }\n\n // /users/{id}/access-groups/{id}\n public accessGroup (id: number) {\n return new APIResourceAccessGroup(this, id);\n }\n\n}\n\nexport default APIResourceUser\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceDevice\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceDevice extends APIResource {\n\n /**\n * /devices/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('devices', id);\n }\n\n // /devices/{id}/properties\n public properties () {\n return new APIList(this).push('properties');\n }\n\n}\n\nexport default APIResourceDevice\n","import APIResource from './APIResource'\n\n\n/**\n * APIResourceUserSession\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceUserSession extends APIResource {\n\n // Constructor\n // /user-sessions\n constructor (parent: object) {\n super(parent);\n this.push('user-sessions');\n }\n\n // /user-sessions/login\n public login (data: object) {\n return new APIResource(this).push('login').post().data(data);\n }\n\n // /user-sessions/logout\n public logout () {\n return new APIResource(this).push('logout').post();\n }\n\n // /user-sessions/{name}-login\n public sso (name: string) {\n return new APIResource(this).push(name + '-login');\n }\n\n // /user-sessions/portal-login\n public portalLogin () {\n return new APIResource(this).push('portal-login').post();\n }\n\n}\n\nexport default APIResourceUserSession\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIAdminResourceCluster\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResourceCluster extends APIResource {\n\n /**\n * /clusters/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('clusters', id);\n }\n\n // /clusters/{id}/devices\n public devices () {\n return new APIList(this).push('devices');\n }\n\n}\n\nexport default APIAdminResourceCluster\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIAdminResourceDeviceTime\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResourceDeviceTime extends APIResource {\n\n /**\n * /device-time\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('device-time');\n }\n\n // /device-time/count-session-report\n public countSessionReport () {\n return new APIList(this).push('count-session-report');\n }\n\n // /device-time/step-time-report\n public stepTimeReport () {\n return new APIList(this).push('step-time-report');\n }\n\n}\n\nexport default APIAdminResourceDeviceTime\n","import APIList from './APIList'\nimport APIResource from './APIResource'\nimport APIResourceRun from './APIResourceRun'\n\n\n/**\n * APIAdminResourceRun\n *\n * @class\n * @extends APIResourceRun\n */\nclass APIAdminResourceRun extends APIResourceRun {\n\n // /runs/{id}/abort\n public abort () {\n return new APIResource(this).push('abort').post();\n }\n\n // /runs/{id}/retry\n public retry (ids?: Array) {\n const a = new APIResource(this).push('retry').setRequestConfig({\n timeout: 0\n }).post();\n\n if (ids != null) {\n a.params({\n deviceRunIds: ids\n });\n }\n\n return a;\n }\n\n // /runs/{id}/changebillable\n public changeBillable () {\n return new APIResource(this).push('changebillable');\n }\n\n // /runs/{id}/changepriority\n public changePriority () {\n return new APIResource(this).push('changepriority');\n }\n\n // /runs/{id}/screenshot-names\n public screenshotNames () {\n return new APIList(this).push('screenshot-names');\n }\n\n // /runs/{id}/screenshots\n public screenshots () {\n return new APIList(this).push('screenshots');\n }\n\n // /runs/{id}/data-availability\n public dataAvailability () {\n return new APIList(this).push('data-availability');\n }\n\n // /runs/{id}/build-logs.zip\n public buildLogsZip (ids?: Array) {\n const a = new APIResource(this).push('build-logs.zip');\n\n if (ids != null) {\n a.params({\n deviceRunIds: ids\n });\n }\n\n return a;\n }\n\n // /runs/{id}/logs.zip\n public logsZip () {\n return new APIResource(this).push('logs.zip');\n }\n\n // /runs/{id}/performance.zip\n public performanceZip () {\n return new APIResource(this).push('performance.zip');\n }\n\n // /runs/{id}/screenshots.zip\n public screenshotsZip () {\n return new APIResource(this).push('screenshots.zip');\n }\n\n}\n\nexport default APIAdminResourceRun\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIAdminResourceDevice\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResourceDevice extends APIResource {\n\n /**\n * /admin/devices/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('admin');\n this.push('devices', id);\n }\n\n // /admin/devices/{id}/queue\n public queue () {\n return new APIList(this).push('queue');\n }\n\n}\n\nexport default APIAdminResourceDevice\n","import APIResource from './APIResource'\nimport APIList from './APIList';\n\nimport InputFileset from './extra-class/InputFileset';\nimport OutputFileset from './extra-class/OutputFileset';\n\n\n/**\n * APIAdminResourceDevice\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResourceDeviceSession extends APIResource {\n\n /**\n * /device-sessions/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('device-sessions', id);\n }\n\n // /admin/device-sessions/{id}/changebillable\n public changeBillable () {\n const a = new APIResource(this);\n a.stack.splice(a.stack.length - 2, 0, 'admin');\n return a.push('changebillable').post();\n }\n\n // /device-sessions/{id}/connections\n public connections () {\n return new APIList(this).push('connections');\n }\n\n // /device-sessions/{id}/connections/{id}\n public connection (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('connections', id);\n }\n\n // /device-sessions/{id}/output-file-set\n public input () {\n return new InputFileset(this);\n }\n\n // /device-sessions/{id}/output-file-set\n public output () {\n return new OutputFileset(this);\n }\n\n // /device-sessions/{id}/release\n public release () {\n return new APIResource(this).push('release').post();\n }\n\n // /device-sessions/{id}/screenshots\n public screenshots () {\n return new APIList(this).push('screenshots');\n }\n\n // /device-sessions/{id}/screenshots/{id}\n public screenshot (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('screenshots', id);\n }\n\n // /device-sessions/{id}/steps\n public steps () {\n return new APIList(this).push('steps');\n }\n\n // /device-sessions/{id}/steps/{id}\n public step (id: number | 'current') {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('steps', id);\n }\n\n // /device-sessions/{id}/steps/current\n public currentStep () {\n return this.step('current');\n }\n\n // /device-sessions/{id}/test-case-runs\n public testCaseRuns () {\n return new APIList(this).push('test-case-runs');\n }\n\n}\n\nexport default APIAdminResourceDeviceSession\n","import APIList from './APIList'\n\nimport APIResource from './APIResource'\nimport APIResourceFile from './APIResourceFile'\n\nimport APIAdminResourceCluster from './APIAdminResourceCluster';\nimport APIAdminResourceDeviceTime from './APIAdminResourceDeviceTime';\nimport APIAdminResourceRun from './APIAdminResourceRun';\nimport APIAdminResourceDevice from './APIAdminResourceDevice';\nimport APIAdminResourceDeviceSession from './APIAdminResourceDeviceSession';\nimport APIResourceProject from './APIResourceProject';\nimport APIResourceAccessGroup from './APIResourceAccessGroup';\n\n\n/**\n * APIAdminResource\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResource extends APIResource {\n\n /**\n * /admin\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n }\n\n private withAdmin () {\n return new APIResource(this).push('admin');\n }\n\n // /clusters\n public clusters () {\n return new APIList(this).push('clusters');\n }\n\n // /clusters/{id}\n public cluster (id: number) {\n return new APIAdminResourceCluster(this, id);\n }\n\n // /admin/devices\n public devices () {\n return new APIList(this).push('admin', 'devices');\n }\n\n // /admin/devices/{id}\n public device (id: number) {\n return new APIAdminResourceDevice(this, id);\n }\n\n // /admin/device-models\n public deviceModels () {\n return new APIList(this).push('admin', 'device-models');\n }\n\n // /admin/device-models/{id}\n public deviceModel (id: number) {\n return new APIResource(this).push('admin', 'device-models', id);\n }\n\n // /device-sessions\n public deviceSessions () {\n return new APIList(this).push('admin', 'device-sessions');\n }\n\n // /device-sessions/{id}\n public deviceSession (id: number) {\n return new APIAdminResourceDeviceSession(this, id);\n }\n\n // /device-status\n public deviceStatuses () {\n return new APIList(this).push('device-status');\n }\n\n // /device-time\n public deviceTime () {\n return new APIAdminResourceDeviceTime(this.withAdmin());\n }\n\n // /admin/interactive-queue\n public interactiveQueue () {\n return new APIList(this).push('admin', 'interactive-queue');\n }\n\n // /files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /files/{id}\n public file (id: number) {\n return new APIResourceFile(this, id);\n }\n\n // /admin/overview\n public overview () {\n return new APIResource(this).push('admin', 'overview');\n }\n\n // /projects\n public projects () {\n return new APIList(this).push('projects');\n }\n\n // /projects/{id}\n public project (id: number) {\n return new APIResourceProject(this, id);\n }\n\n // /runs\n public runs () {\n return new APIList(this).push('admin', 'runs');\n }\n\n // /runs/{id}\n public run (id: number) {\n return new APIAdminResourceRun(this, id);\n }\n\n // /users\n public users () {\n return new APIList(this).push('users');\n }\n\n // /access-groups\n public accessGroups () {\n return new APIList(this).push('access-groups');\n }\n\n // /access-groups/{id}\n public accessGroup (id: number) {\n return new APIResourceAccessGroup(this, id);\n }\n\n}\n\nexport default APIAdminResource\n","import './finka';\nimport ApiConfig from './ApiConfig';\n\nimport axios, { AxiosInstance } from 'axios';\n\n// @ts-ignore\nimport { version } from '../package.json';\n\nimport APIList from './api/APIList';\nimport APIListDevices from './api/APIListDevices';\nimport APIListUsers from './api/APIListUsers';\n\nimport APIResourceUser from './api/APIResourceUser';\nimport APIResourceDevice from './api/APIResourceDevice';\nimport APIResourceDeviceGroup from './api/APIResourceDeviceGroup';\nimport APIResourceUserSession from './api/APIResourceUserSession';\n\nimport APIAdminResource from './api/APIAdminResource';\nimport APIResourceAccount from \"./api/APIResourceAccount\";\n\n// @ts-ignore\nif (global.isNodeJs) {\n // Set User-Agent\n axios.defaults.headers.common['User-Agent'] = `Bitbar Cloud API Client for JavaScript v${version}`;\n}\n\n// Disable max content length\naxios.defaults.maxContentLength = 1073741824; // 1GB\n\n\n/**\n * API\n * Root for other API resources\n */\nclass API {\n\n // Main config\n private config: ApiConfig;\n\n // axios config\n private axiosConfig: ApiConfig;\n\n // axios instance\n public axios: AxiosInstance;\n\n\n constructor (config: ApiConfig) {\n if (config == null) {\n throw new Error('config cannot be empty');\n }\n\n this.config = config;\n this.axiosConfig = {};\n\n if (this.config.cloudUrl == null) {\n throw new TypeError('cloudUrl cannot be empty');\n } else if (typeof this.config.cloudUrl !== 'string') {\n throw new TypeError('cloudUrl must be a string');\n } else if (!/^https?:\\/\\/.{2,}/.test(this.config.cloudUrl)) {\n throw new Error(\"cloudUrl doesn't look like a URL\");\n }\n\n // Validate and correct cloudUrl if needed\n this.axiosConfig.baseURL = this.config.cloudUrl.replace(/\\/+$/, '') + '/api'\n\n // Check v2\n this.config.v2 = !!this.config.v2;\n if (this.config.v2) {\n this.axiosConfig.baseURL += '/v2';\n }\n\n // Check if apiKey is set\n if (this.config.apiKey) {\n if (typeof this.config.apiKey !== 'string') {\n throw new TypeError('apiKey must be a string');\n } else if (!/^[A-Za-z0-9]{32}$/.test(this.config.apiKey)) {\n throw new Error(\"apiKey is in the wrong format\");\n }\n\n this.axiosConfig.auth = {\n username: this.config.apiKey,\n password: ''\n };\n }\n\n // Create axios instance\n this.axios = axios.create(this.axiosConfig);\n }\n\n\n // --- Resources starts here --- //\n\n // /user-sessions\n public userSession () {\n return new APIResourceUserSession(this);\n }\n\n // /user/{id}\n public user (id: number | 'me') {\n return new APIResourceUser(this, id);\n }\n\n // /users\n public users () {\n return new APIListUsers(this);\n }\n\n // /me\n public me () {\n return this.user('me');\n }\n\n // /admin\n public admin () {\n return new APIAdminResource(this);\n }\n\n // /devices\n public devices () {\n return new APIListDevices(this);\n }\n\n // /devices/{id}\n public device (id: number) {\n return new APIResourceDevice(this, id);\n }\n\n // /device-groups\n public deviceGroups () {\n return new APIList(this).push('device-groups');\n }\n\n // /device-groups/{id}\n public deviceGroup (id: number) {\n return new APIResourceDeviceGroup(this, id);\n }\n\n // /label-groups\n public labelGroups () {\n return new APIList(this).push('label-groups');\n }\n\n // /device-statistics\n public deviceStatistics () {\n return new APIList(this).push('device-statistics');\n }\n\n // /accounts/{id}\n public account (id: number) {\n return new APIResourceAccount(this, id)\n }\n\n}\n\n\nexport default API;\n","import API from './API';\nimport FilterBuilder from './FilterBuilder';\n\n/**\n * Cloud API Client\n */\nconst CloudAPIClient = {\n API,\n FilterBuilder\n}\n\nexport default CloudAPIClient;\n"],"names":[],"mappings":";;;;;;;;;;;EAGA,KAAK,EAAE;;;;ECQP,IAAK,oBAIJ;EAJD,WAAK,oBAAoB;MACvB,mCAAW,CAAA;MACX,qCAAa,CAAA;MACb,yCAAiB,CAAA;EACnB,CAAC,EAJI,oBAAoB,KAApB,oBAAoB,QAIxB;AAAA,EASD,MAAM,SAAS;MA8Bb,YAAa,MAA0B;UACrC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;UAChB,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;UAExB,IAAI,MAAM,YAAY,SAAS,EAAE;cAC/B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;cAExB,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;kBAC/B,IAAI,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;eAC5B;cAED,IAAI,MAAM,CAAC,aAAa,IAAI,IAAI,EAAE;kBAChC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;eAC7C;WACF;eAAM;cACL,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;WACpB;OACF;MASM,IAAI,CAAE,GAAG,KAA2B;UACzC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;c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CAAC,CAAC;OAC7C;MAMM,WAAW;UAChB,OAAO,IAAI,sBAAsB,CAAC,IAAI,CAAC,CAAC;OACzC;MAGM,IAAI,CAAE,EAAiB;UAC5B,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;OACtC;MAGM,KAAK;UACV,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;OAC/B;MAGM,EAAE;UACP,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;OACxB;MAGM,KAAK;UACV,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC;OACnC;MAGM,OAAO;UACZ,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;OACjC;MAGM,MAAM,CAAE,EAAU;UACvB,OAAO,IAAI,iBAAiB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;OACxC;MAGM,YAAY;UACjB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;OAChD;MAGM,WAAW,CAAE,EAAU;UAC5B,OAAO,IAAI,sBAAsB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;OAC7C;MAGM,WAAW;UAChB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;OAC/C;MAGM,gBAAgB;UACrB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;OACpD;MAGM,OAAO,CAAE,EAAU;UACxB,OAAO,IAAI,kBAAkB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;OACxC;GAEF;;EClJD,MAAM,cAAc,GAAG;MACrB,GAAG;MACH,aAAa;GACd,CAAA;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"bitbar-cloud-api-client.js","sources":["../src/finka.ts","../src/api/APIEntity.ts","../src/Filter.ts","../src/FilterBuilder.ts","../src/api/APIList.ts","../src/api/APIResource.ts","../src/api/APIListDevices.ts","../src/api/APIListUsers.ts","../src/api/APIResourceAdditionalUser.ts","../src/api/APIResourceAccount.ts","../src/api/APIResourceBillingPeriod.ts","../src/api/APIResourceBuild.ts","../src/api/APIResourceJob.ts","../src/api/APIResourceDeviceGroup.ts","../src/api/extra-class/InputFileset.ts","../src/api/extra-class/OutputFileset.ts","../src/api/APIResourceDeviceSession.ts","../src/api/APIResourceRun.ts","../src/api/APIResourceProject.ts","../src/api/APIResourceFile.ts","../src/api/APIResourceNotification.ts","../src/api/APIResourceAccessGroup.ts","../src/api/APIListDeviceTime.ts","../src/api/APIListFiles.ts","../src/api/APIListPurchased.ts","../src/api/APIListServices.ts","../src/api/APIListRuns.ts","../src/api/APIListNotifications.ts","../src/api/APIResourceAccountService.ts","../src/api/APIResourceUser.ts","../src/api/APIResourceDevice.ts","../src/api/APIResourceUserSession.ts","../src/api/APIAdminResourceCluster.ts","../src/api/APIAdminResourceDeviceTime.ts","../src/api/APIAdminResourceRun.ts","../src/api/APIAdminResourceDevice.ts","../src/api/APIAdminResourceDeviceSession.ts","../src/api/APIAdminResource.ts","../src/API.ts","../src/CloudAPIClient.ts"],"sourcesContent":["// @ts-ignore\nimport finka from '@bitbar/finka';\n\nfinka();\n\nexport default {};\n","import qs from 'qs';\nimport { AxiosRequestConfig, Method } from 'axios';\n\n\n/**\n * Allowed methods\n *\n * @constant\n * @type {Array}\n * @default\n */\nenum ALLOWED_HTTP_METHODS {\n GET = 'GET',\n POST = 'POST',\n DELETE = 'DELETE'\n};\n\n\n/**\n * APIEntity\n *\n * @class\n * @abstract\n */\nclass APIEntity {\n\n /**\n * Stack\n *\n * @public\n * @type {Array}\n */\n public stack: Array;\n\n /**\n * object of request config\n *\n * @protected\n * @type {AxiosRequestConfig}\n */\n protected requestConfig: AxiosRequestConfig;\n\n /**\n * Root\n *\n * @public\n * @type {API}\n */\n public root: object;\n\n /**\n * Constructor\n * @param {APIEntity|object} [parent] - Specifies a parent from which should be inherited properties\n */\n constructor (parent: APIEntity | object) {\n this.stack = [];\n this.requestConfig = {};\n\n if (parent instanceof APIEntity) {\n this.root = parent.root;\n\n if (Array.isArray(parent.stack)) {\n this.push(...parent.stack);\n }\n\n if (parent.requestConfig != null) {\n this.setRequestConfig(parent.requestConfig);\n }\n } else {\n this.root = parent;\n }\n }\n\n /**\n * Push\n *\n * @public\n * @param {string|number} items... - Items that should be pushed to stack\n * @returns this\n */\n public push (...items: Array) {\n for (const item of items) {\n this.stack.push(item);\n }\n return this;\n }\n\n /**\n * Pop\n *\n * @public\n * @return this\n */\n public pop () {\n this.stack.pop();\n return this;\n }\n\n /**\n * To URL\n *\n * @param {boolean} absolute\n */\n public toUrl (absolute = false) {\n let url = `/${this.stack.join('/')}`;\n\n if (absolute) {\n // @ts-ignore\n url = this.root.axiosConfig.baseURL + url;\n }\n\n return url;\n }\n\n /**\n * Set request config\n *\n * @public\n * @param {AxiosRequestConfig} requestConfig - object of request config to be set\n * @returns this\n */\n public setRequestConfig (requestConfig: AxiosRequestConfig) {\n Object.deepAssign(this.requestConfig, requestConfig);\n return this;\n }\n\n /**\n * Remove request config key\n *\n * @public\n * @param {string} key - Key to me removed from request config\n * @returns this\n */\n public removeRequestConfig (key: string) {\n // @ts-ignore\n delete this.requestConfig[key];\n return this;\n }\n\n /**\n * Set headers\n *\n * @public\n * @param {object} headers - Headers object\n * @returns this\n */\n public headers (headers: object) {\n const _headers = {};\n\n // Unify/Standarize headers keys\n for (const key in headers) {\n const newKey = key.replace(/(?:^|-)([a-z])/g, (letter) => letter.toUpperCase());\n // @ts-ignore\n _headers[newKey] = headers[key];\n }\n\n // Set\n return this.setRequestConfig({\n headers: _headers\n });\n }\n\n /**\n * Set HTTP method\n *\n * @public\n * @param {string} name - HTTP methods name\n * @returns this\n */\n public method (name: Method) {\n const NAME: Method = name.toLocaleUpperCase();\n\n // @ts-ignore\n if (!ALLOWED_HTTP_METHODS[NAME]) {\n throw new Error(`Method '${NAME}' is not allowed! You can use: ${Object.keys(ALLOWED_HTTP_METHODS).join(', ')}`);\n }\n\n return this.setRequestConfig({\n method: NAME\n });\n }\n\n /**\n * Set GET as HTTP method\n *\n * @public\n * @returns this\n */\n public get () {\n return this.method('GET');\n }\n\n /**\n * Set POST as HTTP method\n *\n * @public\n * @returns this\n */\n public post () {\n return this.method('POST');\n }\n\n /**\n * Set params\n *\n * @public\n * @param {object} params - object of params to be set\n * @returns this\n */\n public params (params: object) {\n Object.deepAssign(this.requestConfig, {\n params\n });\n return this;\n }\n\n /**\n * Get params\n *\n * @public\n * @returns object\n */\n public getParams () {\n return this.requestConfig.params == null ? {} : this.requestConfig.params;\n }\n\n /**\n * Remove params key\n *\n * @public\n * @param {string} key - Key to me removed from params\n * @returns this\n */\n public removeParam (key: string) {\n delete this.requestConfig.params[key];\n return this;\n }\n\n /**\n * Set data\n *\n * @public\n * @param {object} data - object of data to be set\n * @returns this\n */\n public data (data: object) {\n Object.deepAssign(this.requestConfig, {\n data\n });\n return this;\n }\n\n /**\n * Set JSON data\n *\n * @public\n * @param {object} data - JSON object to be set\n * @returns this\n */\n public jsonData (data: object) {\n this.headers({\n 'Content-Type': 'application/json'\n }).data(data);\n return this;\n }\n\n /**\n * Set form data\n *\n * @public\n * @param {object} data - JSON object to be set\n * @returns this\n */\n public formData (data: FormData) {\n this.headers({\n 'Content-Type': 'multipart/form-data'\n }).data(data);\n return this;\n }\n\n /**\n * Custom params serializer\n * @private\n * @param {object} params\n */\n private paramsSerializer (params: object) {\n return qs.stringify(params, {\n arrayFormat: 'brackets'\n });\n }\n\n /**\n * Send request\n *\n * @public\n * @returns Promise\n */\n public send () {\n const requestConfig = Object.deepAssign({}, this.requestConfig, {\n url: `/${this.stack.join('/')}`\n });\n\n // Set default headers\n if (requestConfig.headers == null) {\n requestConfig.headers = {};\n }\n\n // Set default Content-Type\n if (requestConfig.headers['Content-Type'] == null) {\n requestConfig.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';\n }\n\n // Convert data if needed\n if (requestConfig.method === 'POST' &&\n requestConfig.headers['Content-Type'].startsWith('application/x-www-form-urlencoded') &&\n requestConfig.data != null) {\n requestConfig.data = qs.stringify(requestConfig.data);\n }\n\n if (requestConfig.params) {\n requestConfig.paramsSerializer = this.paramsSerializer;\n }\n\n // Send request\n // @ts-ignore\n return this.root.axios.request(requestConfig);\n }\n}\n\n\nexport default APIEntity;\n","/**\n * Filter\n */\n\nclass Filter {\n public name: string;\n public value: any;\n public operand: string;\n\n constructor (name: string, value: any, operand: string) {\n this.name = name;\n this.value = value;\n this.operand = operand;\n }\n}\n\nexport default Filter;\n","import './finka';\nimport Filter from './Filter';\n\n/**\n * FilterBuilder\n *\n * Builds filter string according to Bitbar Cloud backend convention\n */\n\nclass FilterBuilder {\n\n private filters: Array;\n\n constructor () {\n this.filters = [];\n }\n\n /**\n * Add filter to filters list\n * @param name {string} Name\n * @param value {*} Value\n * @param operand {string} Operand\n * @param [checkNull=false] {boolean} Check null?\n * @returns {FilterBuilder}\n */\n private add (name: string, value: any, operand: string, checkNull = false): FilterBuilder {\n\n value = Array.wrap(value);\n\n if (value.length === 0) {\n return this;\n }\n\n // auto-convert\n for (let i = 0; i < value.length; i++) {\n const v = value[i];\n if (typeof v === 'object' && v instanceof Date) {\n value[i] = v.getTime();\n }\n }\n\n let isNull = false;\n if (checkNull) {\n // check null existence\n for (const v of value) {\n if (v !== null) {\n continue;\n isNull = true;\n }\n }\n\n if (isNull) {\n value = value.filter((item: any) => item !== null);\n operand += 'ornull';\n }\n }\n\n // @ts-ignore\n if (operand.endsWith('ornull') && value.length === 0) {\n operand = 'isnull';\n }\n\n // add filter\n this.filters.push(new Filter(name, value, operand));\n\n return this;\n }\n\n\n\n public gt (name: string, value: number) {\n return this.add(name, value, 'gt');\n }\n\n public lt (name: string, value: number) {\n return this.add(name, value, 'lt');\n }\n\n public after (name: string, value: Date | number) {\n return this.add(name, value, 'after', true);\n }\n\n public afterorequal (name: string, value: Date | number) {\n return this.add(name, value, 'afterorequal', true);\n }\n\n public before (name: string, value: Date | number) {\n return this.add(name, value, 'before', true);\n }\n\n public beforeorequal (name: string, value: Date | number) {\n return this.add(name, value, 'beforeorequal', true);\n }\n\n public on (name: string, value: any) {\n return this.add(name, value, 'on');\n }\n\n public eq (name: string, value: any) {\n return this.add(name, value, 'eq');\n }\n\n public contains (name: string, value: string) {\n return this.add(name, value, 'contains');\n }\n\n public like (name: string, value: string) {\n return this.add(name, value, 'like');\n }\n\n public isnull (name: string) {\n return this.add(name, undefined, 'isnull');\n }\n\n public in (name: string, value: Array) {\n return this.add(name, value, 'in', true);\n }\n\n public notin (name: string, value: Array) {\n return this.add(name, value, 'notin', true);\n }\n\n\n public raw (filter: Filter) {\n const filters = Array.wrap(filter);\n for (const filter of filters) {\n if (this.isFilterPart(filter)) {\n this.filters.push(filter);\n } else {\n throw new SyntaxError(`Filter ${filter} has invalid syntax`);\n }\n }\n }\n\n /**\n * Check if given string is proper filter part\n */\n public isFilterPart (str: string) {\n return /^[a-zA-Z0-9.]{2,12}_(?:isnull$|(?:gt|lt|(?:after|before)(?:orequal)?|on|eq|contains|like|(?:not)?in)_)/.test( str);\n }\n\n /**\n * To string\n */\n public toString () {\n const parts: Array = [];\n\n let part: string,\n val: string;\n\n for (const filter of this.filters) {\n if (typeof filter === 'string') {\n part = filter;\n } else {\n val = '';\n if (filter.value.length > 1 || typeof filter.value[0] !== 'undefined') {\n val = `_${filter.value.join('|')}`;\n }\n part = `${filter.name}_${filter.operand}${val}`;\n }\n parts.push(part);\n }\n\n return parts.join(';');\n }\n}\n\n\nexport default FilterBuilder;\n","import APIEntity from './APIEntity'\nimport FilterBuilder from '../FilterBuilder'\n\n\n/**\n * Default limit\n *\n * @constant\n * @type {number}\n * @default\n */\nconst DEFAULT_LIMIT = 20;\n\n/**\n * Default offset\n *\n * @constant\n * @type {number}\n * @default\n */\nconst DEFAULT_OFFSET = 0;\n\n/**\n * API Order Enum\n */\nenum APIOrder {\n 'asc' = 'a',\n 'desc' = 'd'\n};\n\n\n/**\n * APIList\n *\n * @class\n * @extends APIEntity\n */\nclass APIList extends APIEntity {\n\n /**\n * Create\n * Shortcut for sending data POST\n *\n * @param {object} data\n */\n public create (data: object) {\n return this.post().data(data).send();\n }\n\n /**\n * Sets sorting\n *\n * @public\n * @param {string} name - Name of the column according to which the data will be sorted\n * @param {string} [order=a] - Sorting order. Possibilities: 'a', 'd'\n * @returns this\n */\n public sort (name: string, order: APIOrder = APIOrder.asc) {\n // if order not in ['a', 'd']\n // throw new Error(`Order '\\${order}' is invalid! Use 'a' for ascending or 'd' for descending.`);\n\n return this.params({\n sort: `${name}_${order}`\n });\n }\n\n /**\n * Sets limit\n *\n * @public\n * @param {number} [limit=DEFAULT_LIMIT] - Limit to be set\n * @returns this\n */\n public limit (limit = DEFAULT_LIMIT) {\n if (!Number.isNatural(limit)) {\n throw new Error(`Limit '${limit}' is invalid!`);\n }\n\n return this.params({\n limit\n });\n }\n\n /**\n * Gets limit\n *\n * @public\n * @returns number\n */\n public getLimit () {\n const params = this.getParams();\n return params.limit == null ? DEFAULT_LIMIT : params.limit;\n }\n\n /**\n * Disables limit\n *\n * @public\n * @returns this\n */\n public noLimit () {\n return this.limit(0);\n }\n\n /**\n * Sets offset\n *\n * @public\n * @param {number} [offset=DEFAULT_OFFSET] - Offset to be set\n * @returns this\n */\n public offset (offset: number = DEFAULT_OFFSET) {\n if (!Number.isNatural(offset)) {\n throw new Error(`Offset '${offset}' is invalid!`);\n }\n\n return this.params({\n offset\n });\n }\n\n /**\n * Sets limit and offset so that will request from BE records between range\n *\n * @public\n * @param {number} from - From index\n * @param {number} to - To index\n * @returns this\n */\n public between (from: number, to: number) {\n if (!Number.isNatural(from)) {\n throw new Error(`From '${from}' is invalid!`);\n }\n\n if (!Number.isNatural(to)) {\n throw new Error(`To '${to}' is invalid!`);\n }\n\n return this.params({\n offset: from,\n limit: 1 + (to - from)\n });\n }\n\n /**\n * Sets limit and offset so that will request from BE one record on given index\n *\n * @public\n * @param {number} idx - Index\n * @returns this\n */\n public only (idx: number) {\n if (!Number.isNatural(idx)) {\n throw new Error(`Index '${idx}' is invalid!`);\n }\n\n return this.params({\n offset: idx,\n limit: 1\n });\n }\n\n /**\n * Gets current limit and sets offset so that will request from BE one page of records\n *\n * @public\n * @param {number} [page=1] - Page number (counted from 1)\n * @returns this\n */\n public page (page = 1) {\n if (!Number.isNatural(page) || page == 0) {\n throw new Error(`Page '${page}' is invalid!`);\n }\n\n const limit = this.getLimit();\n const offset = (page - 1) * limit;\n\n return this.params({\n offset,\n limit\n });\n }\n\n /**\n * Sets search\n *\n * query param is working like SQL LIKE. BE sets wraps around query with %, and replaces every white character\n * with %. So e.g. if query='my device', then it's searching for '%my%device%' in DB.\n *\n * @public\n * @param {string} query - Query to search for\n * @returns this\n */\n public search (query: string) {\n if (typeof query !== 'string') {\n throw new Error('Search query must be a string!');\n }\n\n return this.params({\n search: query\n });\n }\n\n /**\n * Sets filter\n *\n * @public\n * @param {FilterBuilder|string} filter - Filter\n * @returns this\n */\n public filter (filter: FilterBuilder | string) {\n const isFilterBuilder = filter instanceof FilterBuilder;\n\n if (typeof filter !== 'string' && !isFilterBuilder) {\n throw new Error('Filter must be either string or instance of FilterBuilder');\n }\n\n if (isFilterBuilder) {\n filter = filter.toString();\n }\n\n return this.params({\n filter\n });\n }\n}\n\ninterface APIList {\n\n /**\n * Alias for 'noLimit'\n *\n * @public\n * @see noLimit\n * @returns this\n */\n all: typeof APIList.prototype.noLimit;\n\n /**\n * Alias for 'between'\n *\n * @public\n * @param {number} from - From idx\n * @param {number} to - To idx\n * @returns this\n */\n cut: typeof APIList.prototype.between;\n}\n\nAPIList.prototype.all = APIList.prototype.noLimit;\nAPIList.prototype.cut = APIList.prototype.between;\n\nexport default APIList;\n","import APIEntity from './APIEntity'\n\n\n/**\n * APIResource\n *\n * @class\n * @extends APIEntity\n */\nclass APIResource extends APIEntity {\n\n /**\n * Set DELETE as HTTP method\n *\n * @public\n * @returns this\n */\n public delete () {\n return this.method('DELETE');\n }\n}\n\n\ninterface APIResource {\n\n /**\n * Alias for 'post'\n *\n * @public\n * @see post\n * @returns this\n */\n update: typeof APIResource.prototype.post;\n}\n\n\nexport default APIResource\n","import APIList from './APIList'\nimport APIResource from './APIResource'\n\n\n/**\n * APIListDevices\n *\n * @class\n * @extends APIList\n */\nclass APIListDevices extends APIList {\n\n /**\n * /devices\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('devices');\n }\n\n // /devices/filters\n public filters () {\n return new APIResource(this).push('filters');\n }\n\n // /devices/cleanup-configurations\n public cleanupConfigurations () {\n return new APIList(this).push('cleanup-configurations');\n }\n\n /**\n * /devices/cleanup-configurations/{id}\n *\n * @param {number} id - Resource ID\n */\n public cleanupConfiguration (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('cleanup-configurations', id);\n }\n\n}\n\nexport default APIListDevices;\n","import APIList from './APIList'\nimport APIResource from './APIResource'\n\n\n/**\n * APIListDevices\n *\n * @class\n * @extends APIList\n */\nclass APIListUsers extends APIList {\n\n /**\n * /users\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('users');\n }\n\n // /users/activate\n public activate () {\n return new APIResource(this).push('activate');\n }\n\n // /users/recoveries\n public recoveries () {\n return new APIResource(this).push('recoveries');\n }\n\n // /users/passwordRecovery\n public passwordRecovery () {\n return new APIResource(this).push('password-recovery');\n }\n\n // /users/resetApiKey\n public resetApiKey () {\n return new APIResource(this).push('reset-api-key');\n }\n\n // /users/resetApiKey\n public validateVatId () {\n return new APIResource(this).push('validateVatId');\n }\n\n}\n\nexport default APIListUsers;\n","import APIResource from './APIResource'\n\n/**\n * APIResourceAdditionalUser\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceAdditionalUser extends APIResource {\n\n /**\n * /additional-users/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('additional-users', id);\n }\n\n // /account/resend-activation\n public resendActivation () {\n return new APIResource(this).push('resend-activation');\n }\n\n}\n\nexport default APIResourceAdditionalUser\n","import APIResource from './APIResource'\nimport APIResourceAdditionalUser from './APIResourceAdditionalUser';\n\nimport APIList from './APIList'\n\n/**\n * APIResourceAccount\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceAccount extends APIResource {\n\n /**\n * /account\n *\n * Constructor\n */\n constructor (parent: object, id?: number) {\n super(parent);\n if(id)\n this.push('accounts', id)\n else\n this.push('account');\n }\n\n // /accounts/{id}/preferences\n public preferences () {\n return new APIResource(this).push('preferences');\n }\n\n // /accounts/{id}/concurrency-status\n public concurrencyStatus () {\n return new APIResource(this).push('concurrency-status');\n }\n\n // /account/roles\n public roles () {\n return new APIList(this).push('roles');\n }\n\n // /account/roles/{id}\n public role (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('roles', id);\n }\n\n // /account/additional-users\n public additionalUsers () {\n return new APIList(this).push('additional-users');\n }\n\n // /account/additional-users/{id}\n public additionalUser (id: number) {\n return new APIResourceAdditionalUser(this, id);\n }\n\n}\n\nexport default APIResourceAccount\n","import APIResource from './APIResource'\n\n\n/**\n * APIResourceBillingPeriod\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceBillingPeriod extends APIResource {\n\n /**\n * /billing-periods/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('billing-periods', id);\n }\n\n // /billing-periods/{id}/receipt\n public receipt () {\n return new APIResource(this).push('receipt').setRequestConfig({\n responseType: 'arraybuffer'\n });\n }\n\n}\n\nexport default APIResourceBillingPeriod\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceBuild\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceBuild extends APIResource {\n\n /**\n * /builds/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('builds', id);\n }\n\n // /builds/{id}/abort\n public abort () {\n return new APIResource(this).push('abort');\n }\n\n // /builds/{id}/output-file-set/files\n public outputFiles () {\n return new APIList(this).push('output-file-set', 'files');\n }\n\n}\n\nexport default APIResourceBuild\n","import APIResource from './APIResource'\nimport APIResourceBuild from './APIResourceBuild'\n\nimport APIList from './APIList'\n\n\n/**\n * APIResourceFile\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceJob extends APIResource {\n\n /**\n * /jobs/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('jobs', id);\n }\n\n // /jobs/{id}/builds\n public builds () {\n return new APIList(this).push('builds');\n }\n\n // /jobs/{id}/builds/{id}\n public build (id: number) {\n return new APIResourceBuild(this, id);\n }\n\n}\n\nexport default APIResourceJob\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceBillingPeriod\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceDeviceGroup extends APIResource {\n\n /**\n * /device-groups/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('device-groups', id);\n }\n\n // /device-groups/{id}/devices\n public devices () {\n return new APIList(this).push('devices');\n }\n\n // /device-groups/{id}/device/{id}\n public device (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('devices', id);\n }\n\n // /device-groups/{id}/selectors\n public selectors () {\n return new APIList(this).push('selectors');\n }\n\n // /device-groups/{id}/selectors/{id}\n public selector (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('selectors', id);\n }\n\n}\n\nexport default APIResourceDeviceGroup\n","import APIResource from '../APIResource'\nimport APIList from '../APIList'\n\n/**\n * InputFileset\n *\n * @class\n * @extends APIResource\n */\nclass InputFileset extends APIResource {\n\n /**\n * /input-file-set\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('input-file-set');\n }\n\n // /input-file-set/files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /input-file-set/files.zip\n public filesZip () {\n return new APIResource(this).push('files.zip');\n }\n}\n\nexport default InputFileset\n","import APIResource from '../APIResource'\nimport APIList from '../APIList'\n\nimport FilterBuilder from '../../FilterBuilder'\n\n// Create non-media files filter\nconst NON_MEDIA_FILES_FILTER = new FilterBuilder();\nNON_MEDIA_FILES_FILTER.eq('state', 'READY');\nNON_MEDIA_FILES_FILTER.notin('mimetype', [\n // no images\n 'image/png', 'image/jpg', 'image/jpeg', 'image/webp', 'image/gif',\n\n // no videos\n 'video/mp4', 'video/avi', 'video/webm', 'video/ogg', 'video/mpeg'\n]);\n\n/**\n * OutputFileset\n *\n * @class\n * @extends APIResource\n */\nclass OutputFileset extends APIResource {\n\n /**\n * /output-file-set\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('output-file-set');\n }\n\n // /output-file-set/files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /output-file-set/files.zip\n public filesZip () {\n return new APIResource(this).push('files.zip');\n }\n\n // /output-file-set/screenshots\n public screenshots () {\n return new APIList(this).push('screenshots');\n }\n\n // /output-file-set/screenshots/{id}\n public screenshot (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('screenshots', id);\n }\n\n // /output-file-set/screenshots/{id}/file/{id}\n public screenshotFile (id: number) {\n this.screenshot(id).push('file');\n }\n\n // Filter files out by ready videos\n public videos () {\n this.files().params({\n filter: 's_state_eq_READY',\n tag: ['video']\n });\n }\n\n // Filter files out by non-media\n nonMediaFiles () {\n return this.files().filter(NON_MEDIA_FILES_FILTER);\n }\n\n}\n\nexport default OutputFileset\n","import APIResource from './APIResource'\nimport APIList from './APIList';\n\nimport InputFileset from './extra-class/InputFileset'\nimport OutputFileset from './extra-class/OutputFileset'\n\n\n/**\n * APIResourceDeviceSession\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceDeviceSession extends APIResource {\n\n /**\n * /device-sessions/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('device-sessions', id);\n }\n\n // /device-sessions/{id}/cluster-logs\n public clusterLogs () {\n return new APIResource(this).push('cluster-logs');\n }\n\n // /device-sessions/{id}/data-availability\n public dataAvailability () {\n return new APIResource(this).push('data-availability');\n }\n\n // /device-sessions/{id}/fixtures.zip\n public fixturesZip () {\n return new APIResource(this).push('fixtures.zip');\n }\n\n // /device-sessions/{id}/junit.xml\n public junitXml () {\n return new APIResource(this).push('junit.xml');\n }\n\n // /device-sessions/{id}/logs\n public logs () {\n return new APIResource(this).push('logs');\n }\n\n // /device-sessions/{id}/performance\n public performance () {\n return new APIResource(this).push('performance');\n }\n\n // /device-sessions/{id}/release\n public release () {\n return new APIResource(this).push('release');\n }\n\n // /device-sessions/{id}/result-data.zip\n public resultDataZip () {\n return new APIResource(this).push('result-data.zip');\n }\n\n // /device-sessions/{id}/screenshots\n public screenshots () {\n return new APIList(this).push('screenshots');\n }\n\n // /device-sessions/{id}/screenshots/{id}\n public screenshot (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('screenshots', id);\n }\n\n // /device-sessions/{id}/steps\n public steps () {\n return new APIList(this).push('steps');\n }\n\n // /device-sessions/{id}/steps/{id}\n public step (id: number | 'current') {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('steps', id);\n }\n\n // /device-sessions/{id}/steps/current\n public currentStep () {\n return this.step('current');\n }\n\n // /device-sessions/{id}/test-case-runs\n public testCaseRuns () {\n return new APIList(this).push('test-case-runs');\n }\n\n // /device-sessions/{id}/retry\n public retry () {\n return new APIResource(this).push('retry').post();\n }\n\n // /device-sessions/{id}/input-file-set\n public input () {\n return new InputFileset(this);\n }\n\n // /device-sessions/{id}/output-file-set\n public output () {\n return new OutputFileset(this);\n }\n\n // Alias for output().videos();\n public videos () {\n return this.output().videos();\n }\n\n // Live Testing Connections\n public connections () {\n return new APIList(this).push('connections');\n }\n\n}\n\nexport default APIResourceDeviceSession\n","import APIResource from './APIResource'\nimport APIResourceDeviceSession from './APIResourceDeviceSession'\n\nimport APIList from './APIList'\n\n\n/**\n * APIResourceRun\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceRun extends APIResource {\n\n /**\n * /runs/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('runs', id);\n }\n\n // /runs/{id}/config\n public config () {\n return new APIResource(this).push('config');\n }\n\n // /runs/{id}/device-sessions\n public deviceSessions () {\n return new APIList(this).push('device-sessions');\n }\n\n // /runs/{id}/device-sessions/{id}\n public deviceSession (id: number) {\n return new APIResourceDeviceSession(this, id);\n }\n\n // /runs/{id}/steps\n public steps () {\n return new APIList(this).push('steps');\n }\n\n // /runs/{id}/files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /runs/{id}/files.zip\n public filesZip () {\n return new APIResource(this).push('files.zip');\n }\n\n // /runs/{id}/tags\n public tags () {\n return new APIList(this).push('tags');\n }\n\n // /runs/{id}/tag\n public tag (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('tags', id);\n }\n\n}\n\nexport default APIResourceRun\n","import APIResource from './APIResource'\nimport APIResourceRun from './APIResourceRun'\n\nimport APIList from './APIList'\n\n\n/**\n * APIResourceFile\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceProject extends APIResource {\n\n /**\n * /projects/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('projects', id);\n }\n\n // /projects/{id}/runs\n public runs () {\n return new APIList(this).push('runs');\n }\n\n // /projects/{id}/runs/{id}\n public run (id: number) {\n return new APIResourceRun(this, id);\n }\n\n // /projects/{id}/runs-extended\n public runsExtended () {\n return new APIList(this).push('runs-extended');\n }\n\n // /projects/{id}/runs-extended/{id}\n public runExtended (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('runs-extended', id);\n }\n\n // /projects/{id}/files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /projects/{id}/files.zip\n public filesZip () {\n return new APIResource(this).push('files.zip');\n }\n\n // /projects/{id}/sharings\n public sharings () {\n return new APIList(this).push('sharings');\n }\n\n // /projects/{id}/sharings/{id}\n public sharing (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('sharings', id);\n }\n\n}\n\nexport default APIResourceProject\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceFile\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceFile extends APIResource {\n\n /**\n * /files/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('files', id);\n }\n\n // use this to download file content\n public file () {\n return new APIResource(this).push('file');\n }\n\n // /files/{id}/icon\n public icon () {\n return new APIResource(this).push('icon');\n }\n\n // /files/{id}/tags\n public tags () {\n return new APIList(this).push('tags');\n }\n\n}\n\nexport default APIResourceFile\n","import APIResource from './APIResource'\n\n\n/**\n * APIResourceNotification\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceNotification extends APIResource {\n\n /**\n * /notifications/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('notifications', id);\n }\n\n // /notifications/{id}/test\n public test () {\n return new APIResource(this).push('test');\n }\n\n}\n\nexport default APIResourceNotification\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceAccessGroup\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceAccessGroup extends APIResource {\n\n /**\n * /device-groups/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('access-groups', id);\n }\n\n // /access-groups/{id}/users\n public users () {\n return new APIList(this).push('users');\n }\n\n // /access-groups/{id}/users/{id}\n public user (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('users', id);\n }\n\n // /access-groups/{id}/resources\n public resources () {\n return new APIList(this).push('resources');\n }\n\n // /access-groups/{id}/resources/{id}\n public resource (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('resources', id);\n }\n\n}\n\nexport default APIResourceAccessGroup\n","import APIList from './APIList'\n\n\n/**\n * APIListDeviceTime\n *\n * @class\n * @extends APIList\n */\nclass APIListDeviceTime extends APIList {\n\n /**\n * /device-time\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('device-time');\n }\n\n // /device-time/reserved\n public reserved () {\n return new APIList(this).push('reserved');\n }\n\n // /device-time/used\n public used () {\n return new APIList(this).push('used');\n }\n\n}\n\nexport default APIListDeviceTime;\n","import APIList from './APIList'\n\ninterface UploadObj {\n /**\n * Directory\n */\n dir: string;\n\n /**\n * Filename\n */\n filename: string;\n}\n\n/**\n * APIListFiles\n *\n * @class\n * @extends APIList\n */\nclass APIListFiles extends APIList {\n\n // Constructor\n constructor (parent: object) {\n super(parent);\n this.push('files');\n }\n\n // Siplifies process of uploading\n public upload (obj: UploadObj) {\n let form;\n\n // For NodeJS\n // @ts-ignore\n if (global.isNodeJs) {\n // @ts-ignore\n const fs = require('fs');\n // @ts-ignore\n const FormData = require('form-data');\n\n form = new FormData();\n form.append('file', fs.createReadStream(obj.dir + '/' + obj.filename), {\n filename: obj.filename\n });\n\n /**\n * Browser\n * @todo\n */\n } else {\n throw new Error('Not supported yet!');\n }\n\n this.post().headers(form.getHeaders()).data(form);\n }\n\n}\n\nexport default APIListFiles\n","import APIList from './APIList'\n\n\n/**\n * APIListPurchased\n *\n * @class\n * @extends APIList\n */\nclass APIListPurchased extends APIList {\n\n /**\n * /purchased\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('purchased');\n }\n\n}\n\nexport default APIListPurchased\n","import APIList from './APIList'\nimport APIListPurchased from './APIListPurchased'\n\n\n/**\n * APIListServices\n *\n * @class\n * @extends APIList\n */\nclass APIListServices extends APIList {\n\n // Constructor\n constructor (parent: object) {\n super(parent);\n this.push('services');\n }\n\n // /services/purchased\n public purchased () {\n return new APIListPurchased(this);\n }\n\n // /services/available\n public available () {\n return new APIList(this).push('available');\n }\n\n public active () {\n const a = new APIList(this);\n if (this.stack[0] === 'me') {\n a.push('active');\n } else {\n a.params({\n notArchived: true\n });\n }\n return a;\n }\n\n}\n\nexport default APIListServices\n","import APIList from './APIList'\nimport APIResource from './APIResource'\n\n\n/**\n * APIListRuns\n *\n * @class\n * @extends APIList\n */\nclass APIListRuns extends APIList {\n\n /**\n * /runs\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('runs');\n }\n\n // /runs/config\n public config () {\n return new APIResource(this).push('config');\n }\n\n}\n\nexport default APIListRuns\n","import APIList from './APIList'\n\n\n/**\n * APIListNotifications\n *\n * @class\n * @extends APIList\n */\nclass APIListNotifications extends APIList {\n\n /**\n * /notifications\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('notifications');\n }\n\n // /notifications/scopes\n public scopes () {\n return new APIList(this).push('scopes');\n }\n\n // /notifications/channels\n public channels () {\n return new APIList(this).push('channels');\n }\n\n}\n\nexport default APIListNotifications\n","import APIResource from './APIResource'\n\n/**\n * APIResourceAccountService\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceAccountService extends APIResource {\n\n /**\n * /account-services/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('account-services', id);\n }\n\n // /account-services/{id}/activate\n public activate () {\n return new APIResource(this).push('activate');\n }\n\n // /account-services/{id}/deactivate\n public deactivate () {\n return new APIResource(this).push('deactivate');\n }\n\n // /account-services/{id}/billing-period\n public billingPeriod () {\n return new APIResource(this).push('billing-period');\n }\n\n}\n\nexport default APIResourceAccountService\n","import APIResource from './APIResource'\nimport APIResourceAccount from './APIResourceAccount';\nimport APIResourceBillingPeriod from './APIResourceBillingPeriod'\nimport APIResourceJob from './APIResourceJob'\nimport APIResourceDeviceGroup from './APIResourceDeviceGroup'\nimport APIResourceDeviceSession from './APIResourceDeviceSession'\nimport APIResourceProject from './APIResourceProject'\nimport APIResourceFile from './APIResourceFile'\nimport APIResourceNotification from './APIResourceNotification'\nimport APIResourceAccessGroup from './APIResourceAccessGroup'\n\nimport APIList from './APIList'\nimport APIListDeviceTime from './APIListDeviceTime'\nimport APIListFiles from './APIListFiles'\nimport APIListServices from './APIListServices'\nimport APIListRuns from './APIListRuns'\nimport APIListNotifications from './APIListNotifications'\nimport APIResourceAccountService from './APIResourceAccountService';\n\n\n/**\n * APIResourceUser\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceUser extends APIResource {\n\n /**\n * /users/{id} | /me\n *\n * Constructor\n */\n constructor (parent: object, id: number | 'me') {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n\n if (id === 'me') {\n this.push('me');\n } else if (typeof id === 'number') {\n this.push('users', id);\n } else {\n throw new TypeError('id is not a number');\n }\n }\n\n // /users/{id}/account\n public account () {\n return new APIResourceAccount(this);\n }\n\n // /users/{id}/device-time\n public deviceTime () {\n return new APIListDeviceTime(this);\n }\n\n // /users/{id}/device-time-summary\n public deviceTimeSummary () {\n return new APIList(this).push('device-time-summary');\n }\n\n // /users/{id}/services\n public services () {\n return new APIListServices(this);\n }\n\n // /users/{id}/services/{id}\n public service (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('services', id);\n }\n\n // /users/{id}/account-services\n public accountServices () {\n return new APIList(this).push('account-services');\n }\n\n // /users/{id}/account-services/{id}\n public accountService (id: number) {\n return new APIResourceAccountService(this, id);\n }\n\n // /users/{id}/billing-periods\n public billingPeriods () {\n return new APIList(this).push('billing-periods');\n }\n\n // /users/{id}/billing-periods/{id}\n public billingPeriod (id: number) {\n return new APIResourceBillingPeriod(this, id);\n }\n\n // /users/{id}/jobs\n public jobs () {\n return new APIList(this).push('jobs');\n }\n\n // /users/{id}/jobs/{id}\n public job (id: number) {\n return new APIResourceJob(this, id);\n }\n\n // /users/{id}/device-groups\n public deviceGroups () {\n return new APIList(this).push('device-groups');\n }\n\n // /users/{id}/device-groups/{id}\n public deviceGroup (id: number) {\n return new APIResourceDeviceGroup(this, id);\n }\n\n // /users/{id}/device-sessions\n public deviceSessions () {\n return new APIList(this).push('device-sessions');\n }\n\n // /users/{id}/device-sessions/{id}\n public deviceSession (id: number) {\n return new APIResourceDeviceSession(this, id);\n }\n\n // /users/{id}/projects\n public projects () {\n return new APIList(this).push('projects');\n }\n\n // /users/{id}/projects/{id}\n public project (id: number) {\n return new APIResourceProject(this, id);\n }\n\n // /users/{id}/files\n public files () {\n return new APIListFiles(this);\n }\n\n // /users/{id}/files/{id}\n public file (id: number) {\n return new APIResourceFile(this, id);\n }\n\n // /users/{id}/runs\n public runs () {\n return new APIListRuns(this);\n }\n\n // /users/{id}/available-build-executors\n public availableBuildExecutors () {\n return new APIList(this).push('available-build-executors');\n }\n\n // /users/{id}/available-frameworks\n public availableFrameworks () {\n return new APIList(this).push('available-frameworks');\n }\n\n /**\n * /users/{id}/\n * /users/{id}/reset-api-key\n */\n public resetApiKey () {\n return new APIResource(this).push('reset-api-key');\n }\n\n // /users/{id}/restore\n public restore () {\n return new APIResource(this).push('restore');\n }\n\n // /users/{id}/account/additional-users\n public accountAdditionalUsers () {\n return new APIList(this) .push('account', 'additional-users');\n }\n\n // /users/{id}/account/additional-users/{id}\n public accountAdditionalUser (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('account', 'additional-users', id);\n }\n\n // /users/{id}/feedback\n public feedback () {\n return new APIResource(this).push('feedback');\n }\n\n // /users/{id}/notifications\n public notifications () {\n return new APIListNotifications(this);\n }\n\n // /users/{id}/notifications/{id}\n public notification (id: number) {\n return new APIResourceNotification(this, id);\n }\n\n // /users/{id}/receipts\n public receipts () {\n return new APIList(this).push('receipts');\n }\n\n // /users/{id}/preferences\n public preferences () {\n return new APIResource(this).push('preferences');\n }\n\n // /users/{id}/ui-preferences\n public uiPreferences () {\n return new APIResource(this).push('ui-preferences');\n }\n\n // /users/{id}/integrations\n public integrations () {\n return new APIList(this).push('integrations');\n }\n\n // /users/{id}/integrations/{id}\n public integration (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('integrations', id);\n }\n\n // /users/{id}/device-usage\n public deviceUsage () {\n return new APIList(this).push('device-usage');\n }\n\n // /users/{id}/statistics\n public statistics () {\n return new APIList(this).push('statistics');\n }\n\n // /users/{id}/statistics\n public deviceStatistics () {\n return new APIList(this).push('device-statistics');\n }\n\n // /users/{id}/access-groups\n public accessGroups () {\n return new APIList(this).push('access-groups');\n }\n\n // /users/{id}/access-groups/{id}\n public accessGroup (id: number) {\n return new APIResourceAccessGroup(this, id);\n }\n\n}\n\nexport default APIResourceUser\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceDevice\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceDevice extends APIResource {\n\n /**\n * /devices/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('devices', id);\n }\n\n // /devices/{id}/properties\n public properties () {\n return new APIList(this).push('properties');\n }\n\n}\n\nexport default APIResourceDevice\n","import APIResource from './APIResource'\n\n\n/**\n * APIResourceUserSession\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceUserSession extends APIResource {\n\n // Constructor\n // /user-sessions\n constructor (parent: object) {\n super(parent);\n this.push('user-sessions');\n }\n\n // /user-sessions/login\n public login (data: object) {\n return new APIResource(this).push('login').post().data(data);\n }\n\n // /user-sessions/logout\n public logout () {\n return new APIResource(this).push('logout').post();\n }\n\n // /user-sessions/{name}-login\n public sso (name: string) {\n return new APIResource(this).push(name + '-login');\n }\n\n // /user-sessions/portal-login\n public portalLogin () {\n return new APIResource(this).push('portal-login').post();\n }\n\n}\n\nexport default APIResourceUserSession\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIAdminResourceCluster\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResourceCluster extends APIResource {\n\n /**\n * /clusters/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('clusters', id);\n }\n\n // /clusters/{id}/devices\n public devices () {\n return new APIList(this).push('devices');\n }\n\n}\n\nexport default APIAdminResourceCluster\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIAdminResourceDeviceTime\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResourceDeviceTime extends APIResource {\n\n /**\n * /device-time\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('device-time');\n }\n\n // /device-time/count-session-report\n public countSessionReport () {\n return new APIList(this).push('count-session-report');\n }\n\n // /device-time/step-time-report\n public stepTimeReport () {\n return new APIList(this).push('step-time-report');\n }\n\n}\n\nexport default APIAdminResourceDeviceTime\n","import APIList from './APIList'\nimport APIResource from './APIResource'\nimport APIResourceRun from './APIResourceRun'\n\n\n/**\n * APIAdminResourceRun\n *\n * @class\n * @extends APIResourceRun\n */\nclass APIAdminResourceRun extends APIResourceRun {\n\n // /runs/{id}/abort\n public abort () {\n return new APIResource(this).push('abort').post();\n }\n\n // /runs/{id}/retry\n public retry (ids?: Array) {\n const a = new APIResource(this).push('retry').setRequestConfig({\n timeout: 0\n }).post();\n\n if (ids != null) {\n a.params({\n deviceRunIds: ids\n });\n }\n\n return a;\n }\n\n // /runs/{id}/changebillable\n public changeBillable () {\n return new APIResource(this).push('changebillable');\n }\n\n // /runs/{id}/changepriority\n public changePriority () {\n return new APIResource(this).push('changepriority');\n }\n\n // /runs/{id}/screenshot-names\n public screenshotNames () {\n return new APIList(this).push('screenshot-names');\n }\n\n // /runs/{id}/screenshots\n public screenshots () {\n return new APIList(this).push('screenshots');\n }\n\n // /runs/{id}/data-availability\n public dataAvailability () {\n return new APIList(this).push('data-availability');\n }\n\n // /runs/{id}/build-logs.zip\n public buildLogsZip (ids?: Array) {\n const a = new APIResource(this).push('build-logs.zip');\n\n if (ids != null) {\n a.params({\n deviceRunIds: ids\n });\n }\n\n return a;\n }\n\n // /runs/{id}/logs.zip\n public logsZip () {\n return new APIResource(this).push('logs.zip');\n }\n\n // /runs/{id}/performance.zip\n public performanceZip () {\n return new APIResource(this).push('performance.zip');\n }\n\n // /runs/{id}/screenshots.zip\n public screenshotsZip () {\n return new APIResource(this).push('screenshots.zip');\n }\n\n}\n\nexport default APIAdminResourceRun\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIAdminResourceDevice\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResourceDevice extends APIResource {\n\n /**\n * /admin/devices/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('admin');\n this.push('devices', id);\n }\n\n // /admin/devices/{id}/queue\n public queue () {\n return new APIList(this).push('queue');\n }\n\n}\n\nexport default APIAdminResourceDevice\n","import APIResource from './APIResource'\nimport APIList from './APIList';\n\nimport InputFileset from './extra-class/InputFileset';\nimport OutputFileset from './extra-class/OutputFileset';\n\n\n/**\n * APIAdminResourceDevice\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResourceDeviceSession extends APIResource {\n\n /**\n * /device-sessions/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('device-sessions', id);\n }\n\n // /admin/device-sessions/{id}/changebillable\n public changeBillable () {\n const a = new APIResource(this);\n a.stack.splice(a.stack.length - 2, 0, 'admin');\n return a.push('changebillable').post();\n }\n\n // /device-sessions/{id}/connections\n public connections () {\n return new APIList(this).push('connections');\n }\n\n // /device-sessions/{id}/connections/{id}\n public connection (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('connections', id);\n }\n\n // /device-sessions/{id}/output-file-set\n public input () {\n return new InputFileset(this);\n }\n\n // /device-sessions/{id}/output-file-set\n public output () {\n return new OutputFileset(this);\n }\n\n // /device-sessions/{id}/release\n public release () {\n return new APIResource(this).push('release').post();\n }\n\n // /device-sessions/{id}/screenshots\n public screenshots () {\n return new APIList(this).push('screenshots');\n }\n\n // /device-sessions/{id}/screenshots/{id}\n public screenshot (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('screenshots', id);\n }\n\n // /device-sessions/{id}/steps\n public steps () {\n return new APIList(this).push('steps');\n }\n\n // /device-sessions/{id}/steps/{id}\n public step (id: number | 'current') {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('steps', id);\n }\n\n // /device-sessions/{id}/steps/current\n public currentStep () {\n return this.step('current');\n }\n\n // /device-sessions/{id}/test-case-runs\n public testCaseRuns () {\n return new APIList(this).push('test-case-runs');\n }\n\n}\n\nexport default APIAdminResourceDeviceSession\n","import APIList from './APIList'\n\nimport APIResource from './APIResource'\nimport APIResourceFile from './APIResourceFile'\n\nimport APIAdminResourceCluster from './APIAdminResourceCluster';\nimport APIAdminResourceDeviceTime from './APIAdminResourceDeviceTime';\nimport APIAdminResourceRun from './APIAdminResourceRun';\nimport APIAdminResourceDevice from './APIAdminResourceDevice';\nimport APIAdminResourceDeviceSession from './APIAdminResourceDeviceSession';\nimport APIResourceProject from './APIResourceProject';\nimport APIResourceAccessGroup from './APIResourceAccessGroup';\n\n\n/**\n * APIAdminResource\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResource extends APIResource {\n\n /**\n * /admin\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n }\n\n private withAdmin () {\n return new APIResource(this).push('admin');\n }\n\n // /clusters\n public clusters () {\n return new APIList(this).push('clusters');\n }\n\n // /clusters/{id}\n public cluster (id: number) {\n return new APIAdminResourceCluster(this, id);\n }\n\n // /admin/devices\n public devices () {\n return new APIList(this).push('admin', 'devices');\n }\n\n // /admin/devices/{id}\n public device (id: number) {\n return new APIAdminResourceDevice(this, id);\n }\n\n // /admin/device-models\n public deviceModels () {\n return new APIList(this).push('admin', 'device-models');\n }\n\n // /admin/device-models/{id}\n public deviceModel (id: number) {\n return new APIResource(this).push('admin', 'device-models', id);\n }\n\n // /device-sessions\n public deviceSessions () {\n return new APIList(this).push('admin', 'device-sessions');\n }\n\n // /device-sessions/{id}\n public deviceSession (id: number) {\n return new APIAdminResourceDeviceSession(this, id);\n }\n\n // /device-status\n public deviceStatuses () {\n return new APIList(this).push('device-status');\n }\n\n // /device-time\n public deviceTime () {\n return new APIAdminResourceDeviceTime(this.withAdmin());\n }\n\n // /admin/interactive-queue\n public interactiveQueue () {\n return new APIList(this).push('admin', 'interactive-queue');\n }\n\n // /files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /files/{id}\n public file (id: number) {\n return new APIResourceFile(this, id);\n }\n\n // /admin/overview\n public overview () {\n return new APIResource(this).push('admin', 'overview');\n }\n\n // /projects\n public projects () {\n return new APIList(this).push('projects');\n }\n\n // /projects/{id}\n public project (id: number) {\n return new APIResourceProject(this, id);\n }\n\n // /runs\n public runs () {\n return new APIList(this).push('admin', 'runs');\n }\n\n // /runs/{id}\n public run (id: number) {\n return new APIAdminResourceRun(this, id);\n }\n\n // /users\n public users () {\n return new APIList(this).push('users');\n }\n\n // /access-groups\n public accessGroups () {\n return new APIList(this).push('access-groups');\n }\n\n // /access-groups/{id}\n public accessGroup (id: number) {\n return new APIResourceAccessGroup(this, id);\n }\n\n}\n\nexport default APIAdminResource\n","import './finka';\nimport ApiConfig from './ApiConfig';\n\nimport axios, { AxiosInstance } from 'axios';\n\n// @ts-ignore\nimport { version } from '../package.json';\n\nimport APIList from './api/APIList';\nimport APIListDevices from './api/APIListDevices';\nimport APIListUsers from './api/APIListUsers';\n\nimport APIResourceUser from './api/APIResourceUser';\nimport APIResourceDevice from './api/APIResourceDevice';\nimport APIResourceDeviceGroup from './api/APIResourceDeviceGroup';\nimport APIResourceUserSession from './api/APIResourceUserSession';\n\nimport APIAdminResource from './api/APIAdminResource';\nimport APIResourceAccount from \"./api/APIResourceAccount\";\n\n// @ts-ignore\nif (global.isNodeJs) {\n // Set User-Agent\n axios.defaults.headers.common['User-Agent'] = `Bitbar Cloud API Client for JavaScript v${version}`;\n}\n\n// Disable max content length\naxios.defaults.maxContentLength = 1073741824; // 1GB\n\n\n/**\n * API\n * Root for other API resources\n */\nclass API {\n\n // Main config\n private config: ApiConfig;\n\n // axios config\n private axiosConfig: ApiConfig;\n\n // axios instance\n public axios: AxiosInstance;\n\n\n constructor (config: ApiConfig) {\n if (config == null) {\n throw new Error('config cannot be empty');\n }\n\n this.config = config;\n this.axiosConfig = {};\n\n if (this.config.cloudUrl == null) {\n throw new TypeError('cloudUrl cannot be empty');\n } else if (typeof this.config.cloudUrl !== 'string') {\n throw new TypeError('cloudUrl must be a string');\n } else if (!/^https?:\\/\\/.{2,}/.test(this.config.cloudUrl)) {\n throw new Error(\"cloudUrl doesn't look like a URL\");\n }\n\n // Validate and correct cloudUrl if needed\n this.axiosConfig.baseURL = this.config.cloudUrl.replace(/\\/+$/, '') + '/api'\n\n // Check v2\n this.config.v2 = !!this.config.v2;\n if (this.config.v2) {\n this.axiosConfig.baseURL += '/v2';\n }\n\n // Check if apiKey is set\n if (this.config.apiKey) {\n if (typeof this.config.apiKey !== 'string') {\n throw new TypeError('apiKey must be a string');\n } else if (!/^[A-Za-z0-9]{32}$/.test(this.config.apiKey)) {\n throw new Error(\"apiKey is in the wrong format\");\n }\n\n this.axiosConfig.auth = {\n username: this.config.apiKey,\n password: ''\n };\n }\n\n // Create axios instance\n this.axios = axios.create(this.axiosConfig);\n }\n\n\n // --- Resources starts here --- //\n\n // /user-sessions\n public userSession () {\n return new APIResourceUserSession(this);\n }\n\n // /user/{id}\n public user (id: number | 'me') {\n return new APIResourceUser(this, id);\n }\n\n // /users\n public users () {\n return new APIListUsers(this);\n }\n\n // /me\n public me () {\n return this.user('me');\n }\n\n // /admin\n public admin () {\n return new APIAdminResource(this);\n }\n\n // /devices\n public devices () {\n return new APIListDevices(this);\n }\n\n // /devices/{id}\n public device (id: number) {\n return new APIResourceDevice(this, id);\n }\n\n // /device-groups\n public deviceGroups () {\n return new APIList(this).push('device-groups');\n }\n\n // /device-groups/{id}\n public deviceGroup (id: number) {\n return new APIResourceDeviceGroup(this, id);\n }\n\n // /label-groups\n public labelGroups () {\n return new APIList(this).push('label-groups');\n }\n\n // /device-statistics\n public deviceStatistics () {\n return new APIList(this).push('device-statistics');\n }\n\n // /accounts/{id}\n public account (id: number) {\n return new APIResourceAccount(this, id)\n }\n\n}\n\n\nexport default API;\n","import API from './API';\nimport FilterBuilder from './FilterBuilder';\n\n/**\n * Cloud API Client\n */\nconst CloudAPIClient = {\n API,\n FilterBuilder\n}\n\nexport default CloudAPIClient;\n"],"names":[],"mappings":";;;;;;;;;;;EAGA,KAAK,EAAE;;;;ECQP,IAAK,oBAIJ;EAJD,WAAK,oBAAoB;MACvB,mCAAW,CAAA;MACX,qCAAa,CAAA;MACb,yCAAiB,CAAA;EACnB,CAAC,EAJI,oBAAoB,KAApB,oBAAoB,QAIxB;AAAA,EASD,MAAM,SA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AC,CAAA;OACxC;GAEF;;EClJD,MAAM,cAAc,GAAG;MACrB,GAAG;MACH,aAAa;GACd,CAAA;;;;;;;;"} \ No newline at end of file diff --git a/dist/bitbar-cloud-api-client.min.js b/dist/bitbar-cloud-api-client.min.js index be872ad8..4d99ce47 100644 --- a/dist/bitbar-cloud-api-client.min.js +++ b/dist/bitbar-cloud-api-client.min.js @@ -1,3 +1,3 @@ -/* @bitbar/cloud-api-client v0.23.0 | Copyright 2020 (c) SmartBear Software and contributors | .git/blob/master/LICENSE */ -!function(e,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s(require("@bitbar/finka"),require("axios"),require("qs")):"function"==typeof define&&define.amd?define(["@bitbar/finka","axios","qs"],s):(e=e||self)["bitbar-cloud-api-client"]=s(e["@bitbar/finka"],e.axios,e.qs)}(this,(function(e,s,t){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e,s=s&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s,t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,e();var r;!function(e){e.GET="GET",e.POST="POST",e.DELETE="DELETE"}(r||(r={}));class n{constructor(e){this.stack=[],this.requestConfig={},e instanceof n?(this.root=e.root,Array.isArray(e.stack)&&this.push(...e.stack),null!=e.requestConfig&&this.setRequestConfig(e.requestConfig)):this.root=e}push(...e){for(const s of e)this.stack.push(s);return this}pop(){return this.stack.pop(),this}toUrl(e=!1){let s="/"+this.stack.join("/");return e&&(s=this.root.axiosConfig.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(!r[s])throw new Error(`Method '${s}' is not allowed! You can use: ${Object.keys(r).join(", ")}`);return this.setRequestConfig({method:s})}get(){return this.method("GET")}post(){return this.method("POST")}params(e){return Object.deepAssign(this.requestConfig,{params:e}),this}getParams(){return null==this.requestConfig.params?{}:this.requestConfig.params}removeParam(e){return delete this.requestConfig.params[e],this}data(e){return Object.deepAssign(this.requestConfig,{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}paramsSerializer(e){return t.stringify(e,{arrayFormat:"brackets"})}send(){const e=Object.deepAssign({},this.requestConfig,{url:"/"+this.stack.join("/")});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=t.stringify(e.data)),e.params&&(e.paramsSerializer=this.paramsSerializer),this.root.axios.request(e)}}class i{constructor(e,s,t){this.name=e,this.value=s,this.operand=t}}class u{constructor(){this.filters=[]}add(e,s,t,r=!1){if(0===(s=Array.wrap(s)).length)return this;for(let e=0;e1||void 0!==r.value[0])&&(t="_"+r.value.join("|")),s=`${r.name}_${r.operand}${t}`),e.push(s);return e.join(";")}}var o;!function(e){e.asc="a",e.desc="d"}(o||(o={}));class h extends n{create(e){return this.post().data(e).send()}sort(e,s=o.asc){return this.params({sort:`${e}_${s}`})}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){const s=e instanceof u;if("string"!=typeof e&&!s)throw new Error("Filter must be either string or instance of FilterBuilder");return s&&(e=e.toString()),this.params({filter:e})}}h.prototype.all=h.prototype.noLimit,h.prototype.cut=h.prototype.between;class a extends n{delete(){return this.method("DELETE")}}class c extends h{constructor(e){super(e),this.push("devices")}filters(){return new a(this).push("filters")}cleanupConfigurations(){return new h(this).push("cleanup-configurations")}cleanupConfiguration(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("cleanup-configurations",e)}}class l extends h{constructor(e){super(e),this.push("users")}activate(){return new a(this).push("activate")}recoveries(){return new a(this).push("recoveries")}passwordRecovery(){return new a(this).push("password-recovery")}resetApiKey(){return new a(this).push("reset-api-key")}validateVatId(){return new a(this).push("validateVatId")}}class p extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("additional-users",s)}resendActivation(){return new a(this).push("resend-activation")}}class w extends a{constructor(e,s){super(e),s?this.push("accounts",s):this.push("account")}preferences(){return new a(this).push("preferences")}concurrencyStatus(){return new a(this).push("concurrency-status")}roles(){return new h(this).push("roles")}role(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("roles",e)}additionalUsers(){return new h(this).push("additional-users")}additionalUser(e){return new p(this,e)}}class d extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("billing-periods",s)}receipt(){return new a(this).push("receipt").setRequestConfig({responseType:"arraybuffer"})}}class f extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("builds",s)}abort(){return new a(this).push("abort")}outputFiles(){return new h(this).push("output-file-set","files")}}class g extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("jobs",s)}builds(){return new h(this).push("builds")}build(e){return new f(this,e)}}class m extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-groups",s)}devices(){return new h(this).push("devices")}device(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("devices",e)}selectors(){return new h(this).push("selectors")}selector(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("selectors",e)}}class b extends a{constructor(e){super(e),this.push("input-file-set")}files(){return new h(this).push("files")}filesZip(){return new a(this).push("files.zip")}}const v=new u;v.eq("state","READY"),v.notin("mimetype",["image/png","image/jpg","image/jpeg","image/webp","image/gif","video/mp4","video/avi","video/webm","video/ogg","video/mpeg"]);class y extends a{constructor(e){super(e),this.push("output-file-set")}files(){return new h(this).push("files")}filesZip(){return new a(this).push("files.zip")}screenshots(){return new h(this).push("screenshots")}screenshot(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("screenshots",e)}screenshotFile(e){this.screenshot(e).push("file")}videos(){this.files().params({filter:"s_state_eq_READY",tag:["video"]})}nonMediaFiles(){return this.files().filter(v)}}class E extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-sessions",s)}clusterLogs(){return new a(this).push("cluster-logs")}dataAvailability(){return new a(this).push("data-availability")}fixturesZip(){return new a(this).push("fixtures.zip")}junitXml(){return new a(this).push("junit.xml")}logs(){return new a(this).push("logs")}performance(){return new a(this).push("performance")}release(){return new a(this).push("release")}resultDataZip(){return new a(this).push("result-data.zip")}screenshots(){return new h(this).push("screenshots")}screenshot(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("screenshots",e)}steps(){return new h(this).push("steps")}step(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("steps",e)}currentStep(){return this.step("current")}testCaseRuns(){return new h(this).push("test-case-runs")}retry(){return new a(this).push("retry").post()}input(){return new b(this)}output(){return new y(this)}videos(){return this.output().videos()}connections(){return new h(this).push("connections")}}class x extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("runs",s)}config(){return new a(this).push("config")}deviceSessions(){return new h(this).push("device-sessions")}deviceSession(e){return new E(this,e)}steps(){return new h(this).push("steps")}files(){return new h(this).push("files")}filesZip(){return new a(this).push("files.zip")}tags(){return new h(this).push("tags")}tag(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("tags",e)}}class R extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("projects",s)}runs(){return new h(this).push("runs")}run(e){return new x(this,e)}runsExtended(){return new h(this).push("runs-extended")}runExtended(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("runs-extended",e)}files(){return new h(this).push("files")}filesZip(){return new a(this).push("files.zip")}sharings(){return new h(this).push("sharings")}sharing(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("sharings",e)}}class D extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("files",s)}file(){return new a(this).push("file")}icon(){return new a(this).push("icon")}tags(){return new h(this).push("tags")}}class I extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("notifications",s)}test(){return new a(this).push("test")}}class q extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("access-groups",s)}users(){return new h(this).push("users")}user(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("users",e)}resources(){return new h(this).push("resources")}resource(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("resources",e)}}class C extends h{constructor(e){super(e),this.push("device-time")}reserved(){return new h(this).push("reserved")}used(){return new h(this).push("used")}}class j extends h{constructor(e){super(e),this.push("files")}upload(e){let s;if(!global.isNodeJs)throw new Error("Not supported yet!");{const t=require("fs");s=new(require("form-data")),s.append("file",t.createReadStream(e.dir+"/"+e.filename),{filename:e.filename})}this.post().headers(s.getHeaders()).data(s)}}class S extends h{constructor(e){super(e),this.push("purchased")}}class T extends h{constructor(e){super(e),this.push("services")}purchased(){return new S(this)}available(){this.push("available")}}class k extends h{constructor(e){super(e),this.push("runs")}config(){return new a(this).push("config")}}class A extends h{constructor(e){super(e),this.push("notifications")}scopes(){return new h(this).push("scopes")}channels(){return new h(this).push("channels")}}class U extends a{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)}}account(){return new w(this)}deviceTime(){return new C(this)}deviceTimeSummary(){return new h(this).push("device-time-summary")}services(){return new T(this)}service(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("services",e)}accountServiceBillingPeriod(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("account-services",e,"billing-period")}billingPeriods(){return new h(this).push("billing-periods")}billingPeriod(e){return new d(this,e)}jobs(){return new h(this).push("jobs")}job(e){return new g(this,e)}deviceGroups(){return new h(this).push("device-groups")}deviceGroup(e){return new m(this,e)}deviceSessions(){return new h(this).push("device-sessions")}deviceSession(e){return new E(this,e)}projects(){return new h(this).push("projects")}project(e){return new R(this,e)}files(){return new j(this)}file(e){return new D(this,e)}runs(){return new k(this)}availableBuildExecutors(){return new h(this).push("available-build-executors")}availableFrameworks(){return new h(this).push("available-frameworks")}resetApiKey(){return new a(this).push("reset-api-key")}restore(){return new a(this).push("restore")}accountAdditionalUsers(){return new h(this).push("account","additional-users")}accountAdditionalUser(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("account","additional-users",e)}feedback(){return new a(this).push("feedback")}notifications(){return new A(this)}notification(e){return new I(this,e)}receipts(){return new h(this).push("receipts")}preferences(){return new a(this).push("preferences")}uiPreferences(){return new a(this).push("ui-preferences")}integrations(){return new h(this).push("integrations")}integration(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("integrations",e)}deviceUsage(){return new h(this).push("device-usage")}statistics(){return new h(this).push("statistics")}deviceStatistics(){return new h(this).push("device-statistics")}accessGroups(){return new h(this).push("access-groups")}accessGroup(e){return new q(this,e)}}class P extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("devices",s)}properties(){return new h(this).push("properties")}}class L extends a{constructor(e){super(e),this.push("user-sessions")}login(e){return new a(this).push("login").post().data(e)}logout(){return new a(this).push("logout").post()}sso(e){return new a(this).push(e+"-login")}portalLogin(){return new a(this).push("portal-login").post()}}class $ extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("clusters",s)}devices(){return new h(this).push("devices")}}class z extends a{constructor(e){super(e),this.push("device-time")}countSessionReport(){return new h(this).push("count-session-report")}stepTimeReport(){return new h(this).push("step-time-report")}}class N extends x{abort(){return new a(this).push("abort").post()}retry(e){const s=new a(this).push("retry").setRequestConfig({timeout:0}).post();return null!=e&&s.params({deviceRunIds:e}),s}changeBillable(){return new a(this).push("changebillable")}changePriority(){return new a(this).push("changepriority")}screenshotNames(){return new h(this).push("screenshot-names")}screenshots(){return new h(this).push("screenshots")}dataAvailability(){return new h(this).push("data-availability")}buildLogsZip(e){const s=new a(this).push("build-logs.zip");return null!=e&&s.params({deviceRunIds:e}),s}logsZip(){return new a(this).push("logs.zip")}performanceZip(){return new a(this).push("performance.zip")}screenshotsZip(){return new a(this).push("screenshots.zip")}}class O extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin"),this.push("devices",s)}queue(){return new h(this).push("queue")}}class F extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-sessions",s)}changeBillable(){const e=new a(this);return e.stack.splice(e.stack.length-2,0,"admin"),e.push("changebillable").post()}connections(){return new h(this).push("connections")}connection(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("connections",e)}input(){return new b(this)}output(){return new y(this)}release(){return new a(this).push("release").post()}screenshots(){return new h(this).push("screenshots")}screenshot(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("screenshots",e)}steps(){return new h(this).push("steps")}step(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("steps",e)}currentStep(){return this.step("current")}testCaseRuns(){return new h(this).push("test-case-runs")}}class G extends a{constructor(e){super(e)}withAdmin(){return new a(this).push("admin")}clusters(){return new h(this).push("clusters")}cluster(e){return new $(this,e)}devices(){return new h(this).push("admin","devices")}device(e){return new O(this,e)}deviceModels(){return new h(this).push("admin","device-models")}deviceModel(e){return new a(this).push("admin","device-models",e)}deviceSessions(){return new h(this).push("admin","device-sessions")}deviceSession(e){return new F(this,e)}deviceStatuses(){return new h(this).push("device-status")}deviceTime(){return new z(this.withAdmin())}interactiveQueue(){return new h(this).push("admin","interactive-queue")}files(){return new h(this).push("files")}file(e){return new D(this,e)}overview(){return new a(this).push("admin","overview")}projects(){return new h(this).push("projects")}project(e){return new R(this,e)}runs(){return new h(this).push("admin","runs")}run(e){return new N(this,e)}users(){return new h(this).push("users")}accessGroups(){return new h(this).push("access-groups")}accessGroup(e){return new q(this,e)}}global.isNodeJs&&(s.defaults.headers.common["User-Agent"]="Bitbar Cloud API Client for JavaScript v0.23.0"),s.defaults.maxContentLength=1073741824;return{API:class{constructor(e){if(null==e)throw new Error("config cannot be empty");if(this.config=e,this.axiosConfig={},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.axios=s.create(this.axiosConfig)}userSession(){return new L(this)}user(e){return new U(this,e)}users(){return new l(this)}me(){return this.user("me")}admin(){return new G(this)}devices(){return new c(this)}device(e){return new P(this,e)}deviceGroups(){return new h(this).push("device-groups")}deviceGroup(e){return new m(this,e)}labelGroups(){return new h(this).push("label-groups")}deviceStatistics(){return new h(this).push("device-statistics")}account(e){return new w(this,e)}},FilterBuilder:u}})); +/* @bitbar/cloud-api-client v0.24.0 | Copyright 2020 (c) SmartBear Software and contributors | .git/blob/master/LICENSE */ +!function(e,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s(require("@bitbar/finka"),require("axios"),require("qs")):"function"==typeof define&&define.amd?define(["@bitbar/finka","axios","qs"],s):(e=e||self)["bitbar-cloud-api-client"]=s(e["@bitbar/finka"],e.axios,e.qs)}(this,(function(e,s,t){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e,s=s&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s,t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,e();var r;!function(e){e.GET="GET",e.POST="POST",e.DELETE="DELETE"}(r||(r={}));class n{constructor(e){this.stack=[],this.requestConfig={},e instanceof n?(this.root=e.root,Array.isArray(e.stack)&&this.push(...e.stack),null!=e.requestConfig&&this.setRequestConfig(e.requestConfig)):this.root=e}push(...e){for(const s of e)this.stack.push(s);return this}pop(){return this.stack.pop(),this}toUrl(e=!1){let s="/"+this.stack.join("/");return e&&(s=this.root.axiosConfig.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(!r[s])throw new Error(`Method '${s}' is not allowed! You can use: ${Object.keys(r).join(", ")}`);return this.setRequestConfig({method:s})}get(){return this.method("GET")}post(){return this.method("POST")}params(e){return Object.deepAssign(this.requestConfig,{params:e}),this}getParams(){return null==this.requestConfig.params?{}:this.requestConfig.params}removeParam(e){return delete this.requestConfig.params[e],this}data(e){return Object.deepAssign(this.requestConfig,{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}paramsSerializer(e){return t.stringify(e,{arrayFormat:"brackets"})}send(){const e=Object.deepAssign({},this.requestConfig,{url:"/"+this.stack.join("/")});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=t.stringify(e.data)),e.params&&(e.paramsSerializer=this.paramsSerializer),this.root.axios.request(e)}}class i{constructor(e,s,t){this.name=e,this.value=s,this.operand=t}}class u{constructor(){this.filters=[]}add(e,s,t,r=!1){if(0===(s=Array.wrap(s)).length)return this;for(let e=0;e1||void 0!==r.value[0])&&(t="_"+r.value.join("|")),s=`${r.name}_${r.operand}${t}`),e.push(s);return e.join(";")}}var o;!function(e){e.asc="a",e.desc="d"}(o||(o={}));class h extends n{create(e){return this.post().data(e).send()}sort(e,s=o.asc){return this.params({sort:`${e}_${s}`})}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){const s=e instanceof u;if("string"!=typeof e&&!s)throw new Error("Filter must be either string or instance of FilterBuilder");return s&&(e=e.toString()),this.params({filter:e})}}h.prototype.all=h.prototype.noLimit,h.prototype.cut=h.prototype.between;class a extends n{delete(){return this.method("DELETE")}}class c extends h{constructor(e){super(e),this.push("devices")}filters(){return new a(this).push("filters")}cleanupConfigurations(){return new h(this).push("cleanup-configurations")}cleanupConfiguration(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("cleanup-configurations",e)}}class l extends h{constructor(e){super(e),this.push("users")}activate(){return new a(this).push("activate")}recoveries(){return new a(this).push("recoveries")}passwordRecovery(){return new a(this).push("password-recovery")}resetApiKey(){return new a(this).push("reset-api-key")}validateVatId(){return new a(this).push("validateVatId")}}class p extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("additional-users",s)}resendActivation(){return new a(this).push("resend-activation")}}class w extends a{constructor(e,s){super(e),s?this.push("accounts",s):this.push("account")}preferences(){return new a(this).push("preferences")}concurrencyStatus(){return new a(this).push("concurrency-status")}roles(){return new h(this).push("roles")}role(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("roles",e)}additionalUsers(){return new h(this).push("additional-users")}additionalUser(e){return new p(this,e)}}class d extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("billing-periods",s)}receipt(){return new a(this).push("receipt").setRequestConfig({responseType:"arraybuffer"})}}class f extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("builds",s)}abort(){return new a(this).push("abort")}outputFiles(){return new h(this).push("output-file-set","files")}}class g extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("jobs",s)}builds(){return new h(this).push("builds")}build(e){return new f(this,e)}}class m extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-groups",s)}devices(){return new h(this).push("devices")}device(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("devices",e)}selectors(){return new h(this).push("selectors")}selector(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("selectors",e)}}class v extends a{constructor(e){super(e),this.push("input-file-set")}files(){return new h(this).push("files")}filesZip(){return new a(this).push("files.zip")}}const b=new u;b.eq("state","READY"),b.notin("mimetype",["image/png","image/jpg","image/jpeg","image/webp","image/gif","video/mp4","video/avi","video/webm","video/ogg","video/mpeg"]);class y extends a{constructor(e){super(e),this.push("output-file-set")}files(){return new h(this).push("files")}filesZip(){return new a(this).push("files.zip")}screenshots(){return new h(this).push("screenshots")}screenshot(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("screenshots",e)}screenshotFile(e){this.screenshot(e).push("file")}videos(){this.files().params({filter:"s_state_eq_READY",tag:["video"]})}nonMediaFiles(){return this.files().filter(b)}}class E extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-sessions",s)}clusterLogs(){return new a(this).push("cluster-logs")}dataAvailability(){return new a(this).push("data-availability")}fixturesZip(){return new a(this).push("fixtures.zip")}junitXml(){return new a(this).push("junit.xml")}logs(){return new a(this).push("logs")}performance(){return new a(this).push("performance")}release(){return new a(this).push("release")}resultDataZip(){return new a(this).push("result-data.zip")}screenshots(){return new h(this).push("screenshots")}screenshot(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("screenshots",e)}steps(){return new h(this).push("steps")}step(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("steps",e)}currentStep(){return this.step("current")}testCaseRuns(){return new h(this).push("test-case-runs")}retry(){return new a(this).push("retry").post()}input(){return new v(this)}output(){return new y(this)}videos(){return this.output().videos()}connections(){return new h(this).push("connections")}}class x extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("runs",s)}config(){return new a(this).push("config")}deviceSessions(){return new h(this).push("device-sessions")}deviceSession(e){return new E(this,e)}steps(){return new h(this).push("steps")}files(){return new h(this).push("files")}filesZip(){return new a(this).push("files.zip")}tags(){return new h(this).push("tags")}tag(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("tags",e)}}class R extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("projects",s)}runs(){return new h(this).push("runs")}run(e){return new x(this,e)}runsExtended(){return new h(this).push("runs-extended")}runExtended(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("runs-extended",e)}files(){return new h(this).push("files")}filesZip(){return new a(this).push("files.zip")}sharings(){return new h(this).push("sharings")}sharing(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("sharings",e)}}class D extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("files",s)}file(){return new a(this).push("file")}icon(){return new a(this).push("icon")}tags(){return new h(this).push("tags")}}class I extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("notifications",s)}test(){return new a(this).push("test")}}class q extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("access-groups",s)}users(){return new h(this).push("users")}user(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("users",e)}resources(){return new h(this).push("resources")}resource(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("resources",e)}}class C extends h{constructor(e){super(e),this.push("device-time")}reserved(){return new h(this).push("reserved")}used(){return new h(this).push("used")}}class j extends h{constructor(e){super(e),this.push("files")}upload(e){let s;if(!global.isNodeJs)throw new Error("Not supported yet!");{const t=require("fs");s=new(require("form-data")),s.append("file",t.createReadStream(e.dir+"/"+e.filename),{filename:e.filename})}this.post().headers(s.getHeaders()).data(s)}}class S extends h{constructor(e){super(e),this.push("purchased")}}class T extends h{constructor(e){super(e),this.push("services")}purchased(){return new S(this)}available(){return new h(this).push("available")}active(){const e=new h(this);return"me"===this.stack[0]?e.push("active"):e.params({notArchived:!0}),e}}class k extends h{constructor(e){super(e),this.push("runs")}config(){return new a(this).push("config")}}class A extends h{constructor(e){super(e),this.push("notifications")}scopes(){return new h(this).push("scopes")}channels(){return new h(this).push("channels")}}class U extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("account-services",s)}activate(){return new a(this).push("activate")}deactivate(){return new a(this).push("deactivate")}billingPeriod(){return new a(this).push("billing-period")}}class P extends a{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)}}account(){return new w(this)}deviceTime(){return new C(this)}deviceTimeSummary(){return new h(this).push("device-time-summary")}services(){return new T(this)}service(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("services",e)}accountServices(){return new h(this).push("account-services")}accountService(e){return new U(this,e)}billingPeriods(){return new h(this).push("billing-periods")}billingPeriod(e){return new d(this,e)}jobs(){return new h(this).push("jobs")}job(e){return new g(this,e)}deviceGroups(){return new h(this).push("device-groups")}deviceGroup(e){return new m(this,e)}deviceSessions(){return new h(this).push("device-sessions")}deviceSession(e){return new E(this,e)}projects(){return new h(this).push("projects")}project(e){return new R(this,e)}files(){return new j(this)}file(e){return new D(this,e)}runs(){return new k(this)}availableBuildExecutors(){return new h(this).push("available-build-executors")}availableFrameworks(){return new h(this).push("available-frameworks")}resetApiKey(){return new a(this).push("reset-api-key")}restore(){return new a(this).push("restore")}accountAdditionalUsers(){return new h(this).push("account","additional-users")}accountAdditionalUser(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("account","additional-users",e)}feedback(){return new a(this).push("feedback")}notifications(){return new A(this)}notification(e){return new I(this,e)}receipts(){return new h(this).push("receipts")}preferences(){return new a(this).push("preferences")}uiPreferences(){return new a(this).push("ui-preferences")}integrations(){return new h(this).push("integrations")}integration(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("integrations",e)}deviceUsage(){return new h(this).push("device-usage")}statistics(){return new h(this).push("statistics")}deviceStatistics(){return new h(this).push("device-statistics")}accessGroups(){return new h(this).push("access-groups")}accessGroup(e){return new q(this,e)}}class L extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("devices",s)}properties(){return new h(this).push("properties")}}class $ extends a{constructor(e){super(e),this.push("user-sessions")}login(e){return new a(this).push("login").post().data(e)}logout(){return new a(this).push("logout").post()}sso(e){return new a(this).push(e+"-login")}portalLogin(){return new a(this).push("portal-login").post()}}class z extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("clusters",s)}devices(){return new h(this).push("devices")}}class N extends a{constructor(e){super(e),this.push("device-time")}countSessionReport(){return new h(this).push("count-session-report")}stepTimeReport(){return new h(this).push("step-time-report")}}class O extends x{abort(){return new a(this).push("abort").post()}retry(e){const s=new a(this).push("retry").setRequestConfig({timeout:0}).post();return null!=e&&s.params({deviceRunIds:e}),s}changeBillable(){return new a(this).push("changebillable")}changePriority(){return new a(this).push("changepriority")}screenshotNames(){return new h(this).push("screenshot-names")}screenshots(){return new h(this).push("screenshots")}dataAvailability(){return new h(this).push("data-availability")}buildLogsZip(e){const s=new a(this).push("build-logs.zip");return null!=e&&s.params({deviceRunIds:e}),s}logsZip(){return new a(this).push("logs.zip")}performanceZip(){return new a(this).push("performance.zip")}screenshotsZip(){return new a(this).push("screenshots.zip")}}class F extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("admin"),this.push("devices",s)}queue(){return new h(this).push("queue")}}class G extends a{constructor(e,s){if(null==s)throw new Error("Resource ID cannot be null!");super(e),this.push("device-sessions",s)}changeBillable(){const e=new a(this);return e.stack.splice(e.stack.length-2,0,"admin"),e.push("changebillable").post()}connections(){return new h(this).push("connections")}connection(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("connections",e)}input(){return new v(this)}output(){return new y(this)}release(){return new a(this).push("release").post()}screenshots(){return new h(this).push("screenshots")}screenshot(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("screenshots",e)}steps(){return new h(this).push("steps")}step(e){if(null==e)throw new Error("Resource ID cannot be null!");return new a(this).push("steps",e)}currentStep(){return this.step("current")}testCaseRuns(){return new h(this).push("test-case-runs")}}class Z extends a{constructor(e){super(e)}withAdmin(){return new a(this).push("admin")}clusters(){return new h(this).push("clusters")}cluster(e){return new z(this,e)}devices(){return new h(this).push("admin","devices")}device(e){return new F(this,e)}deviceModels(){return new h(this).push("admin","device-models")}deviceModel(e){return new a(this).push("admin","device-models",e)}deviceSessions(){return new h(this).push("admin","device-sessions")}deviceSession(e){return new G(this,e)}deviceStatuses(){return new h(this).push("device-status")}deviceTime(){return new N(this.withAdmin())}interactiveQueue(){return new h(this).push("admin","interactive-queue")}files(){return new h(this).push("files")}file(e){return new D(this,e)}overview(){return new a(this).push("admin","overview")}projects(){return new h(this).push("projects")}project(e){return new R(this,e)}runs(){return new h(this).push("admin","runs")}run(e){return new O(this,e)}users(){return new h(this).push("users")}accessGroups(){return new h(this).push("access-groups")}accessGroup(e){return new q(this,e)}}global.isNodeJs&&(s.defaults.headers.common["User-Agent"]="Bitbar Cloud API Client for JavaScript v0.24.0"),s.defaults.maxContentLength=1073741824;return{API:class{constructor(e){if(null==e)throw new Error("config cannot be empty");if(this.config=e,this.axiosConfig={},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.axios=s.create(this.axiosConfig)}userSession(){return new $(this)}user(e){return new P(this,e)}users(){return new l(this)}me(){return this.user("me")}admin(){return new Z(this)}devices(){return new c(this)}device(e){return new L(this,e)}deviceGroups(){return new h(this).push("device-groups")}deviceGroup(e){return new m(this,e)}labelGroups(){return new h(this).push("label-groups")}deviceStatistics(){return new h(this).push("device-statistics")}account(e){return new w(this,e)}},FilterBuilder:u}})); //# sourceMappingURL=bitbar-cloud-api-client.min.js.map diff --git a/dist/bitbar-cloud-api-client.min.js.map b/dist/bitbar-cloud-api-client.min.js.map index c32e851a..164396e9 100644 --- a/dist/bitbar-cloud-api-client.min.js.map +++ b/dist/bitbar-cloud-api-client.min.js.map @@ -1 +1 @@ -{"version":3,"file":"bitbar-cloud-api-client.min.js","sources":["../src/finka.ts","../src/api/APIEntity.ts","../src/Filter.ts","../src/FilterBuilder.ts","../src/api/APIList.ts","../src/api/APIResource.ts","../src/api/APIListDevices.ts","../src/api/APIListUsers.ts","../src/api/APIResourceAdditionalUser.ts","../src/api/APIResourceAccount.ts","../src/api/APIResourceBillingPeriod.ts","../src/api/APIResourceBuild.ts","../src/api/APIResourceJob.ts","../src/api/APIResourceDeviceGroup.ts","../src/api/extra-class/InputFileset.ts","../src/api/extra-class/OutputFileset.ts","../src/api/APIResourceDeviceSession.ts","../src/api/APIResourceRun.ts","../src/api/APIResourceProject.ts","../src/api/APIResourceFile.ts","../src/api/APIResourceNotification.ts","../src/api/APIResourceAccessGroup.ts","../src/api/APIListDeviceTime.ts","../src/api/APIListFiles.ts","../src/api/APIListPurchased.ts","../src/api/APIListServices.ts","../src/api/APIListRuns.ts","../src/api/APIListNotifications.ts","../src/api/APIResourceUser.ts","../src/api/APIResourceDevice.ts","../src/api/APIResourceUserSession.ts","../src/api/APIAdminResourceCluster.ts","../src/api/APIAdminResourceDeviceTime.ts","../src/api/APIAdminResourceRun.ts","../src/api/APIAdminResourceDevice.ts","../src/api/APIAdminResourceDeviceSession.ts","../src/api/APIAdminResource.ts","../src/API.ts","../src/CloudAPIClient.ts"],"sourcesContent":["// @ts-ignore\nimport finka from '@bitbar/finka';\n\nfinka();\n\nexport default {};\n","import qs from 'qs';\nimport { AxiosRequestConfig, Method } from 'axios';\n\n\n/**\n * Allowed methods\n *\n * @constant\n * @type {Array}\n * @default\n */\nenum ALLOWED_HTTP_METHODS {\n GET = 'GET',\n POST = 'POST',\n DELETE = 'DELETE'\n};\n\n\n/**\n * APIEntity\n *\n * @class\n * @abstract\n */\nclass APIEntity {\n\n /**\n * Stack\n *\n * @public\n * @type {Array}\n */\n public stack: Array;\n\n /**\n * object of request config\n *\n * @protected\n * @type {AxiosRequestConfig}\n */\n protected requestConfig: AxiosRequestConfig;\n\n /**\n * Root\n *\n * @public\n * @type {API}\n */\n public root: object;\n\n /**\n * Constructor\n * @param {APIEntity|object} [parent] - Specifies a parent from which should be inherited properties\n */\n constructor (parent: APIEntity | object) {\n this.stack = [];\n this.requestConfig = {};\n\n if (parent instanceof APIEntity) {\n this.root = parent.root;\n\n if (Array.isArray(parent.stack)) {\n this.push(...parent.stack);\n }\n\n if (parent.requestConfig != null) {\n this.setRequestConfig(parent.requestConfig);\n }\n } else {\n this.root = parent;\n }\n }\n\n /**\n * Push\n *\n * @public\n * @param {string|number} items... - Items that should be pushed to stack\n * @returns this\n */\n public push (...items: Array) {\n for (const item of items) {\n this.stack.push(item);\n }\n return this;\n }\n\n /**\n * Pop\n *\n * @public\n * @return this\n */\n public pop () {\n this.stack.pop();\n return this;\n }\n\n /**\n * To URL\n *\n * @param {boolean} absolute\n */\n public toUrl (absolute = false) {\n let url = `/${this.stack.join('/')}`;\n\n if (absolute) {\n // @ts-ignore\n url = this.root.axiosConfig.baseURL + url;\n }\n\n return url;\n }\n\n /**\n * Set request config\n *\n * @public\n * @param {AxiosRequestConfig} requestConfig - object of request config to be set\n * @returns this\n */\n public setRequestConfig (requestConfig: AxiosRequestConfig) {\n Object.deepAssign(this.requestConfig, requestConfig);\n return this;\n }\n\n /**\n * Remove request config key\n *\n * @public\n * @param {string} key - Key to me removed from request config\n * @returns this\n */\n public removeRequestConfig (key: string) {\n // @ts-ignore\n delete this.requestConfig[key];\n return this;\n }\n\n /**\n * Set headers\n *\n * @public\n * @param {object} headers - Headers object\n * @returns this\n */\n public headers (headers: object) {\n const _headers = {};\n\n // Unify/Standarize headers keys\n for (const key in headers) {\n const newKey = key.replace(/(?:^|-)([a-z])/g, (letter) => letter.toUpperCase());\n // @ts-ignore\n _headers[newKey] = headers[key];\n }\n\n // Set\n return this.setRequestConfig({\n headers: _headers\n });\n }\n\n /**\n * Set HTTP method\n *\n * @public\n * @param {string} name - HTTP methods name\n * @returns this\n */\n public method (name: Method) {\n const NAME: Method = name.toLocaleUpperCase();\n\n // @ts-ignore\n if (!ALLOWED_HTTP_METHODS[NAME]) {\n throw new Error(`Method '${NAME}' is not allowed! You can use: ${Object.keys(ALLOWED_HTTP_METHODS).join(', ')}`);\n }\n\n return this.setRequestConfig({\n method: NAME\n });\n }\n\n /**\n * Set GET as HTTP method\n *\n * @public\n * @returns this\n */\n public get () {\n return this.method('GET');\n }\n\n /**\n * Set POST as HTTP method\n *\n * @public\n * @returns this\n */\n public post () {\n return this.method('POST');\n }\n\n /**\n * Set params\n *\n * @public\n * @param {object} params - object of params to be set\n * @returns this\n */\n public params (params: object) {\n Object.deepAssign(this.requestConfig, {\n params\n });\n return this;\n }\n\n /**\n * Get params\n *\n * @public\n * @returns object\n */\n public getParams () {\n return this.requestConfig.params == null ? {} : this.requestConfig.params;\n }\n\n /**\n * Remove params key\n *\n * @public\n * @param {string} key - Key to me removed from params\n * @returns this\n */\n public removeParam (key: string) {\n delete this.requestConfig.params[key];\n return this;\n }\n\n /**\n * Set data\n *\n * @public\n * @param {object} data - object of data to be set\n * @returns this\n */\n public data (data: object) {\n Object.deepAssign(this.requestConfig, {\n data\n });\n return this;\n }\n\n /**\n * Set JSON data\n *\n * @public\n * @param {object} data - JSON object to be set\n * @returns this\n */\n public jsonData (data: object) {\n this.headers({\n 'Content-Type': 'application/json'\n }).data(data);\n return this;\n }\n\n /**\n * Set form data\n *\n * @public\n * @param {object} data - JSON object to be set\n * @returns this\n */\n public formData (data: FormData) {\n this.headers({\n 'Content-Type': 'multipart/form-data'\n }).data(data);\n return this;\n }\n\n /**\n * Custom params serializer\n * @private\n * @param {object} params\n */\n private paramsSerializer (params: object) {\n return qs.stringify(params, {\n arrayFormat: 'brackets'\n });\n }\n\n /**\n * Send request\n *\n * @public\n * @returns Promise\n */\n public send () {\n const requestConfig = Object.deepAssign({}, this.requestConfig, {\n url: `/${this.stack.join('/')}`\n });\n\n // Set default headers\n if (requestConfig.headers == null) {\n requestConfig.headers = {};\n }\n\n // Set default Content-Type\n if (requestConfig.headers['Content-Type'] == null) {\n requestConfig.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';\n }\n\n // Convert data if needed\n if (requestConfig.method === 'POST' &&\n requestConfig.headers['Content-Type'].startsWith('application/x-www-form-urlencoded') &&\n requestConfig.data != null) {\n requestConfig.data = qs.stringify(requestConfig.data);\n }\n\n if (requestConfig.params) {\n requestConfig.paramsSerializer = this.paramsSerializer;\n }\n\n // Send request\n // @ts-ignore\n return this.root.axios.request(requestConfig);\n }\n}\n\n\nexport default APIEntity;\n","/**\n * Filter\n */\n\nclass Filter {\n public name: string;\n public value: any;\n public operand: string;\n\n constructor (name: string, value: any, operand: string) {\n this.name = name;\n this.value = value;\n this.operand = operand;\n }\n}\n\nexport default Filter;\n","import './finka';\nimport Filter from './Filter';\n\n/**\n * FilterBuilder\n *\n * Builds filter string according to Bitbar Cloud backend convention\n */\n\nclass FilterBuilder {\n\n private filters: Array;\n\n constructor () {\n this.filters = [];\n }\n\n /**\n * Add filter to filters list\n * @param name {string} Name\n * @param value {*} Value\n * @param operand {string} Operand\n * @param [checkNull=false] {boolean} Check null?\n * @returns {FilterBuilder}\n */\n private add (name: string, value: any, operand: string, checkNull = false): FilterBuilder {\n\n value = Array.wrap(value);\n\n if (value.length === 0) {\n return this;\n }\n\n // auto-convert\n for (let i = 0; i < value.length; i++) {\n const v = value[i];\n if (typeof v === 'object' && v instanceof Date) {\n value[i] = v.getTime();\n }\n }\n\n let isNull = false;\n if (checkNull) {\n // check null existence\n for (const v of value) {\n if (v !== null) {\n continue;\n isNull = true;\n }\n }\n\n if (isNull) {\n value = value.filter((item: any) => item !== null);\n operand += 'ornull';\n }\n }\n\n // @ts-ignore\n if (operand.endsWith('ornull') && value.length === 0) {\n operand = 'isnull';\n }\n\n // add filter\n this.filters.push(new Filter(name, value, operand));\n\n return this;\n }\n\n\n\n public gt (name: string, value: number) {\n return this.add(name, value, 'gt');\n }\n\n public lt (name: string, value: number) {\n return this.add(name, value, 'lt');\n }\n\n public after (name: string, value: Date | number) {\n return this.add(name, value, 'after', true);\n }\n\n public afterorequal (name: string, value: Date | number) {\n return this.add(name, value, 'afterorequal', true);\n }\n\n public before (name: string, value: Date | number) {\n return this.add(name, value, 'before', true);\n }\n\n public beforeorequal (name: string, value: Date | number) {\n return this.add(name, value, 'beforeorequal', true);\n }\n\n public on (name: string, value: any) {\n return this.add(name, value, 'on');\n }\n\n public eq (name: string, value: any) {\n return this.add(name, value, 'eq');\n }\n\n public contains (name: string, value: string) {\n return this.add(name, value, 'contains');\n }\n\n public like (name: string, value: string) {\n return this.add(name, value, 'like');\n }\n\n public isnull (name: string) {\n return this.add(name, undefined, 'isnull');\n }\n\n public in (name: string, value: Array) {\n return this.add(name, value, 'in', true);\n }\n\n public notin (name: string, value: Array) {\n return this.add(name, value, 'notin', true);\n }\n\n\n public raw (filter: Filter) {\n const filters = Array.wrap(filter);\n for (const filter of filters) {\n if (this.isFilterPart(filter)) {\n this.filters.push(filter);\n } else {\n throw new SyntaxError(`Filter ${filter} has invalid syntax`);\n }\n }\n }\n\n /**\n * Check if given string is proper filter part\n */\n public isFilterPart (str: string) {\n return /^[a-zA-Z0-9.]{2,12}_(?:isnull$|(?:gt|lt|(?:after|before)(?:orequal)?|on|eq|contains|like|(?:not)?in)_)/.test( str);\n }\n\n /**\n * To string\n */\n public toString () {\n const parts: Array = [];\n\n let part: string,\n val: string;\n\n for (const filter of this.filters) {\n if (typeof filter === 'string') {\n part = filter;\n } else {\n val = '';\n if (filter.value.length > 1 || typeof filter.value[0] !== 'undefined') {\n val = `_${filter.value.join('|')}`;\n }\n part = `${filter.name}_${filter.operand}${val}`;\n }\n parts.push(part);\n }\n\n return parts.join(';');\n }\n}\n\n\nexport default FilterBuilder;\n","import APIEntity from './APIEntity'\nimport FilterBuilder from '../FilterBuilder'\n\n\n/**\n * Default limit\n *\n * @constant\n * @type {number}\n * @default\n */\nconst DEFAULT_LIMIT = 20;\n\n/**\n * Default offset\n *\n * @constant\n * @type {number}\n * @default\n */\nconst DEFAULT_OFFSET = 0;\n\n/**\n * API Order Enum\n */\nenum APIOrder {\n 'asc' = 'a',\n 'desc' = 'd'\n};\n\n\n/**\n * APIList\n *\n * @class\n * @extends APIEntity\n */\nclass APIList extends APIEntity {\n\n /**\n * Create\n * Shortcut for sending data POST\n *\n * @param {object} data\n */\n public create (data: object) {\n return this.post().data(data).send();\n }\n\n /**\n * Sets sorting\n *\n * @public\n * @param {string} name - Name of the column according to which the data will be sorted\n * @param {string} [order=a] - Sorting order. Possibilities: 'a', 'd'\n * @returns this\n */\n public sort (name: string, order: APIOrder = APIOrder.asc) {\n // if order not in ['a', 'd']\n // throw new Error(`Order '\\${order}' is invalid! Use 'a' for ascending or 'd' for descending.`);\n\n return this.params({\n sort: `${name}_${order}`\n });\n }\n\n /**\n * Sets limit\n *\n * @public\n * @param {number} [limit=DEFAULT_LIMIT] - Limit to be set\n * @returns this\n */\n public limit (limit = DEFAULT_LIMIT) {\n if (!Number.isNatural(limit)) {\n throw new Error(`Limit '${limit}' is invalid!`);\n }\n\n return this.params({\n limit\n });\n }\n\n /**\n * Gets limit\n *\n * @public\n * @returns number\n */\n public getLimit () {\n const params = this.getParams();\n return params.limit == null ? DEFAULT_LIMIT : params.limit;\n }\n\n /**\n * Disables limit\n *\n * @public\n * @returns this\n */\n public noLimit () {\n return this.limit(0);\n }\n\n /**\n * Sets offset\n *\n * @public\n * @param {number} [offset=DEFAULT_OFFSET] - Offset to be set\n * @returns this\n */\n public offset (offset: number = DEFAULT_OFFSET) {\n if (!Number.isNatural(offset)) {\n throw new Error(`Offset '${offset}' is invalid!`);\n }\n\n return this.params({\n offset\n });\n }\n\n /**\n * Sets limit and offset so that will request from BE records between range\n *\n * @public\n * @param {number} from - From index\n * @param {number} to - To index\n * @returns this\n */\n public between (from: number, to: number) {\n if (!Number.isNatural(from)) {\n throw new Error(`From '${from}' is invalid!`);\n }\n\n if (!Number.isNatural(to)) {\n throw new Error(`To '${to}' is invalid!`);\n }\n\n return this.params({\n offset: from,\n limit: 1 + (to - from)\n });\n }\n\n /**\n * Sets limit and offset so that will request from BE one record on given index\n *\n * @public\n * @param {number} idx - Index\n * @returns this\n */\n public only (idx: number) {\n if (!Number.isNatural(idx)) {\n throw new Error(`Index '${idx}' is invalid!`);\n }\n\n return this.params({\n offset: idx,\n limit: 1\n });\n }\n\n /**\n * Gets current limit and sets offset so that will request from BE one page of records\n *\n * @public\n * @param {number} [page=1] - Page number (counted from 1)\n * @returns this\n */\n public page (page = 1) {\n if (!Number.isNatural(page) || page == 0) {\n throw new Error(`Page '${page}' is invalid!`);\n }\n\n const limit = this.getLimit();\n const offset = (page - 1) * limit;\n\n return this.params({\n offset,\n limit\n });\n }\n\n /**\n * Sets search\n *\n * query param is working like SQL LIKE. BE sets wraps around query with %, and replaces every white character\n * with %. So e.g. if query='my device', then it's searching for '%my%device%' in DB.\n *\n * @public\n * @param {string} query - Query to search for\n * @returns this\n */\n public search (query: string) {\n if (typeof query !== 'string') {\n throw new Error('Search query must be a string!');\n }\n\n return this.params({\n search: query\n });\n }\n\n /**\n * Sets filter\n *\n * @public\n * @param {FilterBuilder|string} filter - Filter\n * @returns this\n */\n public filter (filter: FilterBuilder | string) {\n const isFilterBuilder = filter instanceof FilterBuilder;\n\n if (typeof filter !== 'string' && !isFilterBuilder) {\n throw new Error('Filter must be either string or instance of FilterBuilder');\n }\n\n if (isFilterBuilder) {\n filter = filter.toString();\n }\n\n return this.params({\n filter\n });\n }\n}\n\ninterface APIList {\n\n /**\n * Alias for 'noLimit'\n *\n * @public\n * @see noLimit\n * @returns this\n */\n all: typeof APIList.prototype.noLimit;\n\n /**\n * Alias for 'between'\n *\n * @public\n * @param {number} from - From idx\n * @param {number} to - To idx\n * @returns this\n */\n cut: typeof APIList.prototype.between;\n}\n\nAPIList.prototype.all = APIList.prototype.noLimit;\nAPIList.prototype.cut = APIList.prototype.between;\n\nexport default APIList;\n","import APIEntity from './APIEntity'\n\n\n/**\n * APIResource\n *\n * @class\n * @extends APIEntity\n */\nclass APIResource extends APIEntity {\n\n /**\n * Set DELETE as HTTP method\n *\n * @public\n * @returns this\n */\n public delete () {\n return this.method('DELETE');\n }\n}\n\n\ninterface APIResource {\n\n /**\n * Alias for 'post'\n *\n * @public\n * @see post\n * @returns this\n */\n update: typeof APIResource.prototype.post;\n}\n\n\nexport default APIResource\n","import APIList from './APIList'\nimport APIResource from './APIResource'\n\n\n/**\n * APIListDevices\n *\n * @class\n * @extends APIList\n */\nclass APIListDevices extends APIList {\n\n /**\n * /devices\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('devices');\n }\n\n // /devices/filters\n public filters () {\n return new APIResource(this).push('filters');\n }\n\n // /devices/cleanup-configurations\n public cleanupConfigurations () {\n return new APIList(this).push('cleanup-configurations');\n }\n\n /**\n * /devices/cleanup-configurations/{id}\n *\n * @param {number} id - Resource ID\n */\n public cleanupConfiguration (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('cleanup-configurations', id);\n }\n\n}\n\nexport default APIListDevices;\n","import APIList from './APIList'\nimport APIResource from './APIResource'\n\n\n/**\n * APIListDevices\n *\n * @class\n * @extends APIList\n */\nclass APIListUsers extends APIList {\n\n /**\n * /users\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('users');\n }\n\n // /users/activate\n public activate () {\n return new APIResource(this).push('activate');\n }\n\n // /users/recoveries\n public recoveries () {\n return new APIResource(this).push('recoveries');\n }\n\n // /users/passwordRecovery\n public passwordRecovery () {\n return new APIResource(this).push('password-recovery');\n }\n\n // /users/resetApiKey\n public resetApiKey () {\n return new APIResource(this).push('reset-api-key');\n }\n\n // /users/resetApiKey\n public validateVatId () {\n return new APIResource(this).push('validateVatId');\n }\n\n}\n\nexport default APIListUsers;\n","import APIResource from './APIResource'\n\n/**\n * APIResourceAdditionalUser\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceAdditionalUser extends APIResource {\n\n /**\n * /additional-users/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('additional-users', id);\n }\n\n // /account/resend-activation\n public resendActivation () {\n return new APIResource(this).push('resend-activation');\n }\n\n}\n\nexport default APIResourceAdditionalUser\n","import APIResource from './APIResource'\nimport APIResourceAdditionalUser from './APIResourceAdditionalUser';\n\nimport APIList from './APIList'\n\n/**\n * APIResourceAccount\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceAccount extends APIResource {\n\n /**\n * /account\n *\n * Constructor\n */\n constructor (parent: object, id?: number) {\n super(parent);\n if(id)\n this.push('accounts', id)\n else\n this.push('account');\n }\n\n // /accounts/{id}/preferences\n public preferences () {\n return new APIResource(this).push('preferences');\n }\n\n // /accounts/{id}/concurrency-status\n public concurrencyStatus () {\n return new APIResource(this).push('concurrency-status');\n }\n\n // /account/roles\n public roles () {\n return new APIList(this).push('roles');\n }\n\n // /account/roles/{id}\n public role (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('roles', id);\n }\n\n // /account/additional-users\n public additionalUsers () {\n return new APIList(this).push('additional-users');\n }\n\n // /account/additional-users/{id}\n public additionalUser (id: number) {\n return new APIResourceAdditionalUser(this, id);\n }\n\n}\n\nexport default APIResourceAccount\n","import APIResource from './APIResource'\n\n\n/**\n * APIResourceBillingPeriod\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceBillingPeriod extends APIResource {\n\n /**\n * /billing-periods/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('billing-periods', id);\n }\n\n // /billing-periods/{id}/receipt\n public receipt () {\n return new APIResource(this).push('receipt').setRequestConfig({\n responseType: 'arraybuffer'\n });\n }\n\n}\n\nexport default APIResourceBillingPeriod\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceBuild\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceBuild extends APIResource {\n\n /**\n * /builds/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('builds', id);\n }\n\n // /builds/{id}/abort\n public abort () {\n return new APIResource(this).push('abort');\n }\n\n // /builds/{id}/output-file-set/files\n public outputFiles () {\n return new APIList(this).push('output-file-set', 'files');\n }\n\n}\n\nexport default APIResourceBuild\n","import APIResource from './APIResource'\nimport APIResourceBuild from './APIResourceBuild'\n\nimport APIList from './APIList'\n\n\n/**\n * APIResourceFile\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceJob extends APIResource {\n\n /**\n * /jobs/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('jobs', id);\n }\n\n // /jobs/{id}/builds\n public builds () {\n return new APIList(this).push('builds');\n }\n\n // /jobs/{id}/builds/{id}\n public build (id: number) {\n return new APIResourceBuild(this, id);\n }\n\n}\n\nexport default APIResourceJob\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceBillingPeriod\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceDeviceGroup extends APIResource {\n\n /**\n * /device-groups/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('device-groups', id);\n }\n\n // /device-groups/{id}/devices\n public devices () {\n return new APIList(this).push('devices');\n }\n\n // /device-groups/{id}/device/{id}\n public device (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('devices', id);\n }\n\n // /device-groups/{id}/selectors\n public selectors () {\n return new APIList(this).push('selectors');\n }\n\n // /device-groups/{id}/selectors/{id}\n public selector (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('selectors', id);\n }\n\n}\n\nexport default APIResourceDeviceGroup\n","import APIResource from '../APIResource'\nimport APIList from '../APIList'\n\n/**\n * InputFileset\n *\n * @class\n * @extends APIResource\n */\nclass InputFileset extends APIResource {\n\n /**\n * /input-file-set\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('input-file-set');\n }\n\n // /input-file-set/files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /input-file-set/files.zip\n public filesZip () {\n return new APIResource(this).push('files.zip');\n }\n}\n\nexport default InputFileset\n","import APIResource from '../APIResource'\nimport APIList from '../APIList'\n\nimport FilterBuilder from '../../FilterBuilder'\n\n// Create non-media files filter\nconst NON_MEDIA_FILES_FILTER = new FilterBuilder();\nNON_MEDIA_FILES_FILTER.eq('state', 'READY');\nNON_MEDIA_FILES_FILTER.notin('mimetype', [\n // no images\n 'image/png', 'image/jpg', 'image/jpeg', 'image/webp', 'image/gif',\n\n // no videos\n 'video/mp4', 'video/avi', 'video/webm', 'video/ogg', 'video/mpeg'\n]);\n\n/**\n * OutputFileset\n *\n * @class\n * @extends APIResource\n */\nclass OutputFileset extends APIResource {\n\n /**\n * /output-file-set\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('output-file-set');\n }\n\n // /output-file-set/files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /output-file-set/files.zip\n public filesZip () {\n return new APIResource(this).push('files.zip');\n }\n\n // /output-file-set/screenshots\n public screenshots () {\n return new APIList(this).push('screenshots');\n }\n\n // /output-file-set/screenshots/{id}\n public screenshot (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('screenshots', id);\n }\n\n // /output-file-set/screenshots/{id}/file/{id}\n public screenshotFile (id: number) {\n this.screenshot(id).push('file');\n }\n\n // Filter files out by ready videos\n public videos () {\n this.files().params({\n filter: 's_state_eq_READY',\n tag: ['video']\n });\n }\n\n // Filter files out by non-media\n nonMediaFiles () {\n return this.files().filter(NON_MEDIA_FILES_FILTER);\n }\n\n}\n\nexport default OutputFileset\n","import APIResource from './APIResource'\nimport APIList from './APIList';\n\nimport InputFileset from './extra-class/InputFileset'\nimport OutputFileset from './extra-class/OutputFileset'\n\n\n/**\n * APIResourceDeviceSession\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceDeviceSession extends APIResource {\n\n /**\n * /device-sessions/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('device-sessions', id);\n }\n\n // /device-sessions/{id}/cluster-logs\n public clusterLogs () {\n return new APIResource(this).push('cluster-logs');\n }\n\n // /device-sessions/{id}/data-availability\n public dataAvailability () {\n return new APIResource(this).push('data-availability');\n }\n\n // /device-sessions/{id}/fixtures.zip\n public fixturesZip () {\n return new APIResource(this).push('fixtures.zip');\n }\n\n // /device-sessions/{id}/junit.xml\n public junitXml () {\n return new APIResource(this).push('junit.xml');\n }\n\n // /device-sessions/{id}/logs\n public logs () {\n return new APIResource(this).push('logs');\n }\n\n // /device-sessions/{id}/performance\n public performance () {\n return new APIResource(this).push('performance');\n }\n\n // /device-sessions/{id}/release\n public release () {\n return new APIResource(this).push('release');\n }\n\n // /device-sessions/{id}/result-data.zip\n public resultDataZip () {\n return new APIResource(this).push('result-data.zip');\n }\n\n // /device-sessions/{id}/screenshots\n public screenshots () {\n return new APIList(this).push('screenshots');\n }\n\n // /device-sessions/{id}/screenshots/{id}\n public screenshot (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('screenshots', id);\n }\n\n // /device-sessions/{id}/steps\n public steps () {\n return new APIList(this).push('steps');\n }\n\n // /device-sessions/{id}/steps/{id}\n public step (id: number | 'current') {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('steps', id);\n }\n\n // /device-sessions/{id}/steps/current\n public currentStep () {\n return this.step('current');\n }\n\n // /device-sessions/{id}/test-case-runs\n public testCaseRuns () {\n return new APIList(this).push('test-case-runs');\n }\n\n // /device-sessions/{id}/retry\n public retry () {\n return new APIResource(this).push('retry').post();\n }\n\n // /device-sessions/{id}/input-file-set\n public input () {\n return new InputFileset(this);\n }\n\n // /device-sessions/{id}/output-file-set\n public output () {\n return new OutputFileset(this);\n }\n\n // Alias for output().videos();\n public videos () {\n return this.output().videos();\n }\n\n // Live Testing Connections\n public connections () {\n return new APIList(this).push('connections');\n }\n\n}\n\nexport default APIResourceDeviceSession\n","import APIResource from './APIResource'\nimport APIResourceDeviceSession from './APIResourceDeviceSession'\n\nimport APIList from './APIList'\n\n\n/**\n * APIResourceRun\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceRun extends APIResource {\n\n /**\n * /runs/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('runs', id);\n }\n\n // /runs/{id}/config\n public config () {\n return new APIResource(this).push('config');\n }\n\n // /runs/{id}/device-sessions\n public deviceSessions () {\n return new APIList(this).push('device-sessions');\n }\n\n // /runs/{id}/device-sessions/{id}\n public deviceSession (id: number) {\n return new APIResourceDeviceSession(this, id);\n }\n\n // /runs/{id}/steps\n public steps () {\n return new APIList(this).push('steps');\n }\n\n // /runs/{id}/files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /runs/{id}/files.zip\n public filesZip () {\n return new APIResource(this).push('files.zip');\n }\n\n // /runs/{id}/tags\n public tags () {\n return new APIList(this).push('tags');\n }\n\n // /runs/{id}/tag\n public tag (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('tags', id);\n }\n\n}\n\nexport default APIResourceRun\n","import APIResource from './APIResource'\nimport APIResourceRun from './APIResourceRun'\n\nimport APIList from './APIList'\n\n\n/**\n * APIResourceFile\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceProject extends APIResource {\n\n /**\n * /projects/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('projects', id);\n }\n\n // /projects/{id}/runs\n public runs () {\n return new APIList(this).push('runs');\n }\n\n // /projects/{id}/runs/{id}\n public run (id: number) {\n return new APIResourceRun(this, id);\n }\n\n // /projects/{id}/runs-extended\n public runsExtended () {\n return new APIList(this).push('runs-extended');\n }\n\n // /projects/{id}/runs-extended/{id}\n public runExtended (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('runs-extended', id);\n }\n\n // /projects/{id}/files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /projects/{id}/files.zip\n public filesZip () {\n return new APIResource(this).push('files.zip');\n }\n\n // /projects/{id}/sharings\n public sharings () {\n return new APIList(this).push('sharings');\n }\n\n // /projects/{id}/sharings/{id}\n public sharing (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('sharings', id);\n }\n\n}\n\nexport default APIResourceProject\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceFile\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceFile extends APIResource {\n\n /**\n * /files/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('files', id);\n }\n\n // use this to download file content\n public file () {\n return new APIResource(this).push('file');\n }\n\n // /files/{id}/icon\n public icon () {\n return new APIResource(this).push('icon');\n }\n\n // /files/{id}/tags\n public tags () {\n return new APIList(this).push('tags');\n }\n\n}\n\nexport default APIResourceFile\n","import APIResource from './APIResource'\n\n\n/**\n * APIResourceNotification\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceNotification extends APIResource {\n\n /**\n * /notifications/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('notifications', id);\n }\n\n // /notifications/{id}/test\n public test () {\n return new APIResource(this).push('test');\n }\n\n}\n\nexport default APIResourceNotification\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceAccessGroup\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceAccessGroup extends APIResource {\n\n /**\n * /device-groups/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('access-groups', id);\n }\n\n // /access-groups/{id}/users\n public users () {\n return new APIList(this).push('users');\n }\n\n // /access-groups/{id}/users/{id}\n public user (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('users', id);\n }\n\n // /access-groups/{id}/resources\n public resources () {\n return new APIList(this).push('resources');\n }\n\n // /access-groups/{id}/resources/{id}\n public resource (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('resources', id);\n }\n\n}\n\nexport default APIResourceAccessGroup\n","import APIList from './APIList'\n\n\n/**\n * APIListDeviceTime\n *\n * @class\n * @extends APIList\n */\nclass APIListDeviceTime extends APIList {\n\n /**\n * /device-time\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('device-time');\n }\n\n // /device-time/reserved\n public reserved () {\n return new APIList(this).push('reserved');\n }\n\n // /device-time/used\n public used () {\n return new APIList(this).push('used');\n }\n\n}\n\nexport default APIListDeviceTime;\n","import APIList from './APIList'\n\ninterface UploadObj {\n /**\n * Directory\n */\n dir: string;\n\n /**\n * Filename\n */\n filename: string;\n}\n\n/**\n * APIListFiles\n *\n * @class\n * @extends APIList\n */\nclass APIListFiles extends APIList {\n\n // Constructor\n constructor (parent: object) {\n super(parent);\n this.push('files');\n }\n\n // Siplifies process of uploading\n public upload (obj: UploadObj) {\n let form;\n\n // For NodeJS\n // @ts-ignore\n if (global.isNodeJs) {\n // @ts-ignore\n const fs = require('fs');\n // @ts-ignore\n const FormData = require('form-data');\n\n form = new FormData();\n form.append('file', fs.createReadStream(obj.dir + '/' + obj.filename), {\n filename: obj.filename\n });\n\n /**\n * Browser\n * @todo\n */\n } else {\n throw new Error('Not supported yet!');\n }\n\n this.post().headers(form.getHeaders()).data(form);\n }\n\n}\n\nexport default APIListFiles\n","import APIList from './APIList'\n\n\n/**\n * APIListPurchased\n *\n * @class\n * @extends APIList\n */\nclass APIListPurchased extends APIList {\n\n /**\n * /purchased\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('purchased');\n }\n\n}\n\nexport default APIListPurchased\n","import APIList from './APIList'\nimport APIListPurchased from './APIListPurchased'\n\n\n/**\n * APIListServices\n *\n * @class\n * @extends APIList\n */\nclass APIListServices extends APIList {\n\n // Constructor\n constructor (parent: object) {\n super(parent);\n this.push('services');\n }\n\n // /services/purchased\n public purchased () {\n return new APIListPurchased(this);\n }\n\n // /services/available\n public available () {\n this.push('available');\n }\n\n}\n\nexport default APIListServices\n","import APIList from './APIList'\nimport APIResource from './APIResource'\n\n\n/**\n * APIListRuns\n *\n * @class\n * @extends APIList\n */\nclass APIListRuns extends APIList {\n\n /**\n * /runs\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('runs');\n }\n\n // /runs/config\n public config () {\n return new APIResource(this).push('config');\n }\n\n}\n\nexport default APIListRuns\n","import APIList from './APIList'\n\n\n/**\n * APIListNotifications\n *\n * @class\n * @extends APIList\n */\nclass APIListNotifications extends APIList {\n\n /**\n * /notifications\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('notifications');\n }\n\n // /notifications/scopes\n public scopes () {\n return new APIList(this).push('scopes');\n }\n\n // /notifications/channels\n public channels () {\n return new APIList(this).push('channels');\n }\n\n}\n\nexport default APIListNotifications\n","import APIResource from './APIResource'\nimport APIResourceAccount from './APIResourceAccount';\nimport APIResourceBillingPeriod from './APIResourceBillingPeriod'\nimport APIResourceJob from './APIResourceJob'\nimport APIResourceDeviceGroup from './APIResourceDeviceGroup'\nimport APIResourceDeviceSession from './APIResourceDeviceSession'\nimport APIResourceProject from './APIResourceProject'\nimport APIResourceFile from './APIResourceFile'\nimport APIResourceNotification from './APIResourceNotification'\nimport APIResourceAccessGroup from './APIResourceAccessGroup'\n\nimport APIList from './APIList'\nimport APIListDeviceTime from './APIListDeviceTime'\nimport APIListFiles from './APIListFiles'\nimport APIListServices from './APIListServices'\nimport APIListRuns from './APIListRuns'\nimport APIListNotifications from './APIListNotifications'\n\n\n/**\n * APIResourceUser\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceUser extends APIResource {\n\n /**\n * /users/{id} | /me\n *\n * Constructor\n */\n constructor (parent: object, id: number | 'me') {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n\n if (id === 'me') {\n this.push('me');\n } else if (typeof id === 'number') {\n this.push('users', id);\n } else {\n throw new TypeError('id is not a number');\n }\n }\n\n // /users/{id}/account\n public account () {\n return new APIResourceAccount(this);\n }\n\n // /users/{id}/device-time\n public deviceTime () {\n return new APIListDeviceTime(this);\n }\n\n // /users/{id}/device-time-summary\n public deviceTimeSummary () {\n return new APIList(this).push('device-time-summary');\n }\n\n // /users/{id}/services\n public services () {\n return new APIListServices(this);\n }\n\n // /users/{id}/services/{id}\n public service (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('services', id);\n }\n\n // /users/{id}/account-services/{id}/billing-period\n public accountServiceBillingPeriod (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('account-services', id, 'billing-period');\n }\n\n // /users/{id}/billing-periods\n public billingPeriods () {\n return new APIList(this).push('billing-periods');\n }\n\n // /users/{id}/billing-periods/{id}\n public billingPeriod (id: number) {\n return new APIResourceBillingPeriod(this, id);\n }\n\n // /users/{id}/jobs\n public jobs () {\n return new APIList(this).push('jobs');\n }\n\n // /users/{id}/jobs/{id}\n public job (id: number) {\n return new APIResourceJob(this, id);\n }\n\n // /users/{id}/device-groups\n public deviceGroups () {\n return new APIList(this).push('device-groups');\n }\n\n // /users/{id}/device-groups/{id}\n public deviceGroup (id: number) {\n return new APIResourceDeviceGroup(this, id);\n }\n\n // /users/{id}/device-sessions\n public deviceSessions () {\n return new APIList(this).push('device-sessions');\n }\n\n // /users/{id}/device-sessions/{id}\n public deviceSession (id: number) {\n return new APIResourceDeviceSession(this, id);\n }\n\n // /users/{id}/projects\n public projects () {\n return new APIList(this).push('projects');\n }\n\n // /users/{id}/projects/{id}\n public project (id: number) {\n return new APIResourceProject(this, id);\n }\n\n // /users/{id}/files\n public files () {\n return new APIListFiles(this);\n }\n\n // /users/{id}/files/{id}\n public file (id: number) {\n return new APIResourceFile(this, id);\n }\n\n // /users/{id}/runs\n public runs () {\n return new APIListRuns(this);\n }\n\n // /users/{id}/available-build-executors\n public availableBuildExecutors () {\n return new APIList(this).push('available-build-executors');\n }\n\n // /users/{id}/available-frameworks\n public availableFrameworks () {\n return new APIList(this).push('available-frameworks');\n }\n\n /**\n * /users/{id}/\n * /users/{id}/reset-api-key\n */\n public resetApiKey () {\n return new APIResource(this).push('reset-api-key');\n }\n\n // /users/{id}/restore\n public restore () {\n return new APIResource(this).push('restore');\n }\n\n // /users/{id}/account/additional-users\n public accountAdditionalUsers () {\n return new APIList(this) .push('account', 'additional-users');\n }\n\n // /users/{id}/account/additional-users/{id}\n public accountAdditionalUser (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('account', 'additional-users', id);\n }\n\n // /users/{id}/feedback\n public feedback () {\n return new APIResource(this).push('feedback');\n }\n\n // /users/{id}/notifications\n public notifications () {\n return new APIListNotifications(this);\n }\n\n // /users/{id}/notifications/{id}\n public notification (id: number) {\n return new APIResourceNotification(this, id);\n }\n\n // /users/{id}/receipts\n public receipts () {\n return new APIList(this).push('receipts');\n }\n\n // /users/{id}/preferences\n public preferences () {\n return new APIResource(this).push('preferences');\n }\n\n // /users/{id}/ui-preferences\n public uiPreferences () {\n return new APIResource(this).push('ui-preferences');\n }\n\n // /users/{id}/integrations\n public integrations () {\n return new APIList(this).push('integrations');\n }\n\n // /users/{id}/integrations/{id}\n public integration (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('integrations', id);\n }\n\n // /users/{id}/device-usage\n public deviceUsage () {\n return new APIList(this).push('device-usage');\n }\n\n // /users/{id}/statistics\n public statistics () {\n return new APIList(this).push('statistics');\n }\n\n // /users/{id}/statistics\n public deviceStatistics () {\n return new APIList(this).push('device-statistics');\n }\n\n // /users/{id}/access-groups\n public accessGroups () {\n return new APIList(this).push('access-groups');\n }\n\n // /users/{id}/access-groups/{id}\n public accessGroup (id: number) {\n return new APIResourceAccessGroup(this, id);\n }\n\n}\n\nexport default APIResourceUser\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceDevice\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceDevice extends APIResource {\n\n /**\n * /devices/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('devices', id);\n }\n\n // /devices/{id}/properties\n public properties () {\n return new APIList(this).push('properties');\n }\n\n}\n\nexport default APIResourceDevice\n","import APIResource from './APIResource'\n\n\n/**\n * APIResourceUserSession\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceUserSession extends APIResource {\n\n // Constructor\n // /user-sessions\n constructor (parent: object) {\n super(parent);\n this.push('user-sessions');\n }\n\n // /user-sessions/login\n public login (data: object) {\n return new APIResource(this).push('login').post().data(data);\n }\n\n // /user-sessions/logout\n public logout () {\n return new APIResource(this).push('logout').post();\n }\n\n // /user-sessions/{name}-login\n public sso (name: string) {\n return new APIResource(this).push(name + '-login');\n }\n\n // /user-sessions/portal-login\n public portalLogin () {\n return new APIResource(this).push('portal-login').post();\n }\n\n}\n\nexport default APIResourceUserSession\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIAdminResourceCluster\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResourceCluster extends APIResource {\n\n /**\n * /clusters/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('clusters', id);\n }\n\n // /clusters/{id}/devices\n public devices () {\n return new APIList(this).push('devices');\n }\n\n}\n\nexport default APIAdminResourceCluster\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIAdminResourceDeviceTime\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResourceDeviceTime extends APIResource {\n\n /**\n * /device-time\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('device-time');\n }\n\n // /device-time/count-session-report\n public countSessionReport () {\n return new APIList(this).push('count-session-report');\n }\n\n // /device-time/step-time-report\n public stepTimeReport () {\n return new APIList(this).push('step-time-report');\n }\n\n}\n\nexport default APIAdminResourceDeviceTime\n","import APIList from './APIList'\nimport APIResource from './APIResource'\nimport APIResourceRun from './APIResourceRun'\n\n\n/**\n * APIAdminResourceRun\n *\n * @class\n * @extends APIResourceRun\n */\nclass APIAdminResourceRun extends APIResourceRun {\n\n // /runs/{id}/abort\n public abort () {\n return new APIResource(this).push('abort').post();\n }\n\n // /runs/{id}/retry\n public retry (ids?: Array) {\n const a = new APIResource(this).push('retry').setRequestConfig({\n timeout: 0\n }).post();\n\n if (ids != null) {\n a.params({\n deviceRunIds: ids\n });\n }\n\n return a;\n }\n\n // /runs/{id}/changebillable\n public changeBillable () {\n return new APIResource(this).push('changebillable');\n }\n\n // /runs/{id}/changepriority\n public changePriority () {\n return new APIResource(this).push('changepriority');\n }\n\n // /runs/{id}/screenshot-names\n public screenshotNames () {\n return new APIList(this).push('screenshot-names');\n }\n\n // /runs/{id}/screenshots\n public screenshots () {\n return new APIList(this).push('screenshots');\n }\n\n // /runs/{id}/data-availability\n public dataAvailability () {\n return new APIList(this).push('data-availability');\n }\n\n // /runs/{id}/build-logs.zip\n public buildLogsZip (ids?: Array) {\n const a = new APIResource(this).push('build-logs.zip');\n\n if (ids != null) {\n a.params({\n deviceRunIds: ids\n });\n }\n\n return a;\n }\n\n // /runs/{id}/logs.zip\n public logsZip () {\n return new APIResource(this).push('logs.zip');\n }\n\n // /runs/{id}/performance.zip\n public performanceZip () {\n return new APIResource(this).push('performance.zip');\n }\n\n // /runs/{id}/screenshots.zip\n public screenshotsZip () {\n return new APIResource(this).push('screenshots.zip');\n }\n\n}\n\nexport default APIAdminResourceRun\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIAdminResourceDevice\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResourceDevice extends APIResource {\n\n /**\n * /admin/devices/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('admin');\n this.push('devices', id);\n }\n\n // /admin/devices/{id}/queue\n public queue () {\n return new APIList(this).push('queue');\n }\n\n}\n\nexport default APIAdminResourceDevice\n","import APIResource from './APIResource'\nimport APIList from './APIList';\n\nimport InputFileset from './extra-class/InputFileset';\nimport OutputFileset from './extra-class/OutputFileset';\n\n\n/**\n * APIAdminResourceDevice\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResourceDeviceSession extends APIResource {\n\n /**\n * /device-sessions/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('device-sessions', id);\n }\n\n // /admin/device-sessions/{id}/changebillable\n public changeBillable () {\n const a = new APIResource(this);\n a.stack.splice(a.stack.length - 2, 0, 'admin');\n return a.push('changebillable').post();\n }\n\n // /device-sessions/{id}/connections\n public connections () {\n return new APIList(this).push('connections');\n }\n\n // /device-sessions/{id}/connections/{id}\n public connection (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('connections', id);\n }\n\n // /device-sessions/{id}/output-file-set\n public input () {\n return new InputFileset(this);\n }\n\n // /device-sessions/{id}/output-file-set\n public output () {\n return new OutputFileset(this);\n }\n\n // /device-sessions/{id}/release\n public release () {\n return new APIResource(this).push('release').post();\n }\n\n // /device-sessions/{id}/screenshots\n public screenshots () {\n return new APIList(this).push('screenshots');\n }\n\n // /device-sessions/{id}/screenshots/{id}\n public screenshot (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('screenshots', id);\n }\n\n // /device-sessions/{id}/steps\n public steps () {\n return new APIList(this).push('steps');\n }\n\n // /device-sessions/{id}/steps/{id}\n public step (id: number | 'current') {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('steps', id);\n }\n\n // /device-sessions/{id}/steps/current\n public currentStep () {\n return this.step('current');\n }\n\n // /device-sessions/{id}/test-case-runs\n public testCaseRuns () {\n return new APIList(this).push('test-case-runs');\n }\n\n}\n\nexport default APIAdminResourceDeviceSession\n","import APIList from './APIList'\n\nimport APIResource from './APIResource'\nimport APIResourceFile from './APIResourceFile'\n\nimport APIAdminResourceCluster from './APIAdminResourceCluster';\nimport APIAdminResourceDeviceTime from './APIAdminResourceDeviceTime';\nimport APIAdminResourceRun from './APIAdminResourceRun';\nimport APIAdminResourceDevice from './APIAdminResourceDevice';\nimport APIAdminResourceDeviceSession from './APIAdminResourceDeviceSession';\nimport APIResourceProject from './APIResourceProject';\nimport APIResourceAccessGroup from './APIResourceAccessGroup';\n\n\n/**\n * APIAdminResource\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResource extends APIResource {\n\n /**\n * /admin\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n }\n\n private withAdmin () {\n return new APIResource(this).push('admin');\n }\n\n // /clusters\n public clusters () {\n return new APIList(this).push('clusters');\n }\n\n // /clusters/{id}\n public cluster (id: number) {\n return new APIAdminResourceCluster(this, id);\n }\n\n // /admin/devices\n public devices () {\n return new APIList(this).push('admin', 'devices');\n }\n\n // /admin/devices/{id}\n public device (id: number) {\n return new APIAdminResourceDevice(this, id);\n }\n\n // /admin/device-models\n public deviceModels () {\n return new APIList(this).push('admin', 'device-models');\n }\n\n // /admin/device-models/{id}\n public deviceModel (id: number) {\n return new APIResource(this).push('admin', 'device-models', id);\n }\n\n // /device-sessions\n public deviceSessions () {\n return new APIList(this).push('admin', 'device-sessions');\n }\n\n // /device-sessions/{id}\n public deviceSession (id: number) {\n return new APIAdminResourceDeviceSession(this, id);\n }\n\n // /device-status\n public deviceStatuses () {\n return new APIList(this).push('device-status');\n }\n\n // /device-time\n public deviceTime () {\n return new APIAdminResourceDeviceTime(this.withAdmin());\n }\n\n // /admin/interactive-queue\n public interactiveQueue () {\n return new APIList(this).push('admin', 'interactive-queue');\n }\n\n // /files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /files/{id}\n public file (id: number) {\n return new APIResourceFile(this, id);\n }\n\n // /admin/overview\n public overview () {\n return new APIResource(this).push('admin', 'overview');\n }\n\n // /projects\n public projects () {\n return new APIList(this).push('projects');\n }\n\n // /projects/{id}\n public project (id: number) {\n return new APIResourceProject(this, id);\n }\n\n // /runs\n public runs () {\n return new APIList(this).push('admin', 'runs');\n }\n\n // /runs/{id}\n public run (id: number) {\n return new APIAdminResourceRun(this, id);\n }\n\n // /users\n public users () {\n return new APIList(this).push('users');\n }\n\n // /access-groups\n public accessGroups () {\n return new APIList(this).push('access-groups');\n }\n\n // /access-groups/{id}\n public accessGroup (id: number) {\n return new APIResourceAccessGroup(this, id);\n }\n\n}\n\nexport default APIAdminResource\n","import './finka';\nimport ApiConfig from './ApiConfig';\n\nimport axios, { AxiosInstance } from 'axios';\n\n// @ts-ignore\nimport { version } from '../package.json';\n\nimport APIList from './api/APIList';\nimport APIListDevices from './api/APIListDevices';\nimport APIListUsers from './api/APIListUsers';\n\nimport APIResourceUser from './api/APIResourceUser';\nimport APIResourceDevice from './api/APIResourceDevice';\nimport APIResourceDeviceGroup from './api/APIResourceDeviceGroup';\nimport APIResourceUserSession from './api/APIResourceUserSession';\n\nimport APIAdminResource from './api/APIAdminResource';\nimport APIResourceAccount from \"./api/APIResourceAccount\";\n\n// @ts-ignore\nif (global.isNodeJs) {\n // Set User-Agent\n axios.defaults.headers.common['User-Agent'] = `Bitbar Cloud API Client for JavaScript v${version}`;\n}\n\n// Disable max content length\naxios.defaults.maxContentLength = 1073741824; // 1GB\n\n\n/**\n * API\n * Root for other API resources\n */\nclass API {\n\n // Main config\n private config: ApiConfig;\n\n // axios config\n private axiosConfig: ApiConfig;\n\n // axios instance\n public axios: AxiosInstance;\n\n\n constructor (config: ApiConfig) {\n if (config == null) {\n throw new Error('config cannot be empty');\n }\n\n this.config = config;\n this.axiosConfig = {};\n\n if (this.config.cloudUrl == null) {\n throw new TypeError('cloudUrl cannot be empty');\n } else if (typeof this.config.cloudUrl !== 'string') {\n throw new TypeError('cloudUrl must be a string');\n } else if (!/^https?:\\/\\/.{2,}/.test(this.config.cloudUrl)) {\n throw new Error(\"cloudUrl doesn't look like a URL\");\n }\n\n // Validate and correct cloudUrl if needed\n this.axiosConfig.baseURL = this.config.cloudUrl.replace(/\\/+$/, '') + '/api'\n\n // Check v2\n this.config.v2 = !!this.config.v2;\n if (this.config.v2) {\n this.axiosConfig.baseURL += '/v2';\n }\n\n // Check if apiKey is set\n if (this.config.apiKey) {\n if (typeof this.config.apiKey !== 'string') {\n throw new TypeError('apiKey must be a string');\n } else if (!/^[A-Za-z0-9]{32}$/.test(this.config.apiKey)) {\n throw new Error(\"apiKey is in the wrong format\");\n }\n\n this.axiosConfig.auth = {\n username: this.config.apiKey,\n password: ''\n };\n }\n\n // Create axios instance\n this.axios = axios.create(this.axiosConfig);\n }\n\n\n // --- Resources starts here --- //\n\n // /user-sessions\n public userSession () {\n return new APIResourceUserSession(this);\n }\n\n // /user/{id}\n public user (id: number | 'me') {\n return new APIResourceUser(this, id);\n }\n\n // /users\n public users () {\n return new APIListUsers(this);\n }\n\n // /me\n public me () {\n return this.user('me');\n }\n\n // /admin\n public admin () {\n return new APIAdminResource(this);\n }\n\n // /devices\n public devices () {\n return new APIListDevices(this);\n }\n\n // /devices/{id}\n public device (id: number) {\n return new APIResourceDevice(this, id);\n }\n\n // /device-groups\n public deviceGroups () {\n return new APIList(this).push('device-groups');\n }\n\n // /device-groups/{id}\n public deviceGroup (id: number) {\n return new APIResourceDeviceGroup(this, id);\n }\n\n // /label-groups\n public labelGroups () {\n return new APIList(this).push('label-groups');\n }\n\n // /device-statistics\n public deviceStatistics () {\n return new APIList(this).push('device-statistics');\n }\n\n // /accounts/{id}\n public account (id: number) {\n return new APIResourceAccount(this, id)\n }\n\n}\n\n\nexport default API;\n","import API from './API';\nimport FilterBuilder from './FilterBuilder';\n\n/**\n * Cloud API Client\n */\nconst CloudAPIClient = {\n API,\n FilterBuilder\n}\n\nexport default CloudAPIClient;\n"],"names":["finka","ALLOWED_HTTP_METHODS","APIEntity","[object Object]","parent","this","stack","requestConfig","root","Array","isArray","push","setRequestConfig","items","item","pop","absolute","url","join","axiosConfig","baseURL","Object","deepAssign","key","headers","_headers","replace","letter","toUpperCase","name","NAME","toLocaleUpperCase","Error","keys","method","params","data","Content-Type","qs","stringify","arrayFormat","startsWith","paramsSerializer","axios","request","Filter","value","operand","FilterBuilder","filters","checkNull","wrap","length","i","v","Date","getTime","endsWith","add","undefined","filter","isFilterPart","SyntaxError","str","test","parts","part","val","APIOrder","APIList","post","send","order","asc","sort","limit","Number","isNatural","getParams","offset","from","to","idx","page","getLimit","query","search","isFilterBuilder","toString","prototype","all","noLimit","cut","between","APIResource","APIListDevices","super","id","APIListUsers","APIResourceAdditionalUser","APIResourceAccount","APIResourceBillingPeriod","responseType","APIResourceBuild","APIResourceJob","APIResourceDeviceGroup","InputFileset","NON_MEDIA_FILES_FILTER","eq","notin","OutputFileset","screenshot","files","tag","APIResourceDeviceSession","step","output","videos","APIResourceRun","APIResourceProject","APIResourceFile","APIResourceNotification","APIResourceAccessGroup","APIListDeviceTime","APIListFiles","obj","form","global","isNodeJs","fs","require","append","createReadStream","dir","filename","getHeaders","APIListPurchased","APIListServices","APIListRuns","APIListNotifications","APIResourceUser","TypeError","APIResourceDevice","APIResourceUserSession","APIAdminResourceCluster","APIAdminResourceDeviceTime","APIAdminResourceRun","ids","a","timeout","deviceRunIds","APIAdminResourceDevice","APIAdminResourceDeviceSession","splice","APIAdminResource","withAdmin","defaults","common","maxContentLength","API","config","cloudUrl","v2","apiKey","auth","username","password","create","user"],"mappings":";ohBAGAA,QCQKC,GAAL,SAAKA,GACHA,YACAA,cACAA,kBAHF,CAAKA,IAAAA,OAaL,MAAMC,EA8BJC,YAAaC,GACXC,KAAKC,MAAQ,GACbD,KAAKE,cAAgB,GAEjBH,aAAkBF,GACpBG,KAAKG,KAAOJ,EAAOI,KAEfC,MAAMC,QAAQN,EAAOE,QACvBD,KAAKM,QAAQP,EAAOE,OAGM,MAAxBF,EAAOG,eACTF,KAAKO,iBAAiBR,EAAOG,gBAG/BF,KAAKG,KAAOJ,EAWTD,QAASU,GACd,IAAK,MAAMC,KAAQD,EACjBR,KAAKC,MAAMK,KAAKG,GAElB,OAAOT,KASFF,MAEL,OADAE,KAAKC,MAAMS,MACJV,KAQFF,MAAOa,GAAW,GACvB,IAAIC,EAAM,IAAIZ,KAAKC,MAAMY,KAAK,KAO9B,OALIF,IAEFC,EAAMZ,KAAKG,KAAKW,YAAYC,QAAUH,G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Q8F,GACb,OAAO,IAAI6C,EAAkBzI,KAAM4F,GAI9B9F,eACL,OAAO,IAAIkE,EAAQhE,MAAMM,KAAK,iBAIzBR,YAAa8F,GAClB,OAAO,IAAIQ,EAAuBpG,KAAM4F,GAInC9F,cACL,OAAO,IAAIkE,EAAQhE,MAAMM,KAAK,gBAIzBR,mBACL,OAAO,IAAIkE,EAAQhE,MAAMM,KAAK,qBAIzBR,QAAS8F,GACd,OAAO,IAAIG,EAAmB/F,KAAM4F,KC7ItCjD,cAAAA"} \ No newline at end of file +{"version":3,"file":"bitbar-cloud-api-client.min.js","sources":["../src/finka.ts","../src/api/APIEntity.ts","../src/Filter.ts","../src/FilterBuilder.ts","../src/api/APIList.ts","../src/api/APIResource.ts","../src/api/APIListDevices.ts","../src/api/APIListUsers.ts","../src/api/APIResourceAdditionalUser.ts","../src/api/APIResourceAccount.ts","../src/api/APIResourceBillingPeriod.ts","../src/api/APIResourceBuild.ts","../src/api/APIResourceJob.ts","../src/api/APIResourceDeviceGroup.ts","../src/api/extra-class/InputFileset.ts","../src/api/extra-class/OutputFileset.ts","../src/api/APIResourceDeviceSession.ts","../src/api/APIResourceRun.ts","../src/api/APIResourceProject.ts","../src/api/APIResourceFile.ts","../src/api/APIResourceNotification.ts","../src/api/APIResourceAccessGroup.ts","../src/api/APIListDeviceTime.ts","../src/api/APIListFiles.ts","../src/api/APIListPurchased.ts","../src/api/APIListServices.ts","../src/api/APIListRuns.ts","../src/api/APIListNotifications.ts","../src/api/APIResourceAccountService.ts","../src/api/APIResourceUser.ts","../src/api/APIResourceDevice.ts","../src/api/APIResourceUserSession.ts","../src/api/APIAdminResourceCluster.ts","../src/api/APIAdminResourceDeviceTime.ts","../src/api/APIAdminResourceRun.ts","../src/api/APIAdminResourceDevice.ts","../src/api/APIAdminResourceDeviceSession.ts","../src/api/APIAdminResource.ts","../src/API.ts","../src/CloudAPIClient.ts"],"sourcesContent":["// @ts-ignore\nimport finka from '@bitbar/finka';\n\nfinka();\n\nexport default {};\n","import qs from 'qs';\nimport { AxiosRequestConfig, Method } from 'axios';\n\n\n/**\n * Allowed methods\n *\n * @constant\n * @type {Array}\n * @default\n */\nenum ALLOWED_HTTP_METHODS {\n GET = 'GET',\n POST = 'POST',\n DELETE = 'DELETE'\n};\n\n\n/**\n * APIEntity\n *\n * @class\n * @abstract\n */\nclass APIEntity {\n\n /**\n * Stack\n *\n * @public\n * @type {Array}\n */\n public stack: Array;\n\n /**\n * object of request config\n *\n * @protected\n * @type {AxiosRequestConfig}\n */\n protected requestConfig: AxiosRequestConfig;\n\n /**\n * Root\n *\n * @public\n * @type {API}\n */\n public root: object;\n\n /**\n * Constructor\n * @param {APIEntity|object} [parent] - Specifies a parent from which should be inherited properties\n */\n constructor (parent: APIEntity | object) {\n this.stack = [];\n this.requestConfig = {};\n\n if (parent instanceof APIEntity) {\n this.root = parent.root;\n\n if (Array.isArray(parent.stack)) {\n this.push(...parent.stack);\n }\n\n if (parent.requestConfig != null) {\n this.setRequestConfig(parent.requestConfig);\n }\n } else {\n this.root = parent;\n }\n }\n\n /**\n * Push\n *\n * @public\n * @param {string|number} items... - Items that should be pushed to stack\n * @returns this\n */\n public push (...items: Array) {\n for (const item of items) {\n this.stack.push(item);\n }\n return this;\n }\n\n /**\n * Pop\n *\n * @public\n * @return this\n */\n public pop () {\n this.stack.pop();\n return this;\n }\n\n /**\n * To URL\n *\n * @param {boolean} absolute\n */\n public toUrl (absolute = false) {\n let url = `/${this.stack.join('/')}`;\n\n if (absolute) {\n // @ts-ignore\n url = this.root.axiosConfig.baseURL + url;\n }\n\n return url;\n }\n\n /**\n * Set request config\n *\n * @public\n * @param {AxiosRequestConfig} requestConfig - object of request config to be set\n * @returns this\n */\n public setRequestConfig (requestConfig: AxiosRequestConfig) {\n Object.deepAssign(this.requestConfig, requestConfig);\n return this;\n }\n\n /**\n * Remove request config key\n *\n * @public\n * @param {string} key - Key to me removed from request config\n * @returns this\n */\n public removeRequestConfig (key: string) {\n // @ts-ignore\n delete this.requestConfig[key];\n return this;\n }\n\n /**\n * Set headers\n *\n * @public\n * @param {object} headers - Headers object\n * @returns this\n */\n public headers (headers: object) {\n const _headers = {};\n\n // Unify/Standarize headers keys\n for (const key in headers) {\n const newKey = key.replace(/(?:^|-)([a-z])/g, (letter) => letter.toUpperCase());\n // @ts-ignore\n _headers[newKey] = headers[key];\n }\n\n // Set\n return this.setRequestConfig({\n headers: _headers\n });\n }\n\n /**\n * Set HTTP method\n *\n * @public\n * @param {string} name - HTTP methods name\n * @returns this\n */\n public method (name: Method) {\n const NAME: Method = name.toLocaleUpperCase();\n\n // @ts-ignore\n if (!ALLOWED_HTTP_METHODS[NAME]) {\n throw new Error(`Method '${NAME}' is not allowed! You can use: ${Object.keys(ALLOWED_HTTP_METHODS).join(', ')}`);\n }\n\n return this.setRequestConfig({\n method: NAME\n });\n }\n\n /**\n * Set GET as HTTP method\n *\n * @public\n * @returns this\n */\n public get () {\n return this.method('GET');\n }\n\n /**\n * Set POST as HTTP method\n *\n * @public\n * @returns this\n */\n public post () {\n return this.method('POST');\n }\n\n /**\n * Set params\n *\n * @public\n * @param {object} params - object of params to be set\n * @returns this\n */\n public params (params: object) {\n Object.deepAssign(this.requestConfig, {\n params\n });\n return this;\n }\n\n /**\n * Get params\n *\n * @public\n * @returns object\n */\n public getParams () {\n return this.requestConfig.params == null ? {} : this.requestConfig.params;\n }\n\n /**\n * Remove params key\n *\n * @public\n * @param {string} key - Key to me removed from params\n * @returns this\n */\n public removeParam (key: string) {\n delete this.requestConfig.params[key];\n return this;\n }\n\n /**\n * Set data\n *\n * @public\n * @param {object} data - object of data to be set\n * @returns this\n */\n public data (data: object) {\n Object.deepAssign(this.requestConfig, {\n data\n });\n return this;\n }\n\n /**\n * Set JSON data\n *\n * @public\n * @param {object} data - JSON object to be set\n * @returns this\n */\n public jsonData (data: object) {\n this.headers({\n 'Content-Type': 'application/json'\n }).data(data);\n return this;\n }\n\n /**\n * Set form data\n *\n * @public\n * @param {object} data - JSON object to be set\n * @returns this\n */\n public formData (data: FormData) {\n this.headers({\n 'Content-Type': 'multipart/form-data'\n }).data(data);\n return this;\n }\n\n /**\n * Custom params serializer\n * @private\n * @param {object} params\n */\n private paramsSerializer (params: object) {\n return qs.stringify(params, {\n arrayFormat: 'brackets'\n });\n }\n\n /**\n * Send request\n *\n * @public\n * @returns Promise\n */\n public send () {\n const requestConfig = Object.deepAssign({}, this.requestConfig, {\n url: `/${this.stack.join('/')}`\n });\n\n // Set default headers\n if (requestConfig.headers == null) {\n requestConfig.headers = {};\n }\n\n // Set default Content-Type\n if (requestConfig.headers['Content-Type'] == null) {\n requestConfig.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';\n }\n\n // Convert data if needed\n if (requestConfig.method === 'POST' &&\n requestConfig.headers['Content-Type'].startsWith('application/x-www-form-urlencoded') &&\n requestConfig.data != null) {\n requestConfig.data = qs.stringify(requestConfig.data);\n }\n\n if (requestConfig.params) {\n requestConfig.paramsSerializer = this.paramsSerializer;\n }\n\n // Send request\n // @ts-ignore\n return this.root.axios.request(requestConfig);\n }\n}\n\n\nexport default APIEntity;\n","/**\n * Filter\n */\n\nclass Filter {\n public name: string;\n public value: any;\n public operand: string;\n\n constructor (name: string, value: any, operand: string) {\n this.name = name;\n this.value = value;\n this.operand = operand;\n }\n}\n\nexport default Filter;\n","import './finka';\nimport Filter from './Filter';\n\n/**\n * FilterBuilder\n *\n * Builds filter string according to Bitbar Cloud backend convention\n */\n\nclass FilterBuilder {\n\n private filters: Array;\n\n constructor () {\n this.filters = [];\n }\n\n /**\n * Add filter to filters list\n * @param name {string} Name\n * @param value {*} Value\n * @param operand {string} Operand\n * @param [checkNull=false] {boolean} Check null?\n * @returns {FilterBuilder}\n */\n private add (name: string, value: any, operand: string, checkNull = false): FilterBuilder {\n\n value = Array.wrap(value);\n\n if (value.length === 0) {\n return this;\n }\n\n // auto-convert\n for (let i = 0; i < value.length; i++) {\n const v = value[i];\n if (typeof v === 'object' && v instanceof Date) {\n value[i] = v.getTime();\n }\n }\n\n let isNull = false;\n if (checkNull) {\n // check null existence\n for (const v of value) {\n if (v !== null) {\n continue;\n isNull = true;\n }\n }\n\n if (isNull) {\n value = value.filter((item: any) => item !== null);\n operand += 'ornull';\n }\n }\n\n // @ts-ignore\n if (operand.endsWith('ornull') && value.length === 0) {\n operand = 'isnull';\n }\n\n // add filter\n this.filters.push(new Filter(name, value, operand));\n\n return this;\n }\n\n\n\n public gt (name: string, value: number) {\n return this.add(name, value, 'gt');\n }\n\n public lt (name: string, value: number) {\n return this.add(name, value, 'lt');\n }\n\n public after (name: string, value: Date | number) {\n return this.add(name, value, 'after', true);\n }\n\n public afterorequal (name: string, value: Date | number) {\n return this.add(name, value, 'afterorequal', true);\n }\n\n public before (name: string, value: Date | number) {\n return this.add(name, value, 'before', true);\n }\n\n public beforeorequal (name: string, value: Date | number) {\n return this.add(name, value, 'beforeorequal', true);\n }\n\n public on (name: string, value: any) {\n return this.add(name, value, 'on');\n }\n\n public eq (name: string, value: any) {\n return this.add(name, value, 'eq');\n }\n\n public contains (name: string, value: string) {\n return this.add(name, value, 'contains');\n }\n\n public like (name: string, value: string) {\n return this.add(name, value, 'like');\n }\n\n public isnull (name: string) {\n return this.add(name, undefined, 'isnull');\n }\n\n public in (name: string, value: Array) {\n return this.add(name, value, 'in', true);\n }\n\n public notin (name: string, value: Array) {\n return this.add(name, value, 'notin', true);\n }\n\n\n public raw (filter: Filter) {\n const filters = Array.wrap(filter);\n for (const filter of filters) {\n if (this.isFilterPart(filter)) {\n this.filters.push(filter);\n } else {\n throw new SyntaxError(`Filter ${filter} has invalid syntax`);\n }\n }\n }\n\n /**\n * Check if given string is proper filter part\n */\n public isFilterPart (str: string) {\n return /^[a-zA-Z0-9.]{2,12}_(?:isnull$|(?:gt|lt|(?:after|before)(?:orequal)?|on|eq|contains|like|(?:not)?in)_)/.test( str);\n }\n\n /**\n * To string\n */\n public toString () {\n const parts: Array = [];\n\n let part: string,\n val: string;\n\n for (const filter of this.filters) {\n if (typeof filter === 'string') {\n part = filter;\n } else {\n val = '';\n if (filter.value.length > 1 || typeof filter.value[0] !== 'undefined') {\n val = `_${filter.value.join('|')}`;\n }\n part = `${filter.name}_${filter.operand}${val}`;\n }\n parts.push(part);\n }\n\n return parts.join(';');\n }\n}\n\n\nexport default FilterBuilder;\n","import APIEntity from './APIEntity'\nimport FilterBuilder from '../FilterBuilder'\n\n\n/**\n * Default limit\n *\n * @constant\n * @type {number}\n * @default\n */\nconst DEFAULT_LIMIT = 20;\n\n/**\n * Default offset\n *\n * @constant\n * @type {number}\n * @default\n */\nconst DEFAULT_OFFSET = 0;\n\n/**\n * API Order Enum\n */\nenum APIOrder {\n 'asc' = 'a',\n 'desc' = 'd'\n};\n\n\n/**\n * APIList\n *\n * @class\n * @extends APIEntity\n */\nclass APIList extends APIEntity {\n\n /**\n * Create\n * Shortcut for sending data POST\n *\n * @param {object} data\n */\n public create (data: object) {\n return this.post().data(data).send();\n }\n\n /**\n * Sets sorting\n *\n * @public\n * @param {string} name - Name of the column according to which the data will be sorted\n * @param {string} [order=a] - Sorting order. Possibilities: 'a', 'd'\n * @returns this\n */\n public sort (name: string, order: APIOrder = APIOrder.asc) {\n // if order not in ['a', 'd']\n // throw new Error(`Order '\\${order}' is invalid! Use 'a' for ascending or 'd' for descending.`);\n\n return this.params({\n sort: `${name}_${order}`\n });\n }\n\n /**\n * Sets limit\n *\n * @public\n * @param {number} [limit=DEFAULT_LIMIT] - Limit to be set\n * @returns this\n */\n public limit (limit = DEFAULT_LIMIT) {\n if (!Number.isNatural(limit)) {\n throw new Error(`Limit '${limit}' is invalid!`);\n }\n\n return this.params({\n limit\n });\n }\n\n /**\n * Gets limit\n *\n * @public\n * @returns number\n */\n public getLimit () {\n const params = this.getParams();\n return params.limit == null ? DEFAULT_LIMIT : params.limit;\n }\n\n /**\n * Disables limit\n *\n * @public\n * @returns this\n */\n public noLimit () {\n return this.limit(0);\n }\n\n /**\n * Sets offset\n *\n * @public\n * @param {number} [offset=DEFAULT_OFFSET] - Offset to be set\n * @returns this\n */\n public offset (offset: number = DEFAULT_OFFSET) {\n if (!Number.isNatural(offset)) {\n throw new Error(`Offset '${offset}' is invalid!`);\n }\n\n return this.params({\n offset\n });\n }\n\n /**\n * Sets limit and offset so that will request from BE records between range\n *\n * @public\n * @param {number} from - From index\n * @param {number} to - To index\n * @returns this\n */\n public between (from: number, to: number) {\n if (!Number.isNatural(from)) {\n throw new Error(`From '${from}' is invalid!`);\n }\n\n if (!Number.isNatural(to)) {\n throw new Error(`To '${to}' is invalid!`);\n }\n\n return this.params({\n offset: from,\n limit: 1 + (to - from)\n });\n }\n\n /**\n * Sets limit and offset so that will request from BE one record on given index\n *\n * @public\n * @param {number} idx - Index\n * @returns this\n */\n public only (idx: number) {\n if (!Number.isNatural(idx)) {\n throw new Error(`Index '${idx}' is invalid!`);\n }\n\n return this.params({\n offset: idx,\n limit: 1\n });\n }\n\n /**\n * Gets current limit and sets offset so that will request from BE one page of records\n *\n * @public\n * @param {number} [page=1] - Page number (counted from 1)\n * @returns this\n */\n public page (page = 1) {\n if (!Number.isNatural(page) || page == 0) {\n throw new Error(`Page '${page}' is invalid!`);\n }\n\n const limit = this.getLimit();\n const offset = (page - 1) * limit;\n\n return this.params({\n offset,\n limit\n });\n }\n\n /**\n * Sets search\n *\n * query param is working like SQL LIKE. BE sets wraps around query with %, and replaces every white character\n * with %. So e.g. if query='my device', then it's searching for '%my%device%' in DB.\n *\n * @public\n * @param {string} query - Query to search for\n * @returns this\n */\n public search (query: string) {\n if (typeof query !== 'string') {\n throw new Error('Search query must be a string!');\n }\n\n return this.params({\n search: query\n });\n }\n\n /**\n * Sets filter\n *\n * @public\n * @param {FilterBuilder|string} filter - Filter\n * @returns this\n */\n public filter (filter: FilterBuilder | string) {\n const isFilterBuilder = filter instanceof FilterBuilder;\n\n if (typeof filter !== 'string' && !isFilterBuilder) {\n throw new Error('Filter must be either string or instance of FilterBuilder');\n }\n\n if (isFilterBuilder) {\n filter = filter.toString();\n }\n\n return this.params({\n filter\n });\n }\n}\n\ninterface APIList {\n\n /**\n * Alias for 'noLimit'\n *\n * @public\n * @see noLimit\n * @returns this\n */\n all: typeof APIList.prototype.noLimit;\n\n /**\n * Alias for 'between'\n *\n * @public\n * @param {number} from - From idx\n * @param {number} to - To idx\n * @returns this\n */\n cut: typeof APIList.prototype.between;\n}\n\nAPIList.prototype.all = APIList.prototype.noLimit;\nAPIList.prototype.cut = APIList.prototype.between;\n\nexport default APIList;\n","import APIEntity from './APIEntity'\n\n\n/**\n * APIResource\n *\n * @class\n * @extends APIEntity\n */\nclass APIResource extends APIEntity {\n\n /**\n * Set DELETE as HTTP method\n *\n * @public\n * @returns this\n */\n public delete () {\n return this.method('DELETE');\n }\n}\n\n\ninterface APIResource {\n\n /**\n * Alias for 'post'\n *\n * @public\n * @see post\n * @returns this\n */\n update: typeof APIResource.prototype.post;\n}\n\n\nexport default APIResource\n","import APIList from './APIList'\nimport APIResource from './APIResource'\n\n\n/**\n * APIListDevices\n *\n * @class\n * @extends APIList\n */\nclass APIListDevices extends APIList {\n\n /**\n * /devices\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('devices');\n }\n\n // /devices/filters\n public filters () {\n return new APIResource(this).push('filters');\n }\n\n // /devices/cleanup-configurations\n public cleanupConfigurations () {\n return new APIList(this).push('cleanup-configurations');\n }\n\n /**\n * /devices/cleanup-configurations/{id}\n *\n * @param {number} id - Resource ID\n */\n public cleanupConfiguration (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('cleanup-configurations', id);\n }\n\n}\n\nexport default APIListDevices;\n","import APIList from './APIList'\nimport APIResource from './APIResource'\n\n\n/**\n * APIListDevices\n *\n * @class\n * @extends APIList\n */\nclass APIListUsers extends APIList {\n\n /**\n * /users\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('users');\n }\n\n // /users/activate\n public activate () {\n return new APIResource(this).push('activate');\n }\n\n // /users/recoveries\n public recoveries () {\n return new APIResource(this).push('recoveries');\n }\n\n // /users/passwordRecovery\n public passwordRecovery () {\n return new APIResource(this).push('password-recovery');\n }\n\n // /users/resetApiKey\n public resetApiKey () {\n return new APIResource(this).push('reset-api-key');\n }\n\n // /users/resetApiKey\n public validateVatId () {\n return new APIResource(this).push('validateVatId');\n }\n\n}\n\nexport default APIListUsers;\n","import APIResource from './APIResource'\n\n/**\n * APIResourceAdditionalUser\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceAdditionalUser extends APIResource {\n\n /**\n * /additional-users/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('additional-users', id);\n }\n\n // /account/resend-activation\n public resendActivation () {\n return new APIResource(this).push('resend-activation');\n }\n\n}\n\nexport default APIResourceAdditionalUser\n","import APIResource from './APIResource'\nimport APIResourceAdditionalUser from './APIResourceAdditionalUser';\n\nimport APIList from './APIList'\n\n/**\n * APIResourceAccount\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceAccount extends APIResource {\n\n /**\n * /account\n *\n * Constructor\n */\n constructor (parent: object, id?: number) {\n super(parent);\n if(id)\n this.push('accounts', id)\n else\n this.push('account');\n }\n\n // /accounts/{id}/preferences\n public preferences () {\n return new APIResource(this).push('preferences');\n }\n\n // /accounts/{id}/concurrency-status\n public concurrencyStatus () {\n return new APIResource(this).push('concurrency-status');\n }\n\n // /account/roles\n public roles () {\n return new APIList(this).push('roles');\n }\n\n // /account/roles/{id}\n public role (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('roles', id);\n }\n\n // /account/additional-users\n public additionalUsers () {\n return new APIList(this).push('additional-users');\n }\n\n // /account/additional-users/{id}\n public additionalUser (id: number) {\n return new APIResourceAdditionalUser(this, id);\n }\n\n}\n\nexport default APIResourceAccount\n","import APIResource from './APIResource'\n\n\n/**\n * APIResourceBillingPeriod\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceBillingPeriod extends APIResource {\n\n /**\n * /billing-periods/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('billing-periods', id);\n }\n\n // /billing-periods/{id}/receipt\n public receipt () {\n return new APIResource(this).push('receipt').setRequestConfig({\n responseType: 'arraybuffer'\n });\n }\n\n}\n\nexport default APIResourceBillingPeriod\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceBuild\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceBuild extends APIResource {\n\n /**\n * /builds/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('builds', id);\n }\n\n // /builds/{id}/abort\n public abort () {\n return new APIResource(this).push('abort');\n }\n\n // /builds/{id}/output-file-set/files\n public outputFiles () {\n return new APIList(this).push('output-file-set', 'files');\n }\n\n}\n\nexport default APIResourceBuild\n","import APIResource from './APIResource'\nimport APIResourceBuild from './APIResourceBuild'\n\nimport APIList from './APIList'\n\n\n/**\n * APIResourceFile\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceJob extends APIResource {\n\n /**\n * /jobs/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('jobs', id);\n }\n\n // /jobs/{id}/builds\n public builds () {\n return new APIList(this).push('builds');\n }\n\n // /jobs/{id}/builds/{id}\n public build (id: number) {\n return new APIResourceBuild(this, id);\n }\n\n}\n\nexport default APIResourceJob\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceBillingPeriod\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceDeviceGroup extends APIResource {\n\n /**\n * /device-groups/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('device-groups', id);\n }\n\n // /device-groups/{id}/devices\n public devices () {\n return new APIList(this).push('devices');\n }\n\n // /device-groups/{id}/device/{id}\n public device (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('devices', id);\n }\n\n // /device-groups/{id}/selectors\n public selectors () {\n return new APIList(this).push('selectors');\n }\n\n // /device-groups/{id}/selectors/{id}\n public selector (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('selectors', id);\n }\n\n}\n\nexport default APIResourceDeviceGroup\n","import APIResource from '../APIResource'\nimport APIList from '../APIList'\n\n/**\n * InputFileset\n *\n * @class\n * @extends APIResource\n */\nclass InputFileset extends APIResource {\n\n /**\n * /input-file-set\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('input-file-set');\n }\n\n // /input-file-set/files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /input-file-set/files.zip\n public filesZip () {\n return new APIResource(this).push('files.zip');\n }\n}\n\nexport default InputFileset\n","import APIResource from '../APIResource'\nimport APIList from '../APIList'\n\nimport FilterBuilder from '../../FilterBuilder'\n\n// Create non-media files filter\nconst NON_MEDIA_FILES_FILTER = new FilterBuilder();\nNON_MEDIA_FILES_FILTER.eq('state', 'READY');\nNON_MEDIA_FILES_FILTER.notin('mimetype', [\n // no images\n 'image/png', 'image/jpg', 'image/jpeg', 'image/webp', 'image/gif',\n\n // no videos\n 'video/mp4', 'video/avi', 'video/webm', 'video/ogg', 'video/mpeg'\n]);\n\n/**\n * OutputFileset\n *\n * @class\n * @extends APIResource\n */\nclass OutputFileset extends APIResource {\n\n /**\n * /output-file-set\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('output-file-set');\n }\n\n // /output-file-set/files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /output-file-set/files.zip\n public filesZip () {\n return new APIResource(this).push('files.zip');\n }\n\n // /output-file-set/screenshots\n public screenshots () {\n return new APIList(this).push('screenshots');\n }\n\n // /output-file-set/screenshots/{id}\n public screenshot (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('screenshots', id);\n }\n\n // /output-file-set/screenshots/{id}/file/{id}\n public screenshotFile (id: number) {\n this.screenshot(id).push('file');\n }\n\n // Filter files out by ready videos\n public videos () {\n this.files().params({\n filter: 's_state_eq_READY',\n tag: ['video']\n });\n }\n\n // Filter files out by non-media\n nonMediaFiles () {\n return this.files().filter(NON_MEDIA_FILES_FILTER);\n }\n\n}\n\nexport default OutputFileset\n","import APIResource from './APIResource'\nimport APIList from './APIList';\n\nimport InputFileset from './extra-class/InputFileset'\nimport OutputFileset from './extra-class/OutputFileset'\n\n\n/**\n * APIResourceDeviceSession\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceDeviceSession extends APIResource {\n\n /**\n * /device-sessions/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('device-sessions', id);\n }\n\n // /device-sessions/{id}/cluster-logs\n public clusterLogs () {\n return new APIResource(this).push('cluster-logs');\n }\n\n // /device-sessions/{id}/data-availability\n public dataAvailability () {\n return new APIResource(this).push('data-availability');\n }\n\n // /device-sessions/{id}/fixtures.zip\n public fixturesZip () {\n return new APIResource(this).push('fixtures.zip');\n }\n\n // /device-sessions/{id}/junit.xml\n public junitXml () {\n return new APIResource(this).push('junit.xml');\n }\n\n // /device-sessions/{id}/logs\n public logs () {\n return new APIResource(this).push('logs');\n }\n\n // /device-sessions/{id}/performance\n public performance () {\n return new APIResource(this).push('performance');\n }\n\n // /device-sessions/{id}/release\n public release () {\n return new APIResource(this).push('release');\n }\n\n // /device-sessions/{id}/result-data.zip\n public resultDataZip () {\n return new APIResource(this).push('result-data.zip');\n }\n\n // /device-sessions/{id}/screenshots\n public screenshots () {\n return new APIList(this).push('screenshots');\n }\n\n // /device-sessions/{id}/screenshots/{id}\n public screenshot (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('screenshots', id);\n }\n\n // /device-sessions/{id}/steps\n public steps () {\n return new APIList(this).push('steps');\n }\n\n // /device-sessions/{id}/steps/{id}\n public step (id: number | 'current') {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('steps', id);\n }\n\n // /device-sessions/{id}/steps/current\n public currentStep () {\n return this.step('current');\n }\n\n // /device-sessions/{id}/test-case-runs\n public testCaseRuns () {\n return new APIList(this).push('test-case-runs');\n }\n\n // /device-sessions/{id}/retry\n public retry () {\n return new APIResource(this).push('retry').post();\n }\n\n // /device-sessions/{id}/input-file-set\n public input () {\n return new InputFileset(this);\n }\n\n // /device-sessions/{id}/output-file-set\n public output () {\n return new OutputFileset(this);\n }\n\n // Alias for output().videos();\n public videos () {\n return this.output().videos();\n }\n\n // Live Testing Connections\n public connections () {\n return new APIList(this).push('connections');\n }\n\n}\n\nexport default APIResourceDeviceSession\n","import APIResource from './APIResource'\nimport APIResourceDeviceSession from './APIResourceDeviceSession'\n\nimport APIList from './APIList'\n\n\n/**\n * APIResourceRun\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceRun extends APIResource {\n\n /**\n * /runs/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('runs', id);\n }\n\n // /runs/{id}/config\n public config () {\n return new APIResource(this).push('config');\n }\n\n // /runs/{id}/device-sessions\n public deviceSessions () {\n return new APIList(this).push('device-sessions');\n }\n\n // /runs/{id}/device-sessions/{id}\n public deviceSession (id: number) {\n return new APIResourceDeviceSession(this, id);\n }\n\n // /runs/{id}/steps\n public steps () {\n return new APIList(this).push('steps');\n }\n\n // /runs/{id}/files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /runs/{id}/files.zip\n public filesZip () {\n return new APIResource(this).push('files.zip');\n }\n\n // /runs/{id}/tags\n public tags () {\n return new APIList(this).push('tags');\n }\n\n // /runs/{id}/tag\n public tag (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('tags', id);\n }\n\n}\n\nexport default APIResourceRun\n","import APIResource from './APIResource'\nimport APIResourceRun from './APIResourceRun'\n\nimport APIList from './APIList'\n\n\n/**\n * APIResourceFile\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceProject extends APIResource {\n\n /**\n * /projects/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('projects', id);\n }\n\n // /projects/{id}/runs\n public runs () {\n return new APIList(this).push('runs');\n }\n\n // /projects/{id}/runs/{id}\n public run (id: number) {\n return new APIResourceRun(this, id);\n }\n\n // /projects/{id}/runs-extended\n public runsExtended () {\n return new APIList(this).push('runs-extended');\n }\n\n // /projects/{id}/runs-extended/{id}\n public runExtended (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('runs-extended', id);\n }\n\n // /projects/{id}/files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /projects/{id}/files.zip\n public filesZip () {\n return new APIResource(this).push('files.zip');\n }\n\n // /projects/{id}/sharings\n public sharings () {\n return new APIList(this).push('sharings');\n }\n\n // /projects/{id}/sharings/{id}\n public sharing (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('sharings', id);\n }\n\n}\n\nexport default APIResourceProject\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceFile\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceFile extends APIResource {\n\n /**\n * /files/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('files', id);\n }\n\n // use this to download file content\n public file () {\n return new APIResource(this).push('file');\n }\n\n // /files/{id}/icon\n public icon () {\n return new APIResource(this).push('icon');\n }\n\n // /files/{id}/tags\n public tags () {\n return new APIList(this).push('tags');\n }\n\n}\n\nexport default APIResourceFile\n","import APIResource from './APIResource'\n\n\n/**\n * APIResourceNotification\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceNotification extends APIResource {\n\n /**\n * /notifications/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('notifications', id);\n }\n\n // /notifications/{id}/test\n public test () {\n return new APIResource(this).push('test');\n }\n\n}\n\nexport default APIResourceNotification\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceAccessGroup\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceAccessGroup extends APIResource {\n\n /**\n * /device-groups/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('access-groups', id);\n }\n\n // /access-groups/{id}/users\n public users () {\n return new APIList(this).push('users');\n }\n\n // /access-groups/{id}/users/{id}\n public user (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('users', id);\n }\n\n // /access-groups/{id}/resources\n public resources () {\n return new APIList(this).push('resources');\n }\n\n // /access-groups/{id}/resources/{id}\n public resource (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('resources', id);\n }\n\n}\n\nexport default APIResourceAccessGroup\n","import APIList from './APIList'\n\n\n/**\n * APIListDeviceTime\n *\n * @class\n * @extends APIList\n */\nclass APIListDeviceTime extends APIList {\n\n /**\n * /device-time\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('device-time');\n }\n\n // /device-time/reserved\n public reserved () {\n return new APIList(this).push('reserved');\n }\n\n // /device-time/used\n public used () {\n return new APIList(this).push('used');\n }\n\n}\n\nexport default APIListDeviceTime;\n","import APIList from './APIList'\n\ninterface UploadObj {\n /**\n * Directory\n */\n dir: string;\n\n /**\n * Filename\n */\n filename: string;\n}\n\n/**\n * APIListFiles\n *\n * @class\n * @extends APIList\n */\nclass APIListFiles extends APIList {\n\n // Constructor\n constructor (parent: object) {\n super(parent);\n this.push('files');\n }\n\n // Siplifies process of uploading\n public upload (obj: UploadObj) {\n let form;\n\n // For NodeJS\n // @ts-ignore\n if (global.isNodeJs) {\n // @ts-ignore\n const fs = require('fs');\n // @ts-ignore\n const FormData = require('form-data');\n\n form = new FormData();\n form.append('file', fs.createReadStream(obj.dir + '/' + obj.filename), {\n filename: obj.filename\n });\n\n /**\n * Browser\n * @todo\n */\n } else {\n throw new Error('Not supported yet!');\n }\n\n this.post().headers(form.getHeaders()).data(form);\n }\n\n}\n\nexport default APIListFiles\n","import APIList from './APIList'\n\n\n/**\n * APIListPurchased\n *\n * @class\n * @extends APIList\n */\nclass APIListPurchased extends APIList {\n\n /**\n * /purchased\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('purchased');\n }\n\n}\n\nexport default APIListPurchased\n","import APIList from './APIList'\nimport APIListPurchased from './APIListPurchased'\n\n\n/**\n * APIListServices\n *\n * @class\n * @extends APIList\n */\nclass APIListServices extends APIList {\n\n // Constructor\n constructor (parent: object) {\n super(parent);\n this.push('services');\n }\n\n // /services/purchased\n public purchased () {\n return new APIListPurchased(this);\n }\n\n // /services/available\n public available () {\n return new APIList(this).push('available');\n }\n\n public active () {\n const a = new APIList(this);\n if (this.stack[0] === 'me') {\n a.push('active');\n } else {\n a.params({\n notArchived: true\n });\n }\n return a;\n }\n\n}\n\nexport default APIListServices\n","import APIList from './APIList'\nimport APIResource from './APIResource'\n\n\n/**\n * APIListRuns\n *\n * @class\n * @extends APIList\n */\nclass APIListRuns extends APIList {\n\n /**\n * /runs\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('runs');\n }\n\n // /runs/config\n public config () {\n return new APIResource(this).push('config');\n }\n\n}\n\nexport default APIListRuns\n","import APIList from './APIList'\n\n\n/**\n * APIListNotifications\n *\n * @class\n * @extends APIList\n */\nclass APIListNotifications extends APIList {\n\n /**\n * /notifications\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('notifications');\n }\n\n // /notifications/scopes\n public scopes () {\n return new APIList(this).push('scopes');\n }\n\n // /notifications/channels\n public channels () {\n return new APIList(this).push('channels');\n }\n\n}\n\nexport default APIListNotifications\n","import APIResource from './APIResource'\n\n/**\n * APIResourceAccountService\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceAccountService extends APIResource {\n\n /**\n * /account-services/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('account-services', id);\n }\n\n // /account-services/{id}/activate\n public activate () {\n return new APIResource(this).push('activate');\n }\n\n // /account-services/{id}/deactivate\n public deactivate () {\n return new APIResource(this).push('deactivate');\n }\n\n // /account-services/{id}/billing-period\n public billingPeriod () {\n return new APIResource(this).push('billing-period');\n }\n\n}\n\nexport default APIResourceAccountService\n","import APIResource from './APIResource'\nimport APIResourceAccount from './APIResourceAccount';\nimport APIResourceBillingPeriod from './APIResourceBillingPeriod'\nimport APIResourceJob from './APIResourceJob'\nimport APIResourceDeviceGroup from './APIResourceDeviceGroup'\nimport APIResourceDeviceSession from './APIResourceDeviceSession'\nimport APIResourceProject from './APIResourceProject'\nimport APIResourceFile from './APIResourceFile'\nimport APIResourceNotification from './APIResourceNotification'\nimport APIResourceAccessGroup from './APIResourceAccessGroup'\n\nimport APIList from './APIList'\nimport APIListDeviceTime from './APIListDeviceTime'\nimport APIListFiles from './APIListFiles'\nimport APIListServices from './APIListServices'\nimport APIListRuns from './APIListRuns'\nimport APIListNotifications from './APIListNotifications'\nimport APIResourceAccountService from './APIResourceAccountService';\n\n\n/**\n * APIResourceUser\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceUser extends APIResource {\n\n /**\n * /users/{id} | /me\n *\n * Constructor\n */\n constructor (parent: object, id: number | 'me') {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n\n if (id === 'me') {\n this.push('me');\n } else if (typeof id === 'number') {\n this.push('users', id);\n } else {\n throw new TypeError('id is not a number');\n }\n }\n\n // /users/{id}/account\n public account () {\n return new APIResourceAccount(this);\n }\n\n // /users/{id}/device-time\n public deviceTime () {\n return new APIListDeviceTime(this);\n }\n\n // /users/{id}/device-time-summary\n public deviceTimeSummary () {\n return new APIList(this).push('device-time-summary');\n }\n\n // /users/{id}/services\n public services () {\n return new APIListServices(this);\n }\n\n // /users/{id}/services/{id}\n public service (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('services', id);\n }\n\n // /users/{id}/account-services\n public accountServices () {\n return new APIList(this).push('account-services');\n }\n\n // /users/{id}/account-services/{id}\n public accountService (id: number) {\n return new APIResourceAccountService(this, id);\n }\n\n // /users/{id}/billing-periods\n public billingPeriods () {\n return new APIList(this).push('billing-periods');\n }\n\n // /users/{id}/billing-periods/{id}\n public billingPeriod (id: number) {\n return new APIResourceBillingPeriod(this, id);\n }\n\n // /users/{id}/jobs\n public jobs () {\n return new APIList(this).push('jobs');\n }\n\n // /users/{id}/jobs/{id}\n public job (id: number) {\n return new APIResourceJob(this, id);\n }\n\n // /users/{id}/device-groups\n public deviceGroups () {\n return new APIList(this).push('device-groups');\n }\n\n // /users/{id}/device-groups/{id}\n public deviceGroup (id: number) {\n return new APIResourceDeviceGroup(this, id);\n }\n\n // /users/{id}/device-sessions\n public deviceSessions () {\n return new APIList(this).push('device-sessions');\n }\n\n // /users/{id}/device-sessions/{id}\n public deviceSession (id: number) {\n return new APIResourceDeviceSession(this, id);\n }\n\n // /users/{id}/projects\n public projects () {\n return new APIList(this).push('projects');\n }\n\n // /users/{id}/projects/{id}\n public project (id: number) {\n return new APIResourceProject(this, id);\n }\n\n // /users/{id}/files\n public files () {\n return new APIListFiles(this);\n }\n\n // /users/{id}/files/{id}\n public file (id: number) {\n return new APIResourceFile(this, id);\n }\n\n // /users/{id}/runs\n public runs () {\n return new APIListRuns(this);\n }\n\n // /users/{id}/available-build-executors\n public availableBuildExecutors () {\n return new APIList(this).push('available-build-executors');\n }\n\n // /users/{id}/available-frameworks\n public availableFrameworks () {\n return new APIList(this).push('available-frameworks');\n }\n\n /**\n * /users/{id}/\n * /users/{id}/reset-api-key\n */\n public resetApiKey () {\n return new APIResource(this).push('reset-api-key');\n }\n\n // /users/{id}/restore\n public restore () {\n return new APIResource(this).push('restore');\n }\n\n // /users/{id}/account/additional-users\n public accountAdditionalUsers () {\n return new APIList(this) .push('account', 'additional-users');\n }\n\n // /users/{id}/account/additional-users/{id}\n public accountAdditionalUser (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('account', 'additional-users', id);\n }\n\n // /users/{id}/feedback\n public feedback () {\n return new APIResource(this).push('feedback');\n }\n\n // /users/{id}/notifications\n public notifications () {\n return new APIListNotifications(this);\n }\n\n // /users/{id}/notifications/{id}\n public notification (id: number) {\n return new APIResourceNotification(this, id);\n }\n\n // /users/{id}/receipts\n public receipts () {\n return new APIList(this).push('receipts');\n }\n\n // /users/{id}/preferences\n public preferences () {\n return new APIResource(this).push('preferences');\n }\n\n // /users/{id}/ui-preferences\n public uiPreferences () {\n return new APIResource(this).push('ui-preferences');\n }\n\n // /users/{id}/integrations\n public integrations () {\n return new APIList(this).push('integrations');\n }\n\n // /users/{id}/integrations/{id}\n public integration (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('integrations', id);\n }\n\n // /users/{id}/device-usage\n public deviceUsage () {\n return new APIList(this).push('device-usage');\n }\n\n // /users/{id}/statistics\n public statistics () {\n return new APIList(this).push('statistics');\n }\n\n // /users/{id}/statistics\n public deviceStatistics () {\n return new APIList(this).push('device-statistics');\n }\n\n // /users/{id}/access-groups\n public accessGroups () {\n return new APIList(this).push('access-groups');\n }\n\n // /users/{id}/access-groups/{id}\n public accessGroup (id: number) {\n return new APIResourceAccessGroup(this, id);\n }\n\n}\n\nexport default APIResourceUser\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIResourceDevice\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceDevice extends APIResource {\n\n /**\n * /devices/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('devices', id);\n }\n\n // /devices/{id}/properties\n public properties () {\n return new APIList(this).push('properties');\n }\n\n}\n\nexport default APIResourceDevice\n","import APIResource from './APIResource'\n\n\n/**\n * APIResourceUserSession\n *\n * @class\n * @extends APIResource\n */\nclass APIResourceUserSession extends APIResource {\n\n // Constructor\n // /user-sessions\n constructor (parent: object) {\n super(parent);\n this.push('user-sessions');\n }\n\n // /user-sessions/login\n public login (data: object) {\n return new APIResource(this).push('login').post().data(data);\n }\n\n // /user-sessions/logout\n public logout () {\n return new APIResource(this).push('logout').post();\n }\n\n // /user-sessions/{name}-login\n public sso (name: string) {\n return new APIResource(this).push(name + '-login');\n }\n\n // /user-sessions/portal-login\n public portalLogin () {\n return new APIResource(this).push('portal-login').post();\n }\n\n}\n\nexport default APIResourceUserSession\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIAdminResourceCluster\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResourceCluster extends APIResource {\n\n /**\n * /clusters/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('clusters', id);\n }\n\n // /clusters/{id}/devices\n public devices () {\n return new APIList(this).push('devices');\n }\n\n}\n\nexport default APIAdminResourceCluster\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIAdminResourceDeviceTime\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResourceDeviceTime extends APIResource {\n\n /**\n * /device-time\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n this.push('device-time');\n }\n\n // /device-time/count-session-report\n public countSessionReport () {\n return new APIList(this).push('count-session-report');\n }\n\n // /device-time/step-time-report\n public stepTimeReport () {\n return new APIList(this).push('step-time-report');\n }\n\n}\n\nexport default APIAdminResourceDeviceTime\n","import APIList from './APIList'\nimport APIResource from './APIResource'\nimport APIResourceRun from './APIResourceRun'\n\n\n/**\n * APIAdminResourceRun\n *\n * @class\n * @extends APIResourceRun\n */\nclass APIAdminResourceRun extends APIResourceRun {\n\n // /runs/{id}/abort\n public abort () {\n return new APIResource(this).push('abort').post();\n }\n\n // /runs/{id}/retry\n public retry (ids?: Array) {\n const a = new APIResource(this).push('retry').setRequestConfig({\n timeout: 0\n }).post();\n\n if (ids != null) {\n a.params({\n deviceRunIds: ids\n });\n }\n\n return a;\n }\n\n // /runs/{id}/changebillable\n public changeBillable () {\n return new APIResource(this).push('changebillable');\n }\n\n // /runs/{id}/changepriority\n public changePriority () {\n return new APIResource(this).push('changepriority');\n }\n\n // /runs/{id}/screenshot-names\n public screenshotNames () {\n return new APIList(this).push('screenshot-names');\n }\n\n // /runs/{id}/screenshots\n public screenshots () {\n return new APIList(this).push('screenshots');\n }\n\n // /runs/{id}/data-availability\n public dataAvailability () {\n return new APIList(this).push('data-availability');\n }\n\n // /runs/{id}/build-logs.zip\n public buildLogsZip (ids?: Array) {\n const a = new APIResource(this).push('build-logs.zip');\n\n if (ids != null) {\n a.params({\n deviceRunIds: ids\n });\n }\n\n return a;\n }\n\n // /runs/{id}/logs.zip\n public logsZip () {\n return new APIResource(this).push('logs.zip');\n }\n\n // /runs/{id}/performance.zip\n public performanceZip () {\n return new APIResource(this).push('performance.zip');\n }\n\n // /runs/{id}/screenshots.zip\n public screenshotsZip () {\n return new APIResource(this).push('screenshots.zip');\n }\n\n}\n\nexport default APIAdminResourceRun\n","import APIResource from './APIResource'\nimport APIList from './APIList'\n\n\n/**\n * APIAdminResourceDevice\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResourceDevice extends APIResource {\n\n /**\n * /admin/devices/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('admin');\n this.push('devices', id);\n }\n\n // /admin/devices/{id}/queue\n public queue () {\n return new APIList(this).push('queue');\n }\n\n}\n\nexport default APIAdminResourceDevice\n","import APIResource from './APIResource'\nimport APIList from './APIList';\n\nimport InputFileset from './extra-class/InputFileset';\nimport OutputFileset from './extra-class/OutputFileset';\n\n\n/**\n * APIAdminResourceDevice\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResourceDeviceSession extends APIResource {\n\n /**\n * /device-sessions/{id}\n *\n * Constructor\n */\n constructor (parent: object, id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n super(parent);\n this.push('device-sessions', id);\n }\n\n // /admin/device-sessions/{id}/changebillable\n public changeBillable () {\n const a = new APIResource(this);\n a.stack.splice(a.stack.length - 2, 0, 'admin');\n return a.push('changebillable').post();\n }\n\n // /device-sessions/{id}/connections\n public connections () {\n return new APIList(this).push('connections');\n }\n\n // /device-sessions/{id}/connections/{id}\n public connection (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('connections', id);\n }\n\n // /device-sessions/{id}/output-file-set\n public input () {\n return new InputFileset(this);\n }\n\n // /device-sessions/{id}/output-file-set\n public output () {\n return new OutputFileset(this);\n }\n\n // /device-sessions/{id}/release\n public release () {\n return new APIResource(this).push('release').post();\n }\n\n // /device-sessions/{id}/screenshots\n public screenshots () {\n return new APIList(this).push('screenshots');\n }\n\n // /device-sessions/{id}/screenshots/{id}\n public screenshot (id: number) {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('screenshots', id);\n }\n\n // /device-sessions/{id}/steps\n public steps () {\n return new APIList(this).push('steps');\n }\n\n // /device-sessions/{id}/steps/{id}\n public step (id: number | 'current') {\n if (id == null) {\n throw new Error('Resource ID cannot be null!');\n }\n\n return new APIResource(this).push('steps', id);\n }\n\n // /device-sessions/{id}/steps/current\n public currentStep () {\n return this.step('current');\n }\n\n // /device-sessions/{id}/test-case-runs\n public testCaseRuns () {\n return new APIList(this).push('test-case-runs');\n }\n\n}\n\nexport default APIAdminResourceDeviceSession\n","import APIList from './APIList'\n\nimport APIResource from './APIResource'\nimport APIResourceFile from './APIResourceFile'\n\nimport APIAdminResourceCluster from './APIAdminResourceCluster';\nimport APIAdminResourceDeviceTime from './APIAdminResourceDeviceTime';\nimport APIAdminResourceRun from './APIAdminResourceRun';\nimport APIAdminResourceDevice from './APIAdminResourceDevice';\nimport APIAdminResourceDeviceSession from './APIAdminResourceDeviceSession';\nimport APIResourceProject from './APIResourceProject';\nimport APIResourceAccessGroup from './APIResourceAccessGroup';\n\n\n/**\n * APIAdminResource\n *\n * @class\n * @extends APIResource\n */\nclass APIAdminResource extends APIResource {\n\n /**\n * /admin\n *\n * Constructor\n */\n constructor (parent: object) {\n super(parent);\n }\n\n private withAdmin () {\n return new APIResource(this).push('admin');\n }\n\n // /clusters\n public clusters () {\n return new APIList(this).push('clusters');\n }\n\n // /clusters/{id}\n public cluster (id: number) {\n return new APIAdminResourceCluster(this, id);\n }\n\n // /admin/devices\n public devices () {\n return new APIList(this).push('admin', 'devices');\n }\n\n // /admin/devices/{id}\n public device (id: number) {\n return new APIAdminResourceDevice(this, id);\n }\n\n // /admin/device-models\n public deviceModels () {\n return new APIList(this).push('admin', 'device-models');\n }\n\n // /admin/device-models/{id}\n public deviceModel (id: number) {\n return new APIResource(this).push('admin', 'device-models', id);\n }\n\n // /device-sessions\n public deviceSessions () {\n return new APIList(this).push('admin', 'device-sessions');\n }\n\n // /device-sessions/{id}\n public deviceSession (id: number) {\n return new APIAdminResourceDeviceSession(this, id);\n }\n\n // /device-status\n public deviceStatuses () {\n return new APIList(this).push('device-status');\n }\n\n // /device-time\n public deviceTime () {\n return new APIAdminResourceDeviceTime(this.withAdmin());\n }\n\n // /admin/interactive-queue\n public interactiveQueue () {\n return new APIList(this).push('admin', 'interactive-queue');\n }\n\n // /files\n public files () {\n return new APIList(this).push('files');\n }\n\n // /files/{id}\n public file (id: number) {\n return new APIResourceFile(this, id);\n }\n\n // /admin/overview\n public overview () {\n return new APIResource(this).push('admin', 'overview');\n }\n\n // /projects\n public projects () {\n return new APIList(this).push('projects');\n }\n\n // /projects/{id}\n public project (id: number) {\n return new APIResourceProject(this, id);\n }\n\n // /runs\n public runs () {\n return new APIList(this).push('admin', 'runs');\n }\n\n // /runs/{id}\n public run (id: number) {\n return new APIAdminResourceRun(this, id);\n }\n\n // /users\n public users () {\n return new APIList(this).push('users');\n }\n\n // /access-groups\n public accessGroups () {\n return new APIList(this).push('access-groups');\n }\n\n // /access-groups/{id}\n public accessGroup (id: number) {\n return new APIResourceAccessGroup(this, id);\n }\n\n}\n\nexport default APIAdminResource\n","import './finka';\nimport ApiConfig from './ApiConfig';\n\nimport axios, { AxiosInstance } from 'axios';\n\n// @ts-ignore\nimport { version } from '../package.json';\n\nimport APIList from './api/APIList';\nimport APIListDevices from './api/APIListDevices';\nimport APIListUsers from './api/APIListUsers';\n\nimport APIResourceUser from './api/APIResourceUser';\nimport APIResourceDevice from './api/APIResourceDevice';\nimport APIResourceDeviceGroup from './api/APIResourceDeviceGroup';\nimport APIResourceUserSession from './api/APIResourceUserSession';\n\nimport APIAdminResource from './api/APIAdminResource';\nimport APIResourceAccount from \"./api/APIResourceAccount\";\n\n// @ts-ignore\nif (global.isNodeJs) {\n // Set User-Agent\n axios.defaults.headers.common['User-Agent'] = `Bitbar Cloud API Client for JavaScript v${version}`;\n}\n\n// Disable max content length\naxios.defaults.maxContentLength = 1073741824; // 1GB\n\n\n/**\n * API\n * Root for other API resources\n */\nclass API {\n\n // Main config\n private config: ApiConfig;\n\n // axios config\n private axiosConfig: ApiConfig;\n\n // axios instance\n public axios: AxiosInstance;\n\n\n constructor (config: ApiConfig) {\n if (config == null) {\n throw new Error('config cannot be empty');\n }\n\n this.config = config;\n this.axiosConfig = {};\n\n if (this.config.cloudUrl == null) {\n throw new TypeError('cloudUrl cannot be empty');\n } else if (typeof this.config.cloudUrl !== 'string') {\n throw new TypeError('cloudUrl must be a string');\n } else if (!/^https?:\\/\\/.{2,}/.test(this.config.cloudUrl)) {\n throw new Error(\"cloudUrl doesn't look like a URL\");\n }\n\n // Validate and correct cloudUrl if needed\n this.axiosConfig.baseURL = this.config.cloudUrl.replace(/\\/+$/, '') + '/api'\n\n // Check v2\n this.config.v2 = !!this.config.v2;\n if (this.config.v2) {\n this.axiosConfig.baseURL += '/v2';\n }\n\n // Check if apiKey is set\n if (this.config.apiKey) {\n if (typeof this.config.apiKey !== 'string') {\n throw new TypeError('apiKey must be a string');\n } else if (!/^[A-Za-z0-9]{32}$/.test(this.config.apiKey)) {\n throw new Error(\"apiKey is in the wrong format\");\n }\n\n this.axiosConfig.auth = {\n username: this.config.apiKey,\n password: ''\n };\n }\n\n // Create axios instance\n this.axios = axios.create(this.axiosConfig);\n }\n\n\n // --- Resources starts here --- //\n\n // /user-sessions\n public userSession () {\n return new APIResourceUserSession(this);\n }\n\n // /user/{id}\n public user (id: number | 'me') {\n return new APIResourceUser(this, id);\n }\n\n // /users\n public users () {\n return new APIListUsers(this);\n }\n\n // /me\n public me () {\n return this.user('me');\n }\n\n // /admin\n public admin () {\n return new APIAdminResource(this);\n }\n\n // /devices\n public devices () {\n return new APIListDevices(this);\n }\n\n // /devices/{id}\n public device (id: number) {\n return new APIResourceDevice(this, id);\n }\n\n // /device-groups\n public deviceGroups () {\n return new APIList(this).push('device-groups');\n }\n\n // /device-groups/{id}\n public deviceGroup (id: number) {\n return new APIResourceDeviceGroup(this, id);\n }\n\n // /label-groups\n public labelGroups () {\n return new APIList(this).push('label-groups');\n }\n\n // /device-statistics\n public deviceStatistics () {\n return new APIList(this).push('device-statistics');\n }\n\n // /accounts/{id}\n public account (id: number) {\n return new APIResourceAccount(this, id)\n }\n\n}\n\n\nexport default API;\n","import API from './API';\nimport FilterBuilder from './FilterBuilder';\n\n/**\n * Cloud API Client\n */\nconst CloudAPIClient = {\n API,\n FilterBuilder\n}\n\nexport default CloudAPIClient;\n"],"names":["finka","ALLOWED_HTTP_METHODS","APIEntity","[object Object]","parent","this","stack","requestConfig","root","Array","isArray","push","setRequestConfig","items","item","pop","absolute","url","join","axiosConfig","baseURL","Object","deepAssign","key","headers","_headers","replace","letter","toUpperCase","name","NAME","toLocaleUpperCase","Error","keys","method","params","data","Content-Type","qs","stringify","arrayFormat","startsWith","paramsSerializer","axios","request","Filter","value","operand","FilterBuilder","filters","checkNull","wrap","length","i","v","Date","getTime","endsWith","add","undefined","filter","isFilterPart","SyntaxError","str","test","parts","part","val","APIOrder","APIList","post","send","order","asc","sort","limit","Number","isNatural","getParams","offset","from","to","idx","page","getLimit","query","search","isFilterBuilder","toString","prototype","all","noLimit","cut","between","APIResource","APIListDevices","super","id","APIListUsers","APIResourceAdditionalUser","APIResourceAccount","APIResourceBillingPeriod","responseType","APIResourceBuild","APIResourceJob","APIResourceDeviceGroup","InputFileset","NON_MEDIA_FILES_FILTER","eq","notin","OutputFileset","screenshot","files","tag","APIResourceDeviceSession","step","output","videos","APIResourceRun","APIResourceProject","APIResourceFile","APIResourceNotification","APIResourceAccessGroup","APIListDeviceTime","APIListFiles","obj","form","global","isNodeJs","fs","require","append","createReadStream","dir","filename","getHeaders","APIListPurchased","APIListServices","a","notArchived","APIListRuns","APIListNotifications","APIResourceAccountService","APIResourceUser","TypeError","APIResourceDevice","APIResourceUserSession","APIAdminResourceCluster","APIAdminResourceDeviceTime","APIAdminResourceRun","ids","timeout","deviceRunIds","APIAdminResourceDevice","APIAdminResourceDeviceSession","splice","APIAdminResource","withAdmin","defaults","common","maxContentLength","API","config","cloudUrl","v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AAQhE,MAAMM,KAAK,gBAIzBR,mBACL,OAAO,IAAIkE,EAAQhE,MAAMM,KAAK,qBAIzBR,QAAS8F,GACd,OAAO,IAAIG,EAAmB/F,KAAM4F,KC7ItCjD,cAAAA"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 47582383..38cbfead 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@bitbar/cloud-api-client", - "version": "0.23.0", + "version": "0.24.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 4e2d3833..e14c20df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bitbar/cloud-api-client", - "version": "0.23.0", + "version": "0.24.0", "description": "Bitbar Cloud API Client for JavaScript", "main": "dist/bitbar-cloud-api-client.min.js", "types": "dist/index.d.ts", diff --git a/src/api/APIListServices.ts b/src/api/APIListServices.ts index d3a5d94e..dd4d4f20 100644 --- a/src/api/APIListServices.ts +++ b/src/api/APIListServices.ts @@ -23,7 +23,19 @@ class APIListServices extends APIList { // /services/available public available () { - this.push('available'); + return new APIList(this).push('available'); + } + + public active () { + const a = new APIList(this); + if (this.stack[0] === 'me') { + a.push('active'); + } else { + a.params({ + notArchived: true + }); + } + return a; } } diff --git a/src/api/APIResourceAccountService.ts b/src/api/APIResourceAccountService.ts new file mode 100644 index 00000000..d1551a44 --- /dev/null +++ b/src/api/APIResourceAccountService.ts @@ -0,0 +1,42 @@ +import APIResource from './APIResource' + +/** + * APIResourceAccountService + * + * @class + * @extends APIResource + */ +class APIResourceAccountService extends APIResource { + + /** + * /account-services/{id} + * + * Constructor + */ + constructor (parent: object, id: number) { + if (id == null) { + throw new Error('Resource ID cannot be null!'); + } + + super(parent); + this.push('account-services', id); + } + + // /account-services/{id}/activate + public activate () { + return new APIResource(this).push('activate'); + } + + // /account-services/{id}/deactivate + public deactivate () { + return new APIResource(this).push('deactivate'); + } + + // /account-services/{id}/billing-period + public billingPeriod () { + return new APIResource(this).push('billing-period'); + } + +} + +export default APIResourceAccountService diff --git a/src/api/APIResourceUser.ts b/src/api/APIResourceUser.ts index 26974b29..4149a245 100644 --- a/src/api/APIResourceUser.ts +++ b/src/api/APIResourceUser.ts @@ -15,6 +15,7 @@ import APIListFiles from './APIListFiles' import APIListServices from './APIListServices' import APIListRuns from './APIListRuns' import APIListNotifications from './APIListNotifications' +import APIResourceAccountService from './APIResourceAccountService'; /** @@ -75,13 +76,14 @@ class APIResourceUser extends APIResource { return new APIResource(this).push('services', id); } - // /users/{id}/account-services/{id}/billing-period - public accountServiceBillingPeriod (id: number) { - if (id == null) { - throw new Error('Resource ID cannot be null!'); - } + // /users/{id}/account-services + public accountServices () { + return new APIList(this).push('account-services'); + } - return new APIResource(this).push('account-services', id, 'billing-period'); + // /users/{id}/account-services/{id} + public accountService (id: number) { + return new APIResourceAccountService(this, id); } // /users/{id}/billing-periods