Skip to content

Commit 74ec104

Browse files
author
epilot CI
committed
docs: sync event catalog schemas
1 parent 7f4db68 commit 74ec104

3 files changed

Lines changed: 16 additions & 3 deletions

File tree

static/events/ServiceMeterReadingAdded.config.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,11 @@
204204
"additionalProperties": false,
205205
"description": "S3 reference for the file content"
206206
},
207+
"version_index": {
208+
"type": "integer",
209+
"minimum": 0,
210+
"description": "Latest version index of the file (versions[].length - 1, or 0 if no versions array)"
211+
},
207212
"readable_size": {
208213
"type": "string",
209214
"description": "Human-readable file size (e.g., \"200 KB\")"
@@ -237,14 +242,15 @@
237242
}
238243
},
239244
"required": [
240-
"entity_id"
245+
"entity_id",
246+
"version_index"
241247
],
242248
"additionalProperties": false
243249
},
244250
"description": "All files related to the ticket. The ticket schema is org-specific, so we cannot reliably identify \"the meter photo\" — consumers should filter on `relation_tags`, `_tags`, `mime_type`, or `_created_at` proximity to `reading_timestamp`."
245251
},
246252
"required": false,
247-
"graph_source": "[ticket_files.{\"entity_id\": _id, \"filename\": filename, \"mime_type\": mime_type, \"size_bytes\": size_bytes, \"s3ref\": s3ref, \"readable_size\": readable_size, \"_tags\": _tags, \"relation_tags\": relation_tags, \"category\": category, \"file_date\": file_date, \"_created_at\": _created_at}]"
253+
"graph_source": "[ticket_files.{\"entity_id\": _id, \"filename\": filename, \"mime_type\": mime_type, \"size_bytes\": size_bytes, \"s3ref\": s3ref, \"version_index\": ($count(versions) > 0 ? $count(versions) - 1 : 0), \"readable_size\": readable_size, \"_tags\": _tags, \"relation_tags\": relation_tags, \"category\": category, \"file_date\": file_date, \"_created_at\": _created_at}]"
248254
}
249255
},
250256
"entity_graph": {

static/events/ServiceMeterReadingAdded.sample.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"bucket": "string",
5151
"key": "string"
5252
},
53+
"version_index": 0,
5354
"readable_size": "string",
5455
"_tags": [
5556
"string"

static/events/ServiceMeterReadingAdded.schema.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@
226226
"additionalProperties": false,
227227
"description": "S3 reference for the file content"
228228
},
229+
"version_index": {
230+
"type": "integer",
231+
"minimum": 0,
232+
"description": "Latest version index of the file (versions[].length - 1, or 0 if no versions array)"
233+
},
229234
"readable_size": {
230235
"type": "string",
231236
"description": "Human-readable file size (e.g., \"200 KB\")"
@@ -259,7 +264,8 @@
259264
}
260265
},
261266
"required": [
262-
"entity_id"
267+
"entity_id",
268+
"version_index"
263269
],
264270
"additionalProperties": false
265271
},

0 commit comments

Comments
 (0)