1 This file describes the schemata used for notmuch's structured output
2 format (currently JSON).
4 []'s indicate lists. List items can be marked with a '?', meaning
5 they are optional; or a '*', meaning there can be zero or more of that
6 item. {}'s indicate an object that maps from field identifiers to
7 values. An object field marked '?' is optional. |'s indicate
8 alternates (e.g., int|string means something can be an int or a
14 # Number of seconds since the Epoch
17 # Thread ID, sans "thread:"
20 # Message ID, sans "id:"
26 # A top-level set of threads (do_show)
27 # Returned by notmuch show without a --part argument
28 thread_set = [thread*]
30 # Top-level messages in a thread (show_messages)
31 thread = [thread_node*]
33 # A message and its replies (show_messages)
35 message|null, # null if not matched and not --entire-thread
36 [thread_node*] # children of message
39 # A message (format_part_json)
41 # (format_message_json)
45 timestamp: unix_time, # date header as unix time
46 date_relative: string, # user-friendly timestamp
50 body?: [part] # omitted if --body=false
53 # A MIME part (format_part_json)
55 id: int|string, # part id (currently DFS part number)
57 encstatus?: encstatus,
58 sigstatus?: sigstatus,
62 # if content-type starts with "multipart/":
64 # if content-type is "message/rfc822":
65 content: [{headers: headers, body: [part]}],
66 # otherwise (leaf parts):
68 content-charset?: string,
69 # A leaf part's body content is optional, but may be included if
70 # it can be correctly encoded as a string. Consumers should use
71 # this in preference to fetching the part content separately.
75 # The headers of a message or part (format_headers_json with reply = FALSE)
85 # Encryption status (format_part_json)
86 encstatus = [{status: "good"|"bad"}]
88 # Signature status (format_part_sigstatus_json)
89 sigstatus = [signature*]
92 # (signature_status_to_string)
93 status: "none"|"good"|"bad"|"error"|"unknown",
94 # if status is "good":
99 # if status is not "good":
101 # if the signature has errors:
105 notmuch search schema
106 ---------------------
112 threads = [threadid*]
115 messages = [messageid*]
125 timestamp: unix_time,
126 date_relative: string, # user-friendly timestamp
127 matched: int, # number of matched messages
128 total: int, # total messages in thread
129 authors: string, # comma-separated names with | between
130 # matched and unmatched
139 # The headers of the constructed reply
140 reply-headers: reply_headers,
142 # As in the show format (format_part_json)
146 # Reply headers (format_headers_json with reply = TRUE)