Overview
This page documents all TypeScript types used throughout the Argument Analysis Tool. These types define the structure of argument nodes, tweets, analysis results, and stored documents.ArgumentNode
Represents a single node in an argument graph. Each node can be a thesis, claim, counterclaim, or evidence.Fields
Unique identifier for the argument node.
The ID of the parent node in the argument tree. Set to
null for root nodes (thesis statements).The type of argument node:
thesis- The main proposition or statement being analyzedclaim- A supporting argument or assertioncounterclaim- An opposing argument or rebuttalevidence- Supporting data, facts, or examples
Which side of the argument this node supports:
for- Supports the thesis or parent claimagainst- Opposes the thesis or parent claim
The main text content of the argument node. This is the synthesized or extracted argument statement.
The original text from which this argument was extracted or derived. Used for traceability and verification.
The source URL or reference where this argument was found.Examples:
"https://example.com/article""User input""https://twitter.com/user/status/123"
An array of logical fallacies detected in this argument node.Examples:
["ad hominem", "straw man"][](empty array if no fallacies detected)
A description of the logical role this node plays in the argument structure.Examples:
"Provides statistical evidence""Challenges the underlying assumption""Offers an alternative explanation"
ArgumentTree
Represents a hierarchical tree structure of arguments, where each node can have multiple children.Fields
All fields from
ArgumentNode are included.An array of child argument trees. Each child is itself an
ArgumentTree with its own potential children, forming a recursive structure.Empty array: [] for leaf nodes with no childrenExample Structure
Tweet
Represents a tweet retrieved from X (Twitter) API v2.Fields
The unique identifier for the tweet on X/Twitter.
The full text content of the tweet.
Information about the tweet’s author.
Engagement metrics for the tweet.
ISO 8601 timestamp of when the tweet was created.Format:
"YYYY-MM-DDTHH:mm:ss.sssZ"Example: "2024-01-15T10:30:00.000Z"AnalysisResult
Represents the complete result of an argument analysis operation.Fields
A flat array of all argument nodes extracted from the analysis. These nodes can be reconstructed into an
ArgumentTree structure using their id and parentId relationships.A concise summary of the argument and its main points. Provides a high-level overview of the analysis.
A detailed analysis of the argument structure, including:
- Logical relationships between claims
- Strength of evidence
- Identified fallacies
- Overall argument quality
- Gaps in reasoning
An analysis of the social media discourse surrounding the topic, based on tweets retrieved during analysis. Describes:
- Public sentiment
- Common perspectives
- Trending viewpoints
- Social context
An array of tweets collected during the analysis, representing public discourse on the topic.
ArgumentMapDocument
Represents a saved argument map document stored in Firestore.Fields
The unique document ID in Firestore.
The ID of the user who created this argument map. Used for access control and ownership.
A user-provided name or title for the argument map.Examples:
"Climate Change Analysis - Jan 2024""Universal Basic Income Arguments"
A Firestore
Timestamp object representing when this document was created.Type: firebase/firestore/TimestampA JSON-stringified representation of the
AnalysisResult object. This field stores the complete analysis data including the argument blueprint, summary, analysis text, social pulse, and tweets.Usage: Parse this string to retrieve the AnalysisResult:Source Code Location
src/lib/types.ts