{
  "openapi": "3.0.3",
  "info": {
    "title": "Docs API",
    "description": "Generic document-platform primitives \u2014 documents, templates, projects, sharing, AI generation. Consumed by product backends (Noteble, SystemDox) and sellable standalone to developer customers.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.puglieseweb.com/docs/v1",
      "description": "Production"
    }
  ],
  "paths": {
    "/documents": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "List documents",
        "description": "List documents with optional filters and search.",
        "operationId": "list_documents_documents_get",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Document list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Create a document",
        "description": "Create a new document, storing metadata in DynamoDB and content in S3.",
        "operationId": "create_document_documents_post",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "201": {
            "description": "Document created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetail"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/documents/ask-ai": {
      "post": {
        "tags": [
          "Create - Generation"
        ],
        "summary": "Ask AI",
        "description": "Open-ended AI conversation to help create document content.",
        "operationId": "ask_ai_documents_ask_ai_post",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Answer generated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AskAiResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/documents/chat": {
      "post": {
        "tags": [
          "Create - Generation"
        ],
        "summary": "Chat about document",
        "description": "Ask questions about a document and get AI-generated answers.",
        "operationId": "chat_document_documents_chat_post",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Answer generated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatDocumentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/documents/counts": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Get document counts",
        "description": "Get document counts by category, optionally filtered by project.",
        "operationId": "get_document_counts_documents_counts_get",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Document counts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentCountsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/documents/generate": {
      "post": {
        "tags": [
          "Create - Generation"
        ],
        "summary": "Generate documentation",
        "description": "Generate documentation from transcript using Bedrock Claude.",
        "operationId": "generate_docs_documents_generate_post",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Documentation generated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateDocsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/documents/merge": {
      "post": {
        "tags": [
          "Create - Generation"
        ],
        "summary": "Merge documents with AI",
        "description": "Intelligently merge multiple documents into one cohesive document using AI.",
        "operationId": "merge_documents_documents_merge_post",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Documents merged",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MergeDocumentsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/documents/refine": {
      "post": {
        "tags": [
          "Create - Generation"
        ],
        "summary": "Refine document",
        "description": "Refine or rewrite document content based on user instructions.",
        "operationId": "refine_document_documents_refine_post",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Document refined",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefineDocumentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/documents/sync": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Sync documents",
        "description": "Bulk sync documents from client localStorage to cloud.",
        "operationId": "sync_documents_documents_sync_post",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Sync results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/documents/trash": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "List trashed documents",
        "description": "List documents in the trash with days remaining before permanent deletion.",
        "operationId": "list_trash_documents_trash_get",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Trash document list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrashListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/documents/upload-url": {
      "post": {
        "tags": [
          "Create - Upload"
        ],
        "summary": "Get upload URL",
        "description": "Generate presigned URL for media file upload.",
        "operationId": "upload_media_documents_upload_url_post",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Upload URL generated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadUrlResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/documents/{document_id}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Get a document",
        "description": "Get a single document with full content from S3.",
        "operationId": "get_document_documents__document_id__get",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Document Id"
            },
            "name": "document_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Document detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetail"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Document not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Documents"
        ],
        "summary": "Update a document",
        "description": "Update a document title and/or content.",
        "operationId": "update_document_documents__document_id__put",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Document Id"
            },
            "name": "document_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Document updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetail"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Document not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Documents"
        ],
        "summary": "Move document to trash",
        "description": "Soft-delete a document by moving it to the deleted/ S3 prefix with a 30-day retention period.",
        "operationId": "delete_document_documents__document_id__delete",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Document Id"
            },
            "name": "document_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "204": {
            "description": "Document moved to trash",
            "content": {
              "application/json": {}
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Document not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/documents/{document_id}/permanent": {
      "delete": {
        "tags": [
          "Documents"
        ],
        "summary": "Permanently delete a document",
        "description": "Permanently delete a trashed document, removing all S3 objects and DynamoDB metadata.",
        "operationId": "permanent_delete_document_documents__document_id__permanent_delete",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Document Id"
            },
            "name": "document_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "204": {
            "description": "Document permanently deleted",
            "content": {
              "application/json": {}
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Document not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Document must be in trash first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/documents/{document_id}/restore": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Restore document from trash",
        "description": "Restore a soft-deleted document by moving it back from the deleted/ S3 prefix.",
        "operationId": "restore_document_documents__document_id__restore_post",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Document Id"
            },
            "name": "document_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Document restored",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetail"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Document not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Document is not in trash",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/documents/{document_id}/sources": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Get document sources",
        "description": "List original media sources (audio, photos, notes, transcripts) for a document with presigned download URLs.",
        "operationId": "get_document_sources_documents__document_id__sources_get",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Document Id"
            },
            "name": "document_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Document sources",
            "content": {
              "application/json": {}
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Document not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/documents/{document_id}/versions": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "List document versions",
        "description": "List version history for a document (AI refinements only).",
        "operationId": "list_document_versions_documents__document_id__versions_get",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Document Id"
            },
            "name": "document_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Version list (empty when document has no versions or does not exist)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/documents/{document_id}/versions/{version_id}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Get document version content",
        "description": "Retrieve the content of a specific document version from S3.",
        "operationId": "get_document_version_documents__document_id__versions__version_id__get",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Document Id"
            },
            "name": "document_id",
            "in": "path"
          },
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Version Id"
            },
            "name": "version_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Version content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionContentResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {}
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/jobs": {
      "get": {
        "tags": [
          "Create - Jobs"
        ],
        "summary": "List processing jobs",
        "description": "List processing jobs for the authenticated user.",
        "operationId": "list_jobs_jobs_get",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Job list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Create - Jobs"
        ],
        "summary": "Submit processing job",
        "description": "Submit async document processing job(s).",
        "operationId": "submit_job_jobs_post",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "202": {
            "description": "Job submitted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitJobResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/jobs/dismiss-all": {
      "post": {
        "tags": [
          "Create - Jobs"
        ],
        "summary": "Dismiss all job notifications",
        "description": "Mark all completed and failed jobs as dismissed for the authenticated user.",
        "operationId": "dismiss_all_jobs_jobs_dismiss_all_post",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "All notifications dismissed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DismissAllJobsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/jobs/{job_id}": {
      "get": {
        "tags": [
          "Create - Jobs"
        ],
        "summary": "Get job status",
        "description": "Get status of a specific processing job.",
        "operationId": "get_job_status_jobs__job_id__get",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            },
            "name": "job_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Job status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobItem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/jobs/{job_id}/dismiss": {
      "post": {
        "tags": [
          "Create - Jobs"
        ],
        "summary": "Dismiss a job notification",
        "description": "Mark a completed or failed job as dismissed so it no longer appears in notifications.",
        "operationId": "dismiss_job_jobs__job_id__dismiss_post",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            },
            "name": "job_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Job dismissed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DismissJobResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/jobs/{job_id}/retry": {
      "post": {
        "tags": [
          "Create - Jobs"
        ],
        "summary": "Retry a stuck or failed job",
        "description": "Re-send the SQS message for a job stuck in pending status or that has failed.",
        "operationId": "retry_job_jobs__job_id__retry_post",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            },
            "name": "job_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "202": {
            "description": "Job queued for retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitJobResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/projects": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "List projects",
        "description": "List all projects for the authenticated user.",
        "operationId": "list_projects_projects_get",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Project list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Create a project",
        "description": "Create a new project with optional template assignments.",
        "operationId": "create_project_projects_post",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "201": {
            "description": "Project created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSummary"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/projects/{project_id}": {
      "put": {
        "tags": [
          "Projects"
        ],
        "summary": "Update a project",
        "description": "Update an existing project.",
        "operationId": "update_project_projects__project_id__put",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            },
            "name": "project_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Project updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSummary"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Projects"
        ],
        "summary": "Delete a project",
        "description": "Delete a project.",
        "operationId": "delete_project_projects__project_id__delete",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            },
            "name": "project_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "204": {
            "description": "Project deleted",
            "content": {
              "application/json": {}
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/projects/{project_id}/templates": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "List project templates",
        "description": "List full template metadata for all templates assigned to a project.",
        "operationId": "get_project_templates_projects__project_id__templates_get",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            },
            "name": "project_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Template list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectTemplateListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Assign template to project",
        "description": "Assign a template to a project, optionally creating the template first.",
        "operationId": "assign_template_projects__project_id__templates_post",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            },
            "name": "project_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Template assigned",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssignTemplateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Duplicate template name in project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/sharing/project/{project_id}": {
      "get": {
        "tags": [
          "Sharing"
        ],
        "summary": "List project shares",
        "description": "List all shares for a project (owner view).",
        "operationId": "list_project_shares_sharing_project__project_id__get",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            },
            "name": "project_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Shares listed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSharesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/sharing/project/{project_id}/documents": {
      "get": {
        "tags": [
          "Sharing"
        ],
        "summary": "Get shared project documents",
        "description": "Get documents for a shared project (cross-user read).",
        "operationId": "get_shared_documents_sharing_project__project_id__documents_get",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            },
            "name": "project_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Documents retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharedDocumentsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/sharing/project/{project_id}/documents/{document_id}": {
      "put": {
        "tags": [
          "Sharing"
        ],
        "summary": "Update shared document",
        "description": "Update a document in a shared project (editor only).",
        "operationId": "update_shared_document_sharing_project__project_id__documents__document_id__put",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            },
            "name": "project_id",
            "in": "path"
          },
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Document Id"
            },
            "name": "document_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Document updated",
            "content": {
              "application/json": {}
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/sharing/project/{project_id}/documents/{document_id}/sources": {
      "get": {
        "tags": [
          "Sharing"
        ],
        "summary": "Get shared document sources",
        "description": "Get attachment sources (photos, audio, notes) for a shared document with presigned URLs.",
        "operationId": "get_shared_document_sources_sharing_project__project_id__documents__document_id__sources_get",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            },
            "name": "project_id",
            "in": "path"
          },
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Document Id"
            },
            "name": "document_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Sources retrieved",
            "content": {
              "application/json": {}
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/sharing/respond": {
      "post": {
        "tags": [
          "Sharing"
        ],
        "summary": "Respond to share",
        "description": "Accept or decline a pending share invitation.",
        "operationId": "respond_to_share_sharing_respond_post",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Response recorded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareRespondResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Already responded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/sharing/revoke": {
      "post": {
        "tags": [
          "Sharing"
        ],
        "summary": "Revoke a share",
        "description": "Revoke a share (owner only).",
        "operationId": "revoke_share_sharing_revoke_post",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Share revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/sharing/share": {
      "post": {
        "tags": [
          "Sharing"
        ],
        "summary": "Share a project",
        "description": "Share a project with another user by email.",
        "operationId": "share_project_sharing_share_post",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "201": {
            "description": "Share created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareProjectResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Already shared",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/sharing/shared-with-me": {
      "get": {
        "tags": [
          "Sharing"
        ],
        "summary": "List shared with me",
        "description": "List projects shared with the authenticated user.",
        "operationId": "list_shared_with_me_sharing_shared_with_me_get",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Shares listed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharedWithMeResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/sharing/update-role": {
      "post": {
        "tags": [
          "Sharing"
        ],
        "summary": "Update share role",
        "description": "Update the role of an existing share (owner only).",
        "operationId": "update_share_role_sharing_update_role_post",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Role updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareRoleUpdateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/templates": {
      "get": {
        "tags": [
          "Templates"
        ],
        "summary": "List templates",
        "description": "List platform templates and user custom templates (merged).",
        "operationId": "list_templates_templates_get",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Template list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Templates"
        ],
        "summary": "Create a custom template",
        "description": "Create a new custom template.",
        "operationId": "save_template_templates_post",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Template created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateMutationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/templates/defaults": {
      "get": {
        "tags": [
          "Default Templates"
        ],
        "summary": "List default templates",
        "description": "List all platform-level default templates (public, no auth required).",
        "operationId": "list_default_templates_templates_defaults_get",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Default template list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultTemplateListResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Default Templates"
        ],
        "summary": "Create a default template",
        "description": "Create a new default template (admin only).",
        "operationId": "create_default_template_templates_defaults_post",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "201": {
            "description": "Default template created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultTemplateMutationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/templates/defaults/{template_id}": {
      "get": {
        "tags": [
          "Default Templates"
        ],
        "summary": "Get a default template",
        "description": "Get a specific default template by ID (public, no auth required).",
        "operationId": "get_default_template_templates_defaults__template_id__get",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Template Id"
            },
            "name": "template_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Default template detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultTemplateResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Default Templates"
        ],
        "summary": "Update a default template",
        "description": "Update an existing default template (admin only).",
        "operationId": "update_default_template_templates_defaults__template_id__put",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Template Id"
            },
            "name": "template_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Default template updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultTemplateMutationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Default Templates"
        ],
        "summary": "Delete a default template",
        "description": "Delete a default template (admin only).",
        "operationId": "delete_default_template_templates_defaults__template_id__delete",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Template Id"
            },
            "name": "template_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Default template deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultTemplateDeleteResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/templates/{template_id}": {
      "get": {
        "tags": [
          "Templates"
        ],
        "summary": "Get a template",
        "description": "Get a specific template (custom or platform) with its content.",
        "operationId": "get_template_templates__template_id__get",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Template Id"
            },
            "name": "template_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Template detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateDetailResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Templates"
        ],
        "summary": "Update a template",
        "description": "Update a custom template, or copy-on-write for a platform template.",
        "operationId": "update_template_templates__template_id__put",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Template Id"
            },
            "name": "template_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Template updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateMutationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Templates"
        ],
        "summary": "Delete a custom template",
        "description": "Delete a custom template. Platform templates cannot be deleted by users.",
        "operationId": "delete_template_templates__template_id__delete",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Template Id"
            },
            "name": "template_id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Template deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateMutationResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "DefaultTemplateDeleteResponse": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          },
          "templateId": {
            "type": "string",
            "title": "Templateid"
          }
        },
        "type": "object",
        "required": [
          "message",
          "templateId"
        ],
        "title": "DefaultTemplateDeleteResponse"
      },
      "DefaultTemplateListResponse": {
        "properties": {
          "templates": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Templates"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          }
        },
        "type": "object",
        "required": [
          "templates",
          "count"
        ],
        "title": "DefaultTemplateListResponse"
      },
      "DefaultTemplateMutationResponse": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          },
          "template": {
            "additionalProperties": true,
            "type": "object",
            "title": "Template"
          }
        },
        "type": "object",
        "required": [
          "message",
          "template"
        ],
        "title": "DefaultTemplateMutationResponse"
      },
      "DefaultTemplateResponse": {
        "properties": {
          "template": {
            "additionalProperties": true,
            "type": "object",
            "title": "Template"
          }
        },
        "type": "object",
        "required": [
          "template"
        ],
        "title": "DefaultTemplateResponse"
      },
      "ErrorResponse": {
        "properties": {
          "error": {
            "type": "string",
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "error"
        ],
        "title": "ErrorResponse"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "TemplateDetailResponse": {
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/TemplateMetadata"
          },
          "content": {
            "type": "string",
            "title": "Content",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "metadata"
        ],
        "title": "TemplateDetailResponse"
      },
      "TemplateListResponse": {
        "properties": {
          "templates": {
            "items": {
              "$ref": "#/components/schemas/TemplateSummary"
            },
            "type": "array",
            "title": "Templates"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          }
        },
        "type": "object",
        "required": [
          "templates",
          "count"
        ],
        "title": "TemplateListResponse"
      },
      "TemplateMetadata": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "default": ""
          },
          "outputFormat": {
            "type": "string",
            "title": "Outputformat",
            "default": "general"
          },
          "icon": {
            "type": "string",
            "title": "Icon",
            "default": "FileText"
          },
          "color": {
            "type": "string",
            "title": "Color",
            "default": "slate"
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdat"
          },
          "lastUpdated": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lastupdated"
          },
          "createdBy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdby"
          },
          "createdByEmail": {
            "type": "string",
            "title": "Createdbyemail",
            "default": ""
          },
          "isFromDefault": {
            "type": "boolean",
            "title": "Isfromdefault",
            "default": false
          },
          "defaultTemplateId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Defaulttemplateid"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "TemplateMetadata"
      },
      "TemplateMutationResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "template": {
            "$ref": "#/components/schemas/TemplateSummary"
          }
        },
        "type": "object",
        "required": [
          "success",
          "template"
        ],
        "title": "TemplateMutationResponse"
      },
      "TemplateSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "default": ""
          },
          "outputFormat": {
            "type": "string",
            "title": "Outputformat",
            "default": "general"
          },
          "icon": {
            "type": "string",
            "title": "Icon",
            "default": "FileText"
          },
          "color": {
            "type": "string",
            "title": "Color",
            "default": "slate"
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdat"
          },
          "lastUpdated": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lastupdated"
          },
          "createdBy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdby"
          },
          "createdByEmail": {
            "type": "string",
            "title": "Createdbyemail",
            "default": ""
          },
          "isFromDefault": {
            "type": "boolean",
            "title": "Isfromdefault",
            "default": false
          },
          "defaultTemplateId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Defaulttemplateid"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "TemplateSummary"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "ResponseValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "ResponseValidationError"
      },
      "AssignTemplateResponse": {
        "properties": {
          "template": {
            "additionalProperties": true,
            "type": "object",
            "title": "Template"
          },
          "project": {
            "additionalProperties": true,
            "type": "object",
            "title": "Project"
          }
        },
        "type": "object",
        "required": [
          "template",
          "project"
        ],
        "title": "AssignTemplateResponse"
      },
      "ProjectListResponse": {
        "properties": {
          "projects": {
            "items": {
              "$ref": "#/components/schemas/ProjectSummary"
            },
            "type": "array",
            "title": "Projects"
          }
        },
        "type": "object",
        "required": [
          "projects"
        ],
        "title": "ProjectListResponse"
      },
      "ProjectSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "default": ""
          },
          "templateIds": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Templateids",
            "default": []
          },
          "parentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parentid"
          },
          "isArchived": {
            "type": "boolean",
            "title": "Isarchived",
            "default": false
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdat"
          },
          "updatedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updatedat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "ProjectSummary"
      },
      "ProjectTemplateItem": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "default": ""
          },
          "outputFormat": {
            "type": "string",
            "title": "Outputformat",
            "default": "custom"
          },
          "icon": {
            "type": "string",
            "title": "Icon",
            "default": "FileText"
          },
          "color": {
            "type": "string",
            "title": "Color",
            "default": "slate"
          },
          "createdAt": {
            "type": "string",
            "title": "Createdat",
            "default": ""
          },
          "lastUpdated": {
            "type": "string",
            "title": "Lastupdated",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "ProjectTemplateItem"
      },
      "ProjectTemplateListResponse": {
        "properties": {
          "templates": {
            "items": {
              "$ref": "#/components/schemas/ProjectTemplateItem"
            },
            "type": "array",
            "title": "Templates"
          }
        },
        "type": "object",
        "required": [
          "templates"
        ],
        "title": "ProjectTemplateListResponse"
      },
      "DocumentCountsResponse": {
        "properties": {
          "counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Counts",
            "default": {}
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "default": 0
          }
        },
        "type": "object",
        "title": "DocumentCountsResponse"
      },
      "DocumentDetail": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "content": {
            "type": "string",
            "title": "Content",
            "default": ""
          },
          "category": {
            "type": "string",
            "title": "Category",
            "default": "notes"
          },
          "templateType": {
            "type": "string",
            "title": "Templatetype",
            "default": ""
          },
          "templateName": {
            "type": "string",
            "title": "Templatename",
            "default": ""
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdat"
          },
          "updatedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updatedat"
          },
          "projectId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Projectid"
          },
          "projectName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Projectname"
          },
          "transcriptionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcriptionid"
          },
          "attachments": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attachments"
          }
        },
        "type": "object",
        "required": [
          "id",
          "title"
        ],
        "title": "DocumentDetail"
      },
      "DocumentListResponse": {
        "properties": {
          "documents": {
            "items": {
              "$ref": "#/components/schemas/DocumentSummary"
            },
            "type": "array",
            "title": "Documents"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "documents",
          "total"
        ],
        "title": "DocumentListResponse"
      },
      "DocumentSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "category": {
            "type": "string",
            "title": "Category",
            "default": "notes"
          },
          "templateType": {
            "type": "string",
            "title": "Templatetype",
            "default": ""
          },
          "templateName": {
            "type": "string",
            "title": "Templatename",
            "default": ""
          },
          "contentPreview": {
            "type": "string",
            "title": "Contentpreview",
            "default": ""
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdat"
          },
          "updatedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updatedat"
          },
          "projectId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Projectid"
          },
          "projectName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Projectname"
          },
          "transcriptionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcriptionid"
          },
          "attachments": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attachments"
          }
        },
        "type": "object",
        "required": [
          "id",
          "title"
        ],
        "title": "DocumentSummary"
      },
      "SyncResponse": {
        "properties": {
          "syncedCount": {
            "type": "integer",
            "title": "Syncedcount"
          },
          "createdCount": {
            "type": "integer",
            "title": "Createdcount"
          },
          "updatedCount": {
            "type": "integer",
            "title": "Updatedcount"
          },
          "skippedCount": {
            "type": "integer",
            "title": "Skippedcount"
          },
          "failedCount": {
            "type": "integer",
            "title": "Failedcount"
          },
          "errors": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Errors",
            "default": []
          },
          "conflicts": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Conflicts",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "syncedCount",
          "createdCount",
          "updatedCount",
          "skippedCount",
          "failedCount"
        ],
        "title": "SyncResponse"
      },
      "TrashDocumentSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "category": {
            "type": "string",
            "title": "Category",
            "default": "notes"
          },
          "templateType": {
            "type": "string",
            "title": "Templatetype",
            "default": ""
          },
          "templateName": {
            "type": "string",
            "title": "Templatename",
            "default": ""
          },
          "contentPreview": {
            "type": "string",
            "title": "Contentpreview",
            "default": ""
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdat"
          },
          "updatedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updatedat"
          },
          "deletedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deletedat"
          },
          "daysRemaining": {
            "type": "integer",
            "title": "Daysremaining",
            "default": 30
          },
          "projectId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Projectid"
          },
          "projectName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Projectname"
          }
        },
        "type": "object",
        "required": [
          "id",
          "title"
        ],
        "title": "TrashDocumentSummary"
      },
      "TrashListResponse": {
        "properties": {
          "documents": {
            "items": {
              "$ref": "#/components/schemas/TrashDocumentSummary"
            },
            "type": "array",
            "title": "Documents"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "documents",
          "total"
        ],
        "title": "TrashListResponse"
      },
      "VersionContentResponse": {
        "properties": {
          "content": {
            "type": "string",
            "title": "Content"
          },
          "s3VersionId": {
            "type": "string",
            "title": "S3Versionid"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "createdAt": {
            "type": "string",
            "title": "Createdat"
          }
        },
        "type": "object",
        "required": [
          "content",
          "s3VersionId",
          "label",
          "createdAt"
        ],
        "title": "VersionContentResponse"
      },
      "VersionEntry": {
        "properties": {
          "s3VersionId": {
            "type": "string",
            "title": "S3Versionid"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "createdAt": {
            "type": "string",
            "title": "Createdat"
          }
        },
        "type": "object",
        "required": [
          "s3VersionId",
          "label",
          "createdAt"
        ],
        "title": "VersionEntry"
      },
      "VersionListResponse": {
        "properties": {
          "versions": {
            "items": {
              "$ref": "#/components/schemas/VersionEntry"
            },
            "type": "array",
            "title": "Versions"
          }
        },
        "type": "object",
        "required": [
          "versions"
        ],
        "title": "VersionListResponse"
      },
      "MessageResponse": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "message"
        ],
        "title": "MessageResponse"
      },
      "ProjectShareItem": {
        "properties": {
          "shareId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shareid"
          },
          "recipientEmail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recipientemail"
          },
          "role": {
            "type": "string",
            "title": "Role",
            "default": "viewer"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdat"
          },
          "isExistingUser": {
            "type": "boolean",
            "title": "Isexistinguser",
            "default": false
          }
        },
        "type": "object",
        "title": "ProjectShareItem"
      },
      "ProjectSharesResponse": {
        "properties": {
          "shares": {
            "items": {
              "$ref": "#/components/schemas/ProjectShareItem"
            },
            "type": "array",
            "title": "Shares"
          }
        },
        "type": "object",
        "required": [
          "shares"
        ],
        "title": "ProjectSharesResponse"
      },
      "ShareItem": {
        "properties": {
          "shareId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shareid"
          },
          "projectId": {
            "type": "string",
            "title": "Projectid"
          },
          "projectName": {
            "type": "string",
            "title": "Projectname"
          },
          "ownerEmail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owneremail"
          },
          "ownerName": {
            "type": "string",
            "title": "Ownername",
            "default": ""
          },
          "role": {
            "type": "string",
            "title": "Role",
            "default": "viewer"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "sharedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sharedat"
          }
        },
        "type": "object",
        "required": [
          "projectId",
          "projectName"
        ],
        "title": "ShareItem"
      },
      "ShareProjectResponse": {
        "properties": {
          "shareId": {
            "type": "string",
            "title": "Shareid"
          },
          "projectId": {
            "type": "string",
            "title": "Projectid"
          },
          "recipientEmail": {
            "type": "string",
            "title": "Recipientemail"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "isExistingUser": {
            "type": "boolean",
            "title": "Isexistinguser"
          }
        },
        "type": "object",
        "required": [
          "shareId",
          "projectId",
          "recipientEmail",
          "role",
          "status",
          "isExistingUser"
        ],
        "title": "ShareProjectResponse"
      },
      "ShareRespondResponse": {
        "properties": {
          "shareId": {
            "type": "string",
            "title": "Shareid"
          },
          "projectId": {
            "type": "string",
            "title": "Projectid"
          },
          "status": {
            "type": "string",
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "shareId",
          "projectId",
          "status"
        ],
        "title": "ShareRespondResponse"
      },
      "ShareRoleUpdateResponse": {
        "properties": {
          "shareId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shareid"
          },
          "recipientEmail": {
            "type": "string",
            "title": "Recipientemail"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "recipientEmail",
          "role"
        ],
        "title": "ShareRoleUpdateResponse"
      },
      "SharedDocumentItem": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "templateType": {
            "type": "string",
            "title": "Templatetype",
            "default": ""
          },
          "createdAt": {
            "type": "string",
            "title": "Createdat",
            "default": ""
          },
          "updatedAt": {
            "type": "string",
            "title": "Updatedat",
            "default": ""
          },
          "projectId": {
            "type": "string",
            "title": "Projectid",
            "default": ""
          },
          "content": {
            "type": "string",
            "title": "Content",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "id",
          "title"
        ],
        "title": "SharedDocumentItem"
      },
      "SharedDocumentsResponse": {
        "properties": {
          "documents": {
            "items": {
              "$ref": "#/components/schemas/SharedDocumentItem"
            },
            "type": "array",
            "title": "Documents"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "projectName": {
            "type": "string",
            "title": "Projectname"
          },
          "ownerEmail": {
            "type": "string",
            "title": "Owneremail",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "documents",
          "role",
          "projectName"
        ],
        "title": "SharedDocumentsResponse"
      },
      "SharedWithMeResponse": {
        "properties": {
          "shares": {
            "items": {
              "$ref": "#/components/schemas/ShareItem"
            },
            "type": "array",
            "title": "Shares"
          },
          "pendingInvitations": {
            "items": {
              "$ref": "#/components/schemas/ShareItem"
            },
            "type": "array",
            "title": "Pendinginvitations"
          }
        },
        "type": "object",
        "required": [
          "shares",
          "pendingInvitations"
        ],
        "title": "SharedWithMeResponse"
      },
      "AskAiResponse": {
        "properties": {
          "answer": {
            "type": "string",
            "title": "Answer"
          }
        },
        "type": "object",
        "required": [
          "answer"
        ],
        "title": "AskAiResponse"
      },
      "ChatDocumentResponse": {
        "properties": {
          "answer": {
            "type": "string",
            "title": "Answer"
          }
        },
        "type": "object",
        "required": [
          "answer"
        ],
        "title": "ChatDocumentResponse"
      },
      "DismissAllJobsResponse": {
        "properties": {
          "dismissed": {
            "type": "integer",
            "title": "Dismissed"
          }
        },
        "type": "object",
        "required": [
          "dismissed"
        ],
        "title": "DismissAllJobsResponse"
      },
      "DismissJobResponse": {
        "properties": {
          "jobId": {
            "type": "string",
            "title": "Jobid"
          },
          "dismissed": {
            "type": "boolean",
            "title": "Dismissed"
          }
        },
        "type": "object",
        "required": [
          "jobId",
          "dismissed"
        ],
        "title": "DismissJobResponse"
      },
      "GenerateDocsResponse": {
        "properties": {
          "markdown": {
            "type": "string",
            "title": "Markdown"
          },
          "saved": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Saved"
          }
        },
        "type": "object",
        "required": [
          "markdown"
        ],
        "title": "GenerateDocsResponse"
      },
      "JobItem": {
        "properties": {
          "jobId": {
            "type": "string",
            "title": "Jobid"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "statusMessage": {
            "type": "string",
            "title": "Statusmessage",
            "default": ""
          },
          "projectId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Projectid"
          },
          "projectName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Projectname"
          },
          "templateId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Templateid"
          },
          "templateName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Templatename"
          },
          "outputFormat": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Outputformat"
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdat"
          },
          "updatedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updatedat"
          },
          "documentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Documentid"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "dismissed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dismissed"
          }
        },
        "type": "object",
        "required": [
          "jobId",
          "status"
        ],
        "title": "JobItem"
      },
      "JobListResponse": {
        "properties": {
          "jobs": {
            "items": {
              "$ref": "#/components/schemas/JobItem"
            },
            "type": "array",
            "title": "Jobs"
          }
        },
        "type": "object",
        "required": [
          "jobs"
        ],
        "title": "JobListResponse"
      },
      "MergeDocumentsResponse": {
        "properties": {
          "content": {
            "type": "string",
            "title": "Content"
          }
        },
        "type": "object",
        "required": [
          "content"
        ],
        "title": "MergeDocumentsResponse"
      },
      "RefineDocumentResponse": {
        "properties": {
          "content": {
            "type": "string",
            "title": "Content"
          },
          "summary": {
            "type": "string",
            "title": "Summary"
          }
        },
        "type": "object",
        "required": [
          "content",
          "summary"
        ],
        "title": "RefineDocumentResponse"
      },
      "SubmitJobResponse": {
        "properties": {
          "jobId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jobid"
          },
          "jobIds": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jobids"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "status",
          "message"
        ],
        "title": "SubmitJobResponse"
      },
      "UploadUrlResponse": {
        "properties": {
          "uploadId": {
            "type": "string",
            "title": "Uploadid"
          },
          "presignedUrl": {
            "type": "string",
            "title": "Presignedurl"
          },
          "s3Key": {
            "type": "string",
            "title": "S3Key"
          },
          "expiresIn": {
            "type": "integer",
            "title": "Expiresin"
          }
        },
        "type": "object",
        "required": [
          "uploadId",
          "presignedUrl",
          "s3Key",
          "expiresIn"
        ],
        "title": "UploadUrlResponse"
      }
    }
  }
}