@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
48 lines • 2.23 kB
TypeScript
import * as z from "zod/v3";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import { SandboxInjectionRule } from "./sandboxinjectionrule.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
/**
* The network policy mode. - 'allow-all': All traffic is allowed. - 'deny-all': All traffic is blocked. - 'custom': Traffic is controlled by explicit allow/deny rules.
*/
export declare const Mode: {
readonly AllowAll: "allow-all";
readonly Custom: "custom";
readonly DenyAll: "deny-all";
};
/**
* The network policy mode. - 'allow-all': All traffic is allowed. - 'deny-all': All traffic is blocked. - 'custom': Traffic is controlled by explicit allow/deny rules.
*/
export type Mode = ClosedEnum<typeof Mode>;
/**
* The network policy applied to this sandbox, if any.
*/
export type SandboxNetworkPolicy = {
/**
* The network policy mode. - 'allow-all': All traffic is allowed. - 'deny-all': All traffic is blocked. - 'custom': Traffic is controlled by explicit allow/deny rules.
*/
mode: Mode;
/**
* List of domain names the sandbox is allowed to connect to. Supports wildcard patterns (e.g., "*.vercel.com" matches all subdomains).
*/
allowedDomains?: Array<string> | undefined;
/**
* List of IP address ranges (in CIDR notation) the sandbox is allowed to connect to.
*/
allowedCIDRs?: Array<string> | undefined;
/**
* List of IP address ranges (in CIDR notation) the sandbox is blocked from connecting to. These rules take precedence over all allowed rules.
*/
deniedCIDRs?: Array<string> | undefined;
/**
* HTTP header injection rules for outgoing requests matching specific domains.
*/
injectionRules?: Array<SandboxInjectionRule> | undefined;
};
/** @internal */
export declare const Mode$inboundSchema: z.ZodNativeEnum<typeof Mode>;
/** @internal */
export declare const SandboxNetworkPolicy$inboundSchema: z.ZodType<SandboxNetworkPolicy, z.ZodTypeDef, unknown>;
export declare function sandboxNetworkPolicyFromJSON(jsonString: string): SafeParseResult<SandboxNetworkPolicy, SDKValidationError>;
//# sourceMappingURL=sandboxnetworkpolicy.d.ts.map