Skip to content

Documentation / local-testing / LocalTestingClient

Class: LocalTestingClient

Defined in: local-testing/src/client.ts:13

Extends

  • GeneratedLocalTestingClient

Extended by

Constructors

Constructor

new LocalTestingClient(options?): LocalTestingClient

Defined in: local-testing/src/client.ts:16

Parameters

ParameterType
options?LocalTestingOptions

Returns

LocalTestingClient

Overrides

GeneratedLocalTestingClient.constructor

Properties

PropertyModifierTypeInherited fromDefined in
authHeader?readonlystringGeneratedLocalTestingClient.authHeadercore/src/api-client.ts:50
authTokenreadonlystring-local-testing/src/client.ts:14
baseUrlsreadonlyobjectGeneratedLocalTestingClient.baseUrlscore/src/api-client.ts:49
baseUrls.sdkpublicstring-core/src/api-client.ts:49
baseUrls.sdkCloudpublicstring-core/src/api-client.ts:49
fetchFnreadonly{(input, init?): Promise<Response>; (input, init?): Promise<Response>; }GeneratedLocalTestingClient.fetchFncore/src/api-client.ts:52
registryreadonlyCodecRegistryGeneratedLocalTestingClient.registrycore/src/api-client.ts:53
userAgentreadonlystringGeneratedLocalTestingClient.userAgentcore/src/api-client.ts:51

Methods

disconnectBinaryInstance()

disconnectBinaryInstance(localInstanceId, query?, options?): Promise<string>

Defined in: local-testing/src/client.ts:98

Parameters

ParameterType
localInstanceIdstring
query?Omit<{ auth_token: string; }, "auth_token">
options?ExecuteOptions

Returns

Promise<string>


disconnectInstance()

disconnectInstance(localInstanceId, authToken?, options?): Promise<{ apiVersion: string; message: string; metaData: {[key: string]: unknown; params?: {[key: string]: unknown; }; }; }>

Defined in: openapi/generated/local-testing.client.ts:67

Disconnect a Local binary instance

Parameters

ParameterType
localInstanceIdstring
authToken?string
options?ExecuteOptions

Returns

Promise<{ apiVersion: string; message: string; metaData: {[key: string]: unknown; params?: {[key: string]: unknown; }; }; }>

Inherited from

GeneratedLocalTestingClient.disconnectInstance


downloadBinary()

downloadBinary(osArch, filenamePrefix?, options?): Promise<{ content: Uint8Array; filename: string; }>

Defined in: local-testing/src/client.ts:126

Parameters

ParameterTypeDefault value
osArch"win32" | "darwin-x64" | "linux-x64" | "linux-ia32" | "alpine"undefined
filenamePrefixstring"BrowserStackLocal"
options?ExecuteOptionsundefined

Returns

Promise<{ content: Uint8Array; filename: string; }>


execute()

protected execute<T>(spec): Promise<T>

Defined in: core/src/api-client.ts:103

Internal

Type Parameters

Type ParameterDefault type
Tunknown

Parameters

ParameterType
spec{[key: string]: unknown; baseUrl?: "sdk" | "sdkCloud"; method: HttpMethod; operationId: string; params?: { path?: Record<string, unknown>; query?: Record<string, unknown>; }; path: string; requestCodec?: string; requestCodecConfig?: unknown; requestInput?: unknown; responseCodec: string; responseCodecConfig: unknown; signal?: AbortSignal; }
spec.baseUrl?"sdk" | "sdkCloud"
spec.methodHttpMethod
spec.operationIdstring
spec.params?{ path?: Record<string, unknown>; query?: Record<string, unknown>; }
spec.params.path?Record<string, unknown>
spec.params.query?Record<string, unknown>
spec.pathstring
spec.requestCodec?string
spec.requestCodecConfig?unknown
spec.requestInput?unknown
spec.responseCodecstring
spec.responseCodecConfigunknown
spec.signal?AbortSignal

Returns

Promise<T>

Inherited from

GeneratedLocalTestingClient.execute


getBinaryInstance()

getBinaryInstance(localInstanceId, query?, options?): Promise<{ commandLineParams?: string; disconnectReason?: string; email: string; endTime?: string; hostname?: string; id: string; lastActiveOn: string; localIdentifier: string; privateIP?: string[]; public-IP?: string; startTime: string; }>

Defined in: local-testing/src/client.ts:62

Parameters

ParameterType
localInstanceIdstring
query?Omit<{ auth_token: string; last?: number; state?: "running" | "all"; }, "auth_token">
options?ExecuteOptions

Returns

Promise<{ commandLineParams?: string; disconnectReason?: string; email: string; endTime?: string; hostname?: string; id: string; lastActiveOn: string; localIdentifier: string; privateIP?: string[]; public-IP?: string; startTime: string; }>


getBinaryInstances()

getBinaryInstances(query?, options?): Promise<object[]>

Defined in: local-testing/src/client.ts:36

Parameters

ParameterType
query?Omit<{ auth_token: string; last?: number; state?: "running" | "all"; }, "auth_token">
options?ExecuteOptions

Returns

Promise<object[]>


getInstance()

getInstance(localInstanceId, authToken?, options?): Promise<{ apiVersion: string; instances: object[]; metaData: {[key: string]: unknown; params?: {[key: string]: unknown; }; }; }>

Defined in: openapi/generated/local-testing.client.ts:50

Fetches details of a Local binary instance used for local testing. Note that the binary should have been started with the --enable-logging-for-api parameter.

Parameters

ParameterType
localInstanceIdstring
authToken?string
options?ExecuteOptions

Returns

Promise<{ apiVersion: string; instances: object[]; metaData: {[key: string]: unknown; params?: {[key: string]: unknown; }; }; }>

Inherited from

GeneratedLocalTestingClient.getInstance


getInstances()

getInstances(authToken?, last?, state?, options?): Promise<{ apiVersion: string; instances: object[]; metaData: {[key: string]: unknown; params?: {[key: string]: unknown; }; }; }>

Defined in: openapi/generated/local-testing.client.ts:33

Fetches list of recent binary instances for local testing. Note that the binary should have been started with the --enable-logging-for-api parameter.

Parameters

ParameterType
authToken?string
last?string
state?string
options?ExecuteOptions

Returns

Promise<{ apiVersion: string; instances: object[]; metaData: {[key: string]: unknown; params?: {[key: string]: unknown; }; }; }>

Inherited from

GeneratedLocalTestingClient.getInstances