@hypercerts-org/lexicon 0.10.0-beta.5 → 0.10.0-beta.7

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 (46) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/README.md +46 -0
  3. package/SCHEMAS.md +104 -90
  4. package/dist/exports.d.ts +109 -26
  5. package/dist/exports.d.ts.map +1 -1
  6. package/dist/generated/exports.d.ts +109 -26
  7. package/dist/generated/exports.d.ts.map +1 -1
  8. package/dist/generated/lexicons.d.ts +226 -70
  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 +25 -11
  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/claim/contributionDetails.d.ts +22 -0
  17. package/dist/generated/types/org/hypercerts/claim/contributionDetails.d.ts.map +1 -0
  18. package/dist/generated/types/org/hypercerts/claim/{contributor.d.ts → contributorInformation.d.ts} +3 -11
  19. package/dist/generated/types/org/hypercerts/claim/contributorInformation.d.ts.map +1 -0
  20. package/dist/index.cjs +427 -203
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.mjs +415 -195
  23. package/dist/index.mjs.map +1 -1
  24. package/dist/lexicons.cjs +130 -39
  25. package/dist/lexicons.cjs.map +1 -1
  26. package/dist/lexicons.d.ts +226 -70
  27. package/dist/lexicons.d.ts.map +1 -1
  28. package/dist/lexicons.mjs +130 -39
  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 +25 -11
  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/claim/contributionDetails.d.ts +22 -0
  37. package/dist/types/org/hypercerts/claim/contributionDetails.d.ts.map +1 -0
  38. package/dist/types/org/hypercerts/claim/{contributor.d.ts → contributorInformation.d.ts} +3 -11
  39. package/dist/types/org/hypercerts/claim/contributorInformation.d.ts.map +1 -0
  40. package/lexicons/org/hypercerts/claim/activity.json +44 -13
  41. package/lexicons/org/hypercerts/claim/collection.json +33 -2
  42. package/lexicons/org/hypercerts/claim/{contributor.json → contributionDetails.json} +5 -22
  43. package/lexicons/org/hypercerts/claim/contributorInformation.json +39 -0
  44. package/package.json +5 -2
  45. package/dist/generated/types/org/hypercerts/claim/contributor.d.ts.map +0 -1
  46. package/dist/types/org/hypercerts/claim/contributor.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,80 @@
1
1
  # @hypercerts-org/lexicon
2
2
 
