UNPKG

@scalar/types

Version:

Types to work with Scalar packages

90 lines 2.24 kB
/** * This file is autogenerated. Do not edit it. * * Generated at: 2026-05-20T20:41:54.922Z */ /** * Post-response script for an operation. Use to extract response data or assert on the response. * * @example * ```yaml * x-post-response: | * pm.test("Status code is 200", () => { * pm.response.to.have.status(200) * }) * ``` */ export type XPostResponse = { /** Script executed after a response is received */ 'x-post-response'?: string; }; /** * Pre-request script to run before the request is sent. Use to set variables, generate values, or modify headers. * * @example * ```yaml * x-pre-request: | * var token = pm.environment.get("token") * pm.request.headers.set("Authorization", `Bearer ${token}`) * ``` */ export type XPreRequest = { /** Script executed before the request is sent */ 'x-pre-request'?: string; }; /** * The currently selected environment for this API description. * * @example * ```yaml * x-scalar-active-environment: production * ``` */ export type XScalarActiveEnvironment = { /** The currently selected environment name */ 'x-scalar-active-environment'?: string; }; /** A persisted cookie definition for the workspace */ export type XScalarCookie = { /** Cookie name */ name: string; /** Cookie value */ value: string; /** Domain scope (includes subdomains when set) */ domain?: string; /** Path scope — cookie is sent only for requests matching this path */ path?: string; /** When true, the cookie is not sent with requests */ isDisabled?: boolean; }; /** * Persisted workspace cookies shared across requests. * * @example * ```yaml * x-scalar-cookies: * - name: session * value: abc123 * path: / * ``` */ export type XScalarCookies = { /** Cookies persisted for the workspace and injected into requests */ 'x-scalar-cookies'?: XScalarCookie[]; }; /** * Custom display order for elements in the Scalar UI (tags, operations, tag groups). * * @example * ```yaml * x-scalar-order: * - users * - pets * - admin * ``` */ export type XScalarOrder = { /** Ordered list of element identifiers (tags, operations, etc.) */ 'x-scalar-order'?: string[]; }; //# sourceMappingURL=index.d.ts.map