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
5 changes: 5 additions & 0 deletions .changeset/move-evaluation-attachment-context.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hypercerts-org/lexicon": minor
---

Move evaluation and attachment lexicons to org.hypercerts.context namespace.
4 changes: 2 additions & 2 deletions ERD.puml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ dataclass activity <<largeBold>> #B4E5D0 {
!endif
}

' org.hypercerts.claim.attachment
' org.hypercerts.context.attachment
dataclass attachment {
!if (SHOW_FIELDS == "true")
subjects[]?
Expand Down Expand Up @@ -98,7 +98,7 @@ dataclass measurement {
!endif
}

' org.hypercerts.claim.evaluation
' org.hypercerts.context.evaluation
dataclass evaluation {
!if (SHOW_FIELDS == "true")
subject?
Expand Down
108 changes: 54 additions & 54 deletions SCHEMAS.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,29 +79,6 @@ Hypercerts-specific lexicons for tracking impact work and claims.

---

### `org.hypercerts.claim.attachment`

**Description:** An attachment providing commentary, context, evidence, or documentary material related to a hypercert record (e.g. an activity, project, claim, or evaluation).

**Key:** `tid`

#### Properties

| Property | Type | Required | Description | Comments |
| ------------------------ | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| `subjects` | `ref` | ❌ | References to the subject(s) the attachment is connected to—this may be an activity claim, outcome claim, measurement, evaluation, or even another attachment. This is optional as the attachment can exist before the claim is recorded. | maxLength: 100 |
| `contentType` | `string` | ❌ | The type of attachment, e.g. report, audit, evidence, testimonial, methodology, etc. | maxLength: 64 |
| `content` | `union` | ✅ | The files, documents, or external references included in this attachment record. | maxLength: 100 |
| `title` | `string` | ✅ | Display title for this attachment (e.g. 'Impact Assessment Report', 'Audit Findings') | maxLength: 256 |
| `shortDescription` | `string` | ❌ | Short summary of this attachment, suitable for previews and list views. Rich text annotations may be provided via `shortDescriptionFacets`. | maxLength: 3000, maxGraphemes: 300 |
| `shortDescriptionFacets` | `ref` | ❌ | Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc). | |
| `description` | `string` | ❌ | Optional longer description of this attachment, including context or interpretation. Rich text annotations may be provided via `descriptionFacets`. | maxLength: 30000, maxGraphemes: 3000 |
| `descriptionFacets` | `ref` | ❌ | Rich text annotations for `description` (mentions, URLs, hashtags, etc). | |
| `location` | `ref` | ❌ | A strong reference to the location where this attachment's subject matter occurred. The record referenced must conform with the lexicon app.certified.location. | |
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created. | |

---

### `org.hypercerts.claim.collection`

**Description:** A collection/group of items (activities and/or other collections). Collections support recursive nesting.
Expand Down Expand Up @@ -168,37 +145,6 @@ Hypercerts-specific lexicons for tracking impact work and claims.

---

### `org.hypercerts.claim.evaluation`

**Description:** An evaluation of a hypercert record (e.g. an activity and its impact).

**Key:** `tid`

#### Properties

| Property | Type | Required | Description | Comments |
| -------------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| `subject` | `ref` | ❌ | A strong reference to what is being evaluated (e.g. activity, measurement, contribution, etc.) | |
| `evaluators` | `ref` | ✅ | DIDs of the evaluators | maxLength: 1000 |
| `content` | `union` | ❌ | Evaluation data (URIs or blobs) containing detailed reports or methodology | maxLength: 100 |
| `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 |
| `summary` | `string` | ✅ | Brief evaluation summary | maxLength: 5000, maxGraphemes: 1000 |
| `score` | `ref` | ❌ | Overall score for an evaluation on a numeric scale. | |
| `location` | `ref` | ❌ | An optional reference for georeferenced evaluations. The record referenced must conform with the lexicon app.certified.location. | |
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |

#### Defs

##### `org.hypercerts.claim.evaluation#score`

| Property | Type | Required | Description |
| -------- | --------- | -------- | -------------------------------------------- |
| `min` | `integer` | ✅ | Minimum value of the scale, e.g. 0 or 1. |
| `max` | `integer` | ✅ | Maximum value of the scale, e.g. 5 or 10. |
| `value` | `integer` | ✅ | Score within the inclusive range [min, max]. |

---

### `org.hypercerts.claim.measurement`

**Description:** Measurement data related to a hypercert record (e.g. an activity and its impact).
Expand Down Expand Up @@ -244,6 +190,60 @@ Hypercerts-specific lexicons for tracking impact work and claims.

---

### `org.hypercerts.context.attachment`

**Description:** An attachment providing commentary, context, evidence, or documentary material related to a hypercert record (e.g. an activity, project, claim, or evaluation).

**Key:** `tid`

#### Properties

| Property | Type | Required | Description | Comments |
| ------------------------ | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| `subjects` | `ref` | ❌ | References to the subject(s) the attachment is connected to—this may be an activity claim, outcome claim, measurement, evaluation, or even another attachment. This is optional as the attachment can exist before the claim is recorded. | maxLength: 100 |
| `contentType` | `string` | ❌ | The type of attachment, e.g. report, audit, evidence, testimonial, methodology, etc. | maxLength: 64 |
| `content` | `union` | ✅ | The files, documents, or external references included in this attachment record. | maxLength: 100 |
| `title` | `string` | ✅ | Display title for this attachment (e.g. 'Impact Assessment Report', 'Audit Findings') | maxLength: 256 |
| `shortDescription` | `string` | ❌ | Short summary of this attachment, suitable for previews and list views. Rich text annotations may be provided via `shortDescriptionFacets`. | maxLength: 3000, maxGraphemes: 300 |
| `shortDescriptionFacets` | `ref` | ❌ | Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc). | |
| `description` | `string` | ❌ | Optional longer description of this attachment, including context or interpretation. Rich text annotations may be provided via `descriptionFacets`. | maxLength: 30000, maxGraphemes: 3000 |
| `descriptionFacets` | `ref` | ❌ | Rich text annotations for `description` (mentions, URLs, hashtags, etc). | |
| `location` | `ref` | ❌ | A strong reference to the location where this attachment's subject matter occurred. The record referenced must conform with the lexicon app.certified.location. | |
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created. | |

