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/flat-llamas-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hypercerts-org/lexicon": minor
---

Use Leaflet linear documents for rich-text descriptions in activity and attachment lexicons, and make attachment content optional.
52 changes: 25 additions & 27 deletions SCHEMAS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,20 @@ Hypercerts-specific lexicons for tracking impact work and claims.

#### Properties

| Property | Type | Required | Description | Comments |
| ------------------------ | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| `title` | `string` | ✅ | Display title summarizing the impact work (e.g. 'Reforestation in Amazon Basin 2024') | maxLength: 256 |
| `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 |
| `shortDescriptionFacets` | `ref[]` | ❌ | Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc). | |
| `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 |
| `descriptionFacets` | `ref[]` | ❌ | Rich text annotations for `description` (mentions, URLs, hashtags, etc). | |
| `image` | `union` | ❌ | The hypercert visual representation as a URI or image blob. | |
| `workScope` | `union` | ❌ | Work scope definition. Either a strongRef to a work-scope logic record (structured, nested logic), or a free-form string for simple or legacy scopes. The work scope record should conform to the org.hypercerts.helper.workScopeTag lexicon. | |
| `startDate` | `string` | ❌ | When the work began | |
| `endDate` | `string` | ❌ | When the work ended | |
| `contributors` | `ref[]` | ❌ | An array of contributor objects, each containing contributor information, weight, and contribution details. | maxLength: 1000 |
| `rights` | `ref` | ❌ | A strong reference to the rights that this hypercert has. The record referenced must conform with the lexicon org.hypercerts.claim.rights. | |
| `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. | maxLength: 1000 |
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
| Property | Type | Required | Description | Comments |
| ------------------------ | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| `title` | `string` | ✅ | Display title summarizing the impact work (e.g. 'Reforestation in Amazon Basin 2024') | maxLength: 256 |
| `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 |
| `shortDescriptionFacets` | `ref[]` | ❌ | Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc). | |
| `description` | `ref` | ❌ | Rich-text description, represented as a Leaflet linear document. | |
| `image` | `union` | ❌ | The hypercert visual representation as a URI or image blob. | |
| `contributors` | `ref[]` | ❌ | An array of contributor objects, each containing contributor information, weight, and contribution details. | maxLength: 1000 |
| `workScope` | `union` | ❌ | Work scope definition. Either a strongRef to a work-scope logic record (structured, nested logic), or a free-form string for simple or legacy scopes. The work scope record should conform to the org.hypercerts.helper.workScopeTag lexicon. | |
| `startDate` | `string` | ❌ | When the work began | |
| `endDate` | `string` | ❌ | When the work ended | |
| `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. | maxLength: 1000 |
| `rights` | `ref` | ❌ | A strong reference to the rights that this hypercert has. The record referenced must conform with the lexicon org.hypercerts.claim.rights. | |
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |

#### Defs

Expand Down Expand Up @@ -171,18 +170,17 @@ Hypercerts-specific lexicons for tracking impact work and claims.

#### 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. | |
| 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` | `ref` | ❌ | Rich-text description, represented as a Leaflet linear document. | |
| `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. | |

---

Expand Down
Loading