Note Record

urn:showpapers:scratch-record:1JSON Schema 2020-12Download JSON

Runtime additionally enforces updatedAt >= createdAt, row ID uniqueness within each note, resolved attachment references and their exact manifest union, UTF-16 scalar boundaries and link consistency, and the 512 KiB payload limit. ID and title live in the manifest. Both ordered saved rows and a nullable rich-text document are preserved; this is not an encrypted native vault or an Android import format.

Top Level

MemberTypeRules
recordVersion required1
template requiredone of "Domestic", "International", "Custom"
iconId requiredone of "checklist", "domestic", "international", "work", "study", "family", "appointment", "folder", "paper", "passport", "identity", "receipt", "shield"
createdAt requiredtimestamp
updatedAt requiredtimestamp
automaticTitle requiredboolean
items requiredarray of itemmax items 80
document requirednull or document

Definitions

id

string · pattern ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

mark

MemberTypeRules
start requiredintegermin 0; max 32768
end requiredintegermin 1; max 32768
style requiredone of 1, 2
MemberTypeRules
start requiredintegermin 0; max 32768
end requiredintegermin 1; max 32768
paperId requiredid

document

Runtime additionally enforces UTF-16 length and scalar boundaries, start < end <= text length, nonoverlapping link ranges, in-archive Paper resolution, exact manifest Paper references, byte limits and no unknown fields. Bold/italic marks may overlap and are preserved in order. This content profile does not encode saved checklist items or internal vault metadata.

MemberTypeRules
noteVersion required1
text requiredstringmax length 32768; max UTF-16 units 32768; pattern ^[^\u0000-\u0008\u000b-\u001f\u007f-\u009f\ud800-\udfff]*$
marks requiredarray of markmax items 2048
paperIds requiredarray of idmax items 100; unique
paperLinks requiredarray of paperLinkmax items 640

label

string · min length 1; max length 160

timestamp

string · min length 1; max length 19; pattern ^(?:0|[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[0-1][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-6]|9223372036854775807)$(?![\s\S])

item

MemberTypeRules
id requiredid
label requiredlabel
checked requiredboolean
checkable requiredboolean
paperIds requiredarray of idmax items 8; unique