---

### `org.hypercerts.context.evaluation`

**Description:** An evaluation of a hypercert record (e.g. an activity and its impact).

**Key:** `tid`

#### Properties

| Property | Type | Required | Description | Comments |
| -------------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| `subject` | `ref` | ❌ | A strong reference to what is being evaluated (e.g. activity, measurement, contribution, etc.) | |
| `evaluators` | `ref` | ✅ | DIDs of the evaluators | maxLength: 1000 |
| `content` | `union` | ❌ | Evaluation data (URIs or blobs) containing detailed reports or methodology | maxLength: 100 |
| `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 |
| `summary` | `string` | ✅ | Brief evaluation summary | maxLength: 5000, maxGraphemes: 1000 |
| `score` | `ref` | ❌ | Overall score for an evaluation on a numeric scale. | |
| `location` | `ref` | ❌ | An optional reference for georeferenced evaluations. The record referenced must conform with the lexicon app.certified.location. | |
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |

#### Defs

##### `org.hypercerts.context.evaluation#score`

| Property | Type | Required | Description |
| -------- | --------- | -------- | -------------------------------------------- |
| `min` | `integer` | ✅ | Minimum value of the scale, e.g. 0 or 1. |
| `max` | `integer` | ✅ | Maximum value of the scale, e.g. 5 or 10. |
| `value` | `integer` | ✅ | Score within the inclusive range [min, max]. |

---

### `org.hypercerts.funding.receipt`

**Description:** Records a funding receipt for a payment from one user to another user. It may be recorded by the recipient, by the sender, or by a third party. The sender may remain anonymous.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "org.hypercerts.claim.attachment",
"id": "org.hypercerts.context.attachment",
"defs": {
"main": {
"type": "record",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,7 @@
{
"lexicon": 1,
"id": "org.hypercerts.claim.evaluation",
"id": "org.hypercerts.context.evaluation",
"defs": {
"score": {
"type": "object",
"description": "Overall score for an evaluation on a numeric scale.",
"required": ["min", "max", "value"],
"properties": {
"min": {
"type": "integer",
"description": "Minimum value of the scale, e.g. 0 or 1."
},
"max": {
"type": "integer",
"description": "Maximum value of the scale, e.g. 5 or 10."
},
"value": {
"type": "integer",
"description": "Score within the inclusive range [min, max]."
}
}
},
"main": {
"type": "record",
"description": "An evaluation of a hypercert record (e.g. an activity and its impact).",
Expand Down Expand Up @@ -87,6 +68,25 @@
}
}
}
},
"score": {
"type": "object",
"description": "Overall score for an evaluation on a numeric scale.",
"required": ["min", "max", "value"],
"properties": {
"min": {
"type": "integer",
"description": "Minimum value of the scale, e.g. 0 or 1."
},
"max": {
"type": "integer",
"description": "Maximum value of the scale, e.g. 5 or 10."
},
"value": {
"type": "integer",
"description": "Score within the inclusive range [min, max]."
}
}
}
}
}