{
  "openapi": "3.1.0",
  "info": {
    "title": "Document API",
    "summary": "Service to Store and retrieve TipTap text documents",
    "version": "0.1.0"
  },
  "paths": {
    "/documents/histories/": {
      "post": {
        "tags": [
          "documenthistories"
        ],
        "summary": "Create New Document History",
        "operationId": "create_new_document_history_documents_histories__post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentHistoryCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentHistory"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-public": true
      }
    },
    "/documents/revisions/{document_id}": {
      "post": {
        "tags": [
          "documentrevisions"
        ],
        "summary": "Create New Document Revision",
        "operationId": "create_new_document_revision_documents_revisions__document_id__post",
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "5eb7cf5a86d9755df3a6c593",
              "title": "Document Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentRevisionCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRevision"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-public": true
      }
    }
  },
  "components": {
    "schemas": {
      "AnalyticsForDocumentResponse": {
        "properties": {
          "unique_data_nodes": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/DynamicTextFields"
                },
                {
                  "$ref": "#/components/schemas/DynamicTableFields"
                }
              ]
            },
            "type": "array",
            "title": "Unique Data Nodes"
          },
          "all_data_nodes": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/DynamicTextFields"
                },
                {
                  "$ref": "#/components/schemas/DynamicTableFields"
                }
              ]
            },
            "type": "array",
            "title": "All Data Nodes"
          },
          "nodes_summary": {
            "$ref": "#/components/schemas/NodesSummary"
          }
        },
        "type": "object",
        "required": [
          "unique_data_nodes",
          "all_data_nodes",
          "nodes_summary"
        ],
        "title": "AnalyticsForDocumentResponse"
      },
      "AnalyticsForDocumentsRequest": {
        "properties": {
          "document_revision_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Document Revision Ids"
          },
          "latest_preview_enabled": {
            "type": "boolean",
            "title": "Latest Preview Enabled",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "document_revision_ids"
        ],
        "title": "AnalyticsForDocumentsRequest"
      },
      "ApprovalProcessSettings": {
        "properties": {
          "author_principal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Principal Id"
          },
          "reviewer_principal_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewer Principal Ids"
          },
          "owner_principal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Principal Id"
          },
          "auto_publish": {
            "type": "boolean",
            "title": "Auto Publish",
            "default": false
          }
        },
        "type": "object",
        "title": "ApprovalProcessSettings"
      },
      "AuditInfo": {
        "properties": {
          "user_id_created": {
            "type": "string",
            "title": "User Id Created"
          },
          "timestamp_created": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp Created"
          },
          "user_id_last_updated": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id Last Updated"
          },
          "timestamp_last_updated": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timestamp Last Updated"
          },
          "last_action": {
            "$ref": "#/components/schemas/LastActionType"
          },
          "direct_approval_published_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Direct Approval Published At"
          },
          "direct_approval_published_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Direct Approval Published By"
          }
        },
        "type": "object",
        "required": [
          "user_id_created",
          "timestamp_created",
          "last_action"
        ],
        "title": "AuditInfo"
      },
      "BatchOperationResponse": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/BatchOperationResult"
            },
            "type": "array",
            "title": "Results"
          }
        },
        "type": "object",
        "required": [
          "results"
        ],
        "title": "BatchOperationResponse"
      },
      "BatchOperationResult": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "operation": {
            "$ref": "#/components/schemas/DocumentBatchOperationType"
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Id"
          },
          "document_history": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentHistory"
              },
              {
                "type": "null"
              }
            ]
          },
          "folder_tree": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FolderTree-Output"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "success",
          "operation"
        ],
        "title": "BatchOperationResult"
      },
      "Body_create_template_from_file_endpoint_templates_histories_from_file_post": {
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "title": "File"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "product_name": {
            "type": "string",
            "title": "Product Name",
            "default": ""
          },
          "product_id": {
            "type": "string",
            "title": "Product Id",
            "default": ""
          },
          "accepted_kts_json": {
            "type": "string",
            "title": "Accepted Kts Json",
            "description": "JSON array of AcceptedKT objects"
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          }
        },
        "type": "object",
        "required": [
          "file",
          "title",
          "accepted_kts_json"
        ],
        "title": "Body_create_template_from_file_endpoint_templates_histories_from_file_post"
      },
      "BulkFetchByIdsRequest": {
        "properties": {
          "ids": {
            "items": {
              "type": "string",
              "example": "5eb7cf5a86d9755df3a6c593"
            },
            "type": "array",
            "title": "Ids"
          },
          "include_data": {
            "type": "boolean",
            "title": "Include Data",
            "default": true
          }
        },
        "type": "object",
        "title": "BulkFetchByIdsRequest"
      },
      "Content": {
        "properties": {
          "html": {
            "type": "string",
            "maxLength": 10000000,
            "title": "Html"
          },
          "title": {
            "type": "string",
            "title": "Title"
          }
        },
        "type": "object",
        "required": [
          "html",
          "title"
        ],
        "title": "Content"
      },
      "CreateFolderTreeData": {
        "properties": {
          "label": {
            "type": "string",
            "title": "Label"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          },
          "file_type": {
            "type": "string",
            "const": "folder",
            "title": "File Type",
            "default": "folder"
          },
          "children": {
            "anyOf": [
              {
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/CreateFolderTreeData"
                    },
                    {
                      "$ref": "#/components/schemas/DocumentTreeCreate"
                    },
                    {
                      "$ref": "#/components/schemas/TemplateTreeCreate"
                    }
                  ],
                  "discriminator": {
                    "propertyName": "file_type",
                    "mapping": {
                      "document": "#/components/schemas/DocumentTreeCreate",
                      "folder": "#/components/schemas/CreateFolderTreeData",
                      "template": "#/components/schemas/TemplateTreeCreate"
                    }
                  }
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Children"
          }
        },
        "type": "object",
        "required": [
          "label"
        ],
        "title": "CreateFolderTreeData",
        "description": "Folder creation data for folder tree structure"
      },
      "CreateFolderTreeOperation": {
        "properties": {
          "operation": {
            "type": "string",
            "const": "create_folder_tree",
            "title": "Operation"
          },
          "folder_tree_data": {
            "$ref": "#/components/schemas/CreateFolderTreeData"
          }
        },
        "type": "object",
        "required": [
          "operation",
          "folder_tree_data"
        ],
        "title": "CreateFolderTreeOperation"
      },
      "CreateOperation": {
        "properties": {
          "operation": {
            "type": "string",
            "const": "create",
            "title": "Operation"
          },
          "document_data": {
            "$ref": "#/components/schemas/DocumentHistoryCreate"
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Id"
          }
        },
        "type": "object",
        "required": [
          "operation",
          "document_data"
        ],
        "title": "CreateOperation"
      },
      "CreateQmListFilterTag": {
        "properties": {
          "filter_tag_name": {
            "type": "string",
            "title": "Filter Tag Name"
          }
        },
        "type": "object",
        "required": [
          "filter_tag_name"
        ],
        "title": "CreateQmListFilterTag"
      },
      "CreateQmListGroupId": {
        "properties": {
          "group_id": {
            "type": "string",
            "title": "Group Id"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "related_filter_tag": {
            "type": "string",
            "title": "Related Filter Tag",
            "example": "5eb7cf5a86d9755df3a6c593"
          }
        },
        "type": "object",
        "required": [
          "group_id",
          "related_filter_tag"
        ],
        "title": "CreateQmListGroupId"
      },
      "DeleteOperation": {
        "properties": {
          "operation": {
            "type": "string",
            "const": "delete",
            "title": "Operation"
          },
          "document_id": {
            "type": "string",
            "title": "Document Id"
          },
          "document_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Data"
          }
        },
        "type": "object",
        "required": [
          "operation",
          "document_id"
        ],
        "title": "DeleteOperation"
      },
      "DocumentAndTemplateRevisionForFolder-Input": {
        "properties": {
          "revision_id": {
            "type": "string",
            "title": "Revision Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "parent_id": {
            "type": "string",
            "title": "Parent Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "audit_info": {
            "$ref": "#/components/schemas/AuditInfo"
          },
          "read_only": {
            "type": "boolean",
            "title": "Read Only",
            "default": false
          },
          "version": {
            "type": "string",
            "title": "Version"
          },
          "context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_latest_approved": {
            "type": "boolean",
            "title": "Is Latest Approved",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "revision_id",
          "parent_id",
          "audit_info",
          "version"
        ],
        "title": "DocumentAndTemplateRevisionForFolder"
      },
      "DocumentAndTemplateRevisionForFolder-Output": {
        "properties": {
          "revision_id": {
            "type": "string",
            "title": "Revision Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "parent_id": {
            "type": "string",
            "title": "Parent Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "audit_info": {
            "$ref": "#/components/schemas/AuditInfo"
          },
          "read_only": {
            "type": "boolean",
            "title": "Read Only",
            "default": false
          },
          "version": {
            "type": "string",
            "title": "Version"
          },
          "context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_latest_approved": {
            "type": "boolean",
            "title": "Is Latest Approved",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "revision_id",
          "parent_id",
          "audit_info",
          "version"
        ],
        "title": "DocumentAndTemplateRevisionForFolder"
      },
      "DocumentBatchOperationRequest": {
        "properties": {
          "operations": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/CreateOperation"
                },
                {
                  "$ref": "#/components/schemas/UpdateOperation"
                },
                {
                  "$ref": "#/components/schemas/DeleteOperation"
                },
                {
                  "$ref": "#/components/schemas/CreateFolderTreeOperation"
                }
              ],
              "discriminator": {
                "propertyName": "operation",
                "mapping": {
                  "create": "#/components/schemas/CreateOperation",
                  "create_folder_tree": "#/components/schemas/CreateFolderTreeOperation",
                  "delete": "#/components/schemas/DeleteOperation",
                  "update": "#/components/schemas/UpdateOperation"
                }
              }
            },
            "type": "array",
            "title": "Operations"
          }
        },
        "type": "object",
        "required": [
          "operations"
        ],
        "title": "DocumentBatchOperationRequest"
      },
      "DocumentBatchOperationType": {
        "type": "string",
        "enum": [
          "create",
          "update",
          "delete",
          "create_folder_tree"
        ],
        "title": "DocumentBatchOperationType"
      },
      "DocumentContext": {
        "properties": {
          "sop": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sop"
          },
          "work_instruction": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Instruction"
          },
          "form": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Form"
          },
          "product": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product"
          },
          "group_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id"
          },
          "filter_tag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filter Tag"
          }
        },
        "type": "object",
        "title": "DocumentContext"
      },
      "DocumentDuplicationRequest": {
        "properties": {
          "revision_id": {
            "type": "string",
            "title": "Revision Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "sop_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sop Id"
          },
          "work_instruction_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Instruction Id"
          },
          "form_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Form Id"
          },
          "product": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product"
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          }
        },
        "type": "object",
        "required": [
          "revision_id"
        ],
        "title": "DocumentDuplicationRequest"
      },
      "DocumentHistory": {
        "properties": {
          "_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id",
            "description": "MongoDB document ObjectID"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "current_version": {
            "type": "string",
            "title": "Current Version",
            "default": "0.0"
          },
          "revisions": {
            "items": {
              "$ref": "#/components/schemas/DocumentRevisionPreview"
            },
            "type": "array",
            "title": "Revisions"
          },
          "creates_record": {
            "type": "boolean",
            "title": "Creates Record",
            "default": false
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          },
          "tenant_metadata": {
            "$ref": "#/components/schemas/TenantMetadata"
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "audit_info": {
            "$ref": "#/components/schemas/AuditInfo"
          },
          "jurisdiction_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction Ids"
          }
        },
        "type": "object",
        "required": [
          "title",
          "revisions",
          "tenant_metadata",
          "audit_info"
        ],
        "title": "DocumentHistory"
      },
      "DocumentHistoryCreate": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title"
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          },
          "context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          },
          "jurisdiction_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction Ids"
          },
          "page_orientation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PageOrientation"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "title"
        ],
        "title": "DocumentHistoryCreate"
      },
      "DocumentHistorySlim": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "current_version": {
            "type": "string",
            "title": "Current Version",
            "default": "0.0"
          },
          "revisions": {
            "items": {
              "$ref": "#/components/schemas/DocumentRevisionPreview"
            },
            "type": "array",
            "title": "Revisions"
          },
          "creates_record": {
            "type": "boolean",
            "title": "Creates Record",
            "default": false
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          },
          "tenant_metadata": {
            "$ref": "#/components/schemas/TenantMetadata"
          },
          "audit_info": {
            "$ref": "#/components/schemas/AuditInfo"
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "jurisdiction_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction Ids"
          }
        },
        "type": "object",
        "required": [
          "id",
          "title",
          "revisions",
          "tenant_metadata",
          "audit_info"
        ],
        "title": "DocumentHistorySlim"
      },
      "DocumentHistoryWithDetailedRevision": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "current_version": {
            "type": "string",
            "title": "Current Version",
            "default": "0.0"
          },
          "revisions": {
            "items": {
              "$ref": "#/components/schemas/DocumentRevision"
            },
            "type": "array",
            "title": "Revisions"
          },
          "creates_record": {
            "type": "boolean",
            "title": "Creates Record",
            "default": false
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          },
          "tenant_metadata": {
            "$ref": "#/components/schemas/TenantMetadata"
          },
          "audit_info": {
            "$ref": "#/components/schemas/AuditInfo"
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "jurisdiction_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction Ids"
          }
        },
        "type": "object",
        "required": [
          "id",
          "title",
          "revisions",
          "tenant_metadata",
          "audit_info"
        ],
        "title": "DocumentHistoryWithDetailedRevision"
      },
      "DocumentRevision": {
        "properties": {
          "_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id",
            "description": "MongoDB document ObjectID"
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "version": {
            "type": "string",
            "title": "Version"
          },
          "commit_message": {
            "type": "string",
            "title": "Commit Message"
          },
          "read_only": {
            "type": "boolean",
            "title": "Read Only",
            "default": false
          },
          "is_latest_approved": {
            "type": "boolean",
            "title": "Is Latest Approved",
            "default": false
          },
          "tenant_metadata": {
            "$ref": "#/components/schemas/TenantMetadata"
          },
          "audit_info": {
            "$ref": "#/components/schemas/AuditInfo"
          },
          "context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "approval_process_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApprovalProcessSettings"
              },
              {
                "type": "null"
              }
            ]
          },
          "data": {
            "additionalProperties": true,
            "type": "object",
            "title": "Data",
            "default": {}
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          },
          "jurisdiction_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction Ids"
          },
          "page_orientation": {
            "$ref": "#/components/schemas/PageOrientation",
            "default": "portrait"
          }
        },
        "type": "object",
        "required": [
          "title",
          "version",
          "commit_message",
          "tenant_metadata",
          "audit_info"
        ],
        "title": "DocumentRevision"
      },
      "DocumentRevisionBulkUpdate": {
        "properties": {
          "document_id": {
            "type": "string",
            "title": "Document Id"
          },
          "revision_updates": {
            "$ref": "#/components/schemas/DocumentRevisionUpdate"
          }
        },
        "type": "object",
        "required": [
          "document_id",
          "revision_updates"
        ],
        "title": "DocumentRevisionBulkUpdate"
      },
      "DocumentRevisionCreate": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title"
          },
          "data": {
            "additionalProperties": true,
            "type": "object",
            "title": "Data"
          },
          "commit_message": {
            "type": "string",
            "title": "Commit Message"
          },
          "context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          },
          "approval_process_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApprovalProcessSettings"
              },
              {
                "type": "null"
              }
            ]
          },
          "jurisdiction_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction Ids"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "page_orientation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PageOrientation"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "title",
          "data",
          "commit_message",
          "context"
        ],
        "title": "DocumentRevisionCreate"
      },
      "DocumentRevisionPreview": {
        "properties": {
          "version": {
            "type": "string",
            "title": "Version"
          },
          "commit_message": {
            "type": "string",
            "title": "Commit Message"
          },
          "context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "revision_id": {
            "type": "string",
            "title": "Revision Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "read_only": {
            "type": "boolean",
            "title": "Read Only",
            "default": false
          },
          "is_latest_approved": {
            "type": "boolean",
            "title": "Is Latest Approved",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "version",
          "commit_message",
          "revision_id"
        ],
        "title": "DocumentRevisionPreview"
      },
      "DocumentRevisionUpdate": {
        "properties": {
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data"
          },
          "commit_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commit Message"
          },
          "context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "approval_process_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApprovalProcessSettings"
              },
              {
                "type": "null"
              }
            ]
          },
          "jurisdiction_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction Ids"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "page_orientation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PageOrientation"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "DocumentRevisionUpdate"
      },
      "DocumentRevisionUpdateOperation": {
        "properties": {
          "operations": {
            "items": {
              "$ref": "#/components/schemas/DocumentRevisionBulkUpdate"
            },
            "type": "array",
            "title": "Operations"
          }
        },
        "type": "object",
        "required": [
          "operations"
        ],
        "title": "DocumentRevisionUpdateOperation"
      },
      "DocumentTreeCreate": {
        "properties": {
          "file_type": {
            "type": "string",
            "const": "document",
            "title": "File Type",
            "default": "document"
          },
          "document_data": {
            "$ref": "#/components/schemas/DocumentHistoryCreate"
          }
        },
        "type": "object",
        "required": [
          "document_data"
        ],
        "title": "DocumentTreeCreate",
        "description": "Document creation data for folder tree structure"
      },
      "DocumentUpdate": {
        "properties": {
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          }
        },
        "type": "object",
        "title": "DocumentUpdate"
      },
      "DynamicTableFields": {
        "properties": {
          "table_records": {
            "$ref": "#/components/schemas/RecordsSummary"
          },
          "node_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Identifier"
          },
          "document_id": {
            "type": "string",
            "title": "Document Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "trace_path": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trace Path"
          },
          "display_path": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Path"
          },
          "present": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Present"
          }
        },
        "type": "object",
        "required": [
          "table_records",
          "document_id"
        ],
        "title": "DynamicTableFields"
      },
      "DynamicTextFields": {
        "properties": {
          "values": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Values"
          },
          "node_trace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Trace Id"
          },
          "document_id": {
            "type": "string",
            "title": "Document Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "trace_path": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trace Path"
          },
          "display_path": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Path"
          },
          "present": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Present"
          }
        },
        "type": "object",
        "required": [
          "document_id"
        ],
        "title": "DynamicTextFields"
      },
      "ExportRequest": {
        "properties": {
          "ids": {
            "items": {
              "type": "string",
              "example": "5eb7cf5a86d9755df3a6c593"
            },
            "type": "array",
            "title": "Ids"
          }
        },
        "type": "object",
        "required": [
          "ids"
        ],
        "title": "ExportRequest"
      },
      "FileType": {
        "type": "string",
        "enum": [
          "document",
          "template",
          "folder"
        ],
        "title": "FileType"
      },
      "Folder": {
        "properties": {
          "_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id",
            "description": "MongoDB document ObjectID"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "configuration": {
            "$ref": "#/components/schemas/FolderConfiguration"
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          },
          "tenant_metadata": {
            "$ref": "#/components/schemas/TenantMetadata"
          },
          "audit_info": {
            "$ref": "#/components/schemas/AuditInfo"
          }
        },
        "type": "object",
        "required": [
          "label",
          "configuration",
          "tenant_metadata",
          "audit_info"
        ],
        "title": "Folder"
      },
      "FolderConfiguration": {
        "properties": {
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          }
        },
        "type": "object",
        "title": "FolderConfiguration"
      },
      "FolderCreate": {
        "properties": {
          "label": {
            "type": "string",
            "title": "Label"
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          }
        },
        "type": "object",
        "required": [
          "label"
        ],
        "title": "FolderCreate"
      },
      "FolderDeleteRequest": {
        "properties": {
          "folder_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Folder Ids"
          },
          "document_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Ids"
          },
          "template_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Ids"
          }
        },
        "type": "object",
        "required": [
          "folder_ids"
        ],
        "title": "FolderDeleteRequest"
      },
      "FolderTree-Input": {
        "properties": {
          "label": {
            "type": "string",
            "title": "Label"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "audit_info": {
            "$ref": "#/components/schemas/AuditInfo"
          },
          "tenant_metadata": {
            "$ref": "#/components/schemas/TenantMetadata"
          },
          "file_type": {
            "$ref": "#/components/schemas/FileType"
          },
          "children": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/FolderTree-Input"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Children"
          },
          "configuration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FolderConfiguration"
              },
              {
                "type": "null"
              }
            ]
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          },
          "revisions": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/DocumentAndTemplateRevisionForFolder-Input"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revisions"
          },
          "current_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Version"
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          },
          "jurisdiction_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction Ids"
          }
        },
        "type": "object",
        "required": [
          "label",
          "id",
          "audit_info",
          "tenant_metadata",
          "file_type"
        ],
        "title": "FolderTree"
      },
      "FolderTree-Output": {
        "properties": {
          "label": {
            "type": "string",
            "title": "Label"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "audit_info": {
            "$ref": "#/components/schemas/AuditInfo"
          },
          "tenant_metadata": {
            "$ref": "#/components/schemas/TenantMetadata"
          },
          "file_type": {
            "$ref": "#/components/schemas/FileType"
          },
          "children": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/FolderTree-Output"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Children"
          },
          "configuration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FolderConfiguration"
              },
              {
                "type": "null"
              }
            ]
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          },
          "revisions": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/DocumentAndTemplateRevisionForFolder-Output"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revisions"
          },
          "current_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Version"
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          },
          "jurisdiction_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction Ids"
          }
        },
        "type": "object",
        "required": [
          "label",
          "id",
          "audit_info",
          "tenant_metadata",
          "file_type"
        ],
        "title": "FolderTree"
      },
      "FolderTreeSlim": {
        "properties": {
          "label": {
            "type": "string",
            "title": "Label"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "file_type": {
            "$ref": "#/components/schemas/FileType"
          },
          "children": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/FolderTreeSlim"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Children"
          },
          "configuration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FolderConfiguration"
              },
              {
                "type": "null"
              }
            ]
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          },
          "revisions": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/RevisionForFolderSlim"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revisions"
          },
          "current_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Version"
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          },
          "jurisdiction_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction Ids"
          }
        },
        "type": "object",
        "required": [
          "label",
          "id",
          "file_type"
        ],
        "title": "FolderTreeSlim"
      },
      "FolderUpdate": {
        "properties": {
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "configuration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FolderConfiguration"
              },
              {
                "type": "null"
              }
            ]
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          }
        },
        "type": "object",
        "title": "FolderUpdate"
      },
      "GroupWithTemplateDocuments": {
        "properties": {
          "group": {
            "$ref": "#/components/schemas/QmListGroupId"
          },
          "templates_with_documents": {
            "items": {
              "$ref": "#/components/schemas/TemplateWithDocuments"
            },
            "type": "array",
            "title": "Templates With Documents"
          }
        },
        "type": "object",
        "required": [
          "group",
          "templates_with_documents"
        ],
        "title": "GroupWithTemplateDocuments"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ImportRequest": {
        "properties": {
          "items": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Items"
          },
          "keep_all_revisions": {
            "type": "boolean",
            "title": "Keep All Revisions",
            "default": false
          },
          "keep_revision_versions": {
            "type": "boolean",
            "title": "Keep Revision Versions",
            "default": true
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "ImportRequest",
        "description": "The request model for importing documents and templates. It includes a list of items to import, as well as options for how to handle revisions and parent folder assignment.\n\n@param items: A list of strings representing the items to be imported. These are the contents of the documents or templates to be imported in JSON format.\n@param keep_all_revisions: A boolean flag indicating whether to keep all revisions of the imported documents. If set to True, all revisions will be kept. If False, only the latest revision will be kept. Default is False.\n@param keep_revision_versions: A boolean flag indicating whether to keep the original revision version of the imported documents. If set to False the newly created documents will start with version 0.0. Only applicable if keep_all_revisions is False. Default is True.\n@param parent_folder_id: An optional PydanticObjectId representing the ID of the parent folder where the imported documents should be placed. If not provided, the documents will be imported without a parent folder."
      },
      "ImportResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "imported_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "example": "5eb7cf5a86d9755df3a6c593"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imported Ids"
          },
          "validation_errors": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ValidationError"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Validation Errors"
          }
        },
        "type": "object",
        "required": [
          "success",
          "message"
        ],
        "title": "ImportResponse"
      },
      "LastActionType": {
        "type": "string",
        "enum": [
          "created",
          "updated",
          "published"
        ],
        "title": "LastActionType"
      },
      "MessageResponse": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "message"
        ],
        "title": "MessageResponse"
      },
      "NodeImpactExpertRequest": {
        "properties": {
          "node_id_changed_object": {
            "type": "string",
            "title": "Node Id Changed Object"
          },
          "node_ids_to_check": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Node Ids To Check"
          },
          "changed_object": {
            "additionalProperties": true,
            "type": "object",
            "title": "Changed Object"
          }
        },
        "type": "object",
        "required": [
          "node_id_changed_object",
          "node_ids_to_check",
          "changed_object"
        ],
        "title": "NodeImpactExpertRequest"
      },
      "NodeImpactExpertResponse": {
        "properties": {
          "node_ids_impacted": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Node Ids Impacted"
          }
        },
        "type": "object",
        "required": [
          "node_ids_impacted"
        ],
        "title": "NodeImpactExpertResponse",
        "description": "V1: list of node identifiers that are impacted by the changed object\nV2: additional information about impacted fields\nV3: diff between old and new values (maybe in tiptap format)"
      },
      "NodeType": {
        "type": "string",
        "enum": [
          "Document",
          "ExternalFile",
          "File",
          "Form",
          "GlobalElement",
          "KnowledgeTopic",
          "KnowledgeTopicSchema",
          "KnowledgeUnit",
          "KnowledgeUnitSchema",
          "Product",
          "ProductFamily",
          "Record",
          "SOP",
          "Submission",
          "SubmissionTemplate",
          "Template",
          "WorkInstruction"
        ],
        "title": "NodeType"
      },
      "NodesSummary": {
        "properties": {
          "total_nodes_count": {
            "type": "integer",
            "title": "Total Nodes Count"
          },
          "resolved_nodes_count": {
            "type": "integer",
            "title": "Resolved Nodes Count"
          },
          "missing_nodes_count": {
            "type": "integer",
            "title": "Missing Nodes Count"
          }
        },
        "type": "object",
        "required": [
          "total_nodes_count",
          "resolved_nodes_count",
          "missing_nodes_count"
        ],
        "title": "NodesSummary"
      },
      "PageOrientation": {
        "type": "string",
        "enum": [
          "portrait",
          "landscape"
        ],
        "title": "PageOrientation"
      },
      "QmListFilterTag": {
        "properties": {
          "_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id",
            "description": "MongoDB document ObjectID"
          },
          "filter_tag_name": {
            "type": "string",
            "title": "Filter Tag Name"
          },
          "next_number": {
            "type": "integer",
            "title": "Next Number",
            "default": 1
          },
          "tenant_metadata": {
            "$ref": "#/components/schemas/TenantMetadata"
          },
          "associated_templates": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TemplateInfo"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Associated Templates"
          },
          "associated_groups_and_documents": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/GroupWithTemplateDocuments"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Associated Groups And Documents"
          }
        },
        "type": "object",
        "required": [
          "filter_tag_name",
          "tenant_metadata"
        ],
        "title": "QmListFilterTag"
      },
      "QmListGroupId": {
        "properties": {
          "_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id",
            "description": "MongoDB document ObjectID"
          },
          "tenant_metadata": {
            "$ref": "#/components/schemas/TenantMetadata"
          },
          "group_id": {
            "type": "string",
            "title": "Group Id"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "related_filter_tag": {
            "type": "string",
            "title": "Related Filter Tag",
            "example": "5eb7cf5a86d9755df3a6c593"
          }
        },
        "type": "object",
        "required": [
          "tenant_metadata",
          "group_id",
          "related_filter_tag"
        ],
        "title": "QmListGroupId"
      },
      "RecordFields": {
        "properties": {
          "present_fields": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Present Fields"
          },
          "missing_fields": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Missing Fields"
          }
        },
        "type": "object",
        "title": "RecordFields"
      },
      "RecordsSummary": {
        "properties": {
          "records": {
            "items": {
              "$ref": "#/components/schemas/RecordFields"
            },
            "type": "array",
            "title": "Records"
          },
          "records_with_missing_fields": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Records With Missing Fields"
          }
        },
        "type": "object",
        "required": [
          "records"
        ],
        "title": "RecordsSummary"
      },
      "ReferenceResolveRequest": {
        "properties": {
          "document_id": {
            "type": "string",
            "title": "Document Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "revision_id": {
            "type": "string",
            "title": "Revision Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "document_version": {
            "type": "string",
            "title": "Document Version"
          },
          "is_template": {
            "type": "boolean",
            "title": "Is Template",
            "default": false
          },
          "ref_entity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ref Entity Id"
          },
          "ref_entity_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NodeType"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ref Entity Type"
          },
          "ref_entity_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ref Entity Version",
            "default": ""
          },
          "tiptap_content": {
            "additionalProperties": true,
            "type": "object",
            "title": "Tiptap Content"
          },
          "document_context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "invalidate_ref_cache": {
            "type": "boolean",
            "title": "Invalidate Ref Cache",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "document_id",
          "revision_id",
          "document_version",
          "tiptap_content"
        ],
        "title": "ReferenceResolveRequest"
      },
      "RevisionForFolderSlim": {
        "properties": {
          "revision_id": {
            "type": "string",
            "title": "Revision Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "parent_id": {
            "type": "string",
            "title": "Parent Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "read_only": {
            "type": "boolean",
            "title": "Read Only",
            "default": false
          },
          "version": {
            "type": "string",
            "title": "Version"
          },
          "context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_latest_approved": {
            "type": "boolean",
            "title": "Is Latest Approved",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "revision_id",
          "parent_id",
          "version"
        ],
        "title": "RevisionForFolderSlim"
      },
      "SlimByIdsRequest": {
        "properties": {
          "ids": {
            "items": {
              "type": "string",
              "example": "5eb7cf5a86d9755df3a6c593"
            },
            "type": "array",
            "maxItems": 200,
            "title": "Ids"
          }
        },
        "type": "object",
        "title": "SlimByIdsRequest"
      },
      "TemplateDuplicationRequest": {
        "properties": {
          "revision_id": {
            "type": "string",
            "title": "Revision Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          }
        },
        "type": "object",
        "required": [
          "revision_id"
        ],
        "title": "TemplateDuplicationRequest"
      },
      "TemplateFromFileResponse": {
        "properties": {
          "template_id": {
            "type": "string",
            "title": "Template Id"
          }
        },
        "type": "object",
        "required": [
          "template_id"
        ],
        "title": "TemplateFromFileResponse"
      },
      "TemplateHistory": {
        "properties": {
          "_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id",
            "description": "MongoDB document ObjectID"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "current_version": {
            "type": "string",
            "title": "Current Version",
            "default": "0.0"
          },
          "revisions": {
            "items": {
              "$ref": "#/components/schemas/TemplateRevisionPreview"
            },
            "type": "array",
            "title": "Revisions"
          },
          "creates_record_document": {
            "type": "boolean",
            "title": "Creates Record Document",
            "default": false
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          },
          "tenant_metadata": {
            "$ref": "#/components/schemas/TenantMetadata"
          },
          "audit_info": {
            "$ref": "#/components/schemas/AuditInfo"
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          },
          "jurisdiction_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction Ids"
          }
        },
        "type": "object",
        "required": [
          "title",
          "revisions",
          "tenant_metadata",
          "audit_info"
        ],
        "title": "TemplateHistory"
      },
      "TemplateHistoryCreate": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title"
          },
          "context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          },
          "jurisdiction_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction Ids"
          },
          "page_orientation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PageOrientation"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "title"
        ],
        "title": "TemplateHistoryCreate"
      },
      "TemplateHistorySlim": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          },
          "current_version": {
            "type": "string",
            "title": "Current Version",
            "default": "0.0"
          },
          "revisions": {
            "items": {
              "$ref": "#/components/schemas/TemplateRevisionPreview"
            },
            "type": "array",
            "title": "Revisions"
          },
          "creates_record_document": {
            "type": "boolean",
            "title": "Creates Record Document",
            "default": false
          },
          "tenant_metadata": {
            "$ref": "#/components/schemas/TenantMetadata"
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          },
          "audit_info": {
            "$ref": "#/components/schemas/AuditInfo"
          },
          "jurisdiction_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction Ids"
          }
        },
        "type": "object",
        "required": [
          "id",
          "title",
          "revisions",
          "tenant_metadata",
          "audit_info"
        ],
        "title": "TemplateHistorySlim"
      },
      "TemplateHistoryWithDetailedRevisions": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          },
          "current_version": {
            "type": "string",
            "title": "Current Version",
            "default": "0.0"
          },
          "revisions": {
            "items": {
              "$ref": "#/components/schemas/TemplateRevision"
            },
            "type": "array",
            "title": "Revisions"
          },
          "creates_record_document": {
            "type": "boolean",
            "title": "Creates Record Document",
            "default": false
          },
          "tenant_metadata": {
            "$ref": "#/components/schemas/TenantMetadata"
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          },
          "audit_info": {
            "$ref": "#/components/schemas/AuditInfo"
          },
          "jurisdiction_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction Ids"
          }
        },
        "type": "object",
        "required": [
          "id",
          "title",
          "revisions",
          "tenant_metadata",
          "audit_info"
        ],
        "title": "TemplateHistoryWithDetailedRevisions"
      },
      "TemplateInfo": {
        "properties": {
          "template_id": {
            "type": "string",
            "title": "Template Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "template_name": {
            "type": "string",
            "title": "Template Name"
          },
          "template_revisions": {
            "items": {
              "$ref": "#/components/schemas/TemplateRevision"
            },
            "type": "array",
            "title": "Template Revisions"
          }
        },
        "type": "object",
        "required": [
          "template_id",
          "template_name",
          "template_revisions"
        ],
        "title": "TemplateInfo"
      },
      "TemplateRevision": {
        "properties": {
          "_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id",
            "description": "MongoDB document ObjectID"
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "version": {
            "type": "string",
            "title": "Version"
          },
          "commit_message": {
            "type": "string",
            "title": "Commit Message"
          },
          "context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "data": {
            "additionalProperties": true,
            "type": "object",
            "title": "Data",
            "default": {}
          },
          "read_only": {
            "type": "boolean",
            "title": "Read Only",
            "default": false
          },
          "is_latest_approved": {
            "type": "boolean",
            "title": "Is Latest Approved",
            "default": false
          },
          "tenant_metadata": {
            "$ref": "#/components/schemas/TenantMetadata"
          },
          "audit_info": {
            "$ref": "#/components/schemas/AuditInfo"
          },
          "approval_process_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApprovalProcessSettings"
              },
              {
                "type": "null"
              }
            ]
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          },
          "jurisdiction_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction Ids"
          },
          "page_orientation": {
            "$ref": "#/components/schemas/PageOrientation",
            "default": "portrait"
          }
        },
        "type": "object",
        "required": [
          "title",
          "version",
          "commit_message",
          "context",
          "tenant_metadata",
          "audit_info"
        ],
        "title": "TemplateRevision"
      },
      "TemplateRevisionCreate": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title"
          },
          "data": {
            "additionalProperties": true,
            "type": "object",
            "title": "Data"
          },
          "commit_message": {
            "type": "string",
            "title": "Commit Message"
          },
          "context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          },
          "approval_process_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApprovalProcessSettings"
              },
              {
                "type": "null"
              }
            ]
          },
          "jurisdiction_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction Ids"
          },
          "page_orientation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PageOrientation"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "title",
          "data",
          "commit_message",
          "context"
        ],
        "title": "TemplateRevisionCreate"
      },
      "TemplateRevisionPreview": {
        "properties": {
          "version": {
            "type": "string",
            "title": "Version"
          },
          "commit_message": {
            "type": "string",
            "title": "Commit Message"
          },
          "context": {
            "$ref": "#/components/schemas/DocumentContext"
          },
          "revision_id": {
            "type": "string",
            "title": "Revision Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "read_only": {
            "type": "boolean",
            "title": "Read Only",
            "default": false
          },
          "is_latest_approved": {
            "type": "boolean",
            "title": "Is Latest Approved",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "version",
          "commit_message",
          "context",
          "revision_id"
        ],
        "title": "TemplateRevisionPreview"
      },
      "TemplateRevisionUpdate": {
        "properties": {
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data"
          },
          "commit_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commit Message"
          },
          "context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "abbreviation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Abbreviation"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "approval_process_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApprovalProcessSettings"
              },
              {
                "type": "null"
              }
            ]
          },
          "jurisdiction_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction Ids"
          },
          "page_orientation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PageOrientation"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "TemplateRevisionUpdate"
      },
      "TemplateTreeCreate": {
        "properties": {
          "file_type": {
            "type": "string",
            "const": "template",
            "title": "File Type",
            "default": "template"
          },
          "template_data": {
            "$ref": "#/components/schemas/TemplateHistoryCreate"
          }
        },
        "type": "object",
        "required": [
          "template_data"
        ],
        "title": "TemplateTreeCreate",
        "description": "Template creation data for folder tree structure"
      },
      "TemplateUpdate": {
        "properties": {
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "example": "5eb7cf5a86d9755df3a6c593"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          }
        },
        "type": "object",
        "title": "TemplateUpdate"
      },
      "TemplateWithDocuments": {
        "properties": {
          "template_id": {
            "type": "string",
            "title": "Template Id",
            "example": "5eb7cf5a86d9755df3a6c593"
          },
          "template_name": {
            "type": "string",
            "title": "Template Name"
          },
          "documents": {
            "items": {
              "$ref": "#/components/schemas/DocumentRevision"
            },
            "type": "array",
            "title": "Documents"
          }
        },
        "type": "object",
        "required": [
          "template_id",
          "template_name",
          "documents"
        ],
        "title": "TemplateWithDocuments"
      },
      "TenantMetadata": {
        "properties": {
          "tenant_id": {
            "type": "string",
            "title": "Tenant Id"
          }
        },
        "type": "object",
        "required": [
          "tenant_id"
        ],
        "title": "TenantMetadata"
      },
      "UpdateOperation": {
        "properties": {
          "operation": {
            "type": "string",
            "const": "update",
            "title": "Operation"
          },
          "document_id": {
            "type": "string",
            "title": "Document Id"
          },
          "document_data": {
            "$ref": "#/components/schemas/DocumentUpdate"
          }
        },
        "type": "object",
        "required": [
          "operation",
          "document_id",
          "document_data"
        ],
        "title": "UpdateOperation"
      },
      "UpdateQmListFilterTag": {
        "properties": {
          "filter_tag_name": {
            "type": "string",
            "title": "Filter Tag Name"
          }
        },
        "type": "object",
        "required": [
          "filter_tag_name"
        ],
        "title": "UpdateQmListFilterTag"
      },
      "UpdateQmListGroupId": {
        "properties": {
          "label": {
            "type": "string",
            "title": "Label"
          }
        },
        "type": "object",
        "required": [
          "label"
        ],
        "title": "UpdateQmListGroupId"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ]
}
