import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Accessibility } from "./sdk-messages-accessibility.js"; import { Observability } from "./sdk-messages-observability.js"; import { Percy } from "./sdk-messages-percy.js"; import { TestHub } from "./sdk-messages-testhub.js"; export declare const protobufPackage = "browserstack.sdk.v1"; export interface DriverInitRequest { binSessionId: string; platformIndex: number; ref: string; userInputParams: Uint8Array; } export interface DriverInitResponse { success: boolean; binSessionId: string; capabilities: Uint8Array; hubUrl?: string | undefined; } export interface AutomationFrameworkInitRequest { binSessionId: string; platformIndex: number; frameworkName: string; frameworkVersion: string; ref: string; hubUrl: string; } export interface AutomationFrameworkInitResponse { success: boolean; hubUrl?: string | undefined; } export interface AutomationFrameworkStartRequest { binSessionId: string; platformIndex: number; frameworkName: string; frameworkVersion: string; ref: string; frameworkSessionId: string; hubUrl: string; } export interface AutomationFrameworkStartResponse { success: boolean; } export interface AutomationFrameworkStopRequest { binSessionId: string; platformIndex: number; frameworkName: string; frameworkVersion: string; ref: string; frameworkSessionId: string; hubUrl: string; } export interface AutomationFrameworkStopResponse { success: boolean; } export interface FindNearestHubRequest { binSessionId: string; } export interface FindNearestHubResponse { url: string; latency: number; } export interface StartBinSessionRequest { binSessionId: string; sdkLanguage: string; sdkVersion: string; pathProject: string; pathConfig: string; envVars: { [key: string]: string; }; cliArgs: string[]; frameworks: string[]; frameworkVersions: { [key: string]: string; }; language: string; languageVersion?: string | undefined; testFramework: string; wdioConfig?: string | undefined; } export interface StartBinSessionRequest_EnvVarsEntry { key: string; value: string; } export interface StartBinSessionRequest_FrameworkVersionsEntry { key: string; value: string; } export interface StartBinSessionResponse { binSessionId: string; config: string; testhub?: TestHub | undefined; observability?: Observability | undefined; accessibility?: Accessibility | undefined; percy?: Percy | undefined; sessionFramework?: string | undefined; } export interface ConnectBinSessionResponse { binSessionId: string; config: string; testhub?: TestHub | undefined; observability?: Observability | undefined; accessibility?: Accessibility | undefined; percy?: Percy | undefined; sessionFramework?: string | undefined; testOrchestration?: TestOrchestration | undefined; } export interface TestOrchestration { runPreviouslyFailedFirst?: boolean | undefined; retryTestsOnFailure?: RetryTestsOnFailure | undefined; abortBuildOnFailure?: AbortBuildOnFailure | undefined; runSmartSelection?: RunSmartSelection | undefined; } export interface RunSmartSelection { enabled: boolean; mode: string; source: string[]; } export interface RetryTestsOnFailure { enabled: boolean; maxRetries: number; } export interface AbortBuildOnFailure { enabled: boolean; maxFailures: number; } export interface TestOrchestrationRequest { binSessionId: string; testFiles: string[]; orchestrationStrategy?: string | undefined; orchestrationMetadata?: string | undefined; } export interface TestOrchestrationResponse { success: boolean; orderedTestFiles: string[]; } export interface StopBinSessionRequest { binSessionId: string; exitCode?: number | undefined; exitSignal?: string | undefined; exitReason?: string | undefined; customMetadata?: string | undefined; } export interface StopBinSessionResponse { success: boolean; error?: string | undefined; automateBuildlink?: string | undefined; hashedId?: string | undefined; /** * End-of-build customer-visible summary entries. Populated on EVERY response * shape — success, error, and clean-build alike (empty when nothing to * surface). Iterate by `severity` + `body`; do not branch on `entry_type`, * so new entry types need no SDK change. */ entries: CustomerVisibleSummaryEntry[]; } /** * A single customer-visible summary entry surfaced at end of build via * StopBinSessionResponse.entries. The binary owns the prose so all SDKs render * consistent text; SDKs choose the output stream from `severity`. */ export interface CustomerVisibleSummaryEntry { /** Stable machine-readable identifier (e.g. "network_restrictions"). */ entryType: string; /** One of: "info" | "warn" | "error". */ severity: string; /** Pre-formatted block to display verbatim. May contain embedded newlines. */ body: string; docLink?: string | undefined; } export interface ConnectBinSessionRequest { binSessionId: string; platformIndex?: number | undefined; } export interface TestFrameworkEventRequest { binSessionId: string; platformIndex: number; testFrameworkName: string; testFrameworkVersion: string; uuid: string; eventJson: Uint8Array; /** event type */ testFrameworkState: string; testHookState: string; startedAt: string; endedAt?: string | undefined; executionContext?: ExecutionContext | undefined; } export interface ExecutionContext { threadId: string; processId?: string | undefined; hash?: string | undefined; } export interface TestFrameworkEventResponse { success: boolean; error?: string | undefined; } export interface EnqueueTestEventRequest { binSessionId: string; eventUrl: string; eventDataJson: Uint8Array; } export interface EnqueueTestEventResponse { success: boolean; error?: string | undefined; } export interface LogCreatedEventRequest { binSessionId: string; platformIndex: number; logs: LogCreatedEventRequest_LogEntry[]; executionContext?: ExecutionContext | undefined; } export interface LogCreatedEventRequest_LogEntry { testFrameworkName: string; testFrameworkVersion: string; testFrameworkState: string; timestamp: string; uuid: string; kind: string; message: Uint8Array; level?: string | undefined; fileName?: string | undefined; fileSize?: number | undefined; filePath?: string | undefined; } export interface LogCreatedEventResponse { success: boolean; error?: string | undefined; } export interface TestSessionEventRequest { binSessionId: string; platformIndex: number; testFrameworkName: string; testFrameworkVersion: string; testFrameworkState: string; testHookState: string; testUuid: string; automationSessions: TestSessionEventRequest_AutomationSession[]; executionContext?: ExecutionContext | undefined; capabilities?: Uint8Array | undefined; } export interface TestSessionEventRequest_AutomationSession { provider: string; product?: string | undefined; frameworkName: string; frameworkVersion: string; frameworkSessionId: string; ref?: string | undefined; hubUrl?: string | undefined; } export interface TestSessionEventResponse { success: boolean; error?: string | undefined; } export interface FetchDriverExecuteParamsEventRequest { binSessionId: string; product: string; scriptName?: string | undefined; } export interface FetchDriverExecuteParamsEventResponse { success: boolean; script?: string | undefined; accessibilityExecuteParams?: Uint8Array | undefined; error?: string | undefined; } export declare const DriverInitRequest: MessageFns; export declare const DriverInitResponse: MessageFns; export declare const AutomationFrameworkInitRequest: MessageFns; export declare const AutomationFrameworkInitResponse: MessageFns; export declare const AutomationFrameworkStartRequest: MessageFns; export declare const AutomationFrameworkStartResponse: MessageFns; export declare const AutomationFrameworkStopRequest: MessageFns; export declare const AutomationFrameworkStopResponse: MessageFns; export declare const FindNearestHubRequest: MessageFns; export declare const FindNearestHubResponse: MessageFns; export declare const StartBinSessionRequest: MessageFns; export declare const StartBinSessionRequest_EnvVarsEntry: MessageFns; export declare const StartBinSessionRequest_FrameworkVersionsEntry: MessageFns; export declare const StartBinSessionResponse: MessageFns; export declare const ConnectBinSessionResponse: MessageFns; export declare const TestOrchestration: MessageFns; export declare const RunSmartSelection: MessageFns; export declare const RetryTestsOnFailure: MessageFns; export declare const AbortBuildOnFailure: MessageFns; export declare const TestOrchestrationRequest: MessageFns; export declare const TestOrchestrationResponse: MessageFns; export declare const StopBinSessionRequest: MessageFns; export declare const StopBinSessionResponse: MessageFns; export declare const CustomerVisibleSummaryEntry: MessageFns; export declare const ConnectBinSessionRequest: MessageFns; export declare const TestFrameworkEventRequest: MessageFns; export declare const ExecutionContext: MessageFns; export declare const TestFrameworkEventResponse: MessageFns; export declare const EnqueueTestEventRequest: MessageFns; export declare const EnqueueTestEventResponse: MessageFns; export declare const LogCreatedEventRequest: MessageFns; export declare const LogCreatedEventRequest_LogEntry: MessageFns; export declare const LogCreatedEventResponse: MessageFns; export declare const TestSessionEventRequest: MessageFns; export declare const TestSessionEventRequest_AutomationSession: MessageFns; export declare const TestSessionEventResponse: MessageFns; export declare const FetchDriverExecuteParamsEventRequest: MessageFns; export declare const FetchDriverExecuteParamsEventResponse: MessageFns; export interface MessageFns { encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; } //# sourceMappingURL=sdk-messages.d.ts.map