{
"id": "xyz.pardisio.time.filter",
"defs": {
"or": {
"type": "object",
"required": [
"filters"
],
"properties": {
"filters": {
"type": "array",
"items": {
"refs": [
"#and",
"#or",
"#not",
"#tagsInclude",
"#startTimeBefore",
"#startTimeAfter",
"#endTimeBefore",
"#endTimeAfter"
],
"type": "union",
"closed": true
}
}
},
"description": "Matches when at least one child predicate matches. An empty list matches no entry."
},
"and": {
"type": "object",
"required": [
"filters"
],
"properties": {
"filters": {
"type": "array",
"items": {
"refs": [
"#and",
"#or",
"#not",
"#tagsInclude",
"#startTimeBefore",
"#startTimeAfter",
"#endTimeBefore",
"#endTimeAfter"
],
"type": "union",
"closed": true
}
}
},
"description": "Matches when every child predicate matches. An empty list matches every entry."
},
"not": {
"type": "object",
"required": [
"filter"
],
"properties": {
"filter": {
"refs": [
"#and",
"#or",
"#not",
"#tagsInclude",
"#startTimeBefore",
"#startTimeAfter",
"#endTimeBefore",
"#endTimeAfter"
],
"type": "union",
"closed": true
}
},
"description": "Matches when the nested predicate does not match."
},
"main": {
"key": "tid",
"type": "record",
"record": {
"type": "object",
"required": [
"name",
"predicate",
"createdAt"
],
"properties": {
"name": {
"type": "string",
"maxLength": 2000,
"description": "Display name of the filter.",
"maxGraphemes": 200
},
"color": {
"type": "string",
"maxLength": 32,
"description": "Optional display color, e.g. a hex string like \"#4b3bff\"."
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"predicate": {
"refs": [
"#and",
"#or",
"#not",
"#tagsInclude",
"#startTimeBefore",
"#startTimeAfter",
"#endTimeBefore",
"#endTimeAfter"
],
"type": "union",
"closed": true,
"description": "Root boolean expression an entry must satisfy to match this filter."
}
}
},
"description": "A named, saved filter over time entries. Its predicate is a nestable boolean expression an entry must satisfy to match. A filter may carry a color, which is where the app's per-filter colors come from."
},
"tagsInclude": {
"type": "object",
"required": [
"tags"
],
"properties": {
"tags": {
"type": "array",
"items": {
"type": "string",
"maxLength": 640,
"maxGraphemes": 64
},
"minLength": 1
}
},
"description": "Matches when the entry's tags include every tag in this list."
},
"endTimeAfter": {
"type": "object",
"required": [
"time"
],
"properties": {
"time": {
"type": "string",
"format": "datetime"
}
},
"description": "Matches when the entry has an endTime strictly after the given time. Running entries (no endTime) never match."
},
"endTimeBefore": {
"type": "object",
"required": [
"time"
],
"properties": {
"time": {
"type": "string",
"format": "datetime"
}
},
"description": "Matches when the entry has an endTime strictly before the given time. Running entries (no endTime) never match."
},
"startTimeAfter": {
"type": "object",
"required": [
"time"
],
"properties": {
"time": {
"type": "string",
"format": "datetime"
}
},
"description": "Matches when the entry's startTime is strictly after the given time."
},
"startTimeBefore": {
"type": "object",
"required": [
"time"
],
"properties": {
"time": {
"type": "string",
"format": "datetime"
}
},
"description": "Matches when the entry's startTime is strictly before the given time."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}