import type { RequestOptionsWithHooks, SendMethod, SocketArtifactWithExtras } from './types.mts'; import type { HttpResponse } from '@socketsecurity/lib/http-request/response-types'; import type { JsonValue } from '@socketsecurity/lib/json/types'; export declare class ResponseError extends Error { response: HttpResponse; url?: string | undefined; constructor(response: HttpResponse, message?: string, url?: string | undefined); } export declare function createDeleteRequest(baseUrl: string, urlPath: string, options?: RequestOptionsWithHooks | undefined): Promise; /** * GET options. `stream` resolves as soon as the response headers arrive and * leaves the body unread on `rawResponse`, so a caller can consume records as * they land instead of holding the whole body in memory. `maxResponseSize` * cannot be enforced without reading the body, so it is skipped in stream mode * and the caller owns the read budget. */ export type GetRequestOptions = RequestOptionsWithHooks & { stream?: boolean | undefined; }; export declare function createGetRequest(baseUrl: string, urlPath: string, options?: GetRequestOptions | undefined): Promise; export declare function createRequestWithJson(method: SendMethod, baseUrl: string, urlPath: string, json: unknown, options?: RequestOptionsWithHooks | undefined): Promise; export declare function getResponseJson(response: HttpResponse, method?: string | undefined, url?: string | undefined): Promise; export declare function isResponseOk(response: HttpResponse): boolean; export interface ReshapeArtifactOptions { actions?: string | undefined; isAuthenticated: boolean; policy?: Map | undefined; } export interface ArtifactDeepLinkQualifiers { artifactId?: string | undefined; classifier?: string | undefined; ext?: string | undefined; params?: Record | undefined; path?: string | undefined; platform?: string | undefined; section?: string | undefined; } export declare function pickPresentDeepLinkFields(artifact: SocketArtifactWithExtras & ArtifactDeepLinkQualifiers): ArtifactDeepLinkQualifiers; export declare function reshapeArtifactForPublicPolicy>(data: T, options: ReshapeArtifactOptions): T;