import { ChildProcess } from "child_process"; export interface SauceLabsOptions { /** * Your Sauce Labs username. */ user: string; /** * Your Sauce Labs access key. */ key: string; /** * Your Sauce Labs datacenter region. The following regions are available: * * - us-west-1 (short 'us') * - eu-central-1 (short 'eu') * - us-east-4 */ region?: "us" | "eu" | "us-west-1" | "us-east-4" | "eu-central-1" | "staging"; /** * If you want to tunnel your API request through a proxy please provide your proxy URL. */ proxy?: string; /** * If you want to set request headers, as example {'User-Agent': 'node-saucelabs'} */ headers?: object; } export interface SauceConnectInstance { /** * Sauce Connect child process */ cp: ChildProcess; /** * shutdown Sauce Connect */ close: () => Promise; } export interface SauceConnectOptions { /** * A function to optionally write sauce-connect-launcher log messages, e.g. console.log */ logger?: (output: string) => void; /** * Specify the Sauce Connect version you want to use. (default: 5) */ scVersion?: string; /** * Path to YAML config file. */ configFile?: string; /** * Tunnel name used for this tunnel or the tunnels in the same HA pool. */ tunnelName?: string; /** * Custom metadata key-value pairs. This flag is, primarily, used by Sauce Labs to assign custom properties to the tunnel for reporting purposes. */ metadata?: string; /** * Share the tunnel within the same org unit. Only the 'all' option is currently supported. See here: https://docs.saucelabs.com/basics/acct-team-mgmt/sauce-connect-proxy-tunnels/. */ shared?: string; /** * Denotes a tunnel as part of a high availability tunnel pool. See here: https://docs.saucelabs.com/secure-connections/sauce-connect/setup-configuration/high-availability/. */ tunnelPool?: boolean; /** * Deny requests to the matching domains. Prefix domains with '-' to exclude requests from being denied. Special keyword 'all' matches all domains. */ denyDomains?: string; /** * Forward matching requests to their origin server over the public internet. Requests that don't match "direct domains" will be forwarded to customer-side over the Sauce Connect Proxy connection. You can specify --direct-domains or --tunnel-domains, but not both. Prefix domains with '-' to exclude requests from being forwarded directly. */ directDomains?: string; /** * Pass matching requests to their origin server without SSL/TLS re-encryption. Requests that don't match will be re-encrypted. You can specify --tls-passthrough-domains or --tls-resign-domains, but not both. Prefix domains with '-' to exclude requests from being passed through. */ tlsPassthroughDomains?: string; /** * Resign SSL/TLS certificates for matching requests. You can specify --tls-resign-domains or --tls-passthrough-domains, but not both. Prefix domains with '-' to exclude requests from being resigned. */ tlsResignDomains?: string; /** * Forward matching requests over the Sauce Connect Proxy connection. Requests not matching "tunnel domains" will be forwarded to their origin server over the public internet. You can specify --tunnel-domains or --direct-domains, but not both. Prefix domains with '-' to exclude requests from being forwarded over the SC Proxy connection. Special keyword 'all' matches all domains. */ tunnelDomains?: string; /** * Number of connections to the Sauce Connect server. By default it is set to the number of CPUs on the machine. Total number of concurrent requests that can be handled is limited by the number of connections multiplied by the number of streams, see --tunnel-max-concurrent-streams flag. For example with 4 connections and 256 streams, the total number of concurrent requests is 1024. */ tunnelConnections?: string; /** * Maximal number of concurrent HTTP/2 streams per TCP connection. */ tunnelMaxConcurrentStreams?: string; /** * Site or upstream proxy basic authentication credentials. */ auth?: string; /** * The header name will be normalized to canonical form. The header value should not contain any newlines or carriage returns. The flag can be specified multiple times. The following example removes the User-Agent header and all headers starting with X-. */ header?: string; /** * Proxy Auto-Configuration file to use for upstream proxy selection. */ pac?: string; /** * Upstream proxy for test sessions . It is used for requests received from the Sauce Connect Server only. */ scUpstreamProxy?: string; /** * Setting this to "allow" enables sending requests to localhost through the upstream proxy. Setting this to "direct" sends requests to localhost directly without using the upstream proxy. By default, requests to localhost are denied. */ proxyLocalhost?: string; /** * Establish a tunnel through an upstream proxy. Proxy for requests to Sauce Labs REST API and Sauce Connect servers only. See the -x, --proxy flag for more details on the format. */ proxySauce?: string; /** * If more than one DNS server is specified with the --dns-server flag, passing this flag will enable round-robin selection. */ dnsRoundRobin?: string; /** * DNS server(s) to use instead of system default. There are two execution policies, when more then one server is specified. Fallback: the first server in a list is used as primary, the rest are used as fallbacks. Round robin: the servers are used in a round-robin fashion. The port is optional, if not specified the default port is 53. */ dnsServer?: string; /** * Timeout for dialing DNS servers. Only used if DNS servers are specified. */ dnsTimeout?: string; /** * Add your own CA certificates to verify against. The system root certificates will be used in addition to any certificates in this list. Use this flag multiple times to specify multiple CA certificate files. */ cacertFile?: string; /** * The maximum amount of time a dial will wait for a connect to complete. With or without a timeout, the operating system may impose its own earlier timeout. For instance, TCP timeouts are often around 3 minutes. */ httpDialTimeout?: string; /** * The maximum amount of time an idle (keep-alive) connection will remain idle before closing itself. Zero means no limit. */ httpIdleConnTimeout?: string; /** * The amount of time to wait for a server's response headers after fully writing the request (including its body, if any).This time does not include the time to read the response body. Zero means no limit. */ httpResponseHeaderTimeout?: string; /** * The maximum amount of time waiting to wait for a TLS handshake. Zero means no limit. */ httpTlsHandshakeTimeout?: string; /** * File to log TLS master secrets in NSS key log format. By default, the value is taken from the SSLKEYLOGFILE environment variable. It can be used to allow external programs such as Wireshark to decrypt TLS connections. */ httpTlsKeylogFile?: string; /** * The server address to listen on. If the host is empty, the server will listen on all available interfaces. */ apiAddress?: string; /** * Basic authentication credentials to protect the server. */ apiBasicAuth?: string; /** * The maximum amount of time to wait for the next request before closing connection. */ apiIdleTimeout?: string; /** * Path to the log file, if empty, logs to stdout. */ logFile?: string; /** * HTTP request and response logging mode. */ logHttp?: string; /** * Log level. */ logLevel?: string; } export type JobsState = { completed?: number; errored?: number; failed?: number; finished?: number; passed?: number; public?: number; queued?: number; running?: number; } & { [key: string]: any; }; export type BuildV2 = { creation_time?: string; deletion_time?: string; end_time?: string; group_id?: string; id?: string; jobs?: JobsState; modification_time?: string; name?: string; org_id?: string; owner_id?: string; passed?: boolean; public?: boolean; run?: number; start_time?: number; status?: string; team_id?: string; } & { [key: string]: any; }; export type BuildV2Job = { creation_time?: string; deletion_time?: string; id?: string; modification_time?: string; state?: JobsState; } & { [key: string]: any; }; export type Response_get_builds_v2_200 = { builds?: Array; } & { [key: string]: any; }; export type PerformanceMetricsListView = { items?: Array; } & { [key: string]: any; }; export type PerformanceMetricsListViewItems = { job_id?: string; job_owner?: string; job_name_hash?: string; page_url?: string; order_index?: number; job_creation_time?: string; load_id?: string; loader_id?: string; error?: string; metric_data?: PerformanceMetricsDetails; } & { [key: string]: any; }; export type PerformanceMetricsHistoryView = { items?: Array; } & { [key: string]: any; }; export type PerformanceUserMetricsView = { items?: Array; next?: string; previous?: string; } & { [key: string]: any; }; export type PerformanceMetricsDetails = { rtt?: number; load?: number; score?: number; maxRtt?: number; numFonts?: number; numTasks?: number; font_size?: number; firstPaint?: number; font_count?: number; image_size?: number; numScripts?: number; other_size?: number; speedIndex?: number; throughput?: number; image_count?: number; numRequests?: number; other_count?: number; script_size?: number; firstCPUIdle?: number; requestsSize?: number; script_count?: number; document_size?: number; requestsCount?: number; totalTaskTime?: number; document_count?: number; numStylesheets?: number; stylesheet_size?: number; timeToFirstByte?: number; totalByteWeight?: number; domContentLoaded?: number; firstInteractive?: number; lastVisualChange?: number; maxServerLatency?: number; numTasksOver10ms?: number; numTasksOver25ms?: number; numTasksOver50ms?: number; stylesheet_count?: number; firstVisualChange?: number; numTasksOver100ms?: number; numTasksOver500ms?: number; firstContentfulPaint?: number; firstMeaningfulPaint?: number; estimatedInputLatency?: number; mainDocumentTransferSize?: number; } & { [key: string]: any; }; export type BaselineView = { metric_name?: BaselineDetails; } & { [key: string]: any; }; export type BaselineDetails = { baseline?: number; upper_boundary?: number; lower_boundary?: number; values?: Array; } & { [key: string]: any; }; export type BaselineValues = { real_value?: number; job_id?: string; datetime?: string; } & { [key: string]: any; }; export type OutlierDetails = { status?: boolean; reason?: "baseline" | "new_regime"; } & { [key: string]: any; }; export type AssertView = { metric_name?: AssertDetails; } & { [key: string]: any; }; export type AssertDetails = { baseline?: number; upper_boundary?: number; lower_boundary?: number; real_value?: number; job_id?: string; datetime?: string; order_index?: number; outlier?: OutlierDetails; } & { [key: string]: any; }; export type RegimesView = { metric_name?: Array< { regime_start: number; regime_end: number; baseline_url: string; active: boolean; baseline?: { upper_boundary?: number; lower_boundary?: number; } & { [key: string]: any; }; } & { [key: string]: any; } >; } & { [key: string]: any; }; export type DiscardedView = { job_ids?: Array; } & { [key: string]: any; }; export type ErrorResponse = { status?: string; message?: string; } & { [key: string]: any; }; export type RegimeAcknowledge = { page_url: string; order_index: number; metric_names: Array; } & { [key: string]: any; }; export type Activity = { ccy_exec_peak: Array; datestamp: Array; jobs: Array; minutes: Array; } & { [key: string]: any; }; export type BaseConfig = { browserName?: string; name?: string; platform?: string; status?: string; version?: number; } & { [key: string]: any; }; export type Build = { creation_time?: number; deletion_time?: number; end_time?: number; id?: string; jobs?: { completed?: number; errored?: number; failed?: number; finished?: number; passed?: number; public?: number; queued?: number; running?: number; } & { [key: string]: any; }; modification_time?: number; name?: string; number?: number; owner?: string; passed?: boolean; prefix?: string; public?: boolean; run?: number; start_time?: number; status?: string; } & { [key: string]: any; }; export type CIStat = { platform: string; platform_version?: string; } & { [key: string]: any; }; export type CommandCountStats = { all?: number; error?: number; } & { [key: string]: any; }; export type Concurrency = { concurrency: {} & { [key: string]: OrgTeamConcurrencyValues; }; timestamp: number; } & { [key: string]: any; }; export type ConcurrencyLimit = { mac?: number; overall?: number; real_device?: number; scout?: number; } & { [key: string]: any; }; export type ConcurrencyValues = { mac_vms?: number; rds?: number; vms?: number; id?: string; } & { [key: string]: any; }; export type Error = { code?: number; fields?: string; message?: string; } & { [key: string]: any; }; export type File = { md5: string; mtime: string; name: string; size: number; } & { [key: string]: any; }; export type Job = { assigned_tunnel_id?: string; automation_backend?: string; base_config?: BaseConfig; breakpointed?: string; browser?: string; browser_short_version?: string; browser_version?: string; build?: string; collects_automator_log?: boolean; command_counts?: CommandCountStats; commands_not_successful?: number; consolidated_status?: "error" | "passed" | "failed" | "complete"; creation_time?: string; "custom-data"?: string; deletion_time?: string; end_time?: string; id: string; log_url?: string; manual?: boolean; modification_time?: string; name?: string; os?: string; owner?: string; passed?: boolean; proxied?: boolean; proxy_host?: boolean; public?: "public" | "public restricted" | "share" | "team"; record_screenshots?: boolean; record_video?: boolean; selenium_version?: string; start_time?: string; status?: string; tags?: Array; video_secret?: string; video_url?: string; } & { [key: string]: any; }; export type Platform = { api_name?: string; automation_backend?: string; deprecated_backend_versions?: Array; device?: string; latest_stable_version?: string; long_name?: string; long_version?: string; os?: string; recommended_backend_version?: string; short_version?: string; supported_backend_versions?: Array; } & { [key: string]: any; }; export type SauceConnectDownload = { download?: { url?: string; version?: string; checksums?: Array< { value?: string; algorithm?: string; } & { [key: string]: any; } >; } & { [key: string]: any; }; } & { [key: string]: any; }; export type SauceStatus = { service_operational?: boolean; status_message?: string; wait_time?: number; } & { [key: string]: any; }; export type OrgTeamConcurrencyValues = { current?: ConcurrencyValues; allowed?: ConcurrencyValues; } & { [key: string]: any; }; export type Tunnel = { creation_time?: number; direct_domains?: Array; domain_names?: Array; host?: string; id: string; last_connected?: number; launch_time?: number; metadata?: TunnelMetaData; no_proxy_caching?: boolean; no_ssl_bump_domains?: Array; owner?: string; shared_tunnel?: boolean; shutdown_time?: number; ssh_port?: number; status?: string; tunnel_identifier?: string; use_caching_proxy?: boolean; use_kgp?: boolean; user_shutdown?: boolean; vm_version?: string; } & { [key: string]: any; }; export type TunnelMetaData = { build?: string; command?: string; git_version?: string; hostname?: string; nofile_limit?: number; platform?: string; release?: string; } & { [key: string]: any; }; export type User = { access_key?: string; ancestor_allows_subaccounts?: boolean; ancestor_concurrency_limit?: ConcurrencyLimit; can_run_manual?: boolean; concurrency_limit?: ConcurrencyLimit; creation_time?: string; domain?: string; email?: string; entity_type?: string; first_name?: string; id?: string; is_admin?: string; is_sso?: boolean; last_name?: string; manual_minutes?: number; minutes?: number; name?: string; parent?: string; prevent_emails?: Array<"marketing">; subscribed?: boolean; title?: string; user_type?: string; username?: string; verified?: boolean; vm_lockdown?: boolean; } & { [key: string]: any; }; export type WhoamiUser = { access_key?: string; ancestor_concurrency_limit?: ConcurrencyLimit; can_run_manual?: boolean; concurrency_limit?: ConcurrencyLimit; email?: string; first_name?: string; id?: string; last_name?: string; manual_minutes?: number; minutes?: number; name?: string; parent?: {}; subscribed?: boolean; user_type?: string; username?: string; verified?: boolean; } & { [key: string]: any; }; export type Response_list_user_organization_200 = { count?: number; is_ancestor?: boolean; users?: Array; } & { [key: string]: any; }; export type Response_list_jobs_200 = { jobs?: Array; } & { [key: string]: any; }; export type Response_get_dashboard_message_for_user_200 = { response?: { cta?: string; id?: string; message?: string; } & { [key: string]: any; }; status?: boolean; } & { [key: string]: any; }; export type Response_list_platforms_200 = Array; export type Response_get_current_user_200 = { exp?: number; iat?: number; username?: string; } & { [key: string]: any; }; export type Response_get_user_minutes_200 = { automated?: string; manual?: string; } & { [key: string]: any; }; export type Response_get_users_activity_200 = {} & { [key: string]: any; }; export type Response_users_last_job_200 = {} & { [key: string]: any; }; export type Response_list_all_tunnels_200 = { tunnels?: Array; } & { [key: string]: any; }; export type Response_list_tunnels_200 = Array; export type Response_get_jobs_v1_1_200 = { jobs?: Array; } & { [key: string]: any; }; export type TeamSettings = { virtual_machines?: number; real_devices?: number; live_only?: boolean; } & { [key: string]: any; }; export type TeamGroup = { id?: string; name?: string; } & { [key: string]: any; }; export type Role = { role?: number; name?: string; } & { [key: string]: any; }; export type OrganizationV1 = { id?: string; name?: string; } & { [key: string]: any; }; export type UserV1 = { id?: string; username?: string; first_name?: string; last_name?: string; is_active?: boolean; email?: string; teams?: Array; roles?: Array; organization?: OrganizationV1; } & { [key: string]: any; }; export type TeamV1 = { id?: string; name?: string; is_default?: boolean; org_uuid?: string; user_count?: number; settings?: TeamSettings; group?: TeamGroup; } & { [key: string]: any; }; export type Response_get_teams_v1_200 = Array; export type Response_get_users_v1_200 = Array; export type ApiTesting = { run_id?: string; run_name?: string; run_mode?: string; project_id?: string; project_name?: string; failures_count?: number; warning_count?: number; } & { [key: string]: any; }; export type Ci = { ref_name?: string; commit_sha?: string; repository?: string; branch?: string; } & { [key: string]: any; }; export type HTTPValidationError = { detail?: Array; } & { [key: string]: any; }; export type TestRunPlatform = "vdc" | "rdc" | "api" | "other"; export type SauceJob = { id?: string; name?: string; } & { [key: string]: any; }; export type Status = "passed" | "failed" | "skipped"; export type TestRunTestError = { message?: string; path?: string; line?: number; } & { [key: string]: any; }; export type TestRun = { name: string; id?: string; user_id?: string; org_id?: string; team_id?: string; group_id?: string; author_id?: string; path_name?: string; build_id?: string; build_name?: string; creation_time?: string; start_time: string; end_time: string; duration: number; browser?: string; device?: string; os?: string; app_name?: string; status?: string; platform?: string; type?: string; framework?: string; ci?: Ci; api_testing?: ApiTesting; sauce_job?: SauceJob; errors?: Array; tags?: Array; } & { [key: string]: any; }; export type TestRuns = { test_runs?: Array; } & { [key: string]: any; }; export type TestType = "web" | "mobile" | "api" | "other"; export type ValidationError = { loc: Array; msg: string; type: string; } & { [key: string]: any; }; declare class SauceLabs { constructor(options?: SauceLabsOptions); username: string; region: string; tld: string; webdriverEndpoint: string; /** * Start Sauce Connect * @method * @name SauceLabs#startSauceConnect * @param {string} id - job id */ startSauceConnect(params: SauceConnectOptions): Promise; /** * Get List of Builds (build_source can be vdc or rdc) * @method * @name SauceLabs#getBuildsV2 * @param {string} buildSource - build_source * @param {string} userId - user_idOption * @param {string} orgId - org_idOption * @param {string} groupId - group_idOption * @param {string} teamId - team_idOption * @param {string} status - statusOption * @param {string} startTime - start_timeOption * @param {string} endTime - end_timeOption * @param {number} limit - Number of results to returnOption * @param {number} offset - Starting numberOption * @param {string} sort - sortOption */ getBuildsV2( buildSource: "vdc" | "rdc", options?: { userId?: string; orgId?: string; groupId?: string; teamId?: string; status?: "running" | "error" | "failed" | "complete" | "success"; startTime?: string; endTime?: string; limit?: number; offset?: number; sort?: "asc" | "desc"; } ): Promise; /** * Get Build detail (build_source can be vdc or rdc) * @method * @name SauceLabs#getBuildV2 * @param {string} buildSource - build_source * @param {string} buildId - build_id * @param {string} userId - user_idOption * @param {string} orgId - org_idOption * @param {string} groupId - group_idOption * @param {string} teamId - team_idOption */ getBuildV2( buildSource: "vdc" | "rdc", buildId: string, options?: { userId?: string; orgId?: string; groupId?: string; teamId?: string; } ): Promise; /** * Get Build Jobs (build_source can be vdc or rdc) * @method * @name SauceLabs#getBuildByJobIdV2 * @param {string} buildSource - build_source * @param {string} jobId - job_id * @param {string} userId - user_idOption * @param {string} orgId - org_idOption * @param {string} groupId - group_idOption * @param {string} teamId - team_idOption */ getBuildByJobIdV2( buildSource: "vdc" | "rdc", jobId: string, options?: { userId?: string; orgId?: string; groupId?: string; teamId?: string; } ): Promise; /** * Get Build detail (build_source can be vdc or rdc) * @method * @name SauceLabs#getBuildsJobsV2 * @param {string} buildSource - build_source * @param {string} buildId - build_id * @param {string} userId - user_idOption * @param {string} orgId - org_idOption * @param {string} groupId - group_idOption * @param {string} teamId - team_idOption * @param {string} modifiedSince - modified_sinceOption * @param {boolean} completed - completedOption * @param {string} errored - erroredOption * @param {string} failed - failedOption * @param {string} finished - finishedOption * @param {string} new - newOption * @param {string} passed - passedOption * @param {boolean} public - publicOption * @param {boolean} queued - queuedOption * @param {boolean} running - runningOption * @param {boolean} faulty - faultyOption * @param {number} limit - Number of results to returnOption * @param {number} offset - Starting numberOption */ getBuildsJobsV2( buildSource: "vdc" | "rdc", buildId: string, options?: { userId?: string; orgId?: string; groupId?: string; teamId?: string; modifiedSince?: string; completed?: boolean; errored?: string; failed?: string; finished?: string; new?: string; passed?: string; public?: boolean; queued?: boolean; running?: boolean; faulty?: boolean; limit?: number; offset?: number; } ): Promise; /** * Provides a list of paginated raw performance metrics for the logged user * @method * @name SauceLabs#getPerformanceMetrics * @param {string} pageUrl - Performance API provides essential information about performance of tested web application.Option */ getPerformanceMetrics(options?: { pageUrl?: string; }): Promise; /** * Provides performance metrics and job basic data for a given job_id * @method * @name SauceLabs#getPerformanceMetricsByJobId * @param {string} jobId - Performance API provides essential information about performance of tested web application. * @param {boolean} full - When set to false, basic job data will be returned, excluding performance metricsOption */ getPerformanceMetricsByJobId( jobId: string, options?: { full?: boolean; } ): Promise; /** * Provides information if there is an outlier for the given job_id and metric * @method * @name SauceLabs#assertPerformance * @param {string} jobId - Performance API provides essential information about performance of tested web application. * @param {array} metricNames - Performance API provides essential information about performance of tested web application.Option * @param {integer} orderIndex - Performance API provides essential information about performance of tested web application.Option */ assertPerformance( jobId: string, options?: { metricNames: Array; orderIndex: number; } ): Promise; /** * Provides baseline based on metrics history, where the reference point is a given job_id * @method * @name SauceLabs#getBaseline * @param {string} jobId - Performance API provides essential information about performance of tested web application. * @param {array} metricNames - Performance API provides essential information about performance of tested web application.Option * @param {integer} orderIndex - Performance API provides essential information about performance of tested web application.Option * @param {integer} regimeStart - Performance API provides essential information about performance of tested web application.Option * @param {integer} regimeEnd - Performance API provides essential information about performance of tested web application.Option */ getBaseline( jobId: string, options?: { metricNames: Array; orderIndex: number; regimeStart?: number; regimeEnd?: number; } ): Promise; /** * Returns true if a baseline was resetted for a give job_id * @method * @name SauceLabs#hasBaselineReset * @param {string} jobId - Performance API provides essential information about performance of tested web application. */ hasBaselineReset(jobId: string): Promise; /** * Sets a reset point market at job_id, previous jobs will not be taken into account in calculating baseline * @method * @name SauceLabs#acknowledgeBaseline * @param {string} jobId - Performance API provides essential information about performance of tested web application. */ acknowledgeBaseline(jobId: string): Promise; /** * Provides lists outliers marked as discarded * @method * @name SauceLabs#getDiscardedOutliers * @param {string} jobId - Performance API provides essential information about performance of tested web application. * @param {integer} orderIndex - Performance API provides essential information about performance of tested web application.Option */ getDiscardedOutliers( jobId: string, options?: { orderIndex: number; } ): Promise; /** * Marks outlier for a given {job_id} as not relevant/flaky * @method * @name SauceLabs#discardOutliers * @param {string} jobId - Performance API provides essential information about performance of tested web application. * @param {integer} orderIndex - Performance API provides essential information about performance of tested web application.Option */ discardOutliers( jobId: string, options?: { orderIndex: number; } ): Promise; /** * Provides a list of raw performance metrics up to point where the reference is a given job_id and order_index * @method * @name SauceLabs#getBaselineHistory * @param {string} jobId - Performance API provides essential information about performance of tested web application. * @param {integer} orderIndex - Performance API provides essential information about performance of tested web application.Option * @param {integer} limit - Performance API provides essential information about performance of tested web application.Option */ getBaselineHistory( jobId: string, options?: { orderIndex: number; limit?: number; } ): Promise; /** * Provides regimes per metric calculated for a set of jobs, where the reference point is a given job_id * @method * @name SauceLabs#getRegimes * @param {string} jobId - Performance API provides essential information about performance of tested web application. * @param {array} metricNames - Performance API provides essential information about performance of tested web application.Option * @param {integer} orderIndex - Performance API provides essential information about performance of tested web application.Option * @param {boolean} includeBaseline - Performance API provides essential information about performance of tested web application.Option */ getRegimes( jobId: string, options?: { metricNames: Array; orderIndex: number; includeBaseline?: boolean; } ): Promise; /** * Acknowledge regime. Confirm values in new regime are acceptable. * @method * @name SauceLabs#acknowledgeRegime * @param {string} jobId - Performance API provides essential information about performance of tested web application. * @param {integer} orderIndex - Performance API provides essential information about performance of tested web application.Option */ acknowledgeRegime( jobId: string, options?: { orderIndex: number; } ): Promise; /** * Provides json documentation for the performance API * @method * @name SauceLabs#getApiDefinition */ getApiDefinition(): Promise; /** * Get Job Information * @method * @name SauceLabs#getJobV1_1 * @param {string} id - job id */ getJobV1_1(id: string): Promise; /** * User concurrency * @method * @name SauceLabs#getUserConcurrency * @param {string} username - username */ getUserConcurrency(username: string): Promise; /** * Org information * @method * @name SauceLabs#listUserOrganization * @param {string} username - username */ listUserOrganization( username: string ): Promise; /** * Get all of a users jobs * @method * @name SauceLabs#listJobs * @param {string} username - username * @param {number} limit - Number of results to returnOption * @param {boolean} subaccounts - Include subaccounts in list of jobsOption * @param {boolean} full - Should the response result contain everything or just the basicsOption * @param {boolean} manualOnly - Only return manual jobsOption * @param {boolean} autoOnly - Only return automated jobsOption * @param {string} name - name of the jobOption * @param {string} ownerType - owner type for jobsOption * @param {string} owner - username of owner of the jobsOption * @param {number} from - receive jobs beginning of a specific timestampOption * @param {number} to - receive jobs until specific timestampOption */ listJobs( username: string, options?: { limit?: number; subaccounts?: boolean; full?: boolean; manualOnly?: boolean; autoOnly?: boolean; name?: string; ownerType?: string; owner?: string; from?: number; to?: number; } ): Promise; /** * Dashboard messages from Django * @method * @name SauceLabs#getDashboardMessageForUser * @param {string} username - username */ getDashboardMessageForUser( username: string ): Promise; /** * returns a list of supported platforms in the Sauce cloud * @method * @name SauceLabs#listPlatforms * @param {string} platform - username */ listPlatforms( platform: "appium" | "webdriver" | "all" ): Promise; /** * Sauce Labs Status * @method * @name SauceLabs#getStatus */ getStatus(): Promise; /** * Authenticated user cookie information * @method * @name SauceLabs#getCurrentUser */ getCurrentUser(): Promise; /** * User information * @method * @name SauceLabs#getUser * @param {string} username - username */ getUser(username: string): Promise; /** * User information * @method * @name SauceLabs#getSubaccounts * @param {string} username - username */ getSubaccounts(username: string): Promise; /** * Get currently running job counts broken down by account and job status * @method * @name SauceLabs#getUserActivity * @param {string} username - username */ getUserActivity(username: string): Promise; /** * User's monthly-minutes * @method * @name SauceLabs#getUserMinutes * @param {string} username - username */ getUserMinutes(username: string): Promise; /** * Get job statistics for usernames * @method * @name SauceLabs#getUsersActivity */ getUsersActivity(): Promise; /** * The result returns dict of usersnames and time when they started last job. * @method * @name SauceLabs#usersLastJob */ usersLastJob(): Promise; /** * Authenticated user information * @method * @name SauceLabs#getCurrentUserFull */ getCurrentUserFull(): Promise; /** * Get Job Information * @method * @name SauceLabs#getJob * @param {string} username - username * @param {string} id - job id */ getJob(username: string, id: string): Promise; /** * Update Job Information * @method * @name SauceLabs#updateJob * @param {string} username - username * @param {string} id - job id * @param {} body - This is a REST API documentation provided by Sauce Labs */ updateJob(username: string, id: string, body: Job): Promise; /** * Stop Job Information * @method * @name SauceLabs#stopJob * @param {string} username - username * @param {string} id - job id */ stopJob(username: string, id: string): Promise; /** * Get all Tunnels * @method * @name SauceLabs#listAllTunnels * @param {string} username - username */ listAllTunnels(username: string): Promise; /** * Get tunnels for the user or all the users in the team * @method * @name SauceLabs#listTunnels * @param {string} username - username * @param {boolean} all - Should the response contain the same team user dataOption * @param {boolean} full - Should the response result contain everything or just the basicsOption * @param {string} filter - Filter expression to apply before returning query resultsOption * @param {string} protocol - Sauce Connect ProtocolOption */ listTunnels( username: string, options?: { all?: boolean; full?: boolean; filter?: "v2alpha" | "one_per_pool"; protocol?: "kgp" | "h2c"; } ): Promise; /** * Delete a Tunnel * @method * @name SauceLabs#deleteTunnel * @param {string} username - username * @param {string} id - job id * @param {string} reason - Reason for stopping a tunnelOption * @param {boolean} waitForJobs - Wait for jobs to finishOption */ deleteTunnel( username: string, id: string, options?: { reason: string; waitForJobs?: boolean; } ): Promise; /** * Get Tunnel by ID * @method * @name SauceLabs#getTunnel * @param {string} username - username * @param {string} id - job id */ getTunnel(username: string, id: string): Promise; /** * Get Sauce Connect download information for the latest version * @method * @name SauceLabs#scDownload * @param {string} arch - SC client host CPU archOption * @param {string} os - SC client host OSOption * @param {string} version - SC client versionOption */ scDownload(options?: { arch?: string; os?: string; version?: string; }): Promise; /** * Get job asset * @method * @name SauceLabs#downloadJobAsset * @param {string} id - job id * @param {string} filename - filename * @param {string} filepath - file path to store the asset at */ downloadJobAsset( id: string, filename: string, filepath?: string ): Promise; /** * Get Job Information * @method * @name SauceLabs#getJobsV1_1 * @param {array} id - list of jobIdsOption * @param {boolean} full - Should the response result contain everything or just the basicsOption */ getJobsV1_1(options?: { id: Array; full?: boolean; }): Promise; /** * Get List of Teams * @method * @name SauceLabs#getTeamsV1 * @param {string} name - nameOption */ getTeamsV1(options?: { name?: string }): Promise; /** * Get List of Teams * @method * @name SauceLabs#getUsersV1 * @param {string} username - usernameOption * @param {array} teams - List of team_idsOption * @param {string} teamName - team-nameOption * @param {integer} roles - rolesOption * @param {string} phrase - phraseOption * @param {string} status - statusOption * @param {number} limit - Number of results to returnOption * @param {number} offset - Starting numberOption */ getUsersV1(options?: { username?: string; teams?: Array; teamName?: string; roles?: number; phrase?: string; status?: "active" | "pending" | "inactive"; limit?: number; offset?: number; }): Promise; /** * Upload job assets * @method * @see {@link https://wiki.saucelabs.com|TBD} * @name SauceLabs#uploadJobAssets * @param {} jobId - id of the job that was run on Sauce Labs * @param {} files - asset to upload and attach to your job */ uploadJobAssets( jobId: string, files?: { files?: Array; } & { [key: string]: any; } ): Promise; /** * * @method * @see {@link https://wiki.saucelabs.com|TBD} * @name SauceLabs#createJob * @param {} parameters - create result job request body */ createJob(parameters: string): Promise; /** * Post Test Runs * @method * @name SauceLabs#createTestRunsV1 * @param {} parameters - create test runs request body */ createTestRunsV1(parameters: TestRuns): Promise; } export default SauceLabs;