import { Long, unknownFieldsSymbol } from "../../../../runtime/protos/index.js"; import type { MessageDescriptor, MessageFns, EnumInstance, EnumClass } from "../../../../runtime/protos/index.js"; import { customJson } from "../../../../runtime/util/logging.js"; import { ChannelCredentials, Client, ClientUnaryCall, ClientOptions, CallOptions, Metadata, ServiceError as GrpcServiceError, handleUnaryCall, UntypedServiceImplementation } from "@grpc/grpc-js"; import type { SDKInterface } from "../../../../sdk.js"; import { Request as SDKRequestClass, type RetryOptions } from "../../../../runtime/request.js"; import { Operation as OperationWrapper } from "../../../../runtime/operation.js"; import { GetOperationRequest, Operation, OperationService, ResourceMetadata } from "../../common/v1/index.js"; /** * Request to get a tunnel by its identifier. * */ export interface GetTunnelRequest { /** Contains the fully qualified protobuf type name. */ $type: "nebius.tunnel.v1.GetTunnelRequest"; /** Preserves protobuf fields that this SDK version does not recognize. */ [unknownFieldsSymbol]?: Uint8Array | undefined; /** Returns a safe value for JSON logs. */ [customJson]?: () => unknown; /** * Unique identifier of the tunnel. * */ id: string; } /** Encodes, decodes, converts, and creates {@link GetTunnelRequest} messages. */ export declare const GetTunnelRequest: MessageFns; /** * Request to list tunnels within a parent resource. * */ export interface ListTunnelRequest { /** Contains the fully qualified protobuf type name. */ $type: "nebius.tunnel.v1.ListTunnelRequest"; /** Preserves protobuf fields that this SDK version does not recognize. */ [unknownFieldsSymbol]?: Uint8Array | undefined; /** Returns a safe value for JSON logs. */ [customJson]?: () => unknown; /** * Identifier of the parent resource. * */ parentId: string; /** * Maximum number of items to return per page. * */ pageSize: Long; /** * Token for retrieving the next page of results. * */ pageToken: string; /** * Filter expression for narrowing results. * */ filter: string; } /** Encodes, decodes, converts, and creates {@link ListTunnelRequest} messages. */ export declare const ListTunnelRequest: MessageFns; /** * Response containing a list of tunnels. * */ export interface ListTunnelsResponse { /** Contains the fully qualified protobuf type name. */ $type: "nebius.tunnel.v1.ListTunnelsResponse"; /** Preserves protobuf fields that this SDK version does not recognize. */ [unknownFieldsSymbol]?: Uint8Array | undefined; /** Returns a safe value for JSON logs. */ [customJson]?: () => unknown; /** * List of tunnels matching the request. * */ items: Tunnel[]; /** * Token to retrieve the next page of results, empty if no more results. * */ nextPageToken: string; } /** Encodes, decodes, converts, and creates {@link ListTunnelsResponse} messages. */ export declare const ListTunnelsResponse: MessageFns; /** * Request to create a new tunnel. * */ export interface CreateTunnelRequest { /** Contains the fully qualified protobuf type name. */ $type: "nebius.tunnel.v1.CreateTunnelRequest"; /** Preserves protobuf fields that this SDK version does not recognize. */ [unknownFieldsSymbol]?: Uint8Array | undefined; /** Returns a safe value for JSON logs. */ [customJson]?: () => unknown; /** * Metadata for the new tunnel. * */ metadata?: ResourceMetadata | undefined; /** * Specification for the new tunnel. * */ spec?: TunnelSpec | undefined; } /** Encodes, decodes, converts, and creates {@link CreateTunnelRequest} messages. */ export declare const CreateTunnelRequest: MessageFns; /** * Request to update an existing tunnel. * */ export interface UpdateTunnelRequest { /** Contains the fully qualified protobuf type name. */ $type: "nebius.tunnel.v1.UpdateTunnelRequest"; /** Preserves protobuf fields that this SDK version does not recognize. */ [unknownFieldsSymbol]?: Uint8Array | undefined; /** Returns a safe value for JSON logs. */ [customJson]?: () => unknown; /** * Metadata identifying the tunnel to update. The `id` field is required; * `resource_version`, when non-zero, enables optimistic concurrency control. * */ metadata?: ResourceMetadata | undefined; /** * New specification for the tunnel. * */ spec?: TunnelSpec | undefined; } /** Encodes, decodes, converts, and creates {@link UpdateTunnelRequest} messages. */ export declare const UpdateTunnelRequest: MessageFns; /** * Request to delete a tunnel. * */ export interface DeleteTunnelRequest { /** Contains the fully qualified protobuf type name. */ $type: "nebius.tunnel.v1.DeleteTunnelRequest"; /** Preserves protobuf fields that this SDK version does not recognize. */ [unknownFieldsSymbol]?: Uint8Array | undefined; /** Returns a safe value for JSON logs. */ [customJson]?: () => unknown; /** * Unique identifier of the tunnel to delete. * */ id: string; } /** Encodes, decodes, converts, and creates {@link DeleteTunnelRequest} messages. */ export declare const DeleteTunnelRequest: MessageFns; /** * Defines the gRPC methods for the `nebius.tunnel.v1.TunnelService` service. */ export type TunnelServiceServiceDescription = typeof TunnelServiceServiceDescription; /** * Describes the gRPC methods for the `nebius.tunnel.v1.TunnelService` service. */ export declare const TunnelServiceServiceDescription: { readonly get: { readonly path: "/nebius.tunnel.v1.TunnelService/Get"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: GetTunnelRequest) => Buffer; readonly requestDescriptor: () => MessageDescriptor | undefined; readonly sendResetMask: false; readonly requestDeserialize: (value: Buffer) => GetTunnelRequest; readonly responseSerialize: (value: Tunnel) => Buffer; readonly responseDeserialize: (value: Buffer) => Tunnel; }; readonly list: { readonly path: "/nebius.tunnel.v1.TunnelService/List"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: ListTunnelRequest) => Buffer; readonly requestDescriptor: () => MessageDescriptor | undefined; readonly sendResetMask: false; readonly requestDeserialize: (value: Buffer) => ListTunnelRequest; readonly responseSerialize: (value: ListTunnelsResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => ListTunnelsResponse; }; readonly create: { readonly path: "/nebius.tunnel.v1.TunnelService/Create"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: CreateTunnelRequest) => Buffer; readonly requestDescriptor: () => MessageDescriptor | undefined; readonly sendResetMask: false; readonly requestDeserialize: (value: Buffer) => CreateTunnelRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; readonly update: { readonly path: "/nebius.tunnel.v1.TunnelService/Update"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: UpdateTunnelRequest) => Buffer; readonly requestDescriptor: () => MessageDescriptor | undefined; readonly sendResetMask: true; readonly requestDeserialize: (value: Buffer) => UpdateTunnelRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; readonly delete: { readonly path: "/nebius.tunnel.v1.TunnelService/Delete"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: DeleteTunnelRequest) => Buffer; readonly requestDescriptor: () => MessageDescriptor | undefined; readonly sendResetMask: false; readonly requestDeserialize: (value: Buffer) => DeleteTunnelRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; }; /** * Handles server calls for the `nebius.tunnel.v1.TunnelService` service. */ export interface TunnelServiceServer extends UntypedServiceImplementation { /** * Retrieves a tunnel by its identifier. * */ get: handleUnaryCall; /** * Lists all tunnels within a parent. * */ list: handleUnaryCall; /** * Creates a new tunnel. * */ create: handleUnaryCall; /** * Updates an existing tunnel. * */ update: handleUnaryCall; /** * Deletes a tunnel by its identifier. * */ delete: handleUnaryCall; } /** * Defines the low-level gRPC client for the `nebius.tunnel.v1.TunnelService` service. */ export interface TunnelServiceBaseClient extends Client { /** * Retrieves a tunnel by its identifier. * */ get(request: GetTunnelRequest, metadata: Metadata, options: Partial, callback: (error: GrpcServiceError | null, response: Tunnel) => void): ClientUnaryCall; /** * Lists all tunnels within a parent. * */ list(request: ListTunnelRequest, metadata: Metadata, options: Partial, callback: (error: GrpcServiceError | null, response: ListTunnelsResponse) => void): ClientUnaryCall; /** * Creates a new tunnel. * */ create(request: CreateTunnelRequest, metadata: Metadata, options: Partial, callback: (error: GrpcServiceError | null, response: Operation) => void): ClientUnaryCall; /** * Updates an existing tunnel. * */ update(request: UpdateTunnelRequest, metadata: Metadata, options: Partial, callback: (error: GrpcServiceError | null, response: Operation) => void): ClientUnaryCall; /** * Deletes a tunnel by its identifier. * */ delete(request: DeleteTunnelRequest, metadata: Metadata, options: Partial, callback: (error: GrpcServiceError | null, response: Operation) => void): ClientUnaryCall; } /** * Creates low-level gRPC clients for the `nebius.tunnel.v1.TunnelService` service. */ export declare const TunnelServiceBaseClient: { /** Creates a low-level client for the service address. */ new (address: string, credentials: ChannelCredentials, options?: Partial): TunnelServiceBaseClient; /** Contains the gRPC service description. */ service: typeof TunnelServiceServiceDescription; /** Contains the fully qualified protobuf service name. */ serviceName: string; }; /** * TunnelService provides methods for managing tunnels. * It supports CRUD operations for creating secure tunnel connections for applications. * */ export interface TunnelService { /** Contains the fully qualified protobuf service name. */ $type: "nebius.tunnel.v1.TunnelService"; /** * Retrieves a tunnel by its identifier. * */ get(request: GetTunnelRequest): SDKRequestClass; /** * Retrieves a tunnel by its identifier. * */ get(request: GetTunnelRequest, metadata: Metadata): SDKRequestClass; /** * Retrieves a tunnel by its identifier. * */ get(request: GetTunnelRequest, metadata: Metadata, options: Partial & RetryOptions): SDKRequestClass; /** * Lists all tunnels within a parent. * */ list(request: ListTunnelRequest): SDKRequestClass; /** * Lists all tunnels within a parent. * */ list(request: ListTunnelRequest, metadata: Metadata): SDKRequestClass; /** * Lists all tunnels within a parent. * */ list(request: ListTunnelRequest, metadata: Metadata, options: Partial & RetryOptions): SDKRequestClass; /** * Creates a new tunnel. * */ create(request: CreateTunnelRequest): SDKRequestClass>; /** * Creates a new tunnel. * */ create(request: CreateTunnelRequest, metadata: Metadata): SDKRequestClass>; /** * Creates a new tunnel. * */ create(request: CreateTunnelRequest, metadata: Metadata, options: Partial & RetryOptions): SDKRequestClass>; /** * Updates an existing tunnel. * */ update(request: UpdateTunnelRequest): SDKRequestClass>; /** * Updates an existing tunnel. * */ update(request: UpdateTunnelRequest, metadata: Metadata): SDKRequestClass>; /** * Updates an existing tunnel. * */ update(request: UpdateTunnelRequest, metadata: Metadata, options: Partial & RetryOptions): SDKRequestClass>; /** * Deletes a tunnel by its identifier. * */ delete(request: DeleteTunnelRequest): SDKRequestClass>; /** * Deletes a tunnel by its identifier. * */ delete(request: DeleteTunnelRequest, metadata: Metadata): SDKRequestClass>; /** * Deletes a tunnel by its identifier. * */ delete(request: DeleteTunnelRequest, metadata: Metadata, options: Partial & RetryOptions): SDKRequestClass>; } /** * Calls the `nebius.tunnel.v1.TunnelService` service through the Nebius SDK. */ export declare class TunnelService implements TunnelService { private sdk; $type: "nebius.tunnel.v1.TunnelService"; private addr; private spec; private apiServiceName; /** Creates a client that uses the SDK service address. */ constructor(sdk: SDKInterface); /** Returns the operation service for this service address. */ getOperationService(): OperationService; /** * Retrieves a tunnel by its identifier. * */ get(request: GetTunnelRequest): SDKRequestClass; /** * Retrieves a tunnel by its identifier. * */ get(request: GetTunnelRequest, metadata: Metadata): SDKRequestClass; /** * Retrieves a tunnel by its identifier. * */ get(request: GetTunnelRequest, metadata: Metadata, options: Partial & RetryOptions): SDKRequestClass; /** * Lists all tunnels within a parent. * */ list(request: ListTunnelRequest): SDKRequestClass; /** * Lists all tunnels within a parent. * */ list(request: ListTunnelRequest, metadata: Metadata): SDKRequestClass; /** * Lists all tunnels within a parent. * */ list(request: ListTunnelRequest, metadata: Metadata, options: Partial & RetryOptions): SDKRequestClass; /** * Creates a new tunnel. * */ create(request: CreateTunnelRequest): SDKRequestClass>; /** * Creates a new tunnel. * */ create(request: CreateTunnelRequest, metadata: Metadata): SDKRequestClass>; /** * Creates a new tunnel. * */ create(request: CreateTunnelRequest, metadata: Metadata, options: Partial & RetryOptions): SDKRequestClass>; /** * Updates an existing tunnel. * */ update(request: UpdateTunnelRequest): SDKRequestClass>; /** * Updates an existing tunnel. * */ update(request: UpdateTunnelRequest, metadata: Metadata): SDKRequestClass>; /** * Updates an existing tunnel. * */ update(request: UpdateTunnelRequest, metadata: Metadata, options: Partial & RetryOptions): SDKRequestClass>; /** * Deletes a tunnel by its identifier. * */ delete(request: DeleteTunnelRequest): SDKRequestClass>; /** * Deletes a tunnel by its identifier. * */ delete(request: DeleteTunnelRequest, metadata: Metadata): SDKRequestClass>; /** * Deletes a tunnel by its identifier. * */ delete(request: DeleteTunnelRequest, metadata: Metadata, options: Partial & RetryOptions): SDKRequestClass>; } /** * ConnectionState reports whether the tunnel has an agent behind it. Values are * prefixed because a top-level enum puts them in the package scope. * */ export type ConnectionState = EnumInstance<"UNRECOGNIZED" | "CONNECTION_STATE_UNSPECIFIED" | "CONNECTION_STATE_DISCONNECTED" | "CONNECTION_STATE_CONNECTED">; /** Defines the static values of {@link ConnectionState}. */ export interface ConnectionStateValueMembers { /** * Proto3 zero value. A read of the tunnel never returns it; a mutation * records it, because it reports the tunnel that was written. * */ readonly CONNECTION_STATE_UNSPECIFIED: EnumInstance<"UNRECOGNIZED" | "CONNECTION_STATE_UNSPECIFIED" | "CONNECTION_STATE_DISCONNECTED" | "CONNECTION_STATE_CONNECTED">; /** * No agent is connected. Nothing the tunnel exposes is reachable. * */ readonly CONNECTION_STATE_DISCONNECTED: EnumInstance<"UNRECOGNIZED" | "CONNECTION_STATE_UNSPECIFIED" | "CONNECTION_STATE_DISCONNECTED" | "CONNECTION_STATE_CONNECTED">; /** * At least one agent is connected. * */ readonly CONNECTION_STATE_CONNECTED: EnumInstance<"UNRECOGNIZED" | "CONNECTION_STATE_UNSPECIFIED" | "CONNECTION_STATE_DISCONNECTED" | "CONNECTION_STATE_CONNECTED">; } /** Defines the runtime API for {@link ConnectionState}. */ export type ConnectionStateClass = EnumClass<"UNRECOGNIZED" | "CONNECTION_STATE_UNSPECIFIED" | "CONNECTION_STATE_DISCONNECTED" | "CONNECTION_STATE_CONNECTED"> & ConnectionStateValueMembers; /** Converts and creates {@link ConnectionState} values. */ export declare const ConnectionState: ConnectionStateClass; /** * State represents the lifecycle state of the tunnel. * */ export type TunnelStatus_State = EnumInstance<"UNRECOGNIZED" | "UNSPECIFIED" | "CREATED" | "DELETED">; /** Defines the static values of {@link TunnelStatus_State}. */ export interface TunnelStatus_StateValueMembers { /** * Default unspecified state. * */ readonly UNSPECIFIED: EnumInstance<"UNRECOGNIZED" | "UNSPECIFIED" | "CREATED" | "DELETED">; /** * The tunnel has been created and is active. * */ readonly CREATED: EnumInstance<"UNRECOGNIZED" | "UNSPECIFIED" | "CREATED" | "DELETED">; /** * The tunnel has been deleted. * */ readonly DELETED: EnumInstance<"UNRECOGNIZED" | "UNSPECIFIED" | "CREATED" | "DELETED">; } /** Defines the runtime API for {@link TunnelStatus_State}. */ export type TunnelStatus_StateClass = EnumClass<"UNRECOGNIZED" | "UNSPECIFIED" | "CREATED" | "DELETED"> & TunnelStatus_StateValueMembers; /** Converts and creates {@link TunnelStatus_State} values. */ export declare const TunnelStatus_State: TunnelStatus_StateClass; /** * Tunnel represents a secure tunnel connection for applications. * It enables connectivity between applications and external services within a parent. * */ export interface Tunnel { /** Contains the fully qualified protobuf type name. */ $type: "nebius.tunnel.v1.Tunnel"; /** Preserves protobuf fields that this SDK version does not recognize. */ [unknownFieldsSymbol]?: Uint8Array | undefined; /** Returns a safe value for JSON logs. */ [customJson]?: () => unknown; /** * Resource metadata containing identification and hierarchy information. * */ metadata?: ResourceMetadata | undefined; /** * Specification of the tunnel configuration. * */ spec?: TunnelSpec | undefined; /** * Current status of the tunnel. * */ status?: TunnelStatus | undefined; } /** Encodes, decodes, converts, and creates {@link Tunnel} messages. */ export declare const Tunnel: MessageFns; /** * TunnelSpec defines the configuration for the tunnel. * */ export interface TunnelSpec { /** Contains the fully qualified protobuf type name. */ $type: "nebius.tunnel.v1.TunnelSpec"; /** Preserves protobuf fields that this SDK version does not recognize. */ [unknownFieldsSymbol]?: Uint8Array | undefined; /** Returns a safe value for JSON logs. */ [customJson]?: () => unknown; /** * Human-readable display name for the tunnel. * */ title: string; /** * Arbitrary description of the tunnel provided by the user. * */ description: string; } /** Encodes, decodes, converts, and creates {@link TunnelSpec} messages. */ export declare const TunnelSpec: MessageFns; /** * TunnelStatus represents the current state of the tunnel. * */ export interface TunnelStatus { /** Contains the fully qualified protobuf type name. */ $type: "nebius.tunnel.v1.TunnelStatus"; /** Preserves protobuf fields that this SDK version does not recognize. */ [unknownFieldsSymbol]?: Uint8Array | undefined; /** Returns a safe value for JSON logs. */ [customJson]?: () => unknown; /** * Current lifecycle state of the tunnel. * */ state: TunnelStatus_State; /** * Services reachable through the tunnel. A service is listed while at least * one agent announces it, and follows the agents within about 30 seconds. * */ services: ServiceStatus[]; /** * Whether any agent is connected to the tunnel now. * */ connectionState: ConnectionState; } /** Encodes, decodes, converts, and creates {@link TunnelStatus} messages. */ export declare const TunnelStatus: MessageFns; /** * ServiceStatus is a service reachable through the tunnel. * */ export interface ServiceStatus { /** Contains the fully qualified protobuf type name. */ $type: "nebius.tunnel.v1.ServiceStatus"; /** Preserves protobuf fields that this SDK version does not recognize. */ [unknownFieldsSymbol]?: Uint8Array | undefined; /** Returns a safe value for JSON logs. */ [customJson]?: () => unknown; /** * Name of the service, as the agent announced it. 1-20 characters, lowercase * letters and digits only: the hostname joins the name to the tunnel id with * a dash, so a name may not contain one. For example, "app". * */ name: string; /** * Where to reach the service, as host:port. The tunnel terminates TLS, so a * client connects over TLS and sends the host as SNI. What travels inside is * whatever the service speaks, which the tunnel does not interpret. * For example, "app-hy3wnb3wstpk7dz.tunnel.example.com:443". * */ endpoint: string; } /** Encodes, decodes, converts, and creates {@link ServiceStatus} messages. */ export declare const ServiceStatus: MessageFns; //# sourceMappingURL=index.d.ts.map