feat(enforcement): record decisions and send notices (#3492)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-15 07:12:46 +02:00
1 parent da1842ecab
commit f5c30fdf8f
383 files changed
+29692 -4139

No files matched your search

+227
View File
@@ -1588,6 +1588,10 @@
{
"name": "created_at",
"type": "timestamp"
},
{
"name": "decision_id",
"type": "bigint"
}
],
"primary_key": "(ip)",
@@ -4111,6 +4115,221 @@
"primary_key": "((token_), user_id)",
"options": "default_time_to_live = 86400 AND gc_grace_seconds = 864000 AND compaction = {'class': 'TimeWindowCompactionStrategy', 'compaction_window_unit': 'HOURS', 'compaction_window_size': '1'}"
},
{
"name": "enforcement_decision_evidence",
"columns": [
{
"name": "decision_id",
"type": "bigint"
},
{
"name": "messages",
"type": "frozen<list<iar_message_context>>"
},
{
"name": "message_locations",
"type": "map<bigint, text>"
},
{
"name": "profile_values",
"type": "map<text, text>"
}
],
"primary_key": "(decision_id)",
"options": "default_time_to_live = 31536000"
},
{
"name": "enforcement_decision_notes",
"columns": [
{
"name": "decision_id",
"type": "bigint"
},
{
"name": "note_id",
"type": "bigint"
},
{
"name": "author_id",
"type": "bigint"
},
{
"name": "body",
"type": "text"
},
{
"name": "created_at",
"type": "timestamp"
}
],
"primary_key": "((decision_id), note_id)",
"options": "CLUSTERING ORDER BY (note_id ASC) AND default_time_to_live = 31536000"
},
{
"name": "enforcement_decisions",
"columns": [
{
"name": "decision_id",
"type": "bigint"
},
{
"name": "subject_type",
"type": "text"
},
{
"name": "subject_id",
"type": "bigint"
},
{
"name": "subject_name",
"type": "text"
},
{
"name": "recipient_user_id",
"type": "bigint"
},
{
"name": "kind",
"type": "text"
},
{
"name": "reason_code",
"type": "int"
},
{
"name": "source",
"type": "text"
},
{
"name": "automation",
"type": "text"
},
{
"name": "statement",
"type": "text"
},
{
"name": "rights_holder",
"type": "text"
},
{
"name": "ends_at",
"type": "timestamp"
},
{
"name": "deletion_at",
"type": "timestamp"
},
{
"name": "feature_limit",
"type": "text"
},
{
"name": "profile_fields",
"type": "set<text>"
},
{
"name": "removed_message_count",
"type": "int"
},
{
"name": "removed_all_messages",
"type": "boolean"
},
{
"name": "payment_at",
"type": "timestamp"
},
{
"name": "report_ids",
"type": "set<bigint>"
},
{
"name": "decided_by",
"type": "bigint"
},
{
"name": "created_at",
"type": "timestamp"
},
{
"name": "status",
"type": "text"
},
{
"name": "end_outcome",
"type": "text"
},
{
"name": "ended_at",
"type": "timestamp"
},
{
"name": "ended_by",
"type": "bigint"
},
{
"name": "end_statement",
"type": "text"
},
{
"name": "notice_status",
"type": "text"
},
{
"name": "notice_channels",
"type": "set<text>"
},
{
"name": "notice_locale",
"type": "text"
},
{
"name": "notice_text",
"type": "text"
},
{
"name": "notice_sent_at",
"type": "timestamp"
}
],
"primary_key": "(decision_id)",
"options": ""
},
{
"name": "enforcement_decisions_by_subject",
"columns": [
{
"name": "subject_type",
"type": "text"
},
{
"name": "subject_id",
"type": "bigint"
},
{
"name": "decision_id",
"type": "bigint"
}
],
"primary_key": "((subject_type, subject_id), decision_id)",
"options": "CLUSTERING ORDER BY (decision_id DESC)"
},
{
"name": "enforcement_review_queue",
"columns": [
{
"name": "bucket",
"type": "int"
},
{
"name": "decision_id",
"type": "bigint"
}
],
"primary_key": "((bucket), decision_id)",
"options": "CLUSTERING ORDER BY (decision_id DESC)"
},
{
"name": "favorite_memes",
"columns": [
@@ -6146,6 +6365,10 @@
{
"name": "legal_hold_reason",
"type": "text"
},
{
"name": "reporter_outcome",
"type": "text"
}
],
"primary_key": "((report_id))",
@@ -8651,6 +8874,10 @@
{
"name": "content_hidden_since",
"type": "timestamp"
},
{
"name": "enforcement_decision_id",
"type": "bigint"
}
],
"primary_key": "((user_id))",