{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-experience-cloud/json-schema/salesforce-experience-cloud-feed-element-page-schema.json",
  "title": "FeedElementPage",
  "description": "Paginated list of feed elements",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-experience-cloud-feeds-api-openapi.yml#/components/schemas/FeedElementPage",
  "type": "object",
  "properties": {
    "currentPageToken": {
      "type": "string",
      "description": "Token for the current page"
    },
    "currentPageUrl": {
      "type": "string",
      "format": "uri",
      "description": "URL for the current page"
    },
    "elements": {
      "type": "array",
      "description": "Feed elements on this page",
      "items": {
        "$ref": "#/$defs/FeedElement"
      }
    },
    "isModifiedToken": {
      "type": "string"
    },
    "isModifiedUrl": {
      "type": "string",
      "format": "uri"
    },
    "nextPageToken": {
      "type": "string",
      "description": "Token for the next page"
    },
    "nextPageUrl": {
      "type": "string",
      "format": "uri",
      "description": "URL for the next page"
    },
    "updatesToken": {
      "type": "string"
    },
    "updatesUrl": {
      "type": "string",
      "format": "uri"
    }
  },
  "$defs": {
    "ActorReference": {
      "type": "object",
      "description": "Reference to a user or record",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "Comment": {
      "type": "object",
      "description": "A comment on a feed element",
      "properties": {
        "id": {
          "type": "string"
        },
        "body": {
          "$ref": "#/$defs/MessageBody"
        },
        "createdDate": {
          "type": "string",
          "format": "date-time"
        },
        "feedElement": {
          "$ref": "#/$defs/ActorReference"
        },
        "likes": {
          "$ref": "#/$defs/LikePage"
        },
        "user": {
          "$ref": "#/$defs/ActorReference"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "CommentPage": {
      "type": "object",
      "description": "Paginated list of comments",
      "properties": {
        "comments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Comment"
          }
        },
        "currentPageToken": {
          "type": "string"
        },
        "currentPageUrl": {
          "type": "string",
          "format": "uri"
        },
        "nextPageToken": {
          "type": "string"
        },
        "nextPageUrl": {
          "type": "string",
          "format": "uri"
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "FeedElement": {
      "type": "object",
      "description": "A feed element such as a post or announcement",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier of the feed element"
        },
        "body": {
          "$ref": "#/$defs/MessageBody"
        },
        "capabilities": {
          "$ref": "#/$defs/FeedElementCapabilities"
        },
        "createdDate": {
          "type": "string",
          "format": "date-time",
          "description": "When the feed element was created"
        },
        "feedElementType": {
          "type": "string",
          "description": "Type of feed element",
          "enum": [
            "FeedItem",
            "Bundle",
            "Recommendation"
          ]
        },
        "header": {
          "$ref": "#/$defs/MessageBody"
        },
        "modifiedDate": {
          "type": "string",
          "format": "date-time",
          "description": "When the feed element was last modified"
        },
        "parent": {
          "$ref": "#/$defs/ActorReference"
        },
        "actor": {
          "$ref": "#/$defs/ActorReference"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "API resource URL"
        }
      }
    },
    "FeedElementCapabilities": {
      "type": "object",
      "description": "Capabilities available on a feed element",
      "properties": {
        "comments": {
          "type": "object",
          "properties": {
            "page": {
              "$ref": "#/$defs/CommentPage"
            }
          }
        },
        "chatterLikes": {
          "type": "object",
          "properties": {
            "page": {
              "$ref": "#/$defs/LikePage"
            },
            "myLike": {
              "$ref": "#/$defs/Like"
            }
          }
        }
      }
    },
    "Like": {
      "type": "object",
      "description": "A like on a feed element or comment",
      "properties": {
        "id": {
          "type": "string"
        },
        "createdDate": {
          "type": "string",
          "format": "date-time"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "user": {
          "$ref": "#/$defs/ActorReference"
        }
      }
    },
    "LikePage": {
      "type": "object",
      "description": "Paginated list of likes",
      "properties": {
        "currentPageToken": {
          "type": "string"
        },
        "currentPageUrl": {
          "type": "string",
          "format": "uri"
        },
        "likes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Like"
          }
        },
        "nextPageToken": {
          "type": "string"
        },
        "nextPageUrl": {
          "type": "string",
          "format": "uri"
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "MessageBody": {
      "type": "object",
      "description": "Rich text body of a feed element or comment",
      "properties": {
        "isRichText": {
          "type": "boolean"
        },
        "messageSegments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MessageSegment"
          }
        },
        "text": {
          "type": "string"
        }
      }
    },
    "MessageSegment": {
      "type": "object",
      "description": "A segment of a message body",
      "properties": {
        "text": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "Text",
            "Mention",
            "Hashtag",
            "Link",
            "MarkupBegin",
            "MarkupEnd"
          ]
        }
      }
    }
  }
}