/// import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from '@grpc/grpc-js'; import _m0 from 'protobufjs/minimal'; import { Connection } from '../../../../../../yandex/cloud/serverless/apigateway/websocket/v1/connection'; export declare const protobufPackage = "yandex.cloud.serverless.apigateway.websocket.v1"; export interface GetConnectionRequest { /** ID of the connection to get. */ connectionId: string; } export interface SendToConnectionRequest { /** ID of the connection to which send. */ connectionId: string; /** Data to send. */ data: Buffer; /** Type of the sending data. */ type: SendToConnectionRequest_DataType; } export declare enum SendToConnectionRequest_DataType { DATA_TYPE_UNSPECIFIED = 0, /** BINARY - Binary data. */ BINARY = 1, /** TEXT - Text data. */ TEXT = 2, UNRECOGNIZED = -1 } export declare function sendToConnectionRequest_DataTypeFromJSON(object: any): SendToConnectionRequest_DataType; export declare function sendToConnectionRequest_DataTypeToJSON(object: SendToConnectionRequest_DataType): string; export interface SendToConnectionResponse { } export interface DisconnectRequest { /** ID of the connection to disconnect. */ connectionId: string; } export interface DisconnectResponse { } export declare const GetConnectionRequest: { encode(message: GetConnectionRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetConnectionRequest; fromJSON(object: any): GetConnectionRequest; toJSON(message: GetConnectionRequest): unknown; fromPartial, never>>(object: I): GetConnectionRequest; }; export declare const SendToConnectionRequest: { encode(message: SendToConnectionRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): SendToConnectionRequest; fromJSON(object: any): SendToConnectionRequest; toJSON(message: SendToConnectionRequest): unknown; fromPartial, never>>(object: I): SendToConnectionRequest; }; export declare const SendToConnectionResponse: { encode(_: SendToConnectionResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): SendToConnectionResponse; fromJSON(_: any): SendToConnectionResponse; toJSON(_: SendToConnectionResponse): unknown; fromPartial, never>>(_: I): SendToConnectionResponse; }; export declare const DisconnectRequest: { encode(message: DisconnectRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DisconnectRequest; fromJSON(object: any): DisconnectRequest; toJSON(message: DisconnectRequest): unknown; fromPartial, never>>(object: I): DisconnectRequest; }; export declare const DisconnectResponse: { encode(_: DisconnectResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DisconnectResponse; fromJSON(_: any): DisconnectResponse; toJSON(_: DisconnectResponse): unknown; fromPartial, never>>(_: I): DisconnectResponse; }; /** A set of methods for managing API Gateway WebSocket connections. */ export declare const ConnectionServiceService: { /** Returns the specified connection info. */ readonly get: { readonly path: "/yandex.cloud.serverless.apigateway.websocket.v1.ConnectionService/Get"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: GetConnectionRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => GetConnectionRequest; readonly responseSerialize: (value: Connection) => Buffer; readonly responseDeserialize: (value: Buffer) => Connection; }; /** Sends data to the specified connection. */ readonly send: { readonly path: "/yandex.cloud.serverless.apigateway.websocket.v1.ConnectionService/Send"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: SendToConnectionRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => SendToConnectionRequest; readonly responseSerialize: (value: SendToConnectionResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => SendToConnectionResponse; }; /** Disconnects the specified connection. */ readonly disconnect: { readonly path: "/yandex.cloud.serverless.apigateway.websocket.v1.ConnectionService/Disconnect"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: DisconnectRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => DisconnectRequest; readonly responseSerialize: (value: DisconnectResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => DisconnectResponse; }; }; export interface ConnectionServiceServer extends UntypedServiceImplementation { /** Returns the specified connection info. */ get: handleUnaryCall; /** Sends data to the specified connection. */ send: handleUnaryCall; /** Disconnects the specified connection. */ disconnect: handleUnaryCall; } export interface ConnectionServiceClient extends Client { /** Returns the specified connection info. */ get(request: GetConnectionRequest, callback: (error: ServiceError | null, response: Connection) => void): ClientUnaryCall; get(request: GetConnectionRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Connection) => void): ClientUnaryCall; get(request: GetConnectionRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Connection) => void): ClientUnaryCall; /** Sends data to the specified connection. */ send(request: SendToConnectionRequest, callback: (error: ServiceError | null, response: SendToConnectionResponse) => void): ClientUnaryCall; send(request: SendToConnectionRequest, metadata: Metadata, callback: (error: ServiceError | null, response: SendToConnectionResponse) => void): ClientUnaryCall; send(request: SendToConnectionRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: SendToConnectionResponse) => void): ClientUnaryCall; /** Disconnects the specified connection. */ disconnect(request: DisconnectRequest, callback: (error: ServiceError | null, response: DisconnectResponse) => void): ClientUnaryCall; disconnect(request: DisconnectRequest, metadata: Metadata, callback: (error: ServiceError | null, response: DisconnectResponse) => void): ClientUnaryCall; disconnect(request: DisconnectRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: DisconnectResponse) => void): ClientUnaryCall; } export declare const ConnectionServiceClient: { new (address: string, credentials: ChannelCredentials, options?: Partial): ConnectionServiceClient; service: typeof ConnectionServiceService; }; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact; } & Record>, never>; export {};