ApplyPatchCreateFileOperation - TypeScript SDK

ApplyPatchCreateFileOperation type definition

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

The create_file variant of an apply_patch_call.operation. Carries a V4A diff describing the new file contents.

Example Usage

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

Fields

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