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

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 (44) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/README.md +46 -0
  3. package/SCHEMAS.md +114 -104
  4. package/dist/exports.d.ts +186 -20
  5. package/dist/exports.d.ts.map +1 -1
  6. package/dist/generated/exports.d.ts +186 -20
  7. package/dist/generated/exports.d.ts.map +1 -1
  8. package/dist/generated/lexicons.d.ts +376 -54
  9. package/dist/generated/lexicons.d.ts.map +1 -1
  10. package/dist/generated/types/app/bsky/richtext/facet.d.ts +8 -0
  11. package/dist/generated/types/app/bsky/richtext/facet.d.ts.map +1 -0
  12. package/dist/generated/types/org/hypercerts/claim/activity.d.ts +12 -13
  13. package/dist/generated/types/org/hypercerts/claim/activity.d.ts.map +1 -1
  14. package/dist/generated/types/org/hypercerts/claim/collection.d.ts +18 -2
  15. package/dist/generated/types/org/hypercerts/claim/collection.d.ts.map +1 -1
  16. package/dist/generated/types/org/hypercerts/defs.d.ts +44 -0
  17. package/dist/generated/types/org/hypercerts/defs.d.ts.map +1 -1
  18. package/dist/generated/types/org/hypercerts/helper/workScopeTag.d.ts +31 -0
  19. package/dist/generated/types/org/hypercerts/helper/workScopeTag.d.ts.map +1 -0
  20. package/dist/index.cjs +729 -267
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.mjs +721 -263
  23. package/dist/index.mjs.map +1 -1
  24. package/dist/lexicons.cjs +218 -27
  25. package/dist/lexicons.cjs.map +1 -1
  26. package/dist/lexicons.d.ts +376 -54
  27. package/dist/lexicons.d.ts.map +1 -1
  28. package/dist/lexicons.mjs +218 -27
  29. package/dist/lexicons.mjs.map +1 -1
  30. package/dist/types/app/bsky/richtext/facet.d.ts +8 -0
  31. package/dist/types/app/bsky/richtext/facet.d.ts.map +1 -0
  32. package/dist/types/org/hypercerts/claim/activity.d.ts +12 -13
  33. package/dist/types/org/hypercerts/claim/activity.d.ts.map +1 -1
  34. package/dist/types/org/hypercerts/claim/collection.d.ts +18 -2
  35. package/dist/types/org/hypercerts/claim/collection.d.ts.map +1 -1
  36. package/dist/types/org/hypercerts/defs.d.ts +44 -0
  37. package/dist/types/org/hypercerts/defs.d.ts.map +1 -1
  38. package/dist/types/org/hypercerts/helper/workScopeTag.d.ts +31 -0
  39. package/dist/types/org/hypercerts/helper/workScopeTag.d.ts.map +1 -0
  40. package/lexicons/org/hypercerts/claim/activity.json +31 -25
  41. package/lexicons/org/hypercerts/claim/collection.json +33 -2
  42. package/lexicons/org/hypercerts/defs.json +88 -0
  43. package/lexicons/org/hypercerts/helper/workScopeTag.json +65 -0
  44. package/package.json +4 -1
package/dist/lexicons.cjs CHANGED
@@ -275,16 +275,32 @@ const schemaDict = {
275
275
  },
276
276
  shortDescription: {
277
277
  type: 'string',
278
- description: 'Short blurb of the impact work done.',
278
+ description: 'Short summary of this activity claim, suitable for previews and list views. Rich text annotations may be provided via `shortDescriptionFacets`.',
279
279
  maxLength: 3000,
280
280
  maxGraphemes: 300,
281
281
  },
282
+ shortDescriptionFacets: {
283
+ type: 'array',
284
+ description: 'Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc).',
285
+ items: {
286
+ type: 'ref',
287
+ ref: 'lex:app.bsky.richtext.facet',
288
+ },
289
+ },
282
290
  description: {
283
291
  type: 'string',
284
- description: 'Optional longer description of the impact work done.',
292
+ description: 'Optional longer description of this activity claim, including context or interpretation. Rich text annotations may be provided via `descriptionFacets`.',
285
293
  maxLength: 30000,
286
294
  maxGraphemes: 3000,
287
295
  },
