@hypercerts-org/lexicon 0.9.0-beta.0 → 0.10.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +249 -180
  2. package/README.md.orig +267 -0
  3. package/lexicons/app/certified/badge/award.json +36 -0
  4. package/lexicons/app/certified/badge/definition.json +53 -0
  5. package/lexicons/app/certified/badge/response.json +36 -0
  6. package/lexicons/app/certified/defs.json +4 -16
  7. package/lexicons/app/certified/location.json +5 -8
  8. package/lexicons/com/atproto/repo/strongRef.json +1 -1
  9. package/lexicons/org/hypercerts/claim/activity.json +135 -0
  10. package/lexicons/org/hypercerts/claim/collection.json +54 -0
  11. package/lexicons/org/hypercerts/claim/contribution.json +4 -11
  12. package/lexicons/org/hypercerts/claim/evaluation.json +50 -9
  13. package/lexicons/org/hypercerts/claim/evidence.json +29 -16
  14. package/lexicons/org/hypercerts/claim/measurement.json +18 -8
  15. package/lexicons/org/hypercerts/claim/project.json +64 -0
  16. package/lexicons/org/hypercerts/claim/rights.json +16 -3
  17. package/lexicons/org/hypercerts/defs.json +71 -0
  18. package/lexicons/org/hypercerts/funding/receipt.json +66 -0
  19. package/package.json +31 -38
  20. package/types/index.ts +1257 -0
  21. package/types/lexicons.ts +1071 -0
  22. package/types/types/app/certified/badge/award.ts +48 -0
  23. package/types/types/app/certified/badge/definition.ts +49 -0
  24. package/types/types/app/certified/badge/response.ts +44 -0
  25. package/types/types/app/certified/defs.ts +14 -0
  26. package/types/types/app/certified/location.ts +49 -0
  27. package/types/types/com/atproto/repo/strongRef.ts +31 -0
  28. package/types/types/org/hypercerts/claim/activity.ts +99 -0
  29. package/types/types/org/hypercerts/claim/collection.ts +49 -0
  30. package/types/types/org/hypercerts/claim/contribution.ts +48 -0
  31. package/types/types/org/hypercerts/claim/evaluation.ts +77 -0
  32. package/types/types/org/hypercerts/claim/evidence.ts +53 -0
  33. package/types/types/org/hypercerts/claim/measurement.ts +54 -0
  34. package/types/types/org/hypercerts/claim/project.ts +53 -0
  35. package/types/types/org/hypercerts/claim/rights.ts +49 -0
  36. package/types/types/org/hypercerts/defs.ts +96 -0
  37. package/types/types/org/hypercerts/funding/receipt.ts +58 -0
  38. package/types/util.ts +82 -0
  39. package/dist/index.cjs +0 -1472
  40. package/dist/index.cjs.map +0 -1
  41. package/dist/index.d.ts +0 -2094
  42. package/dist/index.mjs +0 -1441
  43. package/dist/index.mjs.map +0 -1
  44. package/lexicons/org/hypercerts/claim.json +0 -95
  45. package/lexicons/org/hypercerts/collection.json +0 -62
