UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

49 lines 1.59 kB
import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as BindingsAPI from 'cloudflare/resources/workers/scripts/bindings'; export declare class Bindings extends APIResource { /** * List the bindings for a Workers script. */ get(params: BindingGetParams, options?: Core.RequestOptions): Core.APIPromise<BindingGetResponse>; } export type WorkersBinding = WorkersBinding.WorkersKVNamespaceBinding | WorkersBinding.WorkersWasmModuleBinding; export declare namespace WorkersBinding { interface WorkersKVNamespaceBinding { /** * A JavaScript variable name for the binding. */ name: string; /** * Namespace identifier tag. */ namespace_id: string; /** * The class of resource that the binding provides. */ type: 'kv_namespace'; } interface WorkersWasmModuleBinding { /** * A JavaScript variable name for the binding. */ name: string; /** * The class of resource that the binding provides. */ type: 'wasm_module'; } } export type BindingGetResponse = Array<WorkersBinding>; export interface BindingGetParams { /** * Identifier */ zone_id: string; } export declare namespace Bindings { export import WorkersBinding = BindingsAPI.WorkersBinding; export import BindingGetResponse = BindingsAPI.BindingGetResponse; export import BindingGetParams = BindingsAPI.BindingGetParams; } //# sourceMappingURL=bindings.d.ts.map