Collection Manifest

urn:showpapers:format:manifest:4JSON Schema 2020-12Download JSON

Collection carries everything a person authored, reviewed or organized in the apps: originals, paper records (type, details with origin, evidence, confidence and review, removed suggestions, people, built-in folder, reminder), readings, notes, personal folders with rules, people, relationships with decisions, pins and category icons, plus the external agents that proposed values. Optional sections may be omitted; an omitted array is empty and an omitted object is not described. The runtime also checks canonical paths, global ID uniqueness, reference resolution, digests, byte and capacity limits and the rules stated in each $comment.

Top Level

MemberTypeRules
format required"showpapers"
formatVersion required4
protection required"readable"
generator requiredgenerator
collection requiredcollection
agentsarray of agentmax items 32
originals requiredarray of originalmax items 100
papersarray of paperEntrymax items 100
readingsarray of readingEntrymax items 100
notesarray of notemax items 100
foldersarray of foldermax items 64
peoplearray of personmax items 64
relationshipsarray of relationshipmax items 5000
librarylibrary

Definitions

id

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

sha256

string · pattern ^[a-f0-9]{64}$

collectionTitle

string · min length 1; max length 200; pattern ^(?![ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])(?![\s\S]*[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]$)[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]+$

paperTitle

Unicode scalars. The apps' native title rule: trimmed, no control characters, no '/' or '\\'.

string · min length 1; max length 100; pattern ^(?![ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])(?![\s\S]*[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]$)[^\u0000-\u001f\u007f-\u009f\ud800-\udfff/\\]+$

noteTitle

Collection: edge whitespace kept, at least one non-whitespace scalar.

string · min length 1; max length 160; pattern ^[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]*[^\s\u0000-\u001f\u007f-\u009f\ud800-\udfff][^\u0000-\u001f\u007f-\u009f\ud800-\udfff]*$

generator

The program that wrote this file, not a signature. Apps write {"name":"ShowPapers","platform":"android"|"ios","version":<app version>}.

MemberTypeRules
name requiredstringmin length 1; max length 80; pattern ^(?![ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])(?![\s\S]*[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]$)[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]+$
platform requiredstringmin length 1; max length 40; pattern ^(?![ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])(?![\s\S]*[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]$)[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]+$
version requiredstringmin length 1; max length 40; pattern ^(?![ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])(?![\s\S]*[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]$)[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]+$

collection

MemberTypeRules
id requiredid
revision requiredintegermin 1; max 9007199254740991
title requiredcollectionTitle
parentobjectclosed
The exact archive this revision was edited from. Optional; parent.revision is lower than revision.

agent

An external AI agent that proposed values in this file. Agent-origin values reference it by id and stay pending until the person reviews them.

MemberTypeRules
id requiredid
name requiredstringmin length 1; max length 80; pattern ^(?![ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])(?![\s\S]*[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]$)[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]+$
platform requiredstringmin length 0; max length 40; pattern ^[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]*$
version requiredstringmin length 0; max length 40; pattern ^[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]*$

original

MemberTypeRules
id requiredid
title requiredpaperTitle
path requiredstringpattern ^originals/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.(pdf|png|jpg|webp)$
size requiredintegermin 1; max 20971520
sha256 requiredsha256
mediaType requiredone of "application/pdf", "image/png", "image/jpeg", "image/webp"

paperEntry

papers/<id>.json holds urn:showpapers:paper-record:1 for the original with the same id.

MemberTypeRules
id requiredid
path requiredstringpattern ^papers/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.json$
size requiredintegermin 1; max 1048576
sha256 requiredsha256

readingEntry

readings/<id>.json holds urn:showpapers:reading:1 for the original with the same id.

MemberTypeRules
id requiredid
path requiredstringpattern ^readings/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.json$
size requiredintegermin 1; max 8388608
sha256 requiredsha256

note

Payload is the Collection note record (urn:showpapers:scratch-record:1); paperIds is its first-occurrence reference union.

MemberTypeRules
id requiredid
title requirednoteTitle
path requiredstringpattern ^notes/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.json$
size requiredintegermin 1; max 524288
sha256 requiredsha256
encoding required"utf-8"
paperIds requiredarray of idmax items 100; unique

rule

Automatic filing. autoAdd needs at least one document type. Clause fields are distinct; only the six date fields accept operators other than equals, and their values are ISO dates.

MemberTypeRules
documentTypes requiredarray of one of "evidence.identity.foreign-passport", "state.issued.us-passport", "state.issued.visa-foil", "cbp.record.i-94", "ice.sevp.issued.i-20", "uscis.issued.i-551", "uscis.issued.i-766", "uscis.notice.i-797", "uscis.notice.i-797a", "uscis.notice.i-797b", "uscis.notice.i-797c"max items 11; unique
autoAdd requiredboolean
excludedPaperIds requiredarray of idmax items 100; unique
condition requirednull or object or object

folder

A personal folder. Array order is the folder order. Folders hold papers only. Names are unique ignoring case and are limited in UTF-16 units, like the apps.

MemberTypeRules
id requiredid
name requiredstringmin length 1; max length 80; max UTF-16 units 80; pattern ^(?![ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])(?![\s\S]*[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]$)[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]+$
color requiredone of "blue", "teal", "green", "amber", "coral", "purple", "gray"
icon requirednull or one of "folder", "paper", "passport", "identity", "travel", "study", "work", "receipt", "shield", "people", "home", "checklist", "appointment"
purpose requiredstringmin length 0; max length 240; max UTF-16 units 240; pattern ^(?![ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])(?![\s\S]*[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]$)[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]*$
rule requirednull or rule
paperIds requiredarray of idmax items 100; unique

person

Names are unique ignoring case; at most one person is the owner (isMe).

MemberTypeRules
id requiredid
name requiredstringmin length 1; max length 80; pattern ^(?![ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])(?![\s\S]*[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]$)[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]+$
isMe requiredboolean

relationship

Undirected pair (paperIds sorted ascending) with an optional referring paper for direction. id is derived: UUID.nameUUIDFromBytes(UTF-8 of 'showpapers:relationship:1:' + paperIds[0] + ':' + paperIds[1] + ':' + type). accept implies confirmed; reject implies rejected; agent origin needs agentId.

MemberTypeRules
id requiredid
type requiredone of "same-case", "different-stage", "same-person", "same-record", "same-organization", "supporting-document", "renewal", "amendment", "subsequent-filing", "duplicate", "alternate-version"
paperIds requiredarray of idmin items 2; max items 2; unique
referringPaperId requirednull or id
status requiredone of "suggested", "confirmed", "rejected"
origin requiredone of "reading", "person", "agent"
agentId requirednull or id
reasons requiredarray of stringmax items 16
decision requirednull or object

categoryIcon

Icon chosen for a category group. label is the custom type for purpose custom, otherwise null.

MemberTypeRules
purpose requiredone of "identity", "admission", "approvals-and-receipts", "study", "work-permission", "personal-records", "tax", "insurance", "custom", "unknown"
label requirednull or label
icon requiredone of "folder", "paper", "passport", "identity", "travel", "study", "work", "receipt", "shield", "people", "home", "checklist", "appointment"

library

MemberTypeRules
pinnedPaperIds requiredarray of idmax items 100; unique
categoryIcons requiredarray of categoryIconmax items 64

label

string · min length 1; max length 80; pattern ^(?![ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])(?![\s\S]*[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]$)[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]+$

icon

one of "folder", "paper", "passport", "identity", "travel", "study", "work", "receipt", "shield", "people", "home", "checklist", "appointment"