296
+ descriptionFacets: {
297
+ type: 'array',
298
+ description: 'Rich text annotations for `description` (mentions, URLs, hashtags, etc).',
299
+ items: {
300
+ type: 'ref',
301
+ ref: 'lex:app.bsky.richtext.facet',
302
+ },
303
+ },
288
304
  image: {
289
305
  type: 'union',
290
306
  refs: [
@@ -294,9 +310,14 @@ const schemaDict = {
294
310
  description: 'The hypercert visual representation as a URI or image blob.',
295
311
  },
296
312
  workScope: {
297
- type: 'ref',
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.',
313
+ type: 'union',
314
+ refs: [
315
+ 'lex:org.hypercerts.defs#workScopeAll',
316
+ 'lex:org.hypercerts.defs#workScopeAny',
317
+ 'lex:org.hypercerts.defs#workScopeNot',
318
+ 'lex:org.hypercerts.defs#workScopeAtom',
319
+ ],
320
+ description: 'Work scope logic expression using boolean operators (all/any/not) and atomic scope references.',
300
321
  },
301
322
  startDate: {
302
323
  type: 'string',
@@ -339,17 +360,17 @@ const schemaDict = {
339
360
  },
340
361
  contributor: {
341
362
  type: 'object',
342
- required: ['contributorInformation'],
363
+ required: ['contributorIdentity'],
343
364
  properties: {
344
- contributorInformation: {
365
+ contributorIdentity: {
345
366
  type: 'union',
346
367
  refs: [
347
368
  'lex:org.hypercerts.claim.activity#contributorIdentity',
348
369
  'lex:com.atproto.repo.strongRef',
349
370
  ],
350
- description: 'Contributor information as a string (DID or identifier) or strong reference to for instance org.hypercerts.claim.contributorInformation#main.',
371
+ description: 'Contributor identity as a string (DID or identifier) via org.hypercerts.claim.activity#contributorIdentity, or a strong reference to a contributor information record.',
351
372
  },
352
- weight: {
373
+ contributionWeight: {
353
374
  type: 'string',
354
375
  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.',
355
376
  },
@@ -359,7 +380,7 @@ const schemaDict = {
359
380
  'lex:org.hypercerts.claim.activity#contributorRole',
360
381
  'lex:com.atproto.repo.strongRef',
361
382
  ],
362
- description: 'Contribution details as a string or strong reference to org.hypercerts.claim.contributionDetails#main.',
383
+ description: 'Contribution details as a string via org.hypercerts.claim.activity#contributorRole, or a strong reference to a contribution details record.',
363
384
  },
364
385
  },
365
386
  },
@@ -373,21 +394,6 @@ const schemaDict = {
373
394
  maxLength: 10000,
374
395
  maxGraphemes: 1000,
375
396
  },
376
- activityWeight: {
377
- type: 'object',
378
- required: ['activity', 'weight'],
379
- properties: {
380
- activity: {
381
- type: 'ref',
382
- ref: 'lex:com.atproto.repo.strongRef',
383
- description: 'A strong reference to a hypercert activity record. This activity must conform to the lexicon org.hypercerts.claim.activity',
384
- },
385
- weight: {
386
- type: 'string',
387
- description: 'The relative weight/importance of this hypercert activity (stored as a string to avoid float precision issues). Weights can be any positive numeric values and do not need to sum to a specific total; normalization can be performed by the consuming application as needed.',
388
- },
389
- },
390
- },
391
397
  },
392
398
  },
393
399
  OrgHypercertsClaimCollection: {
@@ -423,12 +429,28 @@ const schemaDict = {
423
429
  ref: 'lex:pub.leaflet.pages.linearDocument#main',
424
430
  description: 'Rich-text description, represented as a Leaflet linear document.',
425
431
  },
432
+ avatar: {
433
+ type: 'union',
434
+ refs: [
435
+ 'lex:org.hypercerts.defs#uri',
436
+ 'lex:org.hypercerts.defs#smallImage',
437
+ ],
438
+ description: "The collection's avatar/profile image as a URI or image blob.",
439
+ },
440
+ banner: {
441
+ type: 'union',
442
+ refs: [
443
+ 'lex:org.hypercerts.defs#uri',
444
+ 'lex:org.hypercerts.defs#largeImage',
445
+ ],
446
+ description: 'Larger horizontal image to display behind the collection view.',
447
+ },
426
448
  items: {
427
449
  type: 'array',
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).',
450
+ description: 'Array of items in this collection with optional weights.',
429
451
  items: {
430
452
  type: 'ref',
431
- ref: 'lex:com.atproto.repo.strongRef',
453
+ ref: 'lex:org.hypercerts.claim.collection#item',
432
454
  },
433
455
  },
434
456
  createdAt: {
@@ -439,6 +461,21 @@ const schemaDict = {
439
461
  },
440
462
  },
441
463
  },
464
+ item: {
465
+ type: 'object',
466
+ required: ['itemIdentifier'],
467
+ properties: {
468
+ itemIdentifier: {
469
+ type: 'ref',
470
+ ref: 'lex:com.atproto.repo.strongRef',
471
+ description: 'Strong reference to an item in this collection. Items can be activities (org.hypercerts.claim.activity) and/or other collections (org.hypercerts.claim.collection).',
472
+ },
473
+ itemWeight: {
474
+ type: 'string',
475
+ description: 'Optional weight for this item (positive numeric value stored as string). Weights do not need to sum to a specific total; normalization can be performed by the consuming application as needed.',
476
+ },
477
+ },
478
+ },
442
479
  },
