@hypercerts-org/lexicon 0.10.0-beta.4 → 0.10.0-beta.6

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 (49) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/README.md +66 -311
  3. package/SCHEMAS.md +284 -0
  4. package/dist/exports.d.ts +76 -118
  5. package/dist/exports.d.ts.map +1 -1
  6. package/dist/generated/exports.d.ts +76 -118
  7. package/dist/generated/exports.d.ts.map +1 -1
  8. package/dist/generated/lexicons.d.ts +182 -266
  9. package/dist/generated/lexicons.d.ts.map +1 -1
  10. package/dist/generated/types/org/hypercerts/claim/activity.d.ts +21 -18
  11. package/dist/generated/types/org/hypercerts/claim/activity.d.ts.map +1 -1
  12. package/dist/generated/types/org/hypercerts/claim/collection.d.ts +9 -9
  13. package/dist/generated/types/org/hypercerts/claim/collection.d.ts.map +1 -1
  14. package/dist/generated/types/org/hypercerts/claim/{contribution.d.ts → contributionDetails.d.ts} +8 -10
  15. package/dist/generated/types/org/hypercerts/claim/contributionDetails.d.ts.map +1 -0
  16. package/dist/generated/types/org/hypercerts/claim/contributorInformation.d.ts +23 -0
  17. package/dist/generated/types/org/hypercerts/claim/contributorInformation.d.ts.map +1 -0
  18. package/dist/index.cjs +270 -357
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.mjs +263 -350
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/lexicons.cjs +102 -141
  23. package/dist/lexicons.cjs.map +1 -1
  24. package/dist/lexicons.d.ts +182 -266
  25. package/dist/lexicons.d.ts.map +1 -1
  26. package/dist/lexicons.mjs +102 -141
  27. package/dist/lexicons.mjs.map +1 -1
  28. package/dist/types/org/hypercerts/claim/activity.d.ts +21 -18
  29. package/dist/types/org/hypercerts/claim/activity.d.ts.map +1 -1
  30. package/dist/types/org/hypercerts/claim/collection.d.ts +9 -9
  31. package/dist/types/org/hypercerts/claim/collection.d.ts.map +1 -1
  32. package/dist/types/org/hypercerts/claim/{contribution.d.ts → contributionDetails.d.ts} +8 -10
  33. package/dist/types/org/hypercerts/claim/contributionDetails.d.ts.map +1 -0
  34. package/dist/types/org/hypercerts/claim/contributorInformation.d.ts +23 -0
  35. package/dist/types/org/hypercerts/claim/contributorInformation.d.ts.map +1 -0
  36. package/lexicons/org/hypercerts/claim/activity.json +29 -39
  37. package/lexicons/org/hypercerts/claim/collection.json +14 -17
  38. package/lexicons/org/hypercerts/claim/contributionDetails.json +43 -0
  39. package/lexicons/org/hypercerts/claim/contributorInformation.json +39 -0
  40. package/lexicons/org/hypercerts/claim/evaluation.json +1 -1
  41. package/package.json +6 -2
  42. package/dist/generated/types/org/hypercerts/claim/contribution.d.ts.map +0 -1
  43. package/dist/generated/types/org/hypercerts/claim/project.d.ts +0 -29
  44. package/dist/generated/types/org/hypercerts/claim/project.d.ts.map +0 -1
  45. package/dist/types/org/hypercerts/claim/contribution.d.ts.map +0 -1
  46. package/dist/types/org/hypercerts/claim/project.d.ts +0 -29
  47. package/dist/types/org/hypercerts/claim/project.d.ts.map +0 -1
  48. package/lexicons/org/hypercerts/claim/contribution.json +0 -50
  49. package/lexicons/org/hypercerts/claim/project.json +0 -64
