/**
 * Copyright (c) Microsoft Corporation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
export type WebSocketMessage = string | ArrayBuffer | Blob | ArrayBufferView<ArrayBuffer>;
export type WSData = {
    data: string;
    isBase64: boolean;
};
export type OnCreatePayload = {
    type: 'onCreate';
    id: string;
    url: string;
    protocols: string[];
};
export type OnMessageFromPagePayload = {
    type: 'onMessageFromPage';
    id: string;
    data: WSData;
};
export type OnClosePagePayload = {
    type: 'onClosePage';
    id: string;
    code: number | undefined;
    reason: string | undefined;
    wasClean: boolean;
};
export type OnMessageFromServerPayload = {
    type: 'onMessageFromServer';
    id: string;
    data: WSData;
};
export type OnCloseServerPayload = {
    type: 'onCloseServer';
    id: string;
    code: number | undefined;
    reason: string | undefined;
    wasClean: boolean;
};
export type BindingPayload = OnCreatePayload | OnMessageFromPagePayload | OnMessageFromServerPayload | OnClosePagePayload | OnCloseServerPayload;
export type ConnectRequest = {
    type: 'connect';
    id: string;
};
export type PassthroughRequest = {
    type: 'passthrough';
    id: string;
};
export type EnsureOpenedRequest = {
    type: 'ensureOpened';
    id: string;
};
export type SendToPageRequest = {
    type: 'sendToPage';
    id: string;
    data: WSData;
};
export type SendToServerRequest = {
    type: 'sendToServer';
    id: string;
    data: WSData;
};
export type ClosePageRequest = {
    type: 'closePage';
    id: string;
    code: number | undefined;
    reason: string | undefined;
    wasClean: boolean;
};
export type CloseServerRequest = {
    type: 'closeServer';
    id: string;
    code: number | undefined;
    reason: string | undefined;
    wasClean: boolean;
};
export type APIRequest = ConnectRequest | PassthroughRequest | EnsureOpenedRequest | SendToPageRequest | SendToServerRequest | ClosePageRequest | CloseServerRequest;
type GlobalThis = typeof globalThis;
export declare function inject(globalThis: GlobalThis): void;
export {};
//# sourceMappingURL=webSocketMock.d.ts.map