UNPKG

@codesandbox/sdk

Version:
23 lines (22 loc) 734 B
import type { HostToken } from "../HostTokens"; import { Tracer } from "@opentelemetry/api"; export type { HostToken }; export declare class Hosts { private sandboxId; private hostToken?; private tracer?; constructor(sandboxId: string, hostToken?: HostToken | undefined, tracer?: Tracer | undefined); private withSpan; /** * If private Sandbox this will return a URL with a host token. */ getUrl(port: number, protocol?: string): string; /** * If private Sandbox this will return headers with a host token. */ getHeaders(): Record<string, string>; /** * If private Sandbox this will return cookies with a host token. */ getCookies(): Record<string, string>; }