package/dist/lexicons.cjs CHANGED
@@ -266,13 +266,7 @@ const schemaDict = {
266
266
  key: 'any',
267
267
  record: {
268
268
  type: 'object',
269
- required: [
270
- 'title',
271
- 'shortDescription',
272
- 'createdAt',
273
- 'startDate',
274
- 'endDate',
275
- ],
269
+ required: ['title', 'shortDescription', 'createdAt'],
276
270
  properties: {
277
271
  title: {
278
272
  type: 'string',
@@ -301,7 +295,8 @@ const schemaDict = {
301
295
  },
302
296
  workScope: {
303
297
  type: 'ref',
304
- ref: 'lex:org.hypercerts.claim.activity#workScope',
298
+ ref: 'lex:com.atproto.repo.strongRef',
299
+ description: 'A strong reference to a record defining the scope of work. The record referenced should describe the logical scope using label-based conditions.',
305
300
  },
306
301
  startDate: {
307
302
  type: 'string',
@@ -313,12 +308,12 @@ const schemaDict = {
313
308
  format: 'datetime',
314
309
  description: 'When the work ended',
315
310
  },
316
- contributions: {
311
+ contributors: {
317
312
  type: 'array',
318
- 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.contribution.',
313
+ description: 'An array of contributor objects, each containing contributor information, weight, and contribution details.',
319
314
  items: {
320
315
  type: 'ref',
321
- ref: 'lex:com.atproto.repo.strongRef',
316
+ ref: 'lex:org.hypercerts.claim.activity#contributor',
322
317
  },
323
318
  },
324
319
  rights: {
@@ -334,11 +329,6 @@ const schemaDict = {
334
329
  ref: 'lex:com.atproto.repo.strongRef',
335
330
  },
336
331
  },
337
- project: {
338
- type: 'string',
339
- format: 'at-uri',
340
- description: 'A reference (AT-URI) to the project record that this activity is part of. The record referenced must conform with the lexicon org.hypercerts.claim.project. This activity must also be referenced by the project, establishing a bidirectional link.',
341
- },
342
332
  createdAt: {
343
333
  type: 'string',
344
334
  format: 'datetime',
@@ -347,36 +337,42 @@ const schemaDict = {
347
337
  },
348
338
  },
349
339
  },
350
- workScope: {
340
+ contributor: {
351
341
  type: 'object',
352
- description: 'Logical scope of the work using label-based conditions. All labels in `withinAllOf` must apply; at least one label in `withinAnyOf` must apply if provided; no label in `withinNoneOf` may apply.',
342
+ required: ['contributorInformation'],
353
343
  properties: {
354
- withinAllOf: {
355
- type: 'array',
356
- description: 'Labels that MUST all hold for the scope to apply.',
357
- items: {
358
- type: 'string',
359
- },
360
- maxLength: 100,
344
+ contributorInformation: {
345
+ type: 'union',
346
+ refs: [
347
+ 'lex:org.hypercerts.claim.activity#contributorIdentity',
348
+ 'lex:com.atproto.repo.strongRef',
349
+ ],
350
+ description: 'Contributor information as a string (DID or identifier) or strong reference to for instance org.hypercerts.claim.contributorInformation#main.',
361
351
  },
362
- withinAnyOf: {
363
- type: 'array',
364
- description: 'Labels of which AT LEAST ONE must hold (optional). If omitted or empty, imposes no additional condition.',
365
- items: {
366
- type: 'string',
367
- },
368
- maxLength: 100,
352
+ weight: {
353
+ type: 'string',
354
+ description: 'The relative weight/importance of this contribution (stored as a string to avoid float precision issues). Must be a positive numeric value. Weights do not need to sum to a specific total; normalization can be performed by the consuming application as needed.',
369
355
  },
370
- withinNoneOf: {
371
- type: 'array',
372
- description: 'Labels that MUST NOT hold for the scope to apply.',
373
- items: {
374
- type: 'string',
375
- },
376
- maxLength: 100,
356
+ contributionDetails: {
357
+ type: 'union',
358
+ refs: [
359
+ 'lex:org.hypercerts.claim.activity#contributorRole',
360
+ 'lex:com.atproto.repo.strongRef',
361
+ ],
362
+ description: 'Contribution details as a string or strong reference to org.hypercerts.claim.contributionDetails#main.',
377
363
  },
378
364
  },
379
365
  },
366
+ contributorIdentity: {
367
+ type: 'string',
368
+ description: 'Contributor information as a string (DID or identifier).',
369
+ },
370
+ contributorRole: {
371
+ type: 'string',
372
+ description: 'Contribution details as a string.',
373
+ maxLength: 10000,
374
+ maxGraphemes: 1000,
375
+ },
380
376
  activityWeight: {
381
377
  type: 'object',
382
378
  required: ['activity', 'weight'],
@@ -400,12 +396,16 @@ const schemaDict = {
400
396
  defs: {
401
397
  main: {
402
398
  type: 'record',
403
- description: 'A collection/group of hypercerts that have a specific property.',
399
+ description: 'A collection/group of items (activities and/or other collections). Collections support recursive nesting. Use app.certified.location as a sidecar (same TID) for location metadata.',
404
400
  key: 'tid',
405
401
  record: {
406
402
  type: 'object',
407
- required: ['title', 'activities', 'createdAt'],
403
+ required: ['title', 'items', 'createdAt'],
408
404
  properties: {
405
+ type: {
406
+ type: 'string',
407
+ description: "The type of this collection. Possible fields can be 'favorites', 'project', or any other type of collection.",
408
+ },
409
409
  title: {
410
410
  type: 'string',
411
411
  description: 'The title of this collection',
@@ -416,26 +416,19 @@ const schemaDict = {
416
416
  type: 'string',
417
417
  maxLength: 3000,
418
418
  maxGraphemes: 300,
419
- description: 'A short description of this collection',
419
+ description: 'Short summary of this collection, suitable for previews and list views',
420
420
  },
421
- avatar: {
422
- type: 'blob',
423
- description: 'Primary avatar image representing this collection across apps and views; typically a square image.',
424
- accept: ['image/png', 'image/jpeg'],
425
- maxSize: 1000000,
426
- },
427
- coverPhoto: {
428
- type: 'blob',
429
- description: 'The cover photo of this collection.',
430
- accept: ['image/png', 'image/jpeg'],
431
- maxSize: 1000000,
421
+ description: {
422
+ type: 'ref',
423
+ ref: 'lex:pub.leaflet.pages.linearDocument#main',
424
+ description: 'Rich-text description, represented as a Leaflet linear document.',
432
425
  },
433
- activities: {
426
+ items: {
434
427
  type: 'array',
435
- description: 'Array of activities with their associated weights in this collection',
428
+ description: 'Array of strong references to items in this collection. Items can be activities (org.hypercerts.claim.activity) and/or other collections (org.hypercerts.claim.collection).',
436
429
  items: {
437
430
  type: 'ref',
438
- ref: 'lex:org.hypercerts.claim.activity#activityWeight',
431
+ ref: 'lex:com.atproto.repo.strongRef',
439
432
  },
440
433
  },
441
434
  createdAt: {
@@ -448,35 +441,28 @@ const schemaDict = {
448
441
  },
449
442
  },
450
443
  },
451
- OrgHypercertsClaimContribution: {
444
+ OrgHypercertsClaimContributionDetails: {
452
445
  lexicon: 1,
453
- id: 'org.hypercerts.claim.contribution',
446
+ id: 'org.hypercerts.claim.contributionDetails',
454
447
  defs: {
455
448
  main: {
456
449
  type: 'record',
457
- description: "A contribution made toward a hypercert's impact.",
450
+ description: 'Details about a specific contribution including role, description, and timeframe.',
458
451
  key: 'tid',
459
452
  record: {
460
453
  type: 'object',
461
- required: ['contributors', 'createdAt'],
454
+ required: ['createdAt'],
462
455
  properties: {
463
456
  role: {
464
457
  type: 'string',
465
- description: 'Role or title of the contributor(s).',
458
+ description: 'Role or title of the contributor.',
466
459
  maxLength: 100,
467
460
  },
468
- contributors: {
469
- type: 'array',
470
- 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.',
471
- items: {
472
- type: 'string',
473
- },
474
- },
475
- description: {
461
+ contributionDescription: {
476
462
  type: 'string',
477
- description: 'What the contribution concretely achieved',
478
- maxLength: 2000,
479
- maxGraphemes: 500,
463
+ description: 'What the contribution concretely was.',
464
+ maxLength: 10000,
465
+ maxGraphemes: 1000,
480
466
  },
481
467
  startDate: {
482
468
  type: 'string',
@@ -486,12 +472,51 @@ const schemaDict = {
486
472
  endDate: {
487
473
  type: 'string',
488
474
  format: 'datetime',
489
- description: 'When this contribution finished. This should be a subset of the hypercert timeframe.',
475
+ description: 'When this contribution finished. This should be a subset of the hypercert timeframe.',
490
476
  },
491
477
  createdAt: {
492
478
  type: 'string',
493
479
  format: 'datetime',
494
- description: 'Client-declared timestamp when this record was originally created',
480
+ description: 'Client-declared timestamp when this record was originally created.',
481
+ },
482
+ },
483
+ },
484
+ },
485
+ },
486
+ },
487
+ OrgHypercertsClaimContributorInformation: {
488
+ lexicon: 1,
489
+ id: 'org.hypercerts.claim.contributorInformation',
490
+ defs: {
491
+ main: {
492
+ type: 'record',
493
+ description: 'Contributor information including identifier, display name, and image.',
494
+ key: 'tid',
495
+ record: {
496
+ type: 'object',
497
+ required: ['createdAt'],
498
+ properties: {
499
+ identifier: {
500
+ type: 'string',
501
+ description: 'DID or a URI to a social profile of the contributor.',
502
+ },
503
+ displayName: {
504
+ type: 'string',
505
+ description: 'Display name of the contributor.',
506
+ maxLength: 100,
507
+ },
508
+ image: {
509
+ type: 'union',
510
+ refs: [
511
+ 'lex:org.hypercerts.defs#uri',
512
+ 'lex:org.hypercerts.defs#smallImage',
513
+ ],
514
+ description: 'The contributor visual representation as a URI or image blob.',
515
+ },
516
+ createdAt: {
517
+ type: 'string',
518
+ format: 'datetime',
519
+ description: 'Client-declared timestamp when this record was originally created.',
495
520
  },
496
521
  },
497
522
  },
@@ -557,7 +582,7 @@ const schemaDict = {
557
582
  },
558
583
  measurements: {
559
584
  type: 'array',
560
- description: 'Optional references to the measurements that contributed to this evaluation. The record(s) referenced must conform with the lexicon org.hypercerts.claim.measurement ',
585
+ description: 'Optional references to the measurements that contributed to this evaluation. The record(s) referenced must conform with the lexicon org.hypercerts.claim.measurement',
561
586
  items: {
562
587
  type: 'ref',
563
588
  ref: 'lex:com.atproto.repo.strongRef',
@@ -717,70 +742,6 @@ const schemaDict = {
717
742
  },
718
743
  },
719
744
  },
720
- OrgHypercertsClaimProject: {
721
- lexicon: 1,
722
- id: 'org.hypercerts.claim.project',
723
- defs: {
724
- main: {
725
- type: 'record',
726
- description: 'A project that can include multiple activities, each of which may be linked to at most one project.',
727
- key: 'tid',
728
- record: {
729
- type: 'object',
730
- required: ['title', 'shortDescription', 'createdAt'],
731
- properties: {
732
- title: {
733
- type: 'string',
734
- description: 'Title of this project',
735
- maxLength: 800,
736
- maxGraphemes: 80,
737
- },
738
- shortDescription: {
739
- type: 'string',
740
- maxLength: 3000,
741
- maxGraphemes: 300,
742
- description: 'Short summary of this project, suitable for previews and list views.',
743
- },
744
- description: {
745
- type: 'ref',
746
- ref: 'lex:pub.leaflet.pages.linearDocument#main',
747
- description: 'Rich-text description of this project, represented as a Leaflet linear document.',
748
- },
749
- avatar: {
750
- type: 'blob',
751
- description: 'Primary avatar image representing this project across apps and views; typically a square logo or project identity image.',
752
- accept: ['image/png', 'image/jpeg'],
753
- maxSize: 1000000,
754
- },
755
- coverPhoto: {
756
- type: 'blob',
757
- description: 'The cover photo of this project.',
758
- accept: ['image/png', 'image/jpeg'],
759
- maxSize: 1000000,
760
- },
761
- activities: {
762
- type: 'array',
763
- description: 'Array of activities with their associated weights in this project',
764
- items: {
765
- type: 'ref',
766
- ref: 'lex:org.hypercerts.claim.activity#activityWeight',
767
- },
768
- },
769
- location: {
770
- type: 'ref',
771
- ref: 'lex:com.atproto.repo.strongRef',
772
- description: 'A strong reference to a location record describing where the work for this project took place. The referenced record must conform to the app.certified.location lexicon.',
773
- },
774
- createdAt: {
775
- type: 'string',
776
- format: 'datetime',
777
- description: 'Client-declared timestamp when this record was originally created',
778
- },
779
- },
780
- },
781
- },
782
- },
783
- },
784
745
  OrgHypercertsClaimRights: {
785
746
  lexicon: 1,
786
747
  id: 'org.hypercerts.claim.rights',
@@ -987,11 +948,11 @@ const ids = {
987
948
  ComAtprotoRepoStrongRef: 'com.atproto.repo.strongRef',
988
949
  OrgHypercertsClaimActivity: 'org.hypercerts.claim.activity',
989
950
  OrgHypercertsClaimCollection: 'org.hypercerts.claim.collection',
990
- OrgHypercertsClaimContribution: 'org.hypercerts.claim.contribution',
951
+ OrgHypercertsClaimContributionDetails: 'org.hypercerts.claim.contributionDetails',
952
+ OrgHypercertsClaimContributorInformation: 'org.hypercerts.claim.contributorInformation',
991
953
  OrgHypercertsClaimEvaluation: 'org.hypercerts.claim.evaluation',
992
954
  OrgHypercertsClaimEvidence: 'org.hypercerts.claim.evidence',
993
955
  OrgHypercertsClaimMeasurement: 'org.hypercerts.claim.measurement',
994
- OrgHypercertsClaimProject: 'org.hypercerts.claim.project',
995
956
  OrgHypercertsClaimRights: 'org.hypercerts.claim.rights',
996
957
  OrgHypercertsDefs: 'org.hypercerts.defs',
997
958
  OrgHypercertsFundingReceipt: 'org.hypercerts.funding.receipt',