@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/CHANGELOG.md CHANGED
@@ -1,5 +1,81 @@
1
1
  # @hypercerts-org/lexicon
2
2
 
3
+ ## 0.10.0-beta.8
4
+
5
+ ### Minor Changes
6
+
7
+ - [#107](https://github.com/hypercerts-org/hypercerts-lexicon/pull/107) [`678de97`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/678de97614826fc124ed3208cccb236d9b6e2bb1) Thanks [@holkexyz](https://github.com/holkexyz)! - Add work scope logic expression system with boolean operators
8
+
9
+ **New Features:**
10
+ - **Work scope logic AST (`org.hypercerts.defs`):**
11
+ - Added `org.hypercerts.defs#workScopeAll` (logical AND): requires all arguments to be satisfied, with recursive union support for nested expressions
12
+ - Added `org.hypercerts.defs#workScopeAny` (logical OR): requires at least one argument to be satisfied, with recursive union support for nested expressions
13
+ - Added `org.hypercerts.defs#workScopeNot` (logical NOT): negates an expression, with recursive union support for nested expressions
14
+ - Added `org.hypercerts.defs#workScopeAtom`: atomic reference to a scope tag record via strongRef
15
+ - All operators support recursive boolean logic expressions through union types in their `args`/`arg` properties, allowing nested combinations of `workScopeAll`, `workScopeAny`, `workScopeNot`, and `workScopeAtom`
16
+ - **Work scope tag lexicon (`org.hypercerts.helper.workScopeTag`):**
17
+ - New record type for reusable scope atoms
18
+ - Fields: `createdAt`, `key`, `label` (required), `kind`, `description`, `parent`, `aliases`, `externalReference` (optional)
19
+ - Supports taxonomy/hierarchy via `parent` strongRef
20
+ - Supports external references via URI or blob
21
+ - **Activity lexicon (`org.hypercerts.claim.activity`):**
22
+ - Added `org.hypercerts.claim.activity#workScope` field using a union type that references `org.hypercerts.defs#workScopeAll`, `org.hypercerts.defs#workScopeAny`, `org.hypercerts.defs#workScopeNot`, and `org.hypercerts.defs#workScopeAtom`
23
+ - Enables complex boolean logic expressions for work scope definitions with recursive nesting support
24
+ - Replaces simple strongRef approach with expressive AST-based system
25
+
26
+ **Breaking Changes:**
27
+ - The `workScope` field in `org.hypercerts.claim.activity` now expects a work scope logic expression instead of a simple strongRef. Existing records using the old format will need to be migrated to use the new AST structure.
28
+
29
+ ## 0.10.0-beta.7
30
+
31
+ ### Minor Changes
32
+
33
+ - [#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
34
+
35
+ - [#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
36
+
37
+ **Breaking Changes:**
38
+ - **Activity lexicon (`org.hypercerts.claim.activity`):**
39
+ - Removed `org.hypercerts.claim.activity#activityWeight` def
40
+ - Activity records no longer include activity weight information
41
+ - **Collection lexicon (`org.hypercerts.claim.collection`):**
42
+ - Changed `org.hypercerts.claim.collection#items` from array of strongRefs to array of item objects
43
+ - Added `org.hypercerts.claim.collection#item` def with:
44
+ - `itemIdentifier` (required): strongRef to an item (activity or collection)
45
+ - `itemWeight` (optional): positive numeric value stored as string
46
+ - Supports recursive collection nesting (items can reference activities or other collections)
47
+
48
+ **Migration:**
49
+
50
+ **Collection items:** Convert from array of strongRefs to array of item objects:
51
+
52
+ ```json
53
+ // Before
54
+ "items": [strongRef1, strongRef2]
55
+
56
+ // After
57
+ "items": [
58
+ { "itemIdentifier": strongRef1, "itemWeight": "1.5" },
59
+ { "itemIdentifier": strongRef2 }
60
+ ]
61
+ ```
62
+
63
+ **Activity weights:** Migrate existing `org.hypercerts.claim.activity#activityWeight` data to collection `org.hypercerts.claim.collection#item.itemWeight`:
64
+
65
+ ```json
66
+ // Old (removed from activity)
67
+ { "activity": { "uri": "...", "cid": "..." }, "weight": "1.5" }
68
+
69
+ // New (in collection items)
70
+ { "itemIdentifier": { "uri": "...", "cid": "..." }, "itemWeight": "1.5" }
71
+ ```
72
+
73
+ Update collections that reference activities to include weights in `org.hypercerts.claim.collection#item.itemWeight`. Weights can be dropped if not needed.
74
+
75
+ - [#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
76
+
77
+ Add `shortDescriptionFacets` and `descriptionFacets` fields to the activity lexicon to support rich text annotations (mentions, URLs, hashtags, etc.) in activity claim descriptions.
78
+
3
79
  ## 0.10.0-beta.6
4
80
 
5
81
  ### 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,36 +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
- | `contributors` | `ref` | no | An array of contributor objects, each containing contributor information, weight, and contribution details. | |
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` | `union` | | Work scope logic expression using boolean operators (all/any/not) and atomic scope references. | |
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
36
  ##### contributor
35
37
 
36
- | Property | Type | Required | Description |
37
- | ------------------------ | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
38
- | `contributorInformation` | `union` | yes | Contributor information as a string (DID or identifier) or strong reference to for instance org.hypercerts.claim.contributorInformation#main. |
39
- | `weight` | `string` | no | 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. |
40
- | `contributionDetails` | `union` | no | Contribution details as a string or strong reference to org.hypercerts.claim.contributionDetails#main. |
41
-
42
- ##### activityWeight
43
-
44
- | Property | Type | Required | Description |
45
- | ---------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
46
- | `activity` | `ref` | yes | A strong reference to a hypercert activity record. This activity must conform to the lexicon org.hypercerts.claim.activity |
47
- | `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. |
48
43
 
49
44
  ---
50
45
 
@@ -58,14 +53,14 @@ Hypercerts-specific lexicons for tracking impact work and claims.
58
53
 
59
54
  | Property | Type | Required | Description | Comments |
60
55
  | -------------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
61
- | `subject` | `ref` | no | A strong reference to what is being evaluated. (e.g activity, measurement, contribution, etc.) | |
62
- | `evaluators` | `ref` | yes | DIDs of the evaluators | maxLength: 1000 |
63
- | `content` | `union` | no | Evaluation data (URIs or blobs) containing detailed reports or methodology | maxLength: 100 |
64
- | `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 |
65
- | `summary` | `string` | yes | Brief evaluation summary | maxLength: 5000, maxGraphemes: 1000 |
66
- | `score` | `ref` | no | Overall score for an evaluation on a numeric scale. | |
67
- | `location` | `ref` | no | An optional reference for georeferenced evaluations. The record referenced must conform with the lexicon app.certified.location. | |
68
- | `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 | |
69
64
 
70
65
  #### Defs
71
66
 
@@ -73,9 +68,9 @@ Hypercerts-specific lexicons for tracking impact work and claims.
73
68
 
74
69
  | Property | Type | Required | Description |
75
70
  | -------- | --------- | -------- | -------------------------------------------- |
76
- | `min` | `integer` | yes | Minimum value of the scale, e.g. 0 or 1. |
77
- | `max` | `integer` | yes | Maximum value of the scale, e.g. 5 or 10. |
78
- | `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]. |
79
74
 
80
75
  ---
81
76
 
@@ -89,13 +84,13 @@ Hypercerts-specific lexicons for tracking impact work and claims.
89
84
 
90
85
  | Property | Type | Required | Description | Comments |
91
86
  | ------------------ | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
92
- | `subject` | `ref` | no | A strong reference to the record this evidence relates to (e.g. an activity, project, claim, or evaluation). | |
93
- | `content` | `union` | yes | A piece of evidence (URI or blob) related to the subject record; it may support, clarify, or challenge a hypercert claim. | |
94
- | `title` | `string` | yes | Title to describe the nature of the evidence. | maxLength: 256 |
95
- | `shortDescription` | `string` | no | Short description explaining what this evidence shows. | maxLength: 3000, maxGraphemes: 300 |
96
- | `description` | `string` | no | Longer description describing the evidence in more detail. | maxLength: 30000, maxGraphemes: 3000 |
97
- | `relationType` | `string` | no | How this evidence relates to the subject. | Known values: `supports`, `challenges`, `clarifies` |
98
- | `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 | |
99
94
 
100
95
  ---
101
96
 
@@ -109,15 +104,15 @@ Hypercerts-specific lexicons for tracking impact work and claims.
109
104
 
110
105
  | Property | Type | Required | Description | Comments |
111
106
  | ------------- | -------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
112
- | `subject` | `ref` | no | A strong reference to the record this measurement refers to (e.g. an activity, project, or claim). | |
113
- | `measurers` | `ref` | yes | DIDs of the entity (or entities) that measured this data | maxLength: 100 |
114
- | `metric` | `string` | yes | The metric being measured | maxLength: 500 |
115
- | `value` | `string` | yes | The measured value | maxLength: 500 |
116
- | `methodType` | `string` | no | Short identifier for the measurement methodology | maxLength: 30 |
117
- | `methodURI` | `string` | no | URI to methodology documentation, standard protocol, or measurement procedure | |
118
- | `evidenceURI` | `string` | no | URIs to related evidence or underlying data (e.g. org.hypercerts.claim.evidence records or raw datasets) | maxLength: 50 |
119
- | `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 | |
120
- | `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 | |
121
116
 
122
117
  ---
123
118
 
@@ -129,14 +124,25 @@ Hypercerts-specific lexicons for tracking impact work and claims.
129
124
 
130
125
  #### Properties
131
126
 
132
- | Property | Type | Required | Description | Comments |
133
- | ------------------ | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
134
- | `type` | `string` | no | The type of this collection. Possible fields can be 'favorites', 'project', or any other type of collection. | |
135
- | `title` | `string` | yes | The title of this collection | maxLength: 800, maxGraphemes: 80 |
136
- | `shortDescription` | `string` | no | Short summary of this collection, suitable for previews and list views | maxLength: 3000, maxGraphemes: 300 |
137
- | `description` | `ref` | no | Rich-text description, represented as a Leaflet linear document. | |
138
- | `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). | |
139
- | `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. |
140
146
 
141
147
  ---
142
148
 
@@ -150,11 +156,11 @@ Hypercerts-specific lexicons for tracking impact work and claims.
150
156
 
151
157
  | Property | Type | Required | Description | Comments |
152
158
  | ------------------- | -------- | -------- | ------------------------------------------------------------------ | -------------- |
153
- | `rightsName` | `string` | yes | Full name of the rights | maxLength: 100 |
154
- | `rightsType` | `string` | yes | Short rights identifier for easier search | maxLength: 10 |
155
- | `rightsDescription` | `string` | yes | Description of the rights of this hypercert | |
156
- | `attachment` | `union` | no | An attachment to define the rights further, e.g. a legal document. | |
157
- | `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 | |
158
164
 
159
165
  ---
160
166
 
@@ -168,17 +174,17 @@ Hypercerts-specific lexicons for tracking impact work and claims.
168
174
 
169
175
  | Property | Type | Required | Description | Comments |
170
176
  | ---------------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
171
- | `from` | `ref` | yes | DID of the sender who transferred the funds. Leave empty if sender wants to stay anonymous. | |
172
- | `to` | `string` | yes | The recipient of the funds. Can be identified by DID or a clear-text name. | |
173
- | `amount` | `string` | yes | Amount of funding received. | |
174
- | `currency` | `string` | yes | Currency of the payment (e.g. EUR, USD, ETH). | |
175
- | `paymentRail` | `string` | no | How the funds were transferred (e.g. bank_transfer, credit_card, onchain, cash, check, payment_processor). | |
176
- | `paymentNetwork` | `string` | no | Optional network within the payment rail (e.g. arbitrum, ethereum, sepa, visa, paypal). | |
177
- | `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. | |
178
- | `for` | `string` | no | Optional reference to the activity, project, or organization this funding relates to. | |
179
- | `notes` | `string` | no | Optional notes or additional context for this funding receipt. | maxLength: 500 |
180
- | `occurredAt` | `string` | no | Timestamp when the payment occurred. | |
181
- | `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. | |
182
188
 
183
189
  ---
184
190
 
@@ -192,13 +198,17 @@ Certified lexicons are common/shared lexicons that can be used across multiple p
192
198
 
193
199
  #### Defs
194
200
 
195
- | Def | Type | Description | Comments |
196
- | ------------ | -------- | ----------------------------------------- | --------------------------------------- |
197
- | `uri` | `object` | Object containing a URI to external data | Has `uri` property (string, format uri) |
198
- | `smallBlob` | `object` | Object containing a blob to external data | Has `blob` property (blob, up to 10MB) |
199
- | `largeBlob` | `object` | Object containing a blob to external data | Has `blob` property (blob, up to 100MB) |
200
- | `smallImage` | `object` | Object containing a small image | Has `image` property (blob, up to 5MB) |
201
- | `largeImage` | `object` | Object containing a large image | Has `image` property (blob, up to 10MB) |
201
+ | Def | Type | Description | Comments |
202
+ | --------------- | -------- | -------------------------------------------------------------- | --------------------------------------- |
203
+ | `uri` | `object` | Object containing a URI to external data | Has `uri` property (string, format uri) |
204
+ | `smallBlob` | `object` | Object containing a blob to external data | Has `blob` property (blob, up to 10MB) |
205
+ | `largeBlob` | `object` | Object containing a blob to external data | Has `blob` property (blob, up to 100MB) |
206
+ | `smallImage` | `object` | Object containing a small image | Has `image` property (blob, up to 5MB) |
207
+ | `largeImage` | `object` | Object containing a large image | Has `image` property (blob, up to 10MB) |
208
+ | `workScopeAll` | `object` | Logical AND operation: all arguments must be satisfied. | |
209
+ | `workScopeAny` | `object` | Logical OR operation: at least one argument must be satisfied. | |
210
+ | `workScopeNot` | `object` | Logical NOT operation: the argument must not be satisfied. | |
211
+ | `workScopeAtom` | `object` | Atomic scope reference: a strong reference to a scope record. | |
202
212
 
203
213
  ---
204
214
 
@@ -212,13 +222,13 @@ Certified lexicons are common/shared lexicons that can be used across multiple p
212
222
 
213
223
  | Property | Type | Required | Description | Comments |
214
224
  | -------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
215
- | `lpVersion` | `string` | yes | The version of the Location Protocol | maxLength: 10 |
216
- | `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 |
217
- | `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` |
218
- | `location` | `union` | yes | The location of where the work was performed as a URI or blob. | |
219
- | `name` | `string` | no | Optional name for this location | maxLength: 1000, maxGraphemes: 100 |
220
- | `description` | `string` | no | Optional description for this location | maxLength: 2000, maxGraphemes: 500 |
221
- | `createdAt` | `string` | yes | Client-declared timestamp when this record was originally created | |
225
+ | `lpVersion` | `string` | | The version of the Location Protocol | maxLength: 10 |
226
+ | `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 |
227
+ | `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` |
228
+ | `location` | `union` | | The location of where the work was performed as a URI or blob. | |
229
+ | `name` | `string` | | Optional name for this location | maxLength: 1000, maxGraphemes: 100 |
230
+ | `description` | `string` | | Optional description for this location | maxLength: 2000, maxGraphemes: 500 |
231
+ | `createdAt` | `string` | | Client-declared timestamp when this record was originally created | |
222
232
 
223
233
  ---
224
234
 
@@ -232,12 +242,12 @@ Certified lexicons are common/shared lexicons that can be used across multiple p
232
242
 
233
243
  | Property | Type | Required | Description | Comments |
234
244
  | ---------------- | -------- | -------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
235
- | `badgeType` | `string` | yes | Category of the badge (e.g. endorsement, participation, affiliation). | |
236
- | `title` | `string` | yes | Human-readable title of the badge. | |
237
- | `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 |
238
- | `description` | `string` | no | Optional short statement describing what the badge represents. | |
239
- | `allowedIssuers` | `ref` | no | Optional allowlist of DIDs allowed to issue this badge. If omitted, anyone may issue it. | |
240
- | `createdAt` | `string` | yes | Client-declared timestamp when this record was originally created | |
245
+ | `badgeType` | `string` | | Category of the badge (e.g. endorsement, participation, affiliation). | |
246
+ | `title` | `string` | | Human-readable title of the badge. | |
247
+ | `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 |
248
+ | `description` | `string` | | Optional short statement describing what the badge represents. | |
249
+ | `allowedIssuers` | `ref` | | Optional allowlist of DIDs allowed to issue this badge. If omitted, anyone may issue it. | |
250
+ | `createdAt` | `string` | | Client-declared timestamp when this record was originally created | |
241
251
 
242
252
  ---
243
253
 
@@ -251,10 +261,10 @@ Certified lexicons are common/shared lexicons that can be used across multiple p
251
261
 
252
262
  | Property | Type | Required | Description |
253
263
  | ----------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
254
- | `badge` | `ref` | yes | Reference to the badge definition for this award. |
255
- | `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. |
256
- | `note` | `string` | no | Optional statement explaining the reason for this badge award. |
257
- | `createdAt` | `string` | yes | Client-declared timestamp when this record was originally created |
264
+ | `badge` | `ref` | | Reference to the badge definition for this award. |
265
+ | `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. |
266
+ | `note` | `string` | | Optional statement explaining the reason for this badge award. |
267
+ | `createdAt` | `string` | | Client-declared timestamp when this record was originally created |
258
268
 
259
269
  ---
260
270
 
@@ -268,10 +278,10 @@ Certified lexicons are common/shared lexicons that can be used across multiple p
268
278
 
269
279
  | Property | Type | Required | Description |
270
280
  | ------------ | -------- | -------- | ------------------------------------------------------------------------ |
271
- | `badgeAward` | `ref` | yes | Reference to the badge award. |
272
- | `response` | `string` | yes | The recipient’s response for the badge (accepted or rejected). |
273
- | `weight` | `string` | no | Optional relative weight for accepted badges, assigned by the recipient. |
274
- | `createdAt` | `string` | yes | Client-declared timestamp when this record was originally created |
281
+ | `badgeAward` | `ref` | | Reference to the badge award. |
282
+ | `response` | `string` | | The recipient’s response for the badge (accepted or rejected). |
283
+ | `weight` | `string` | | Optional relative weight for accepted badges, assigned by the recipient. |
284
+ | `createdAt` | `string` | | Client-declared timestamp when this record was originally created |
275
285
 
276
286
  ---
277
287