{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-experience-cloud/json-schema/salesforce-experience-cloud-list-view-representation-schema.json",
  "title": "ListViewRepresentation",
  "description": "List view data and metadata",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-experience-cloud-list-views-api-openapi.yml#/components/schemas/ListViewRepresentation",
  "type": "object",
  "properties": {
    "count": {
      "type": "integer"
    },
    "currentPageToken": {
      "type": "string"
    },
    "currentPageUrl": {
      "type": "string",
      "format": "uri"
    },
    "info": {
      "$ref": "#/$defs/ListViewInfo"
    },
    "nextPageToken": {
      "type": "string"
    },
    "nextPageUrl": {
      "type": "string",
      "format": "uri"
    },
    "previousPageToken": {
      "type": "string"
    },
    "previousPageUrl": {
      "type": "string",
      "format": "uri"
    },
    "records": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RecordRepresentation"
      }
    }
  },
  "$defs": {
    "FieldValueRepresentation": {
      "type": "object",
      "description": "Field value with display formatting",
      "properties": {
        "displayValue": {
          "type": "string",
          "description": "Formatted display value (locale-aware)"
        },
        "value": {
          "description": "Raw field value"
        }
      }
    },
    "ListViewInfo": {
      "type": "object",
      "description": "Metadata about a list view",
      "properties": {
        "cloneable": {
          "type": "boolean"
        },
        "createable": {
          "type": "boolean"
        },
        "deletable": {
          "type": "boolean"
        },
        "displayColumns": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "fieldApiName": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "sortable": {
                "type": "boolean"
              }
            }
          }
        },
        "eTag": {
          "type": "string"
        },
        "filterLogicString": {
          "type": "string"
        },
        "filteredByInfo": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "listReference": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "listViewApiName": {
              "type": "string"
            },
            "objectApiName": {
              "type": "string"
            },
            "type": {
              "type": "string"
            }
          }
        },
        "orderedByInfo": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "fieldApiName": {
                "type": "string"
              },
              "isAscending": {
                "type": "boolean"
              },
              "label": {
                "type": "string"
              }
            }
          }
        },
        "updateable": {
          "type": "boolean"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "Private",
            "Public"
          ]
        }
      }
    },
    "RecordRepresentation": {
      "type": "object",
      "description": "Representation of a record with field values",
      "properties": {
        "apiName": {
          "type": "string",
          "description": "API name of the sObject type"
        },
        "childRelationships": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          }
        },
        "eTag": {
          "type": "string",
          "description": "Entity tag for optimistic concurrency"
        },
        "fields": {
          "type": "object",
          "description": "Map of field API names to field values",
          "additionalProperties": {
            "$ref": "#/$defs/FieldValueRepresentation"
          }
        },
        "id": {
          "type": "string",
          "description": "Record ID"
        },
        "lastModifiedById": {
          "type": "string"
        },
        "lastModifiedDate": {
          "type": "string",
          "format": "date-time"
        },
        "recordTypeId": {
          "type": "string"
        },
        "recordTypeInfo": {
          "type": "object",
          "properties": {
            "available": {
              "type": "boolean"
            },
            "defaultRecordTypeMapping": {
              "type": "boolean"
            },
            "master": {
              "type": "boolean"
            },
            "name": {
              "type": "string"
            },
            "recordTypeId": {
              "type": "string"
            }
          }
        },
        "systemModstamp": {
          "type": "string",
          "format": "date-time"
        },
        "weakEtag": {
          "type": "integer"
        }
      }
    }
  }
}