443
480
  },
444
481
  OrgHypercertsClaimContributionDetails: {
@@ -860,6 +897,94 @@ const schemaDict = {
860
897
  },
861
898
  },
862
899
  },
900
+ workScopeAll: {
901
+ type: 'object',
902
+ required: ['op', 'args'],
903
+ description: 'Logical AND operation: all arguments must be satisfied.',
904
+ properties: {
905
+ op: {
906
+ type: 'string',
907
+ const: 'all',
908
+ description: "Operator type: 'all' (logical AND)",
909
+ },
910
+ args: {
911
+ type: 'array',
912
+ items: {
913
+ type: 'union',
914
+ refs: [
915
+ 'lex:org.hypercerts.defs#workScopeAll',
916
+ 'lex:org.hypercerts.defs#workScopeAny',
917
+ 'lex:org.hypercerts.defs#workScopeNot',
918
+ 'lex:org.hypercerts.defs#workScopeAtom',
919
+ ],
920
+ },
921
+ minLength: 1,
922
+ maxLength: 100,
923
+ description: 'Array of work scope expressions that must all be satisfied',
924
+ },
925
+ },
926
+ },
927
+ workScopeAny: {
928
+ type: 'object',
929
+ required: ['op', 'args'],
930
+ description: 'Logical OR operation: at least one argument must be satisfied.',
931
+ properties: {
932
+ op: {
933
+ type: 'string',
934
+ const: 'any',
935
+ description: "Operator type: 'any' (logical OR)",
936
+ },
937
+ args: {
938
+ type: 'array',
939
+ items: {
940
+ type: 'union',
941
+ refs: [
942
+ 'lex:org.hypercerts.defs#workScopeAll',
943
+ 'lex:org.hypercerts.defs#workScopeAny',
944
+ 'lex:org.hypercerts.defs#workScopeNot',
945
+ 'lex:org.hypercerts.defs#workScopeAtom',
946
+ ],
947
+ },
948
+ minLength: 1,
949
+ maxLength: 100,
950
+ description: 'Array of work scope expressions, at least one of which must be satisfied',
951
+ },
952
+ },
953
+ },
954
+ workScopeNot: {
955
+ type: 'object',
956
+ required: ['op', 'arg'],
957
+ description: 'Logical NOT operation: the argument must not be satisfied.',
958
+ properties: {
959
+ op: {
960
+ type: 'string',
961
+ const: 'not',
962
+ description: "Operator type: 'not' (logical NOT)",
963
+ },
964
+ arg: {
965
+ type: 'union',
966
+ refs: [
967
+ 'lex:org.hypercerts.defs#workScopeAll',
968
+ 'lex:org.hypercerts.defs#workScopeAny',
969
+ 'lex:org.hypercerts.defs#workScopeNot',
970
+ 'lex:org.hypercerts.defs#workScopeAtom',
971
+ ],
972
+ description: 'Work scope expression that must not be satisfied',
973
+ },
974
+ },
975
+ },
976
+ workScopeAtom: {
977
+ type: 'object',
978
+ required: ['atom'],
979
+ description: 'Atomic scope reference: a strong reference to a scope record.',
980
+ properties: {
981
+ atom: {
982
+ type: 'ref',
983
+ ref: 'lex:com.atproto.repo.strongRef',
984
+ description: 'Strong reference to an org.hypercerts.helper.workScopeTag record',
985
+ },
986
+ },
987
+ },
863
988
  },
