Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .changeset/update-contributor-lexicon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@hypercerts-org/lexicon": minor
---

Update `org.hypercerts.claim.contributor` lexicon to support individual contributor profiles and roles.

Breaking Changes:

- Removed `contributors` array.
- Added `identifier`, `displayName`, and `image` fields for individual profiles.
- Renamed `description` to `contributionDescription`.
- Updated `required` fields to only include `createdAt`.

Also corrected incorrect references to `org.hypercerts.claim.contribution` across the codebase to use the correct ID `org.hypercerts.claim.contributor`.
20 changes: 11 additions & 9 deletions ERD.puml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ classDiagram {

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

Expand Down Expand Up @@ -111,12 +111,14 @@ dataclass evaluation {
!endif
}

' org.hypercerts.claim.contribution
dataclass contribution {
' org.hypercerts.claim.contributor
dataclass contributor {
!if (SHOW_FIELDS == "true")
identifier?
displayName?
image?
role?
contributors[]
description?
contributionDescription?
startDate?
endDate?
createdAt
Expand Down Expand Up @@ -298,11 +300,11 @@ collection::items --> activity
collection::items --> collection : "recursive\nnesting"
collection ..|> collectionProject : "sidecar\n(same TID)"

activity::contributions -l--> contribution
activity::contributions -l--> contributor
activity::rights --> rights
activity::locations --> location

contribution::contributors --> contributor : made by
contributor::identifier --> contributorEntity : made by

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

fundingReceipt::for --> activity : funds

Expand Down
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ Hypercerts-specific lexicons for tracking impact work and claims.
| `workScope` | `object` | ❌ | Logical scope of the work using label-based conditions | Object with `withinAllOf`, `withinAnyOf`, `withinNoneOf` arrays of labels |
| `startDate` | `string` | ❌ | When the work began | |
| `endDate` | `string` | ❌ | When the work ended | |
| `contributions` | `array` | ❌ | A strong reference to the contributions done to create the impact in the hypercerts | References must conform to `org.hypercerts.claim.contribution` |
| `contributions` | `array` | ❌ | A strong reference to the contributions done to create the impact in the hypercerts | References must conform to `org.hypercerts.claim.contributor` |
| `rights` | `ref` | ❌ | A strong reference to the rights that this hypercert has | References must conform to `org.hypercerts.claim.rights` |
| `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` |
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
Expand All @@ -311,24 +311,26 @@ Hypercerts-specific lexicons for tracking impact work and claims.

---

### Hypercerts Contribution
### Hypercerts Contributor

**Lexicon ID:** `org.hypercerts.claim.contribution`
**Lexicon ID:** `org.hypercerts.claim.contributor`

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

**Key:** `tid`

#### Properties

| Property | Type | Required | Description |
| -------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `role` | `string` | ❌ | Role or title of the contributor(s). |
| `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. |
| `description` | `string` | ❌ | What the contribution concretely achieved |
| `startDate` | `string` | ❌ | When this contribution started. This should be a subset of the hypercert timeframe. |
| `endDate` | `string` | ❌ | When this contribution finished. This should be a subset of the hypercert timeframe. |
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created |
| Property | Type | Required | Description |
| ------------------------- | -------- | -------- | ------------------------------------------------------------------------------------ |
| `identifier` | `string` | ❌ | DID or a URI to a social profile of the contributor. |
| `displayName` | `string` | ❌ | Display name of the contributor. |
| `image` | `union` | ❌ | The contributor visual representation as a URI or image blob. |
| `role` | `string` | ❌ | Role or title of the contributor. |
| `contributionDescription` | `string` | ❌ | What the contribution concretely achieved. |
| `startDate` | `string` | ❌ | When this contribution started. This should be a subset of the hypercert timeframe. |
| `endDate` | `string` | ❌ | When this contribution finished. This should be a subset of the hypercert timeframe. |
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created |

---

Expand Down
Loading