ApplyPatchUpdateFileOperation - TypeScript SDK

ApplyPatchUpdateFileOperation type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

The update_file variant of an apply_patch_call.operation. Carries a V4A diff describing edits to an existing file.

Example Usage

1import { ApplyPatchUpdateFileOperation } from "@openrouter/sdk/models";
2
3let value: ApplyPatchUpdateFileOperation = {
4 diff: "@@ function main() {\n+ console.log(\"hi\");\n }",
5 path: "/src/main.ts",
6 type: "update_file",
7};

Fields

FieldTypeRequiredDescription
diffstring✔️N/A
pathstring✔️N/A
type”update_file”✔️N/A