Skip to content

Commit 8a35285

Browse files
authored
Merge pull request #92 from hypercerts-org/update-contributor-lexicon
2 parents 296fc93 + bec8e63 commit 8a35285

File tree

6 files changed

+1100
-36
lines changed

6 files changed

+1100
-36
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
"@hypercerts-org/lexicon": minor
3+
---
4+
5+
Update `org.hypercerts.claim.contributor` lexicon to support individual contributor profiles and roles.
6+
7+
Breaking Changes:
8+
9+
- Removed `contributors` array.
10+
- Added `identifier`, `displayName`, and `image` fields for individual profiles.
11+
- Renamed `description` to `contributionDescription`.
12+
- Updated `required` fields to only include `createdAt`.
13+
14+
Also corrected incorrect references to `org.hypercerts.claim.contribution` across the codebase to use the correct ID `org.hypercerts.claim.contributor`.

ERD.puml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ classDiagram {
4545

4646
' Contributors are represented by DIDs or human-readable strings
4747
' therefore do not require modelling via a lexicon.
48-
entity contributor #FFD4A3 {
48+
entity "contributor (DID/profile)" as contributorEntity #FFD4A3 {
4949
!if (SHOW_FIELDS == "true")
50-
DID or name/pseudonym
50+
DID or social profile URI
5151
!endif
5252
}
5353

@@ -111,12 +111,14 @@ dataclass evaluation {
111111
!endif
112112
}
113113

114-
' org.hypercerts.claim.contribution
115-
dataclass contribution {
114+
' org.hypercerts.claim.contributor
115+
dataclass contributor {
116116
!if (SHOW_FIELDS == "true")
117+
identifier?
118+
displayName?
119+
image?
117120
role?
118-
contributors[]
119-
description?
121+
contributionDescription?
120122
startDate?
121123
endDate?
122124
createdAt
@@ -298,11 +300,11 @@ collection::items --> activity
298300
collection::items --> collection : "recursive\nnesting"
299301
collection ..|> collectionProject : "sidecar\n(same TID)"
300302

301-
activity::contributions -l--> contribution
303+
activity::contributions -l--> contributor
302304
activity::rights --> rights
303305
activity::locations --> location
304306

305-
contribution::contributors --> contributor : made by
307+
contributor::identifier --> contributorEntity : made by
306308

307309
' These ones are not described by any lexicon, but are added to
308310
' the diagram for clarity
@@ -315,7 +317,7 @@ contributor ..> rights : has
315317
' However we still deliberately use solid arrows because they are
316318
' explicitly described within the fundingReceipt lexicon.
317319
fundingReceipt::from --> funder
318-
fundingReceipt::to --> contributor
320+
fundingReceipt::to --> contributorEntity
319321

320322
fundingReceipt::for --> activity : funds
321323

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ Hypercerts-specific lexicons for tracking impact work and claims.
295295
| `workScope` | `object` || Logical scope of the work using label-based conditions | Object with `withinAllOf`, `withinAnyOf`, `withinNoneOf` arrays of labels |
296296
| `startDate` | `string` || When the work began | |
297297
| `endDate` | `string` || When the work ended | |
298-
| `contributions` | `array` || A strong reference to the contributions done to create the impact in the hypercerts | References must conform to `org.hypercerts.claim.contribution` |
298+
| `contributions` | `array` || A strong reference to the contributions done to create the impact in the hypercerts | References must conform to `org.hypercerts.claim.contributor` |
299299
| `rights` | `ref` || A strong reference to the rights that this hypercert has | References must conform to `org.hypercerts.claim.rights` |
300300
| `locations` | `ref` || An array of strong references to the locations where the work for done hypercert was located | References must conform to `app.certified.location` |
301301
| `createdAt` | `string` || Client-declared timestamp when this record was originally created | |
@@ -311,24 +311,26 @@ Hypercerts-specific lexicons for tracking impact work and claims.
311311

312312
---
313313

314-
### Hypercerts Contribution
314+
### Hypercerts Contributor
315315

316-
**Lexicon ID:** `org.hypercerts.claim.contribution`
316+
**Lexicon ID:** `org.hypercerts.claim.contributor`
317317

318-
**Description:** A contribution made toward a hypercert's impact.
318+
**Description:** A contribution made toward a hypercert's impact, representing a single contributor's profile and role.
319319

320320
**Key:** `tid`
321321

322322
#### Properties
323323

324-
| Property | Type | Required | Description |
325-
| -------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
326-
| `role` | `string` || Role or title of the contributor(s). |
327-
| `contributors` | `array` || List of the contributors (names, pseudonyms, or DIDs). If multiple contributors are stored in the same hypercertContribution, then they would have the exact same role. |
328-
| `description` | `string` || What the contribution concretely achieved |
329-
| `startDate` | `string` || When this contribution started. This should be a subset of the hypercert timeframe. |
330-
| `endDate` | `string` || When this contribution finished. This should be a subset of the hypercert timeframe. |
331-
| `createdAt` | `string` || Client-declared timestamp when this record was originally created |
324+
| Property | Type | Required | Description |
325+
| ------------------------- | -------- | -------- | ------------------------------------------------------------------------------------ |
326+
| `identifier` | `string` || DID or a URI to a social profile of the contributor. |
327+
| `displayName` | `string` || Display name of the contributor. |
328+
| `image` | `union` || The contributor visual representation as a URI or image blob. |
329+
| `role` | `string` || Role or title of the contributor. |
330+
| `contributionDescription` | `string` || What the contribution concretely achieved. |
331+
| `startDate` | `string` || When this contribution started. This should be a subset of the hypercert timeframe. |
332+
| `endDate` | `string` || When this contribution finished. This should be a subset of the hypercert timeframe. |
333+
| `createdAt` | `string` || Client-declared timestamp when this record was originally created |
332334

333335
---
334336

0 commit comments

Comments
 (0)