864
989
  },
865
990
  OrgHypercertsFundingReceipt: {
@@ -928,6 +1053,71 @@ const schemaDict = {
928
1053
  },
929
1054
  },
930
1055
  },
1056
+ OrgHypercertsHelperWorkScopeTag: {
1057
+ lexicon: 1,
1058
+ id: 'org.hypercerts.helper.workScopeTag',
1059
+ defs: {
1060
+ main: {
1061
+ type: 'record',
1062
+ description: 'A reusable scope atom for work scope logic expressions. Scopes can represent topics, languages, domains, deliverables, methods, regions, tags, or other categorical labels.',
1063
+ key: 'tid',
1064
+ record: {
1065
+ type: 'object',
1066
+ required: ['createdAt', 'key', 'label'],
1067
+ properties: {
1068
+ createdAt: {
1069
+ type: 'string',
1070
+ format: 'datetime',
1071
+ description: 'Client-declared timestamp when this record was originally created',
1072
+ },
1073
+ key: {
1074
+ type: 'string',
1075
+ description: "Lowercase, hyphenated machine-readable key for this scope (e.g., 'ipfs', 'go-lang', 'filecoin').",
1076
+ maxLength: 120,
1077
+ },
1078
+ label: {
1079
+ type: 'string',
1080
+ description: 'Human-readable label for this scope.',
1081
+ maxLength: 200,
1082
+ },
1083
+ kind: {
1084
+ type: 'string',
1085
+ description: 'Category type of this scope. Recommended values: topic, language, domain, method, tag.',
1086
+ maxLength: 50,
1087
+ },
1088
+ description: {
1089
+ type: 'string',
1090
+ description: 'Optional longer description of this scope.',
1091
+ maxLength: 10000,
1092
+ maxGraphemes: 1000,
1093
+ },
1094
+ parent: {
1095
+ type: 'ref',
1096
+ ref: 'lex:com.atproto.repo.strongRef',
1097
+ description: 'Optional strong reference to a parent scope record for taxonomy/hierarchy support.',
1098
+ },
1099
+ aliases: {
1100
+ type: 'array',
1101
+ items: {
1102
+ type: 'string',
1103
+ maxLength: 200,
1104
+ },
1105
+ maxLength: 50,
1106
+ description: 'Optional array of alternative names or identifiers for this scope.',
1107
+ },
1108
+ externalReference: {
1109
+ type: 'union',
1110
+ refs: [
1111
+ 'lex:org.hypercerts.defs#uri',
1112
+ 'lex:org.hypercerts.defs#smallBlob',
1113
+ ],
1114
+ description: 'Optional external reference for this scope as a URI or blob.',
1115
+ },
1116
+ },
1117
+ },
1118
+ },
1119
+ },
1120
+ },
931
1121
  };
932
1122
  const schemas = Object.values(schemaDict);
933
1123
  const lexicons = new lexicon.Lexicons(schemas);
@@ -956,6 +1146,7 @@ const ids = {
956
1146
  OrgHypercertsClaimRights: 'org.hypercerts.claim.rights',
957
1147
  OrgHypercertsDefs: 'org.hypercerts.defs',
958
1148
  OrgHypercertsFundingReceipt: 'org.hypercerts.funding.receipt',
1149
+ OrgHypercertsHelperWorkScopeTag: 'org.hypercerts.helper.workScopeTag',
959
1150
  };
960
1151
 
961
1152
  exports.ids = ids;