package/dist/index.mjs DELETED
@@ -1,1441 +0,0 @@
1
- import { Lexicons, ValidationError } from '@atproto/lexicon';
2
-
3
- var lexicon$9 = 1;
4
- var id$i = "app.certified.defs";
5
- var defs$a = {
6
- uri: {
7
- type: "string",
8
- format: "uri",
9
- maxGraphemes: 1000,
10
- description: "URI to external data"
11
- },
12
- smallBlob: {
13
- type: "blob",
14
- accept: [
15
- "*/*"
16
- ],
17
- maxSize: 10485760,
18
- description: "Blob to external data (up to 10MB)"
19
- },
20
- largeBlob: {
21
- type: "blob",
22
- accept: [
23
- "*/*"
24
- ],
25
- maxSize: 104857600,
26
- description: "Blob to external data (up to 100MB)"
27
- }
28
- };
29
- var defsLexicon = {
30
- lexicon: lexicon$9,
31
- id: id$i,
32
- defs: defs$a
33
- };
34
-
35
- var lexicon$8 = 1;
36
- var id$h = "app.certified.location";
37
- var defs$9 = {
38
- main: {
39
- type: "record",
40
- description: "A location reference",
41
- key: "any",
42
- record: {
43
- type: "object",
44
- required: [
45
- "lpVersion",
46
- "srs",
47
- "locationType",
48
- "location",
49
- "createdAt"
50
- ],
51
- properties: {
52
- lpVersion: {
53
- type: "string",
54
- description: "The version of the Location Protocol",
55
- maxLength: 10
56
- },
57
- srs: {
58
- type: "string",
59
- format: "uri",
60
- description: "The Spatial Reference System URI (e.g., http://www.opengis.net/def/crs/OGC/1.3/CRS84) that defines the coordinate system.",
61
- maxLength: 100
62
- },
63
- locationType: {
64
- type: "string",
65
- description: "An identifier for the format of the location data (e.g., coordinate-decimal, geojson-point)",
66
- knownValues: [
67
- "coordinate-decimal",
68
- "geojson-point"
69
- ],
70
- maxLength: 20
71
- },
72
- location: {
73
- type: "union",
74
- refs: [
75
- "app.certified.defs#uri",
76
- "app.certified.defs#smallBlob"
77
- ],
78
- description: "The location of where the work was performed as a URI or blob."
79
- },
80
- name: {
81
- type: "string",
82
- description: "Optional name for this location",
83
- maxLength: 1000,
84
- maxGraphemes: 100
85
- },
86
- description: {
87
- type: "string",
88
- description: "Optional description for this location",
89
- maxLength: 2000,
90
- maxGraphemes: 500
91
- },
92
- createdAt: {
93
- type: "string",
94
- format: "datetime",
95
- description: "Client-declared timestamp when this record was originally created"
96
- }
97
- }
98
- }
99
- }
100
- };
101
- var locationLexicon = {
102
- lexicon: lexicon$8,
103
- id: id$h,
104
- defs: defs$9
105
- };
106
-
107
- var lexicon$7 = 1;
108
- var id$g = "org.hypercerts.claim";
109
- var defs$8 = {
110
- main: {
111
- type: "record",
112
- description: "A hypercert record tracking impact work.",
113
- key: "any",
114
- record: {
115
- type: "object",
116
- required: [
117
- "title",
118
- "shortDescription",
119
- "createdAt",
120
- "workScope",
121
- "workTimeFrameFrom",
122
- "workTimeFrameTo"
123
- ],
124
- properties: {
125
- title: {
126
- type: "string",
127
- description: "Title of the hypercert",
128
- maxLength: 256
129
- },
130
- shortDescription: {
131
- type: "string",
132
- description: "Short blurb of the impact work done.",
133
- maxLength: 3000,
134
- maxGraphemes: 300
135
- },
136
- description: {
137
- type: "string",
138
- description: "Optional longer description of the impact work done.",
139
- maxLength: 30000,
140
- maxGraphemes: 3000
141
- },
142
- image: {
143
- type: "union",
144
- refs: [
145
- "app.certified.defs#uri",
146
- "app.certified.defs#smallBlob"
147
- ],
148
- description: "The hypercert visual representation as a URI or blob"
149
- },
150
- workScope: {
151
- type: "string",
152
- description: "Scope of the work performed",
153
- maxLength: 5000,
154
- maxGraphemes: 1000
155
- },
156
- workTimeFrameFrom: {
157
- type: "string",
158
- format: "datetime",
159
- description: "When the work began"
160
- },
161
- workTimeFrameTo: {
162
- type: "string",
163
- format: "datetime",
164
- description: "When the work ended"
165
- },
166
- evidence: {
167
- type: "array",
168
- description: "Supporting evidence, documentation, or external data URIs",
169
- items: {
170
- type: "ref",
171
- ref: "com.atproto.repo.strongRef",
172
- description: "A strong reference to the evidence that supports this impact claim. The record referenced must conform with the org.hypercerts.claim.evidence lexicon"
173
- },
174
- maxLength: 100
175
- },
176
- contributions: {
177
- type: "array",
178
- description: "A strong reference to the contributions done to create the impact in the hypercerts. The record referenced must conform with the lexicon org.hypercerts.claim.contributions",
179
- items: {
180
- type: "ref",
181
- ref: "com.atproto.repo.strongRef"
182
- }
183
- },
184
- rights: {
185
- type: "ref",
186
- ref: "com.atproto.repo.strongRef",
187
- description: "A strong reference to the rights that this hypercert has. The record referenced must conform with the lexicon org.hypercerts.claim.rights"
188
- },
189
- location: {
190
- type: "ref",
191
- ref: "com.atproto.repo.strongRef",
192
- description: "A strong reference to the location where the work for done hypercert was located. The record referenced must conform with the lexicon org.hypercerts.claim.location"
193
- },
194
- createdAt: {
195
- type: "string",
196
- format: "datetime",
197
- description: "Client-declared timestamp when this record was originally created"
198
- }
199
- }
200
- }
201
- }
202
- };
203
- var claimLexicon = {
204
- lexicon: lexicon$7,
205
- id: id$g,
206
- defs: defs$8
207
- };
208
-
209
- var lexicon$6 = 1;
210
- var id$f = "org.hypercerts.claim.contribution";
211
- var defs$7 = {
212
- main: {
213
- type: "record",
214
- description: "A contribution made toward a hypercert's impact.",
215
- key: "any",
216
- record: {
217
- type: "object",
218
- required: [
219
- "hypercert",
220
- "contributors",
221
- "createdAt"
222
- ],
223
- properties: {
224
- hypercert: {
225
- type: "ref",
226
- ref: "com.atproto.repo.strongRef",
227
- description: "A strong reference to the hypercert this contribution is for. The record referenced must conform with the lexicon org.hypercerts.claim."
228
- },
229
- role: {
230
- type: "string",
231
- description: "Role or title of the contributor(s).",
232
- maxLength: 100
233
- },
234
- contributors: {
235
- type: "array",
236
- description: "List of the contributors (names, pseudonyms, or DIDs). If multiple contributors are stored in the same hypercertContribution, then they would have the exact same role.",
237
- items: {
238
- type: "string"
239
- }
240
- },
241
- description: {
242
- type: "string",
243
- description: "What the contribution concretely achieved",
244
- maxLength: 2000,
245
- maxGraphemes: 500
246
- },
247
- workTimeframeFrom: {
248
- type: "string",
249
- format: "datetime",
250
- description: "When this contribution started. This should be a subset of the hypercert timeframe."
251
- },
252
- workTimeframeTo: {
253
- type: "string",
254
- format: "datetime",
255
- description: "When this contribution finished. This should be a subset of the hypercert timeframe."
256
- },
257
- createdAt: {
258
- type: "string",
259
- format: "datetime",
260
- description: "Client-declared timestamp when this record was originally created"
261
- }
262
- }
263
- }
264
- }
265
- };
266
- var contributionLexicon = {
267
- lexicon: lexicon$6,
268
- id: id$f,
269
- defs: defs$7
270
- };
271
-
272
- var lexicon$5 = 1;
273
- var id$e = "org.hypercerts.claim.evaluation";
274
- var defs$6 = {
275
- main: {
276
- type: "record",
277
- description: "An evaluation of a hypercert or other claim",
278
- key: "tid",
279
- record: {
280
- type: "object",
281
- required: [
282
- "subject",
283
- "evaluators",
284
- "summary",
285
- "createdAt"
286
- ],
287
- properties: {
288
- subject: {
289
- type: "ref",
290
- ref: "com.atproto.repo.strongRef",
291
- description: "A strong reference to the evaluated claim. (e.g measurement, hypercert, contribution, etc)"
292
- },
293
- evaluators: {
294
- type: "array",
295
- description: "DIDs of the evaluators",
296
- items: {
297
- type: "string",
298
- format: "did"
299
- },
300
- maxLength: 100
301
- },
302
- evaluations: {
303
- type: "array",
304
- description: "Evaluation data (URIs or blobs) containing detailed reports or methodology",
305
- items: {
306
- type: "union",
307
- refs: [
308
- "app.certified.defs#uri",
309
- "app.certified.defs#smallBlob"
310
- ]
311
- },
312
- maxLength: 100
313
- },
314
- summary: {
315
- type: "string",
316
- description: "Brief evaluation summary",
317
- maxLength: 5000,
318
- maxGraphemes: 1000
319
- },
320
- createdAt: {
321
- type: "string",
322
- format: "datetime",
323
- description: "Client-declared timestamp when this record was originally created"
324
- }
325
- }
326
- }
327
- }
328
- };
329
- var evaluationLexicon = {
330
- lexicon: lexicon$5,
331
- id: id$e,
332
- defs: defs$6
333
- };
334
-
335
- var lexicon$4 = 1;
336
- var id$d = "org.hypercerts.claim.evidence";
337
- var defs$5 = {
338
- main: {
339
- type: "record",
340
- description: "A piece of evidence supporting a hypercert claim",
341
- key: "any",
342
- record: {
343
- type: "object",
344
- required: [
345
- "content",
346
- "shortDescription",
347
- "createdAt"
348
- ],
349
- properties: {
350
- content: {
351
- type: "union",
352
- refs: [
353
- "app.certified.defs#uri",
354
- "app.certified.defs#smallBlob"
355
- ],
356
- description: "A piece of evidence (URI or blobs) supporting a hypercert claim"
357
- },
358
- title: {
359
- type: "string",
360
- maxLength: 256,
361
- description: "Optional title to describe the nature of the evidence"
362
- },
363
- shortDescription: {
364
- type: "string",
365
- maxLength: 3000,
366
- maxGraphemes: 300,
367
- description: "Short description explaining what this evidence demonstrates or proves"
368
- },
369
- description: {
370
- type: "string",
371
- description: "Optional longer description describing the impact claim evidence.",
372
- maxLength: 30000,
373
- maxGraphemes: 3000
374
- },
375
- createdAt: {
376
- type: "string",
377
- format: "datetime",
378
- description: "Client-declared timestamp when this hypercert claim was originally created"
379
- }
380
- }
381
- }
382
- }
383
- };
384
- var evidenceLexicon = {
385
- lexicon: lexicon$4,
386
- id: id$d,
387
- defs: defs$5
388
- };
389
-
390
- var lexicon$3 = 1;
391
- var id$c = "org.hypercerts.claim.measurement";
392
- var defs$4 = {
393
- main: {
394
- type: "record",
395
- description: "External measurement data supporting a hypercert claim",
396
- key: "tid",
397
- record: {
398
- type: "object",
399
- required: [
400
- "hypercert",
401
- "measurers",
402
- "metric",
403
- "value",
404
- "createdAt"
405
- ],
406
- properties: {
407
- hypercert: {
408
- type: "ref",
409
- ref: "com.atproto.repo.strongRef",
410
- description: "A strong reference to the hypercert that this measurement is for. The record referenced must conform with the lexicon org.hypercerts.claim."
411
- },
412
- measurers: {
413
- type: "array",
414
- description: "DIDs of the entity (or entities) that measured this data",
415
- items: {
416
- type: "string",
417
- format: "did"
418
- },
419
- maxLength: 100
420
- },
421
- metric: {
422
- type: "string",
423
- description: "The metric being measured",
424
- maxLength: 500
425
- },
426
- value: {
427
- type: "string",
428
- description: "The measured value",
429
- maxLength: 500
430
- },
431
- measurementMethodURI: {
432
- type: "string",
433
- format: "uri",
434
- description: "URI to methodology documentation, standard protocol, or measurement procedure"
435
- },
436
- evidenceURI: {
437
- type: "array",
438
- description: "URIs to supporting evidence or data",
439
- items: {
440
- type: "string",
441
- format: "uri"
442
- },
443
- maxLength: 50
444
- },
445
- createdAt: {
446
- type: "string",
447
- format: "datetime",
448
- description: "Client-declared timestamp when this record was originally created"
449
- }
450
- }
451
- }
452
- }
453
- };
454
- var measurementLexicon = {
455
- lexicon: lexicon$3,
456
- id: id$c,
457
- defs: defs$4
458
- };
459
-
460
- var lexicon$2 = 1;
461
- var id$b = "org.hypercerts.claim.rights";
462
- var defs$3 = {
463
- main: {
464
- type: "record",
465
- description: "Describes the rights that a user has with a hypercert, such as whether it can be sold, transferred, and under what conditions.",
466
- key: "any",
467
- record: {
468
- type: "object",
469
- required: [
470
- "rightsName",
471
- "rightsType",
472
- "rightsDescription",
473
- "createdAt"
474
- ],
475
- properties: {
476
- rightsName: {
477
- type: "string",
478
- description: "Full name of the rights",
479
- maxLength: 100
480
- },
481
- rightsType: {
482
- type: "string",
483
- description: "Short rights identifier for easier search",
484
- maxLength: 10
485
- },
486
- rightsDescription: {
487
- type: "string",
488
- description: "Description of the rights of this hypercert"
489
- },
490
- createdAt: {
491
- type: "string",
492
- format: "datetime",
493
- description: "Client-declared timestamp when this record was originally created"
494
- }
495
- }
496
- }
497
- }
498
- };
499
- var rightsLexicon = {
500
- lexicon: lexicon$2,
501
- id: id$b,
502
- defs: defs$3
503
- };
504
-
505
- var lexicon$1 = 1;
506
- var id$a = "com.atproto.repo.strongRef";
507
- var description = "A URI with a content-hash fingerprint.";
508
- var defs$2 = {
509
- main: {
510
- type: "object",
511
- required: [
512
- "uri",
513
- "cid"
514
- ],
515
- properties: {
516
- uri: {
517
- type: "string",
518
- format: "at-uri"
519
- },
520
- cid: {
521
- type: "string",
522
- format: "cid"
523
- }
524
- }
525
- }
526
- };
527
- var strongRef$1 = {
528
- lexicon: lexicon$1,
529
- id: id$a,
530
- description: description,
531
- defs: defs$2
532
- };
533
-
534
- var lexicon = 1;
535
- var id$9 = "org.hypercerts.collection";
536
- var defs$1 = {
537
- main: {
538
- type: "record",
539
- description: "A collection/group of hypercerts that have a specific property.",
540
- key: "tid",
541
- record: {
542
- type: "object",
543
- required: [
544
- "title",
545
- "claims",
546
- "createdAt"
547
- ],
548
- properties: {
549
- title: {
550
- type: "string",
551
- description: "The title of this collection",
552
- maxLength: 800,
553
- maxGraphemes: 80
554
- },
555
- shortDescription: {
556
- type: "string",
557
- maxLength: 3000,
558
- maxGraphemes: 300,
559
- description: "A short description of this collection"
560
- },
561
- coverPhoto: {
562
- type: "union",
563
- refs: [
564
- "app.certified.defs#uri",
565
- "app.certified.defs#smallBlob"
566
- ],
567
- description: "The cover photo of this collection (either in URI format or in a blob)."
568
- },
569
- claims: {
570
- type: "array",
571
- description: "Array of claims with their associated weights in this collection",
572
- items: {
573
- type: "ref",
574
- ref: "#claimItem"
575
- }
576
- },
577
- createdAt: {
578
- type: "string",
579
- format: "datetime",
580
- description: "Client-declared timestamp when this record was originally created"
581
- }
582
- }
583
- }
584
- },
585
- claimItem: {
586
- type: "object",
587
- required: [
588
- "claim",
589
- "weight"
590
- ],
591
- properties: {
592
- claim: {
593
- type: "ref",
594
- ref: "com.atproto.repo.strongRef",
595
- description: "A strong reference to a hypercert claim record. This claim must conform to the lexicon org.hypercerts.claim.record"
596
- },
597
- weight: {
598
- type: "string",
599
- description: "The weight/importance of this hypercert claim in the collection (a percentage from 0-100, stored as a string to avoid float precision issues). The total claim weights should add up to 100."
600
- }
601
- }
602
- }
603
- };
604
- var collectionLexicon = {
605
- lexicon: lexicon,
606
- id: id$9,
607
- defs: defs$1
608
- };
609
-
610
- /**
611
- * GENERATED CODE - DO NOT MODIFY
612
- */
613
- function isObject(v) {
614
- return v != null && typeof v === 'object';
615
- }
616
- function is$type($type, id, hash) {
617
- return hash === 'main'
618
- ? $type === id
619
- : // $type === `${id}#${hash}`
620
- typeof $type === 'string' &&
621
- $type.length === id.length + 1 + hash.length &&
622
- $type.charCodeAt(id.length) === 35 /* '#' */ &&
623
- $type.startsWith(id) &&
624
- $type.endsWith(hash);
625
- }
626
- function is$typed$9(v, id, hash) {
627
- return isObject(v) && '$type' in v && is$type(v.$type, id, hash);
628
- }
629
- function maybe$typed(v, id, hash) {
630
- return (isObject(v) &&
631
- ('$type' in v ? v.$type === undefined || is$type(v.$type, id, hash) : true));
632
- }
633
- /**
634
- * Utility function that allows to convert a "validate*" utility function into a
635
- * type predicate.
636
- */
637
- function asPredicate(validate) {
638
- return function (v) {
639
- return validate(v).success;
640
- };
641
- }
642
-
643
- /**
644
- * GENERATED CODE - DO NOT MODIFY
645
- */
646
- const schemaDict = {
647
- AppCertifiedDefs: {
648
- lexicon: 1,
649
- id: 'app.certified.defs',
650
- defs: {
651
- uri: {
652
- type: 'string',
653
- format: 'uri',
654
- maxGraphemes: 1000,
655
- description: 'URI to external data',
656
- },
657
- smallBlob: {
658
- type: 'blob',
659
- accept: ['*/*'],
660
- maxSize: 10485760,
661
- description: 'Blob to external data (up to 10MB)',
662
- },
663
- largeBlob: {
664
- type: 'blob',
665
- accept: ['*/*'],
666
- maxSize: 104857600,
667
- description: 'Blob to external data (up to 100MB)',
668
- },
669
- },
670
- },
671
- AppCertifiedLocation: {
672
- lexicon: 1,
673
- id: 'app.certified.location',
674
- defs: {
675
- main: {
676
- type: 'record',
677
- description: 'A location reference',
678
- key: 'any',
679
- record: {
680
- type: 'object',
681
- required: [
682
- 'lpVersion',
683
- 'srs',
684
- 'locationType',
685
- 'location',
686
- 'createdAt',
687
- ],
688
- properties: {
689
- lpVersion: {
690
- type: 'string',
691
- description: 'The version of the Location Protocol',
692
- maxLength: 10,
693
- },
694
- srs: {
695
- type: 'string',
696
- format: 'uri',
697
- description: 'The Spatial Reference System URI (e.g., http://www.opengis.net/def/crs/OGC/1.3/CRS84) that defines the coordinate system.',
698
- maxLength: 100,
699
- },
700
- locationType: {
701
- type: 'string',
702
- description: 'An identifier for the format of the location data (e.g., coordinate-decimal, geojson-point)',
703
- knownValues: ['coordinate-decimal', 'geojson-point'],
704
- maxLength: 20,
705
- },
706
- location: {
707
- type: 'union',
708
- refs: [
709
- 'lex:app.certified.defs#uri',
710
- 'lex:app.certified.defs#smallBlob',
711
- ],
712
- description: 'The location of where the work was performed as a URI or blob.',
713
- },
714
- name: {
715
- type: 'string',
716
- description: 'Optional name for this location',
717
- maxLength: 1000,
718
- maxGraphemes: 100,
719
- },
720
- description: {
721
- type: 'string',
722
- description: 'Optional description for this location',
723
- maxLength: 2000,
724
- maxGraphemes: 500,
725
- },
726
- createdAt: {
727
- type: 'string',
728
- format: 'datetime',
729
- description: 'Client-declared timestamp when this record was originally created',
730
- },
731
- },
732
- },
733
- },
734
- },
735
- },
736
- ComAtprotoRepoStrongRef: {
737
- lexicon: 1,
738
- id: 'com.atproto.repo.strongRef',
739
- description: 'A URI with a content-hash fingerprint.',
740
- defs: {
741
- main: {
742
- type: 'object',
743
- required: ['uri', 'cid'],
744
- properties: {
745
- uri: {
746
- type: 'string',
747
- format: 'at-uri',
748
- },
749
- cid: {
750
- type: 'string',
751
- format: 'cid',
752
- },
753
- },
754
- },
755
- },
756
- },
757
- OrgHypercertsClaim: {
758
- lexicon: 1,
759
- id: 'org.hypercerts.claim',
760
- defs: {
761
- main: {
762
- type: 'record',
763
- description: 'A hypercert record tracking impact work.',
764
- key: 'any',
765
- record: {
766
- type: 'object',
767
- required: [
768
- 'title',
769
- 'shortDescription',
770
- 'createdAt',
771
- 'workScope',
772
- 'workTimeFrameFrom',
773
- 'workTimeFrameTo',
774
- ],
775
- properties: {
776
- title: {
777
- type: 'string',
778
- description: 'Title of the hypercert',
779
- maxLength: 256,
780
- },
781
- shortDescription: {
782
- type: 'string',
783
- description: 'Short blurb of the impact work done.',
784
- maxLength: 3000,
785
- maxGraphemes: 300,
786
- },
787
- description: {
788
- type: 'string',
789
- description: 'Optional longer description of the impact work done.',
790
- maxLength: 30000,
791
- maxGraphemes: 3000,
792
- },
793
- image: {
794
- type: 'union',
795
- refs: [
796
- 'lex:app.certified.defs#uri',
797
- 'lex:app.certified.defs#smallBlob',
798
- ],
799
- description: 'The hypercert visual representation as a URI or blob',
800
- },
801
- workScope: {
802
- type: 'string',
803
- description: 'Scope of the work performed',
804
- maxLength: 5000,
805
- maxGraphemes: 1000,
806
- },
807
- workTimeFrameFrom: {
808
- type: 'string',
809
- format: 'datetime',
810
- description: 'When the work began',
811
- },
812
- workTimeFrameTo: {
813
- type: 'string',
814
- format: 'datetime',
815
- description: 'When the work ended',
816
- },
817
- evidence: {
818
- type: 'array',
819
- description: 'Supporting evidence, documentation, or external data URIs',
820
- items: {
821
- type: 'ref',
822
- ref: 'lex:com.atproto.repo.strongRef',
823
- description: 'A strong reference to the evidence that supports this impact claim. The record referenced must conform with the org.hypercerts.claim.evidence lexicon',
824
- },
825
- maxLength: 100,
826
- },
827
- contributions: {
828
- type: 'array',
829
- description: 'A strong reference to the contributions done to create the impact in the hypercerts. The record referenced must conform with the lexicon org.hypercerts.claim.contributions',
830
- items: {
831
- type: 'ref',
832
- ref: 'lex:com.atproto.repo.strongRef',
833
- },
834
- },
835
- rights: {
836
- type: 'ref',
837
- ref: 'lex:com.atproto.repo.strongRef',
838
- description: 'A strong reference to the rights that this hypercert has. The record referenced must conform with the lexicon org.hypercerts.claim.rights',
839
- },
840
- location: {
841
- type: 'ref',
842
- ref: 'lex:com.atproto.repo.strongRef',
843
- description: 'A strong reference to the location where the work for done hypercert was located. The record referenced must conform with the lexicon org.hypercerts.claim.location',
844
- },
845
- createdAt: {
846
- type: 'string',
847
- format: 'datetime',
848
- description: 'Client-declared timestamp when this record was originally created',
849
- },
850
- },
851
- },
852
- },
853
- },
854
- },
855
- OrgHypercertsClaimContribution: {
856
- lexicon: 1,
857
- id: 'org.hypercerts.claim.contribution',
858
- defs: {
859
- main: {
860
- type: 'record',
861
- description: "A contribution made toward a hypercert's impact.",
862
- key: 'any',
863
- record: {
864
- type: 'object',
865
- required: ['hypercert', 'contributors', 'createdAt'],
866
- properties: {
867
- hypercert: {
868
- type: 'ref',
869
- ref: 'lex:com.atproto.repo.strongRef',
870
- description: 'A strong reference to the hypercert this contribution is for. The record referenced must conform with the lexicon org.hypercerts.claim.',
871
- },
872
- role: {
873
- type: 'string',
874
- description: 'Role or title of the contributor(s).',
875
- maxLength: 100,
876
- },
877
- contributors: {
878
- type: 'array',
879
- description: 'List of the contributors (names, pseudonyms, or DIDs). If multiple contributors are stored in the same hypercertContribution, then they would have the exact same role.',
880
- items: {
881
- type: 'string',
882
- },
883
- },
884
- description: {
885
- type: 'string',
886
- description: 'What the contribution concretely achieved',
887
- maxLength: 2000,
888
- maxGraphemes: 500,
889
- },
890
- workTimeframeFrom: {
891
- type: 'string',
892
- format: 'datetime',
893
- description: 'When this contribution started. This should be a subset of the hypercert timeframe.',
894
- },
895
- workTimeframeTo: {
896
- type: 'string',
897
- format: 'datetime',
898
- description: 'When this contribution finished. This should be a subset of the hypercert timeframe.',
899
- },
900
- createdAt: {
901
- type: 'string',
902
- format: 'datetime',
903
- description: 'Client-declared timestamp when this record was originally created',
904
- },
905
- },
906
- },
907
- },
908
- },
909
- },
910
- OrgHypercertsClaimEvaluation: {
911
- lexicon: 1,
912
- id: 'org.hypercerts.claim.evaluation',
913
- defs: {
914
- main: {
915
- type: 'record',
916
- description: 'An evaluation of a hypercert or other claim',
917
- key: 'tid',
918
- record: {
919
- type: 'object',
920
- required: ['subject', 'evaluators', 'summary', 'createdAt'],
921
- properties: {
922
- subject: {
923
- type: 'ref',
924
- ref: 'lex:com.atproto.repo.strongRef',
925
- description: 'A strong reference to the evaluated claim. (e.g measurement, hypercert, contribution, etc)',
926
- },
927
- evaluators: {
928
- type: 'array',
929
- description: 'DIDs of the evaluators',
930
- items: {
931
- type: 'string',
932
- format: 'did',
933
- },
934
- maxLength: 100,
935
- },
936
- evaluations: {
937
- type: 'array',
938
- description: 'Evaluation data (URIs or blobs) containing detailed reports or methodology',
939
- items: {
940
- type: 'union',
941
- refs: [
942
- 'lex:app.certified.defs#uri',
943
- 'lex:app.certified.defs#smallBlob',
944
- ],
945
- },
946
- maxLength: 100,
947
- },
948
- summary: {
949
- type: 'string',
950
- description: 'Brief evaluation summary',
951
- maxLength: 5000,
952
- maxGraphemes: 1000,
953
- },
954
- createdAt: {
955
- type: 'string',
956
- format: 'datetime',
957
- description: 'Client-declared timestamp when this record was originally created',
958
- },
959
- },
960
- },
961
- },
962
- },
963
- },
964
- OrgHypercertsClaimEvidence: {
965
- lexicon: 1,
966
- id: 'org.hypercerts.claim.evidence',
967
- defs: {
968
- main: {
969
- type: 'record',
970
- description: 'A piece of evidence supporting a hypercert claim',
971
- key: 'any',
972
- record: {
973
- type: 'object',
974
- required: ['content', 'shortDescription', 'createdAt'],
975
- properties: {
976
- content: {
977
- type: 'union',
978
- refs: [
979
- 'lex:app.certified.defs#uri',
980
- 'lex:app.certified.defs#smallBlob',
981
- ],
982
- description: 'A piece of evidence (URI or blobs) supporting a hypercert claim',
983
- },
984
- title: {
985
- type: 'string',
986
- maxLength: 256,
987
- description: 'Optional title to describe the nature of the evidence',
988
- },
989
- shortDescription: {
990
- type: 'string',
991
- maxLength: 3000,
992
- maxGraphemes: 300,
993
- description: 'Short description explaining what this evidence demonstrates or proves',
994
- },
995
- description: {
996
- type: 'string',
997
- description: 'Optional longer description describing the impact claim evidence.',
998
- maxLength: 30000,
999
- maxGraphemes: 3000,
1000
- },
1001
- createdAt: {
1002
- type: 'string',
1003
- format: 'datetime',
1004
- description: 'Client-declared timestamp when this hypercert claim was originally created',
1005
- },
1006
- },
1007
- },
1008
- },
1009
- },
1010
- },
1011
- OrgHypercertsClaimMeasurement: {
1012
- lexicon: 1,
1013
- id: 'org.hypercerts.claim.measurement',
1014
- defs: {
1015
- main: {
1016
- type: 'record',
1017
- description: 'External measurement data supporting a hypercert claim',
1018
- key: 'tid',
1019
- record: {
1020
- type: 'object',
1021
- required: ['hypercert', 'measurers', 'metric', 'value', 'createdAt'],
1022
- properties: {
1023
- hypercert: {
1024
- type: 'ref',
1025
- ref: 'lex:com.atproto.repo.strongRef',
1026
- description: 'A strong reference to the hypercert that this measurement is for. The record referenced must conform with the lexicon org.hypercerts.claim.',
1027
- },
1028
- measurers: {
1029
- type: 'array',
1030
- description: 'DIDs of the entity (or entities) that measured this data',
1031
- items: {
1032
- type: 'string',
1033
- format: 'did',
1034
- },
1035
- maxLength: 100,
1036
- },
1037
- metric: {
1038
- type: 'string',
1039
- description: 'The metric being measured',
1040
- maxLength: 500,
1041
- },
1042
- value: {
1043
- type: 'string',
1044
- description: 'The measured value',
1045
- maxLength: 500,
1046
- },
1047
- measurementMethodURI: {
1048
- type: 'string',
1049
- format: 'uri',
1050
- description: 'URI to methodology documentation, standard protocol, or measurement procedure',
1051
- },
1052
- evidenceURI: {
1053
- type: 'array',
1054
- description: 'URIs to supporting evidence or data',
1055
- items: {
1056
- type: 'string',
1057
- format: 'uri',
1058
- },
1059
- maxLength: 50,
1060
- },
1061
- createdAt: {
1062
- type: 'string',
1063
- format: 'datetime',
1064
- description: 'Client-declared timestamp when this record was originally created',
1065
- },
1066
- },
1067
- },
1068
- },
1069
- },
1070
- },
1071
- OrgHypercertsClaimRights: {
1072
- lexicon: 1,
1073
- id: 'org.hypercerts.claim.rights',
1074
- defs: {
1075
- main: {
1076
- type: 'record',
1077
- description: 'Describes the rights that a user has with a hypercert, such as whether it can be sold, transferred, and under what conditions.',
1078
- key: 'any',
1079
- record: {
1080
- type: 'object',
1081
- required: [
1082
- 'rightsName',
1083
- 'rightsType',
1084
- 'rightsDescription',
1085
- 'createdAt',
1086
- ],
1087
- properties: {
1088
- rightsName: {
1089
- type: 'string',
1090
- description: 'Full name of the rights',
1091
- maxLength: 100,
1092
- },
1093
- rightsType: {
1094
- type: 'string',
1095
- description: 'Short rights identifier for easier search',
1096
- maxLength: 10,
1097
- },
1098
- rightsDescription: {
1099
- type: 'string',
1100
- description: 'Description of the rights of this hypercert',
1101
- },
1102
- createdAt: {
1103
- type: 'string',
1104
- format: 'datetime',
1105
- description: 'Client-declared timestamp when this record was originally created',
1106
- },
1107
- },
1108
- },
1109
- },
1110
- },
1111
- },
1112
- OrgHypercertsCollection: {
1113
- lexicon: 1,
1114
- id: 'org.hypercerts.collection',
1115
- defs: {
1116
- main: {
1117
- type: 'record',
1118
- description: 'A collection/group of hypercerts that have a specific property.',
1119
- key: 'tid',
1120
- record: {
1121
- type: 'object',
1122
- required: ['title', 'claims', 'createdAt'],
1123
- properties: {
1124
- title: {
1125
- type: 'string',
1126
- description: 'The title of this collection',
1127
- maxLength: 800,
1128
- maxGraphemes: 80,
1129
- },
1130
- shortDescription: {
1131
- type: 'string',
1132
- maxLength: 3000,
1133
- maxGraphemes: 300,
1134
- description: 'A short description of this collection',
1135
- },
1136
- coverPhoto: {
1137
- type: 'union',
1138
- refs: [
1139
- 'lex:app.certified.defs#uri',
1140
- 'lex:app.certified.defs#smallBlob',
1141
- ],
1142
- description: 'The cover photo of this collection (either in URI format or in a blob).',
1143
- },
1144
- claims: {
1145
- type: 'array',
1146
- description: 'Array of claims with their associated weights in this collection',
1147
- items: {
1148
- type: 'ref',
1149
- ref: 'lex:org.hypercerts.collection#claimItem',
1150
- },
1151
- },
1152
- createdAt: {
1153
- type: 'string',
1154
- format: 'datetime',
1155
- description: 'Client-declared timestamp when this record was originally created',
1156
- },
1157
- },
1158
- },
1159
- },
1160
- claimItem: {
1161
- type: 'object',
1162
- required: ['claim', 'weight'],
1163
- properties: {
1164
- claim: {
1165
- type: 'ref',
1166
- ref: 'lex:com.atproto.repo.strongRef',
1167
- description: 'A strong reference to a hypercert claim record. This claim must conform to the lexicon org.hypercerts.claim.record',
1168
- },
1169
- weight: {
1170
- type: 'string',
1171
- description: 'The weight/importance of this hypercert claim in the collection (a percentage from 0-100, stored as a string to avoid float precision issues). The total claim weights should add up to 100.',
1172
- },
1173
- },
1174
- },
1175
- },
1176
- },
1177
- };
1178
- const schemas = Object.values(schemaDict);
1179
- const lexicons = new Lexicons(schemas);
1180
- function validate$9(v, id, hash, requiredType) {
1181
- return (requiredType ? is$typed$9 : maybe$typed)(v, id, hash)
1182
- ? lexicons.validate(`${id}#${hash}`, v)
1183
- : {
1184
- success: false,
1185
- error: new ValidationError(`Must be an object with "${hash === 'main' ? id : `${id}#${hash}`}" $type property`),
1186
- };
1187
- }
1188
- const ids = {
1189
- AppCertifiedDefs: 'app.certified.defs',
1190
- AppCertifiedLocation: 'app.certified.location',
1191
- ComAtprotoRepoStrongRef: 'com.atproto.repo.strongRef',
1192
- OrgHypercertsClaim: 'org.hypercerts.claim',
1193
- OrgHypercertsClaimContribution: 'org.hypercerts.claim.contribution',
1194
- OrgHypercertsClaimEvaluation: 'org.hypercerts.claim.evaluation',
1195
- OrgHypercertsClaimEvidence: 'org.hypercerts.claim.evidence',
1196
- OrgHypercertsClaimMeasurement: 'org.hypercerts.claim.measurement',
1197
- OrgHypercertsClaimRights: 'org.hypercerts.claim.rights',
1198
- OrgHypercertsCollection: 'org.hypercerts.collection',
1199
- };
1200
-
1201
- var defs = /*#__PURE__*/Object.freeze({
1202
- __proto__: null
1203
- });
1204
-
1205
- const is$typed$8 = is$typed$9, validate$8 = validate$9;
1206
- const id$8 = 'app.certified.location';
1207
- const hashMain$8 = 'main';
1208
- function isMain$8(v) {
1209
- return is$typed$8(v, id$8, hashMain$8);
1210
- }
1211
- function validateMain$8(v) {
1212
- return validate$8(v, id$8, hashMain$8, true);
1213
- }
1214
-
1215
- var location = /*#__PURE__*/Object.freeze({
1216
- __proto__: null,
1217
- isMain: isMain$8,
1218
- isRecord: isMain$8,
1219
- validateMain: validateMain$8,
1220
- validateRecord: validateMain$8
1221
- });
1222
-
1223
- const is$typed$7 = is$typed$9, validate$7 = validate$9;
1224
- const id$7 = 'com.atproto.repo.strongRef';
1225
- const hashMain$7 = 'main';
1226
- function isMain$7(v) {
1227
- return is$typed$7(v, id$7, hashMain$7);
1228
- }
1229
- function validateMain$7(v) {
1230
- return validate$7(v, id$7, hashMain$7);
1231
- }
1232
-
1233
- var strongRef = /*#__PURE__*/Object.freeze({
1234
- __proto__: null,
1235
- isMain: isMain$7,
1236
- validateMain: validateMain$7
1237
- });
1238
-
1239
- const is$typed$6 = is$typed$9, validate$6 = validate$9;
1240
- const id$6 = 'org.hypercerts.claim';
1241
- const hashMain$6 = 'main';
1242
- function isMain$6(v) {
1243
- return is$typed$6(v, id$6, hashMain$6);
1244
- }
1245
- function validateMain$6(v) {
1246
- return validate$6(v, id$6, hashMain$6, true);
1247
- }
1248
-
1249
- var claim = /*#__PURE__*/Object.freeze({
1250
- __proto__: null,
1251
- isMain: isMain$6,
1252
- isRecord: isMain$6,
1253
- validateMain: validateMain$6,
1254
- validateRecord: validateMain$6
1255
- });
1256
-
1257
- const is$typed$5 = is$typed$9, validate$5 = validate$9;
1258
- const id$5 = 'org.hypercerts.claim.contribution';
1259
- const hashMain$5 = 'main';
1260
- function isMain$5(v) {
1261
- return is$typed$5(v, id$5, hashMain$5);
1262
- }
1263
- function validateMain$5(v) {
1264
- return validate$5(v, id$5, hashMain$5, true);
1265
- }
1266
-
1267
- var contribution = /*#__PURE__*/Object.freeze({
1268
- __proto__: null,
1269
- isMain: isMain$5,
1270
- isRecord: isMain$5,
1271
- validateMain: validateMain$5,
1272
- validateRecord: validateMain$5
1273
- });
1274
-
1275
- const is$typed$4 = is$typed$9, validate$4 = validate$9;
1276
- const id$4 = 'org.hypercerts.claim.evaluation';
1277
- const hashMain$4 = 'main';
1278
- function isMain$4(v) {
1279
- return is$typed$4(v, id$4, hashMain$4);
1280
- }
1281
- function validateMain$4(v) {
1282
- return validate$4(v, id$4, hashMain$4, true);
1283
- }
1284
-
1285
- var evaluation = /*#__PURE__*/Object.freeze({
1286
- __proto__: null,
1287
- isMain: isMain$4,
1288
- isRecord: isMain$4,
1289
- validateMain: validateMain$4,
1290
- validateRecord: validateMain$4
1291
- });
1292
-
1293
- const is$typed$3 = is$typed$9, validate$3 = validate$9;
1294
- const id$3 = 'org.hypercerts.claim.evidence';
1295
- const hashMain$3 = 'main';
1296
- function isMain$3(v) {
1297
- return is$typed$3(v, id$3, hashMain$3);
1298
- }
1299
- function validateMain$3(v) {
1300
- return validate$3(v, id$3, hashMain$3, true);
1301
- }
1302
-
1303
- var evidence = /*#__PURE__*/Object.freeze({
1304
- __proto__: null,
1305
- isMain: isMain$3,
1306
- isRecord: isMain$3,
1307
- validateMain: validateMain$3,
1308
- validateRecord: validateMain$3
1309
- });
1310
-
1311
- const is$typed$2 = is$typed$9, validate$2 = validate$9;
1312
- const id$2 = 'org.hypercerts.claim.measurement';
1313
- const hashMain$2 = 'main';
1314
- function isMain$2(v) {
1315
- return is$typed$2(v, id$2, hashMain$2);
1316
- }
1317
- function validateMain$2(v) {
1318
- return validate$2(v, id$2, hashMain$2, true);
1319
- }
1320
-
1321
- var measurement = /*#__PURE__*/Object.freeze({
1322
- __proto__: null,
1323
- isMain: isMain$2,
1324
- isRecord: isMain$2,
1325
- validateMain: validateMain$2,
1326
- validateRecord: validateMain$2
1327
- });
1328
-
1329
- const is$typed$1 = is$typed$9, validate$1 = validate$9;
1330
- const id$1 = 'org.hypercerts.claim.rights';
1331
- const hashMain$1 = 'main';
1332
- function isMain$1(v) {
1333
- return is$typed$1(v, id$1, hashMain$1);
1334
- }
1335
- function validateMain$1(v) {
1336
- return validate$1(v, id$1, hashMain$1, true);
1337
- }
1338
-
1339
- var rights = /*#__PURE__*/Object.freeze({
1340
- __proto__: null,
1341
- isMain: isMain$1,
1342
- isRecord: isMain$1,
1343
- validateMain: validateMain$1,
1344
- validateRecord: validateMain$1
1345
- });
1346
-
1347
- const is$typed = is$typed$9, validate = validate$9;
1348
- const id = 'org.hypercerts.collection';
1349
- const hashMain = 'main';
1350
- function isMain(v) {
1351
- return is$typed(v, id, hashMain);
1352
- }
1353
- function validateMain(v) {
1354
- return validate(v, id, hashMain, true);
1355
- }
1356
- const hashClaimItem = 'claimItem';
1357
- function isClaimItem(v) {
1358
- return is$typed(v, id, hashClaimItem);
1359
- }
1360
- function validateClaimItem(v) {
1361
- return validate(v, id, hashClaimItem);
1362
- }
1363
-
1364
- var collection = /*#__PURE__*/Object.freeze({
1365
- __proto__: null,
1366
- isClaimItem: isClaimItem,
1367
- isMain: isMain,
1368
- isRecord: isMain,
1369
- validateClaimItem: validateClaimItem,
1370
- validateMain: validateMain,
1371
- validateRecord: validateMain
1372
- });
1373
-
1374
- /**
1375
- * Hypercert lexicon definitions for AT Protocol.
1376
- *
1377
- * This module exports the lexicon documents, collection names,
1378
- * and generated TypeScript types for all hypercert-related record types.
1379
- *
1380
- * @packageDocumentation
1381
- */
1382
- /**
1383
- * All hypercert-related lexicons for registration with AT Protocol Agent.
1384
- *
1385
- * This array contains all lexicon documents needed to work with
1386
- * hypercert records.
1387
- */
1388
- const HYPERCERT_LEXICONS = [
1389
- defsLexicon,
1390
- locationLexicon,
1391
- claimLexicon,
1392
- rightsLexicon,
1393
- contributionLexicon,
1394
- measurementLexicon,
1395
- evaluationLexicon,
1396
- evidenceLexicon,
1397
- collectionLexicon,
1398
- ];
1399
- /**
1400
- * Collection NSIDs (Namespaced Identifiers) for hypercert records.
1401
- *
1402
- * Use these constants when performing record operations to ensure
1403
- * correct collection names.
1404
- */
1405
- const HYPERCERT_COLLECTIONS = {
1406
- /**
1407
- * Main hypercert claim record collection.
1408
- */
1409
- CLAIM: "org.hypercerts.claim",
1410
- /**
1411
- * Rights record collection.
1412
- */
1413
- RIGHTS: "org.hypercerts.claim.rights",
1414
- /**
1415
- * Location record collection (shared certified lexicon).
1416
- */
1417
- LOCATION: "app.certified.location",
1418
- /**
1419
- * Contribution record collection.
1420
- */
1421
- CONTRIBUTION: "org.hypercerts.claim.contribution",
1422
- /**
1423
- * Measurement record collection.
1424
- */
1425
- MEASUREMENT: "org.hypercerts.claim.measurement",
1426
- /**
1427
- * Evaluation record collection.
1428
- */
1429
- EVALUATION: "org.hypercerts.claim.evaluation",
1430
- /**
1431
- * Evidence record collection.
1432
- */
1433
- EVIDENCE: "org.hypercerts.claim.evidence",
1434
- /**
1435
- * Collection record collection (groups of hypercerts).
1436
- */
1437
- COLLECTION: "org.hypercerts.collection",
1438
- };
1439
-
1440
- export { defs as AppCertifiedDefs, location as AppCertifiedLocation, strongRef as ComAtprotoRepoStrongRef, HYPERCERT_COLLECTIONS, HYPERCERT_LEXICONS, claim as OrgHypercertsClaim, contribution as OrgHypercertsClaimContribution, evaluation as OrgHypercertsClaimEvaluation, evidence as OrgHypercertsClaimEvidence, measurement as OrgHypercertsClaimMeasurement, rights as OrgHypercertsClaimRights, collection as OrgHypercertsCollection, asPredicate, claimLexicon, collectionLexicon, contributionLexicon, defsLexicon, evaluationLexicon, evidenceLexicon, ids, is$typed$9 as is$typed, lexicons, locationLexicon, maybe$typed, measurementLexicon, rightsLexicon, schemaDict, schemas, strongRef$1 as strongRefLexicon, validate$9 as validate };
1441
- //# sourceMappingURL=index.mjs.map