{
  "format": "filelovenote-api-examples-v1",
  "contract": "existing-wire-with-marked-rebuild-additions",
  "sourceDate": "2026-10-26",
  "examples": [
    {
      "id": "storage-status",
      "method": "GET",
      "path": "/api/notes/storage",
      "responseStatus": 200,
      "response": {
        "active": true,
        "connected": true,
        "folderId": "drive-app-folder",
        "folderName": "FileLoveNote",
        "notesCount": 1,
        "migrationPending": false,
        "migrationStage": "active",
        "userKey": "0123456789abcdef0123456789abcdef"
      }
    },
    {
      "id": "pull-request",
      "method": "POST",
      "path": "/api/drive-notes",
      "responseStatus": 200,
      "request": {
        "revisions": {
          "doc-example": "opaque-revision-before"
        }
      },
      "response": {
        "documents": [
          {
            "id": "doc-example",
            "title": "Research notes",
            "folderId": "note-folder-example",
            "content": {
              "type": "doc",
              "content": [
                {
                  "type": "paragraph",
                  "content": [
                    {
                      "type": "text",
                      "text": "My observations about the source file."
                    }
                  ]
                }
              ]
            },
            "createdAt": 1793000000000,
            "updatedAt": 1793000001000,
            "trashedAt": null,
            "driveRevision": "opaque-revision-a",
            "driveFileId": "drive-note-example"
          }
        ],
        "revisions": {
          "doc-example": "opaque-revision-a"
        },
        "hasMore": false,
        "removed": []
      }
    },
    {
      "id": "push-request",
      "method": "POST",
      "path": "/api/drive-notes/push",
      "responseStatus": 200,
      "request": {
        "station": true,
        "upserts": [
          {
            "id": "doc-example",
            "document": {
              "id": "doc-example",
              "title": "Research notes",
              "folderId": "note-folder-example",
              "content": {
                "type": "doc",
                "content": [
                  {
                    "type": "paragraph",
                    "content": [
                      {
                        "type": "text",
                        "text": "My observations about the source file."
                      }
                    ]
                  }
                ]
              },
              "createdAt": 1793000000000,
              "updatedAt": 1793000001000,
              "trashedAt": null,
              "driveRevision": "opaque-revision-a",
              "driveFileId": "drive-note-example"
            },
            "baseDocument": {
              "id": "doc-example",
              "title": "Research notes",
              "folderId": "note-folder-example",
              "content": {
                "type": "doc",
                "content": [
                  {
                    "type": "paragraph",
                    "content": [
                      {
                        "type": "text",
                        "text": "My observations about the source file."
                      }
                    ]
                  }
                ]
              },
              "createdAt": 1793000000000,
              "updatedAt": 1793000000000,
              "trashedAt": null,
              "driveRevision": "opaque-revision-a",
              "driveFileId": "drive-note-example"
            },
            "token": "queue-version-example"
          }
        ],
        "deletes": [
          {
            "id": "doc-remove-example",
            "token": "delete-version-example"
          }
        ],
        "folders": [
          {
            "key": "folder-op:000000000001",
            "id": "note-folder-example",
            "kind": "create",
            "body": {
              "name": "Sources",
              "parentId": "folder-notes"
            }
          }
        ]
      },
      "response": {
        "queued": true,
        "ticket": "0123456789abcdef0123456789abcdef"
      }
    },
    {
      "id": "push-result",
      "method": "GET",
      "path": "/api/drive-notes/push-ticket?ticket=0123456789abcdef0123456789abcdef",
      "responseStatus": 200,
      "response": {
        "notes": [
          {
            "id": "doc-example",
            "ok": true,
            "document": {
              "id": "doc-example",
              "title": "Research notes",
              "folderId": "note-folder-example",
              "content": {
                "type": "doc",
                "content": [
                  {
                    "type": "paragraph",
                    "content": [
                      {
                        "type": "text",
                        "text": "My observations about the source file."
                      }
                    ]
                  }
                ]
              },
              "createdAt": 1793000000000,
              "updatedAt": 1793000001000,
              "trashedAt": null,
              "driveRevision": "opaque-revision-a",
              "driveFileId": "drive-note-example"
            }
          },
          {
            "id": "doc-remove-example",
            "ok": true,
            "deleted": true
          }
        ],
        "folders": [
          {
            "key": "folder-op:000000000001",
            "id": "note-folder-example",
            "kind": "create",
            "ok": true
          }
        ]
      }
    },
    {
      "id": "push-conflict",
      "method": "POST",
      "path": "/api/drive-notes/push",
      "responseStatus": 200,
      "response": {
        "notes": [
          {
            "id": "doc-example",
            "ok": false,
            "status": 409,
            "error": "A conflicting version was preserved.",
            "document": {
              "id": "doc-example",
              "title": "Research notes",
              "folderId": "note-folder-example",
              "content": {
                "type": "doc",
                "content": [
                  {
                    "type": "paragraph",
                    "content": [
                      {
                        "type": "text",
                        "text": "My observations about the source file."
                      }
                    ]
                  }
                ]
              },
              "createdAt": 1793000000000,
              "updatedAt": 1793000001000,
              "trashedAt": null,
              "driveRevision": "opaque-revision-a",
              "driveFileId": "drive-note-example"
            },
            "conflictDocument": {
              "id": "conflict-doc-example",
              "title": "Research notes (conflict)",
              "folderId": "note-folder-example",
              "content": {
                "type": "doc",
                "content": [
                  {
                    "type": "paragraph",
                    "content": [
                      {
                        "type": "text",
                        "text": "My observations about the source file."
                      }
                    ]
                  }
                ]
              },
              "createdAt": 1793000000000,
              "updatedAt": 1793000001000,
              "trashedAt": null,
              "driveRevision": "opaque-revision-a",
              "driveFileId": "drive-note-example"
            }
          }
        ],
        "folders": []
      }
    },
    {
      "id": "search",
      "method": "POST",
      "path": "/search",
      "responseStatus": 200,
      "request": {
        "query": "research",
        "chips": [],
        "page": 0,
        "pageSize": 50,
        "documents": [
          {
            "id": "doc-example",
            "title": "Research notes",
            "folderId": "note-folder-example",
            "content": {
              "type": "doc",
              "content": [
                {
                  "type": "paragraph",
                  "content": [
                    {
                      "type": "text",
                      "text": "My observations about the source file."
                    }
                  ]
                }
              ]
            },
            "createdAt": 1793000000000,
            "updatedAt": 1793000001000,
            "trashedAt": null,
            "driveRevision": "opaque-revision-a",
            "driveFileId": "drive-note-example"
          }
        ],
        "folders": [
          {
            "id": "note-folder-example",
            "name": "Sources",
            "parentId": "folder-notes"
          }
        ]
      },
      "response": {
        "items": [
          {
            "id": "paper:doc-example",
            "source": "paper",
            "sourceId": "doc-example",
            "type": "paper",
            "title": "Research notes",
            "createdAt": 1793000000000,
            "tags": [],
            "note": "",
            "author": "",
            "transcript": "",
            "transcriptStatus": "idle",
            "playbackSeconds": 0,
            "lastPlayedMs": 0,
            "meta": {
              "siteHost": "",
              "format": "paper",
              "ext": "paper",
              "sizeBytes": 0
            },
            "remotePath": "paper:doc-example",
            "playlisted": false
          }
        ],
        "total": 1
      }
    },
    {
      "id": "picker-result",
      "method": "GET",
      "path": "/api/google-drive/list?folder=root&includeAll=true",
      "responseStatus": 200,
      "response": {
        "configured": true,
        "connected": true,
        "email": "example@example.test",
        "folders": [],
        "items": [
          {
            "id": "drive-source-example",
            "name": "Source.pdf",
            "type": "book",
            "size": 1073741824,
            "mtime": 1793000000000,
            "thumbUrl": "",
            "downloadUrl": "/google-drive/raw/drive-source-example",
            "url": "/google-drive/raw/drive-source-example",
            "route": "gdrive:drive-source-example",
            "source": "gdrive",
            "folderId": "drive-parent-example"
          }
        ],
        "breadcrumb": [
          {
            "id": "root",
            "name": "Google Drive"
          }
        ],
        "nextPageToken": ""
      }
    },
    {
      "id": "upload-begin",
      "method": "POST",
      "path": "/google-drive/upload/begin",
      "responseStatus": 200,
      "request": {
        "name": "Source.pdf",
        "size": 1073741824,
        "type": "application/pdf",
        "folderId": "folder-home"
      },
      "response": {
        "ok": true,
        "uploadId": "0123456789abcdef0123456789abcdef",
        "chunkSize": 8388608,
        "received": 0
      }
    },
    {
      "id": "canvas-put",
      "method": "PUT",
      "path": "/api/notes/doc-example/canvas/canvas-example",
      "responseStatus": 200,
      "request": {
        "canvas": {
          "format": "notesandfiles-canvas-v1",
          "id": "canvas-example",
          "docId": "doc-example",
          "title": "Source map",
          "createdAt": 1793000000000,
          "updatedAt": 1793000001000,
          "elements": [],
          "connectors": []
        }
      },
      "response": {
        "canvas": {
          "format": "notesandfiles-canvas-v1",
          "id": "canvas-example",
          "docId": "doc-example",
          "title": "Source map",
          "createdAt": 1793000000000,
          "updatedAt": 1793000002000,
          "elements": [],
          "connectors": []
        },
        "summary": {
          "title": "Source map",
          "elementCount": 0,
          "refTitles": []
        }
      }
    }
  ]
}
