From
bafyreibkl6cvow3kedemrdehgpwqqxcnmcwg3fybn24rmomv3vkuv46exi
indexed 2026-05-18 19:45 UTC
View this version
To
bafyreif4gc5j4rr7tnogvv3wbamizt3qcmqqn52uz7stjhu4ojiss2a36a
indexed 2026-05-19 03:28 UTC
View this version
Compatibility
backward compatible No changes detected.
Changes
11
{22
"$type": "com.atproto.lexicon.schema",33
"defs": {44
"identifier": {55
"description": "External identifier assigned to a document by a source system, authority, archive, or standard. For content hashes use retrieval.sha256; for URLs use retrieval.url.",66
"properties": {77
"type": {88
"description": "Identifier type or namespace.",99
"knownValues": [1010
"dof_id",1111
"dof_publication_id",1212
"unfccc_symbol",1313
"official_file_number",1414
"docket_number",1515
"case_number",1616
"law_number",1717
"isbn",1818
"issn",1919
"doi",2020
"other"2121
],2222
"maxLength": 128,2323
"type": "string"2424
},2525
"url": {2626
"description": "Optional URL where this identifier can be resolved or verified.",2727
"format": "uri",2828
"type": "string"2929
},3030
"value": {3131
"description": "Identifier value.",3232
"maxGraphemes": 256,3333
"maxLength": 1024,3434
"type": "string"3535
}3636
},3737
"required": [3838
"type",3939
"value"4040
],4141
"type": "object"4242
},4343
"main": {4444
"description": "Core document metadata for official and institutional documents. Stores identity, provenance, and public context, but not full text, sections, chunks, AI analysis, or ingestion pipeline state.",4545
"key": "tid",4646
"record": {4747
"properties": {4848
"country": {4949
"description": "Primary country connected to the document, as an ISO 3166-1 alpha-2 code (e.g., 'MX', 'BR', 'US'). Omit for international documents.",5050
"maxLength": 2,5151
"type": "string"5252
},5353
"createdAt": {5454
"description": "When this AT Protocol record was created.",5555
"format": "datetime",5656
"type": "string"5757
},5858
"description": {5959
"description": "Short source-provided description or human-readable abstract. AI summaries should be stored in enrichment records.",6060
"maxGraphemes": 2000,6161
"maxLength": 10000,6262
"type": "string"6363
},6464
"documentType": {6565
"description": "Machine-readable document category. Open set; known values cover common official and institutional documents.",6666
"knownValues": [6767
"official-publication",6868
"official-gazette-issue",6969
"official-gazette-entry",7070
"law",7171
"decree",7272
"agreement",7373
"notice",7474
"regulation",7575
"standard",7676
"report",7777
"audit-report",7878
"budget-document",7979
"contract",8080
"procurement-document",8181
"court-ruling",8282
"legislative-bill",8383
"legislative-opinion",8484
"treaty",8585
"submission",8686
"technical-paper",8787
"environmental-impact-document",8888
"education-policy-document",8989
"dataset-documentation",9090
"meeting-minutes",9191
"resolution",9292
"other"9393
],9494
"maxLength": 128,9595
"type": "string"9696
},9797
"domains": {9898
"description": "Broad public-interest domains covered by the document. Open set; consumers should tolerate unknown values.",9999
"items": {100100
"knownValues": [101101
"government",102102
"politics",103103
"law",104104
"justice",105105
"environment",106106
"climate",107107
"education",108108
"health",109109
"budget",110110
"procurement",111111
"economy",112112
"finance",113113
"labor",114114
"energy",115115
"infrastructure",116116
"security",117117
"science-technology",118118
"society",119119
"human-rights",120120
"other"121121
],122122
"maxGraphemes": 64,123123
"maxLength": 128,124124
"type": "string"125125
},126126
"maxLength": 20,127127
"type": "array"128128
},129129
"effectiveAt": {130130
"description": "When the document's legal or administrative effects begin, if applicable and explicitly known.",131131
"format": "datetime",132132
"type": "string"133133
},134134
"identifiers": {135135
"description": "External identifiers such as DOF IDs, UNFCCC symbols, file numbers, docket numbers, ISBNs, or local archival IDs. For content hashes use retrieval.sha256; for URLs use retrieval.url.",136136
"items": {137137
"ref": "#identifier",138138
"type": "ref"139139
},140140
"maxLength": 50,141141
"type": "array"142142
},143143
"issuedAt": {144144
"description": "When the issuing authority signed, issued, adopted, or approved the document, if different from publication time.",145145
"format": "datetime",146146
"type": "string"147147
},148148
"issuingBodies": {149149
"description": "Organizations, public bodies, institutions, or authorities responsible for issuing, publishing, filing, or adopting the document. Uses the shared tech.transparencia.defs#organization type. Conventional role values include 'publisher', 'issuer', 'author', 'adopter', 'filer', 'regulator', 'court', 'legislature', 'repository'.",150150
"items": {151151
"ref": "tech.transparencia.defs#organization",152152
"type": "ref"153153
},154154
"maxLength": 20,155155
"type": "array"156156
},157157
"jurisdiction": {158158
"description": "Legal or administrative jurisdiction covered by the document (e.g., 'federal', 'state', 'municipal', 'international').",159159
"knownValues": [160160
"local",161161
"municipal",162162
"state",163163
"federal",164164
"national",165165
"regional",166166
"international",167167
"supranational",168168
"unknown"169169
],170170
"maxGraphemes": 64,171171
"maxLength": 256,172172
"type": "string"173173
},174174
"language": {175175
"description": "Primary language of the document content (BCP-47, e.g., 'es-MX', 'en', 'pt-BR').",176176
"format": "language",177177
"type": "string"178178
},179179
"publishedAt": {180180
"description": "When the document was published by the source. Use midnight UTC when only a calendar date is available.",181181
"format": "datetime",182182
"type": "string"183183
},184184
"retrieval": {185185
"description": "Per-document retrieval metadata: canonical URLs, MIME type, checksums, file size, and access status of the specific retrieved representation.",186186
"ref": "#retrieval",187187
"type": "ref"188188
},189189
"source": {190190
"description": "Strong reference to the tech.transparencia.document.source record for the publisher or repository (e.g., DOF, UNFCCC). Identifies which source this document came from.",191191
"ref": "com.atproto.repo.strongRef",192192
"type": "ref"193193
},194194
"subtitle": {195195
"description": "Optional subtitle, section heading, or secondary title.",196196
"maxGraphemes": 1024,197197
"maxLength": 4096,198198
"type": "string"199199
},200200
"title": {201201
"description": "Official or source-provided title of the document.",202202
"maxGraphemes": 1024,203203
"maxLength": 4096,204204
"type": "string"205205
},206206
"topics": {207207
"description": "Free-form topics, tags, or source categories attached to the document.",208208
"items": {209209
"maxGraphemes": 128,210210
"maxLength": 512,211211
"type": "string"212212
},213213
"maxLength": 30,214214
"type": "array"215215
},216216
"updatedAt": {217217
"description": "When this record was last materially updated.",218218
"format": "datetime",219219
"type": "string"220220
}221221
},222222
"required": [223223
"title",224224
"documentType",225225
"source",226226
"retrieval",227227
"publishedAt",228228
"createdAt"229229
],230230
"type": "object"231231
},232232
"type": "record"233233
},234234
"retrieval": {235235
"description": "Per-document retrieval metadata for a single retrieved representation. Publisher-level metadata (name, base URL, license) lives on the tech.transparencia.document.source record referenced by 'source'.",236236
"properties": {237237
"accessType": {238238
"description": "Access status of the source at retrieval time. Use 'previously-public' for documents that were once publicly accessible but have since been withdrawn or removed by the source.",239239
"knownValues": [240240
"public",241241
"restricted",242242
"paywalled",243243
"previously-public",244244
"unknown"245245
],246246
"maxLength": 64,247247
"type": "string"248248
},249249
"blob": {250250
"accept": [251251
"application/pdf",252252
"text/html",253253
"text/plain",254254
"application/json"255255
],256
"description": "Optional binary attachment preserving the actual document bytes on this PDS. Typical contents: the source PDF, an HTML snapshot, the extracted plain text used by the enrichment pipeline, or the original upstream JSON payload (e.g., a SIDOF response). The other retrieval fields (url, pdfUrl, sha256) still reference the original public source — this blob is the archived copy. Max 10 MB.",257
"maxSize": 10000000,256
"description": "Optional binary attachment preserving the actual document bytes on this PDS. Typical contents: the source PDF, an HTML snapshot, the extracted plain text used by the enrichment pipeline, or the original upstream JSON payload (e.g., a SIDOF response). The other retrieval fields (url, pdfUrl, sha256) still reference the original public source — this blob is the archived copy. Max 50 MB.",257
"maxSize": 50000000,258258
"type": "blob"259259
},260260
"canonicalUrl": {261261
"description": "Canonical, normalized, or preferred public URL for the document.",262262
"format": "uri",263263
"type": "string"264264
},265265
"fileName": {266266
"description": "Original or normalized file name, if applicable.",267267
"maxGraphemes": 256,268268
"maxLength": 1024,269269
"type": "string"270270
},271271
"htmlUrl": {272272
"description": "HTML landing page or web version of the document, if available.",273273
"format": "uri",274274
"type": "string"275275
},276276
"license": {277277
"description": "Per-document license override, if the document is licensed differently from the source-level default.",278278
"maxGraphemes": 128,279279
"maxLength": 512,280280
"type": "string"281281
},282282
"mimeType": {283283
"description": "MIME type of the retrieved representation (e.g., 'text/html', 'application/pdf').",284284
"maxLength": 128,285285
"type": "string"286286
},287287
"pdfUrl": {288288
"description": "PDF or downloadable document URL, if available.",289289
"format": "uri",290290
"type": "string"291291
},292292
"retrievedAt": {293293
"description": "When the source was retrieved by the pipeline.",294294
"format": "datetime",295295
"type": "string"296296
},297297
"sha256": {298298
"description": "SHA-256 checksum of the retrieved file or canonical source payload, if available.",299299
"maxLength": 64,300300
"type": "string"301301
},302302
"sizeBytes": {303303
"description": "Size of the retrieved file or canonical representation in bytes.",304304
"minimum": 0,305305
"type": "integer"306306
},307307
"sourceId": {308308
"description": "Source-system identifier for deduplication, if provided by the upstream source.",309309
"maxLength": 512,310310
"type": "string"311311
},312312
"url": {313313
"description": "URL where this document was found or retrieved.",314314
"format": "uri",315315
"type": "string"316316
}317317
},318318
"required": [319319
"url",320320
"retrievedAt"321321
],322322
"type": "object"323323
}324324
},325325
"description": "A canonical public-interest document record. Represents one official publication, report, filing, act, submission, or other source document before structural parsing or AI enrichment.",326326
"id": "tech.transparencia.document.item",327327
"lexicon": 1328328
}