{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/shepherd-vet/json-schema/shepherd-vet-restcollection-model-base-open-api-conversation-controller-conversation-schema.json",
  "title": "RESTCollectionModelBase_OpenApiConversationController.Conversation",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/shepherd-vet-conversation-api-openapi.yml#/components/schemas/RESTCollectionModelBase_OpenApiConversationController.Conversation",
  "type": "object",
  "properties": {
    "embed": {
      "type": "string"
    },
    "item": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OpenApiConversationController.Conversation"
      }
    },
    "page": {
      "format": "int32",
      "type": "integer"
    },
    "recordsPerPage": {
      "format": "int32",
      "type": "integer"
    },
    "searchQuery": {
      "type": "string"
    },
    "sort": {
      "type": "string"
    },
    "totalRecords": {
      "format": "int32",
      "type": "integer"
    }
  },
  "$defs": {
    "OpenApiConversationController.Conversation": {
      "description": "Conversation REST model",
      "type": "object",
      "properties": {
        "clientId": {
          "format": "uuid",
          "description": "Unique identifier representing the related Client entity.",
          "type": "string"
        },
        "clientPhoneNumber": {
          "description": "Client's phone number",
          "type": "string"
        },
        "conversationAssignedToTeams": {
          "description": "List of objects representing the Teams assigned to this Conversation.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/OpenApiConversationController.ConversationAssignedToTeam"
          }
        },
        "conversationStatus": {
          "$ref": "#/$defs/OpenApiConversationController.ConversationStatus",
          "description": "Object representing related ConversationStatus entity."
        },
        "conversationStatusId": {
          "format": "uuid",
          "description": "Unique identifier representing the related ConversationStatus entity.",
          "type": "string"
        },
        "isDeleted": {
          "description": "Flag indicating whether this Conversation has been deleted. Deleting a conversation does not flag its messages as deleted.",
          "type": "boolean"
        },
        "lastMessage": {
          "$ref": "#/$defs/OpenApiConversationController.LastMessage",
          "description": "Object representing related LastMessage entity."
        },
        "dateCreated": {
          "format": "date-time",
          "type": "string"
        },
        "dateUpdated": {
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "type": "string"
        }
      }
    },
    "OpenApiConversationController.ConversationAssignedToTeam": {
      "description": "ConversationAssignedToTeam REST model. Links a Conversation to a Team assigned to it.",
      "type": "object",
      "properties": {
        "team": {
          "$ref": "#/$defs/OpenApiConversationController.Team",
          "description": "Object representing the related Team entity."
        },
        "teamId": {
          "format": "uuid",
          "description": "Unique identifier representing the related Team entity.",
          "type": "string"
        },
        "dateCreated": {
          "format": "date-time",
          "type": "string"
        },
        "dateUpdated": {
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "type": "string"
        }
      }
    },
    "OpenApiConversationController.ConversationStatus": {
      "description": "ConversationStatus REST model.",
      "type": "object",
      "properties": {
        "abrv": {
          "description": "Short unique identifier for the lookup.",
          "type": "string"
        },
        "description": {
          "description": "The description of the lookup entry.",
          "type": "string"
        },
        "name": {
          "description": "The name of the lookup entry.",
          "type": "string"
        },
        "dateCreated": {
          "format": "date-time",
          "type": "string"
        },
        "dateUpdated": {
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "type": "string"
        }
      }
    },
    "OpenApiConversationController.LastMessage": {
      "description": "Message REST model.",
      "type": "object",
      "properties": {
        "content": {
          "description": "Optional free-text field representing message content.",
          "type": "string"
        },
        "conversationId": {
          "format": "uuid",
          "description": "Unique identifier representing the related Conversation entity.",
          "type": "string"
        },
        "isClientMessage": {
          "description": "Value indicating whether this LastMessage is client message.",
          "type": "boolean"
        },
        "messageStatus": {
          "$ref": "#/$defs/OpenApiConversationController.MessageStatus",
          "description": "Object representing the related MessageStatus entity."
        },
        "messageStatusId": {
          "format": "uuid",
          "description": "Unique identifier representing the related MessageStatus entity.",
          "type": "string"
        },
        "sentByUserFormatted": {
          "description": "Full name of the user who sent the message, including the prefix and suffix.",
          "type": "string"
        },
        "dateCreated": {
          "format": "date-time",
          "type": "string"
        },
        "dateUpdated": {
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "type": "string"
        }
      }
    },
    "OpenApiConversationController.MessageStatus": {
      "description": "Message REST model.",
      "type": "object",
      "properties": {
        "abrv": {
          "description": "Short unique identifier for the lookup.",
          "type": "string"
        },
        "description": {
          "description": "The description of the lookup entry.",
          "type": "string"
        },
        "name": {
          "description": "The name of the lookup entry.",
          "type": "string"
        },
        "dateCreated": {
          "format": "date-time",
          "type": "string"
        },
        "dateUpdated": {
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "type": "string"
        }
      }
    },
    "OpenApiConversationController.Team": {
      "description": "Team REST model.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Name of the team.",
          "type": "string"
        },
        "dateCreated": {
          "format": "date-time",
          "type": "string"
        },
        "dateUpdated": {
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "type": "string"
        }
      }
    }
  }
}