// Vendored from vercel/api: services/api-dev-tunnel/src/gen/tunnel/v1/tunnel_pb.ts, // generated from proto/tunnel/v1/tunnel.proto. Regenerate it there and copy it // here rather than editing it. // @generated by protoc-gen-es v2.12.0 with parameter "target=ts,import_extension=none" // @generated from file tunnel/v1/tunnel.proto (package vercel.api.dev_tunnel.v1, syntax proto3) /* eslint-disable */ import type { GenEnum, GenFile, GenMessage, GenService, } from '@bufbuild/protobuf/codegenv2'; import { enumDesc, fileDesc, messageDesc, serviceDesc, } from '@bufbuild/protobuf/codegenv2'; import type { Message } from '@bufbuild/protobuf'; /** * Describes the file tunnel/v1/tunnel.proto. */ export const file_tunnel_v1_tunnel: GenFile /*@__PURE__*/ = fileDesc( 'ChZ0dW5uZWwvdjEvdHVubmVsLnByb3RvEhh2ZXJjZWwuYXBpLmRldl90dW5uZWwudjEimwIKDkNvbm5lY3RSZXF1ZXN0Ei4KBGRhdGEYASABKAsyHi52ZXJjZWwuYXBpLmRldl90dW5uZWwudjEuRGF0YUgAEjAKBWNsb3NlGAIgASgLMh8udmVyY2VsLmFwaS5kZXZfdHVubmVsLnYxLkNsb3NlSAASMAoFcmVzZXQYAyABKAsyHy52ZXJjZWwuYXBpLmRldl90dW5uZWwudjEuUmVzZXRIABI4CgloZWFydGJlYXQYBCABKAsyIy52ZXJjZWwuYXBpLmRldl90dW5uZWwudjEuSGVhcnRiZWF0SAASMgoGd2luZG93GAUgASgLMiAudmVyY2VsLmFwaS5kZXZfdHVubmVsLnYxLldpbmRvd0gAQgcKBWZyYW1lIoYDCg9Db25uZWN0UmVzcG9uc2USLgoEb3BlbhgBIAEoCzIeLnZlcmNlbC5hcGkuZGV2X3R1bm5lbC52MS5PcGVuSAASLgoEZGF0YRgCIAEoCzIeLnZlcmNlbC5hcGkuZGV2X3R1bm5lbC52MS5EYXRhSAASMAoFY2xvc2UYAyABKAsyHy52ZXJjZWwuYXBpLmRldl90dW5uZWwudjEuQ2xvc2VIABIwCgVyZXNldBgEIAEoCzIfLnZl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T0NPTF9UQ1AQATLOAQoNVHVubmVsU2VydmljZRJiCgdDb25uZWN0EigudmVyY2VsLmFwaS5kZXZfdHVubmVsLnYxLkNvbm5lY3RSZXF1ZXN0GikudmVyY2VsLmFwaS5kZXZfdHVubmVsLnYxLkNvbm5lY3RSZXNwb25zZSgBMAESWQoERGlhbBIlLnZlcmNlbC5hcGkuZGV2X3R1bm5lbC52MS5EaWFsUmVxdWVzdBomLnZlcmNlbC5hcGkuZGV2X3R1bm5lbC52MS5EaWFsUmVzcG9uc2UoATABYgZwcm90bzM' ); /** * CLI to service. * * @generated from message vercel.api.dev_tunnel.v1.ConnectRequest */ export type ConnectRequest = Message<'vercel.api.dev_tunnel.v1.ConnectRequest'> & { /** * @generated from oneof vercel.api.dev_tunnel.v1.ConnectRequest.frame */ frame: | { /** * @generated from field: vercel.api.dev_tunnel.v1.Data data = 1; */ value: Data; case: 'data'; } | { /** * @generated from field: vercel.api.dev_tunnel.v1.Close close = 2; */ value: Close; case: 'close'; } | { /** * @generated from field: vercel.api.dev_tunnel.v1.Reset reset = 3; */ value: Reset; case: 'reset'; } | { /** * @generated from field: vercel.api.dev_tunnel.v1.Heartbeat heartbeat = 4; */ value: Heartbeat; case: 'heartbeat'; } | { /** * @generated from field: vercel.api.dev_tunnel.v1.Window window = 5; */ value: Window; case: 'window'; } | { case: undefined; value?: undefined }; }; /** * Describes the message vercel.api.dev_tunnel.v1.ConnectRequest. * Use `create(ConnectRequestSchema)` to create a new message. */ export const ConnectRequestSchema: GenMessage /*@__PURE__*/ = messageDesc(file_tunnel_v1_tunnel, 0); /** * Service to CLI. * * @generated from message vercel.api.dev_tunnel.v1.ConnectResponse */ export type ConnectResponse = Message<'vercel.api.dev_tunnel.v1.ConnectResponse'> & { /** * @generated from oneof vercel.api.dev_tunnel.v1.ConnectResponse.frame */ frame: | { /** * @generated from field: vercel.api.dev_tunnel.v1.Open open = 1; */ value: Open; case: 'open'; } | { /** * @generated from field: vercel.api.dev_tunnel.v1.Data data = 2; */ value: Data; case: 'data'; } | { /** * @generated from field: vercel.api.dev_tunnel.v1.Close close = 3; */ value: Close; case: 'close'; } | { /** * @generated from field: vercel.api.dev_tunnel.v1.Reset reset = 4; */ value: Reset; case: 'reset'; } | { /** * @generated from field: vercel.api.dev_tunnel.v1.Heartbeat heartbeat = 5; */ value: Heartbeat; case: 'heartbeat'; } | { /** * @generated from field: vercel.api.dev_tunnel.v1.Window window = 6; */ value: Window; case: 'window'; } | { /** * @generated from field: vercel.api.dev_tunnel.v1.Reconnect reconnect = 7; */ value: Reconnect; case: 'reconnect'; } | { case: undefined; value?: undefined }; }; /** * Describes the message vercel.api.dev_tunnel.v1.ConnectResponse. * Use `create(ConnectResponseSchema)` to create a new message. */ export const ConnectResponseSchema: GenMessage /*@__PURE__*/ = messageDesc(file_tunnel_v1_tunnel, 1); /** * A new conn. The CLI connects to `port` on the developer's machine, or resets * the conn if it doesn't serve that port. * * @generated from message vercel.api.dev_tunnel.v1.Open */ export type Open = Message<'vercel.api.dev_tunnel.v1.Open'> & { /** * @generated from field: uint64 conn_id = 1; */ connId: bigint; /** * @generated from field: vercel.api.dev_tunnel.v1.Protocol protocol = 2; */ protocol: Protocol; /** * @generated from field: uint32 port = 3; */ port: number; }; /** * Describes the message vercel.api.dev_tunnel.v1.Open. * Use `create(OpenSchema)` to create a new message. */ export const OpenSchema: GenMessage /*@__PURE__*/ = messageDesc( file_tunnel_v1_tunnel, 2 ); /** * No more than the conn's window allows (see Window). * * @generated from message vercel.api.dev_tunnel.v1.Data */ export type Data = Message<'vercel.api.dev_tunnel.v1.Data'> & { /** * @generated from field: uint64 conn_id = 1; */ connId: bigint; /** * @generated from field: bytes payload = 2; */ payload: Uint8Array; }; /** * Describes the message vercel.api.dev_tunnel.v1.Data. * Use `create(DataSchema)` to create a new message. */ export const DataSchema: GenMessage /*@__PURE__*/ = messageDesc( file_tunnel_v1_tunnel, 3 ); /** * The sender has nothing more to send (TCP half-close). A conn is over once * both sides have closed, or either has reset. * * @generated from message vercel.api.dev_tunnel.v1.Close */ export type Close = Message<'vercel.api.dev_tunnel.v1.Close'> & { /** * @generated from field: uint64 conn_id = 1; */ connId: bigint; }; /** * Describes the message vercel.api.dev_tunnel.v1.Close. * Use `create(CloseSchema)` to create a new message. */ export const CloseSchema: GenMessage /*@__PURE__*/ = messageDesc( file_tunnel_v1_tunnel, 4 ); /** * Abandons the conn in both directions, e.g. connection refused. * * @generated from message vercel.api.dev_tunnel.v1.Reset */ export type Reset = Message<'vercel.api.dev_tunnel.v1.Reset'> & { /** * @generated from field: uint64 conn_id = 1; */ connId: bigint; /** * @generated from field: string reason = 2; */ reason: string; }; /** * Describes the message vercel.api.dev_tunnel.v1.Reset. * Use `create(ResetSchema)` to create a new message. */ export const ResetSchema: GenMessage /*@__PURE__*/ = messageDesc( file_tunnel_v1_tunnel, 5 ); /** * Lets the peer send `bytes` more of a conn's Data, as the sender of this * consumes what it received. Each side starts each conn able to send 256 KiB. * A client that sends past its window, or grants back more than it was sent, * has the conn reset. * * @generated from message vercel.api.dev_tunnel.v1.Window */ export type Window = Message<'vercel.api.dev_tunnel.v1.Window'> & { /** * @generated from field: uint64 conn_id = 1; */ connId: bigint; /** * @generated from field: uint32 bytes = 2; */ bytes: number; }; /** * Describes the message vercel.api.dev_tunnel.v1.Window. * Use `create(WindowSchema)` to create a new message. */ export const WindowSchema: GenMessage /*@__PURE__*/ = messageDesc( file_tunnel_v1_tunnel, 6 ); /** * Sent both ways every 30s, inside the ALB's idle timeout. The service drops a * client it hasn't heard from in three. The service also sends one as soon as * a Connect stream holds the tunnel, so the CLI knows it's live. * * @generated from message vercel.api.dev_tunnel.v1.Heartbeat */ export type Heartbeat = Message<'vercel.api.dev_tunnel.v1.Heartbeat'> & {}; /** * Describes the message vercel.api.dev_tunnel.v1.Heartbeat. * Use `create(HeartbeatSchema)` to create a new message. */ export const HeartbeatSchema: GenMessage /*@__PURE__*/ = messageDesc( file_tunnel_v1_tunnel, 7 ); /** * This pod is shutting down. The CLI opens a new stream now, and keeps this one * until the service ends it: it still carries the conns already open on it. * * @generated from message vercel.api.dev_tunnel.v1.Reconnect */ export type Reconnect = Message<'vercel.api.dev_tunnel.v1.Reconnect'> & {}; /** * Describes the message vercel.api.dev_tunnel.v1.Reconnect. * Use `create(ReconnectSchema)` to create a new message. */ export const ReconnectSchema: GenMessage /*@__PURE__*/ = messageDesc( file_tunnel_v1_tunnel, 8 ); /** * @generated from message vercel.api.dev_tunnel.v1.DialRequest */ export type DialRequest = Message<'vercel.api.dev_tunnel.v1.DialRequest'> & { /** * @generated from oneof vercel.api.dev_tunnel.v1.DialRequest.frame */ frame: | { /** * First message only. * * @generated from field: vercel.api.dev_tunnel.v1.DialTarget target = 1; */ value: DialTarget; case: 'target'; } | { /** * @generated from field: bytes payload = 2; */ value: Uint8Array; case: 'payload'; } | { case: undefined; value?: undefined }; }; /** * Describes the message vercel.api.dev_tunnel.v1.DialRequest. * Use `create(DialRequestSchema)` to create a new message. */ export const DialRequestSchema: GenMessage /*@__PURE__*/ = messageDesc(file_tunnel_v1_tunnel, 9); /** * @generated from message vercel.api.dev_tunnel.v1.DialTarget */ export type DialTarget = Message<'vercel.api.dev_tunnel.v1.DialTarget'> & { /** * @generated from field: vercel.api.dev_tunnel.v1.Protocol protocol = 1; */ protocol: Protocol; /** * @generated from field: uint32 port = 2; */ port: number; }; /** * Describes the message vercel.api.dev_tunnel.v1.DialTarget. * Use `create(DialTargetSchema)` to create a new message. */ export const DialTargetSchema: GenMessage /*@__PURE__*/ = messageDesc(file_tunnel_v1_tunnel, 10); /** * @generated from message vercel.api.dev_tunnel.v1.DialResponse */ export type DialResponse = Message<'vercel.api.dev_tunnel.v1.DialResponse'> & { /** * @generated from oneof vercel.api.dev_tunnel.v1.DialResponse.frame */ frame: | { /** * @generated from field: bytes payload = 1; */ value: Uint8Array; case: 'payload'; } | { /** * The developer's side has nothing more to send. Sent once; more payload * may still go the other way. * * @generated from field: vercel.api.dev_tunnel.v1.DialEnd end = 2; */ value: DialEnd; case: 'end'; } | { case: undefined; value?: undefined }; }; /** * Describes the message vercel.api.dev_tunnel.v1.DialResponse. * Use `create(DialResponseSchema)` to create a new message. */ export const DialResponseSchema: GenMessage /*@__PURE__*/ = messageDesc(file_tunnel_v1_tunnel, 11); /** * @generated from message vercel.api.dev_tunnel.v1.DialEnd */ export type DialEnd = Message<'vercel.api.dev_tunnel.v1.DialEnd'> & {}; /** * Describes the message vercel.api.dev_tunnel.v1.DialEnd. * Use `create(DialEndSchema)` to create a new message. */ export const DialEndSchema: GenMessage /*@__PURE__*/ = messageDesc( file_tunnel_v1_tunnel, 12 ); /** * @generated from enum vercel.api.dev_tunnel.v1.Protocol */ export enum Protocol { /** * @generated from enum value: PROTOCOL_UNSPECIFIED = 0; */ UNSPECIFIED = 0, /** * @generated from enum value: PROTOCOL_TCP = 1; */ TCP = 1, } /** * Describes the enum vercel.api.dev_tunnel.v1.Protocol. */ export const ProtocolSchema: GenEnum /*@__PURE__*/ = enumDesc( file_tunnel_v1_tunnel, 0 ); /** * Relays TCP connections between the tunnel's deployment and the developer's * machine. Payloads are opaque bytes; nothing here interprets them. * * @generated from service vercel.api.dev_tunnel.v1.TunnelService */ export const TunnelService: GenService<{ /** * The stream `vc dev --tunnel` holds open, carrying every conn the * deployment dials. Authenticated with the client token * (`authorization: Bearer`), which the next create-session replaces: a CLI * refused with UNAUTHENTICATED on a reconnect asks for a new one. * * One client per tunnel: another stream fails with ALREADY_EXISTS, unless it * carries the same `x-vercel-dev-tunnel-instance` (1 to 64 letters, digits * or dashes, one per CLI process). Then it replaces the old stream, which * ends with ABORTED, so a CLI can reconnect while its old stream is still * open on the service. The CLI sends a Heartbeat at least every 30s; a * stream silent for three ends with DEADLINE_EXCEEDED, and one ending with * UNAVAILABLE means reconnect. A CLI that stops reading the stream while * the service has frames for it has it end with RESOURCE_EXHAUSTED. * * A pod shutting down sends Reconnect and refuses new streams with * UNAVAILABLE. Once the CLI's new stream holds the tunnel elsewhere, the old * one gets no new conns and ends with ABORTED when its open ones are done. * * @generated from rpc vercel.api.dev_tunnel.v1.TunnelService.Connect */ connect: { methodKind: 'bidi_streaming'; input: typeof ConnectRequestSchema; output: typeof ConnectResponseSchema; }; /** * One conn from the deployment: a TCP connection to a port on the * developer's machine. The first message is the target; the rest carry * payload. Ending the request stream half-closes the conn, and `end` says the * developer's side has; the call ends once both have, and fails if either * side resets. With no client connected, it waits up to 5s for one, then * fails with UNAVAILABLE. A tunnel carries at most 256 conns at once; more * wait up to 30s for one to end, then fail with RESOURCE_EXHAUSTED, as do * any past 256 waiting. Authenticated with the server token * (`authorization: Bearer`). * * @generated from rpc vercel.api.dev_tunnel.v1.TunnelService.Dial */ dial: { methodKind: 'bidi_streaming'; input: typeof DialRequestSchema; output: typeof DialResponseSchema; }; }> /*@__PURE__*/ = serviceDesc(file_tunnel_v1_tunnel, 0);