3
+ ## 0.10.0-beta.7
4
+
5
+ ### Minor Changes
6
+
7
+ - [#106](https://github.com/hypercerts-org/hypercerts-lexicon/pull/106) [`b03a1f7`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/b03a1f7925b56a5d614bb3a40f7fe5e6321f3d34) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Add avatar and banner fields to collection lexicon for visual representation
8
+
9
+ - [#113](https://github.com/hypercerts-org/hypercerts-lexicon/pull/113) [`c3f9ca2`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/c3f9ca2f5cb2c5da4d0f4272a74d06f6798e058b) Thanks [@holkexyz](https://github.com/holkexyz)! - Refactor collection items structure to support optional weights and remove activityWeight from activity schema
10
+
11
+ **Breaking Changes:**
12
+ - **Activity lexicon (`org.hypercerts.claim.activity`):**
13
+ - Removed `org.hypercerts.claim.activity#activityWeight` def
14
+ - Activity records no longer include activity weight information
15
+ - **Collection lexicon (`org.hypercerts.claim.collection`):**
16
+ - Changed `org.hypercerts.claim.collection#items` from array of strongRefs to array of item objects
17
+ - Added `org.hypercerts.claim.collection#item` def with:
18
+ - `itemIdentifier` (required): strongRef to an item (activity or collection)
19
+ - `itemWeight` (optional): positive numeric value stored as string
20
+ - Supports recursive collection nesting (items can reference activities or other collections)
21
+
22
+ **Migration:**
23
+
24
+ **Collection items:** Convert from array of strongRefs to array of item objects:
25
+
26
+ ```json
27
+ // Before
28
+ "items": [strongRef1, strongRef2]
29
+
30
+ // After
31
+ "items": [
32
+ { "itemIdentifier": strongRef1, "itemWeight": "1.5" },
33
+ { "itemIdentifier": strongRef2 }
34
+ ]
35
+ ```
36
+
37
+ **Activity weights:** Migrate existing `org.hypercerts.claim.activity#activityWeight` data to collection `org.hypercerts.claim.collection#item.itemWeight`:
38
+
39
+ ```json
40
+ // Old (removed from activity)
41
+ { "activity": { "uri": "...", "cid": "..." }, "weight": "1.5" }
42
+
43
+ // New (in collection items)
44
+ { "itemIdentifier": { "uri": "...", "cid": "..." }, "itemWeight": "1.5" }
45
+ ```
46
+
47
+ Update collections that reference activities to include weights in `org.hypercerts.claim.collection#item.itemWeight`. Weights can be dropped if not needed.
48
+
49
+ - [#91](https://github.com/hypercerts-org/hypercerts-lexicon/pull/91) [`0c6da09`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/0c6da093c8a38a3ee516a85b6bffee0850535b14) Thanks [@holkexyz](https://github.com/holkexyz)! - Add rich text facet support to activity claim descriptions
50
+
51
+ Add `shortDescriptionFacets` and `descriptionFacets` fields to the activity lexicon to support rich text annotations (mentions, URLs, hashtags, etc.) in activity claim descriptions.
52
+
53
+ ## 0.10.0-beta.6
54
+
55
+ ### Minor Changes
56
+
57
+ - [#102](https://github.com/hypercerts-org/hypercerts-lexicon/pull/102) [`68011ae`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/68011ae1f58dcc35408e2400c02dfa16559e18d6) Thanks [@holkexyz](https://github.com/holkexyz)! - Refactor contributions structure and split contributor lexicon
58
+
59
+ **Breaking Changes:**
60
+ - **Activity lexicon (`org.hypercerts.claim.activity`):**
61
+ - Renamed `contributions` field to `contributors`
62
+ - Replaced `contributions` array (array of strongRefs) with new `contributors` array containing contributor objects
63
+ - Each contributor object has three fields:
64
+ - `contributorInformation` (required): string (DID/identifier) or strongRef to `org.hypercerts.claim.contributorInformation#main`
65
+ - `weight` (optional): positive number (stored as string)
66
+ - `contributionDetails` (optional): string or strongRef to `org.hypercerts.claim.contributionDetails#main`
67
+ - Renamed internal `contribution` object type to `contributor`
68
+ - Renamed string wrapper defs: `contributorInformationString` → `contributorIdentity`, `contributionDetailsString` → `contributorRole`
69
+ - Updated `contributorRole` string limits: maxLength 10000, maxGraphemes 1000
70
+ - **Contributor lexicon (`org.hypercerts.claim.contributor`):**
71
+ - Split into two separate lexicon files:
72
+ - `org.hypercerts.claim.contributorInformation`: new lexicon file containing `identifier`, `displayName`, `image` (contributor profile information)
73
+ - `org.hypercerts.claim.contributionDetails`: new lexicon file containing `role`, `contributionDescription`, `startDate`, `endDate` (contribution-specific details)
74
+ - The original `org.hypercerts.claim.contributor` lexicon has been removed
75
+
76
+ Existing contributions using the old structure will need to be migrated to the new format.
77
+
3
78
  ## 0.10.0-beta.5
4
79
 
5
80
  ### Minor Changes
package/README.md CHANGED
@@ -254,3 +254,49 @@ const projectRecord = {
254
254
  **Note**: The `type` field is optional and can be set to "project",
255
255
  "favorites", or any other collection type. The `description` field
256
256
  supports rich-text via Leaflet linear documents.
257
+
258
+ ### Adding Visual Representation to Collections
259
+
260
+ Collections can include `avatar` and `banner` fields for visual representation:
261
+
262
+ ```typescript
263
+ import { COLLECTION_NSID } from "@hypercerts-org/lexicon";
264
+
265
+ const collectionRecord = {
266
+ $type: COLLECTION_NSID,
267
+ title: "Climate Action Projects",
268
+ avatar: {
269
+ image: blobRef, // or { uri: "https://..." }
270
+ },
271
+ banner: {
272
+ image: largeBlobRef, // or { uri: "https://..." }
273
+ },
274
+ items: [
275
+ // ... collection items
276
+ ],
277
+ createdAt: new Date().toISOString(),
278
+ };
279
+ ```
280
+
281
+ **Note**: Both `avatar` (up to 5MB) and `banner` (up to 10MB) fields
282
+ are optional and support either embedded image blobs or URI references to
283
+ external images.
284
+
285
+ ### Adding Locations to Activities
286
+
287
+ The `locations` field in activity records is an array of strong references
288
+ (`com.atproto.repo.strongRef`) pointing to `app.certified.location` records.
289
+ Each strong reference contains two required fields:
290
+
291
+ - `uri`: The ATProto URI of the location record (e.g., `at://did:plc:alice/app.certified.location/abc123`)
292
+ - `cid`: The content identifier (CID) of the location record, ensuring referential integrity
293
+
294
+ **Validation and Expectations**:
295
+
296
+ - All location records referenced in the `locations` array must conform to the
297
+ `app.certified.location` lexicon schema
298
+ - The `uri` field must be a valid ATProto URI pointing to an existing location record
299
+ - The `cid` field must match the current CID of the referenced location record
300
+ - The `locations` field is optional; activities can be created without location data
301
+ - When using the sidecar pattern (same TID), ensure the location record is created
302
+ or updated alongside the activity record for consistency
package/SCHEMAS.md CHANGED
@@ -15,28 +15,31 @@ Hypercerts-specific lexicons for tracking impact work and claims.
15
15
 
16
16
  #### Properties
17
17
 
18
- | Property | Type | Required | Description | Comments |
19
- | ------------------ | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
20
- | `title` | `string` | yes | Title of the hypercert. | maxLength: 256 |
21
- | `shortDescription` | `string` | yes | Short blurb of the impact work done. | maxLength: 3000, maxGraphemes: 300 |
22
- | `description` | `string` | no | Optional longer description of the impact work done. | maxLength: 30000, maxGraphemes: 3000 |
23
- | `image` | `union` | no | The hypercert visual representation as a URI or image blob. | |
24
- | `workScope` | `ref` | no | A strong reference to a record defining the scope of work. The record referenced should describe the logical scope using label-based conditions. | |
25
- | `startDate` | `string` | no | When the work began | |
26
- | `endDate` | `string` | no | When the work ended | |
27
- | `contributions` | `ref` | no | 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.contributor. | |
28
- | `rights` | `ref` | no | A strong reference to the rights that this hypercert has. The record referenced must conform with the lexicon org.hypercerts.claim.rights. | |
29
- | `locations` | `ref` | no | An array of strong references to the location where activity was performed. The record referenced must conform with the lexicon app.certified.location. | |
30
- | `createdAt` | `string` | yes | Client-declared timestamp when this record was originally created | |
18
+ | Property | Type | Required | Description | Comments |
19
+ | ------------------------ | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
20
+ | `title` | `string` | | Title of the hypercert. | maxLength: 256 |
21
+ | `shortDescription` | `string` | | Short summary of this activity claim, suitable for previews and list views. Rich text annotations may be provided via `shortDescriptionFacets`. | maxLength: 3000, maxGraphemes: 300 |
22
+ | `shortDescriptionFacets` | `ref` | | Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc). | |
23
+ | `description` | `string` | | Optional longer description of this activity claim, including context or interpretation. Rich text annotations may be provided via `descriptionFacets`. | maxLength: 30000, maxGraphemes: 3000 |
24
+ | `descriptionFacets` | `ref` | | Rich text annotations for `description` (mentions, URLs, hashtags, etc). | |
25
+ | `image` | `union` | | The hypercert visual representation as a URI or image blob. | |
26
+ | `workScope` | `ref` | | A strong reference to a record defining the scope of work. The record referenced should describe the logical scope using label-based conditions. | |
27
+ | `startDate` | `string` | | When the work began | |
28
+ | `endDate` | `string` | | When the work ended | |
29
+ | `contributors` | `ref` | | An array of contributor objects, each containing contributor information, weight, and contribution details. | |
30
+ | `rights` | `ref` | | A strong reference to the rights that this hypercert has. The record referenced must conform with the lexicon org.hypercerts.claim.rights. | |
31
+ | `locations` | `ref` | ❌ | An array of strong references to the location where activity was performed. The record referenced must conform with the lexicon app.certified.location. | |
32
+ | `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
31
33
 
32
34
  #### Defs
33
35
 
34
- ##### activityWeight
36
+ ##### contributor
35
37
 
36
- | Property | Type | Required | Description |
37
- | ---------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
38
- | `activity` | `ref` | yes | A strong reference to a hypercert activity record. This activity must conform to the lexicon org.hypercerts.claim.activity |
39
- | `weight` | `string` | yes | 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. |
38
+ | Property | Type | Required | Description |
39
+ | --------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
40
+ | `contributorIdentity` | `union` | | Contributor identity as a string (DID or identifier) via org.hypercerts.claim.activity#contributorIdentity, or a strong reference to a contributor information record. |
41
+ | `contributionWeight` | `string` | | 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. |
42
+ | `contributionDetails` | `union` | ❌ | Contribution details as a string via org.hypercerts.claim.activity#contributorRole, or a strong reference to a contribution details record. |
40
43
 
41
44
  ---
42
45
 
@@ -50,14 +53,14 @@ Hypercerts-specific lexicons for tracking impact work and claims.
50
53
 
51
54
  | Property | Type | Required | Description | Comments |
52
55
  | -------------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
53
- | `subject` | `ref` | no | A strong reference to what is being evaluated. (e.g activity, measurement, contribution, etc.) | |
54
- | `evaluators` | `ref` | yes | DIDs of the evaluators | maxLength: 1000 |
55
- | `content` | `union` | no | Evaluation data (URIs or blobs) containing detailed reports or methodology | maxLength: 100 |
56
- | `measurements` | `ref` | no | Optional references to the measurements that contributed to this evaluation. The record(s) referenced must conform with the lexicon org.hypercerts.claim.measurement | maxLength: 100 |
57
- | `summary` | `string` | yes | Brief evaluation summary | maxLength: 5000, maxGraphemes: 1000 |
58
- | `score` | `ref` | no | Overall score for an evaluation on a numeric scale. | |
59
- | `location` | `ref` | no | An optional reference for georeferenced evaluations. The record referenced must conform with the lexicon app.certified.location. | |
60
- | `createdAt` | `string` | yes | Client-declared timestamp when this record was originally created | |
56
+ | `subject` | `ref` | | A strong reference to what is being evaluated. (e.g activity, measurement, contribution, etc.) | |
57
+ | `evaluators` | `ref` | | DIDs of the evaluators | maxLength: 1000 |
58
+ | `content` | `union` | | Evaluation data (URIs or blobs) containing detailed reports or methodology | maxLength: 100 |
59
+ | `measurements` | `ref` | | Optional references to the measurements that contributed to this evaluation. The record(s) referenced must conform with the lexicon org.hypercerts.claim.measurement | maxLength: 100 |
60
+ | `summary` | `string` | | Brief evaluation summary | maxLength: 5000, maxGraphemes: 1000 |
61
+ | `score` | `ref` | | Overall score for an evaluation on a numeric scale. | |
62
+ | `location` | `ref` | | An optional reference for georeferenced evaluations. The record referenced must conform with the lexicon app.certified.location. | |
63
+ | `createdAt` | `string` | | Client-declared timestamp when this record was originally created | |
61
64
 
62
65
  #### Defs
63
66
 
@@ -65,9 +68,9 @@ Hypercerts-specific lexicons for tracking impact work and claims.
65
68
 
66
69
  | Property | Type | Required | Description |
67
70
  | -------- | --------- | -------- | -------------------------------------------- |
68
- | `min` | `integer` | yes | Minimum value of the scale, e.g. 0 or 1. |
69
- | `max` | `integer` | yes | Maximum value of the scale, e.g. 5 or 10. |
70
- | `value` | `integer` | yes | Score within the inclusive range [min, max]. |
71
+ | `min` | `integer` | | Minimum value of the scale, e.g. 0 or 1. |
72
+ | `max` | `integer` | | Maximum value of the scale, e.g. 5 or 10. |
73
+ | `value` | `integer` | | Score within the inclusive range [min, max]. |
71
74
 
72
75
  ---
73
76
 
@@ -81,13 +84,13 @@ Hypercerts-specific lexicons for tracking impact work and claims.
81
84
 
82
85
  | Property | Type | Required | Description | Comments |
83
86
  | ------------------ | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
84
- | `subject` | `ref` | no | A strong reference to the record this evidence relates to (e.g. an activity, project, claim, or evaluation). | |
85
- | `content` | `union` | yes | A piece of evidence (URI or blob) related to the subject record; it may support, clarify, or challenge a hypercert claim. | |
86
- | `title` | `string` | yes | Title to describe the nature of the evidence. | maxLength: 256 |
87
- | `shortDescription` | `string` | no | Short description explaining what this evidence shows. | maxLength: 3000, maxGraphemes: 300 |
88
- | `description` | `string` | no | Longer description describing the evidence in more detail. | maxLength: 30000, maxGraphemes: 3000 |
89
- | `relationType` | `string` | no | How this evidence relates to the subject. | Known values: `supports`, `challenges`, `clarifies` |
90
- | `createdAt` | `string` | yes | Client-declared timestamp when this record was originally created | |
87
+ | `subject` | `ref` | | A strong reference to the record this evidence relates to (e.g. an activity, project, claim, or evaluation). | |
88
+ | `content` | `union` | | A piece of evidence (URI or blob) related to the subject record; it may support, clarify, or challenge a hypercert claim. | |
89
+ | `title` | `string` | | Title to describe the nature of the evidence. | maxLength: 256 |
90
+ | `shortDescription` | `string` | | Short description explaining what this evidence shows. | maxLength: 3000, maxGraphemes: 300 |
91
+ | `description` | `string` | | Longer description describing the evidence in more detail. | maxLength: 30000, maxGraphemes: 3000 |
92
+ | `relationType` | `string` | | How this evidence relates to the subject. | Known values: `supports`, `challenges`, `clarifies` |
93
+ | `createdAt` | `string` | | Client-declared timestamp when this record was originally created | |
91
94
 
92
95
  ---
93
96
 
@@ -101,15 +104,15 @@ Hypercerts-specific lexicons for tracking impact work and claims.
101
104
 
102
105
  | Property | Type | Required | Description | Comments |
103
106
  | ------------- | -------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
104
- | `subject` | `ref` | no | A strong reference to the record this measurement refers to (e.g. an activity, project, or claim). | |
105
- | `measurers` | `ref` | yes | DIDs of the entity (or entities) that measured this data | maxLength: 100 |
106
- | `metric` | `string` | yes | The metric being measured | maxLength: 500 |
107
- | `value` | `string` | yes | The measured value | maxLength: 500 |
108
- | `methodType` | `string` | no | Short identifier for the measurement methodology | maxLength: 30 |
109
- | `methodURI` | `string` | no | URI to methodology documentation, standard protocol, or measurement procedure | |
110
- | `evidenceURI` | `string` | no | URIs to related evidence or underlying data (e.g. org.hypercerts.claim.evidence records or raw datasets) | maxLength: 50 |
111
- | `location` | `ref` | no | A strong reference to the location where the measurement was taken. The record referenced must conform with the lexicon app.certified.location | |
112
- | `createdAt` | `string` | yes | Client-declared timestamp when this record was originally created | |
107
+ | `subject` | `ref` | | A strong reference to the record this measurement refers to (e.g. an activity, project, or claim). | |
108
+ | `measurers` | `ref` | | DIDs of the entity (or entities) that measured this data | maxLength: 100 |
109
+ | `metric` | `string` | | The metric being measured | maxLength: 500 |
110
+ | `value` | `string` | | The measured value | maxLength: 500 |
111
+ | `methodType` | `string` | | Short identifier for the measurement methodology | maxLength: 30 |
112
+ | `methodURI` | `string` | | URI to methodology documentation, standard protocol, or measurement procedure | |
113
+ | `evidenceURI` | `string` | | URIs to related evidence or underlying data (e.g. org.hypercerts.claim.evidence records or raw datasets) | maxLength: 50 |
114
+ | `location` | `ref` | | A strong reference to the location where the measurement was taken. The record referenced must conform with the lexicon app.certified.location | |
115
+ | `createdAt` | `string` | | Client-declared timestamp when this record was originally created | |
113
116
 
114
117
  ---
115
118
 
@@ -121,14 +124,25 @@ Hypercerts-specific lexicons for tracking impact work and claims.
121
124
 
122
125
  #### Properties
123
126
 
124
- | Property | Type | Required | Description | Comments |
125
- | ------------------ | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
126
- | `type` | `string` | no | The type of this collection. Possible fields can be 'favorites', 'project', or any other type of collection. | |
127
- | `title` | `string` | yes | The title of this collection | maxLength: 800, maxGraphemes: 80 |
128
- | `shortDescription` | `string` | no | Short summary of this collection, suitable for previews and list views | maxLength: 3000, maxGraphemes: 300 |
129
- | `description` | `ref` | no | Rich-text description, represented as a Leaflet linear document. | |
130
- | `items` | `ref` | yes | 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). | |
131
- | `createdAt` | `string` | yes | Client-declared timestamp when this record was originally created | |
127
+ | Property | Type | Required | Description | Comments |
128
+ | ------------------ | -------- | -------- | ------------------------------------------------------------------------------------------------------------ | ---------------------------------- |
129
+ | `type` | `string` | | The type of this collection. Possible fields can be 'favorites', 'project', or any other type of collection. | |
130
+ | `title` | `string` | | The title of this collection | maxLength: 800, maxGraphemes: 80 |
131
+ | `shortDescription` | `string` | | Short summary of this collection, suitable for previews and list views | maxLength: 3000, maxGraphemes: 300 |
132
+ | `description` | `ref` | | Rich-text description, represented as a Leaflet linear document. | |
133
+ | `avatar` | `union` | | The collection's avatar/profile image as a URI or image blob. | |
134
+ | `banner` | `union` | | Larger horizontal image to display behind the collection view. | |
135
+ | `items` | `ref` | ✅ | Array of items in this collection with optional weights. | |
136
+ | `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
137
+
138
+ #### Defs
139
+
140
+ ##### item
141
+
142
+ | Property | Type | Required | Description |
143
+ | ---------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
144
+ | `itemIdentifier` | `ref` | ✅ | Strong reference to an item in this collection. Items can be activities (org.hypercerts.claim.activity) and/or other collections (org.hypercerts.claim.collection). |
145
+ | `itemWeight` | `string` | ❌ | 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. |
132
146
 
133
147
  ---
134
148
 
@@ -142,11 +156,11 @@ Hypercerts-specific lexicons for tracking impact work and claims.
142
156
 
143
157
  | Property | Type | Required | Description | Comments |
144
158
  | ------------------- | -------- | -------- | ------------------------------------------------------------------ | -------------- |
145
- | `rightsName` | `string` | yes | Full name of the rights | maxLength: 100 |
146
- | `rightsType` | `string` | yes | Short rights identifier for easier search | maxLength: 10 |
147
- | `rightsDescription` | `string` | yes | Description of the rights of this hypercert | |
148
- | `attachment` | `union` | no | An attachment to define the rights further, e.g. a legal document. | |
149
- | `createdAt` | `string` | yes | Client-declared timestamp when this record was originally created | |
159
+ | `rightsName` | `string` | | Full name of the rights | maxLength: 100 |
160
+ | `rightsType` | `string` | | Short rights identifier for easier search | maxLength: 10 |
161
+ | `rightsDescription` | `string` | | Description of the rights of this hypercert | |
162
+ | `attachment` | `union` | | An attachment to define the rights further, e.g. a legal document. | |
163
+ | `createdAt` | `string` | | Client-declared timestamp when this record was originally created | |
150
164
 
151
165
  ---
152
166
 
@@ -160,17 +174,17 @@ Hypercerts-specific lexicons for tracking impact work and claims.
160
174
 
161
175
  | Property | Type | Required | Description | Comments |
162
176
  | ---------------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
163
- | `from` | `ref` | yes | DID of the sender who transferred the funds. Leave empty if sender wants to stay anonymous. | |
164
- | `to` | `string` | yes | The recipient of the funds. Can be identified by DID or a clear-text name. | |
165
- | `amount` | `string` | yes | Amount of funding received. | |
166
- | `currency` | `string` | yes | Currency of the payment (e.g. EUR, USD, ETH). | |
167
- | `paymentRail` | `string` | no | How the funds were transferred (e.g. bank_transfer, credit_card, onchain, cash, check, payment_processor). | |
168
- | `paymentNetwork` | `string` | no | Optional network within the payment rail (e.g. arbitrum, ethereum, sepa, visa, paypal). | |
169
- | `transactionId` | `string` | no | Identifier of the underlying payment transaction (e.g. bank reference, onchain transaction hash, or processor-specific ID). Use paymentNetwork to specify the network where applicable. | |
170
- | `for` | `string` | no | Optional reference to the activity, project, or organization this funding relates to. | |
171
- | `notes` | `string` | no | Optional notes or additional context for this funding receipt. | maxLength: 500 |
172
- | `occurredAt` | `string` | no | Timestamp when the payment occurred. | |
173
- | `createdAt` | `string` | yes | Client-declared timestamp when this receipt record was created. | |
177
+ | `from` | `ref` | | DID of the sender who transferred the funds. Leave empty if sender wants to stay anonymous. | |
178
+ | `to` | `string` | | The recipient of the funds. Can be identified by DID or a clear-text name. | |
179
+ | `amount` | `string` | | Amount of funding received. | |
180
+ | `currency` | `string` | | Currency of the payment (e.g. EUR, USD, ETH). | |
181
+ | `paymentRail` | `string` | | How the funds were transferred (e.g. bank_transfer, credit_card, onchain, cash, check, payment_processor). | |
182
+ | `paymentNetwork` | `string` | | Optional network within the payment rail (e.g. arbitrum, ethereum, sepa, visa, paypal). | |
183
+ | `transactionId` | `string` | | Identifier of the underlying payment transaction (e.g. bank reference, onchain transaction hash, or processor-specific ID). Use paymentNetwork to specify the network where applicable. | |
184
+ | `for` | `string` | | Optional reference to the activity, project, or organization this funding relates to. | |
185
+ | `notes` | `string` | | Optional notes or additional context for this funding receipt. | maxLength: 500 |
186
+ | `occurredAt` | `string` | | Timestamp when the payment occurred. | |
187
+ | `createdAt` | `string` | | Client-declared timestamp when this receipt record was created. | |
174
188
 
175
189
  ---
176
190
 
@@ -204,13 +218,13 @@ Certified lexicons are common/shared lexicons that can be used across multiple p
204
218
 
205
219
  | Property | Type | Required | Description | Comments |
206
220
  | -------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
207
- | `lpVersion` | `string` | yes | The version of the Location Protocol | maxLength: 10 |
208
- | `srs` | `string` | yes | The Spatial Reference System URI (e.g., http://www.opengis.net/def/crs/OGC/1.3/CRS84) that defines the coordinate system. | maxLength: 100 |
209
- | `locationType` | `string` | yes | An identifier for the format of the location data (e.g., coordinate-decimal, geojson-point) | maxLength: 20, Known values: `coordinate-decimal`, `geojson-point` |
210
- | `location` | `union` | yes | The location of where the work was performed as a URI or blob. | |
211
- | `name` | `string` | no | Optional name for this location | maxLength: 1000, maxGraphemes: 100 |
212
- | `description` | `string` | no | Optional description for this location | maxLength: 2000, maxGraphemes: 500 |
213
- | `createdAt` | `string` | yes | Client-declared timestamp when this record was originally created | |
221
+ | `lpVersion` | `string` | | The version of the Location Protocol | maxLength: 10 |
222
+ | `srs` | `string` | | The Spatial Reference System URI (e.g., http://www.opengis.net/def/crs/OGC/1.3/CRS84) that defines the coordinate system. | maxLength: 100 |
223
+ | `locationType` | `string` | | An identifier for the format of the location data (e.g., coordinate-decimal, geojson-point) | maxLength: 20, Known values: `coordinate-decimal`, `geojson-point` |
224
+ | `location` | `union` | | The location of where the work was performed as a URI or blob. | |
225
+ | `name` | `string` | | Optional name for this location | maxLength: 1000, maxGraphemes: 100 |
226
+ | `description` | `string` | | Optional description for this location | maxLength: 2000, maxGraphemes: 500 |
227
+ | `createdAt` | `string` | | Client-declared timestamp when this record was originally created | |
214
228
 
215
229
  ---
216
230
 
@@ -224,12 +238,12 @@ Certified lexicons are common/shared lexicons that can be used across multiple p
224
238
 
225
239
  | Property | Type | Required | Description | Comments |
226
240
  | ---------------- | -------- | -------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
227
- | `badgeType` | `string` | yes | Category of the badge (e.g. endorsement, participation, affiliation). | |
228
- | `title` | `string` | yes | Human-readable title of the badge. | |
229
- | `icon` | `blob` | yes | Icon representing the badge, stored as a blob for compact visual display. | maxSize: 1048576, accepts: image/png, image/jpeg, image/webp, image/svg+xml |
230
- | `description` | `string` | no | Optional short statement describing what the badge represents. | |
231
- | `allowedIssuers` | `ref` | no | Optional allowlist of DIDs allowed to issue this badge. If omitted, anyone may issue it. | |
232
- | `createdAt` | `string` | yes | Client-declared timestamp when this record was originally created | |
241
+ | `badgeType` | `string` | | Category of the badge (e.g. endorsement, participation, affiliation). | |
242
+ | `title` | `string` | | Human-readable title of the badge. | |
243
+ | `icon` | `blob` | | Icon representing the badge, stored as a blob for compact visual display. | maxSize: 1048576, accepts: image/png, image/jpeg, image/webp, image/svg+xml |
244
+ | `description` | `string` | | Optional short statement describing what the badge represents. | |
245
+ | `allowedIssuers` | `ref` | | Optional allowlist of DIDs allowed to issue this badge. If omitted, anyone may issue it. | |
246
+ | `createdAt` | `string` | | Client-declared timestamp when this record was originally created | |
233
247
 
234
248
  ---
235
249
 
@@ -243,10 +257,10 @@ Certified lexicons are common/shared lexicons that can be used across multiple p
243
257
 
244
258
  | Property | Type | Required | Description |
245
259
  | ----------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
246
- | `badge` | `ref` | yes | Reference to the badge definition for this award. |
247
- | `subject` | `union` | yes | Entity the badge award is for (either an account DID or any specific AT Protocol record), e.g. a user, a project, or a specific activity claim. |
248
- | `note` | `string` | no | Optional statement explaining the reason for this badge award. |
249
- | `createdAt` | `string` | yes | Client-declared timestamp when this record was originally created |
260
+ | `badge` | `ref` | | Reference to the badge definition for this award. |
261
+ | `subject` | `union` | | Entity the badge award is for (either an account DID or any specific AT Protocol record), e.g. a user, a project, or a specific activity claim. |
262
+ | `note` | `string` | | Optional statement explaining the reason for this badge award. |
263
+ | `createdAt` | `string` | | Client-declared timestamp when this record was originally created |
250
264
 
251
265
  ---
252
266
 
@@ -260,10 +274,10 @@ Certified lexicons are common/shared lexicons that can be used across multiple p
260
274
 
261
275
  | Property | Type | Required | Description |
262
276
  | ------------ | -------- | -------- | ------------------------------------------------------------------------ |
263
- | `badgeAward` | `ref` | yes | Reference to the badge award. |
264
- | `response` | `string` | yes | The recipient’s response for the badge (accepted or rejected). |
265
- | `weight` | `string` | no | Optional relative weight for accepted badges, assigned by the recipient. |
266
- | `createdAt` | `string` | yes | Client-declared timestamp when this record was originally created |
277
+ | `badgeAward` | `ref` | | Reference to the badge award. |
278
+ | `response` | `string` | | The recipient’s response for the badge (accepted or rejected). |
279
+ | `weight` | `string` | | Optional relative weight for accepted badges, assigned by the recipient. |
280
+ | `createdAt` | `string` | | Client-declared timestamp when this record was originally created |
267
281
 
268
282
  ---
269
283