import { SerializableRequest } from "./types"; export function createPipelineRunRequest(): SerializableRequest { return { url: "/api/workflow/run", options: { method: "POST", }, }; } export function createSecretRequest( name: string, value: string ): SerializableRequest { return { url: "/api/secrets", options: { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ name, value }), }, }; } export function deleteSecretRequest(name: string): SerializableRequest { return { url: "/api/secrets", options: { method: "DELETE", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ name }), }, }; }