@hypercerts-org/lexicon 0.10.0-beta.12 → 0.10.0-beta.13
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.
- package/CHANGELOG.md +93 -0
- package/README.md +142 -0
- package/SCHEMAS.md +174 -67
- package/dist/exports.d.ts +103 -61
- package/dist/exports.d.ts.map +1 -1
- package/dist/generated/exports.d.ts +103 -61
- package/dist/generated/exports.d.ts.map +1 -1
- package/dist/generated/lexicons.d.ts +196 -112
- package/dist/generated/lexicons.d.ts.map +1 -1
- package/dist/generated/types/app/certified/location.d.ts +9 -1
- package/dist/generated/types/app/certified/location.d.ts.map +1 -1
- package/dist/generated/types/org/hypercerts/claim/attachment.d.ts +37 -0
- package/dist/generated/types/org/hypercerts/claim/attachment.d.ts.map +1 -0
- package/dist/index.cjs +283 -190
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +280 -187
- package/dist/index.mjs.map +1 -1
- package/dist/lexicons.cjs +102 -59
- package/dist/lexicons.cjs.map +1 -1
- package/dist/lexicons.d.ts +196 -112
- package/dist/lexicons.d.ts.map +1 -1
- package/dist/lexicons.mjs +102 -59
- package/dist/lexicons.mjs.map +1 -1
- package/dist/types/app/certified/location.d.ts +9 -1
- package/dist/types/app/certified/location.d.ts.map +1 -1
- package/dist/types/org/hypercerts/claim/attachment.d.ts +37 -0
- package/dist/types/org/hypercerts/claim/attachment.d.ts.map +1 -0
- package/lexicons/app/certified/location.json +16 -2
- package/lexicons/org/hypercerts/claim/attachment.json +86 -0
- package/package.json +1 -1
- package/dist/generated/types/org/hypercerts/claim/evidence.d.ts +0 -29
- package/dist/generated/types/org/hypercerts/claim/evidence.d.ts.map +0 -1
- package/dist/types/org/hypercerts/claim/evidence.d.ts +0 -29
- package/dist/types/org/hypercerts/claim/evidence.d.ts.map +0 -1
- package/lexicons/org/hypercerts/claim/evidence.json +0 -57
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,98 @@
|
|
|
1
1
|
# @hypercerts-org/lexicon
|
|
2
2
|
|
|
3
|
+
## 0.10.0-beta.13
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#131](https://github.com/hypercerts-org/hypercerts-lexicon/pull/131) [`7f42fad`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/7f42fad517e191dad6db22fc67ec8346ec167f5c) Thanks [@aspiers](https://github.com/aspiers)! - Add inline string format to app.certified.location schema with documentation and examples
|
|
8
|
+
|
|
9
|
+
- [#118](https://github.com/hypercerts-org/hypercerts-lexicon/pull/118) [`8427780`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/8427780888759ee749a683528f49e6b0da2b97c2) Thanks [@holkexyz](https://github.com/holkexyz)! - Rename evidence lexicon to attachment and refactor schema structure
|
|
10
|
+
|
|
11
|
+
**Breaking Changes:**
|
|
12
|
+
- **Lexicon ID change:**
|
|
13
|
+
- `org.hypercerts.claim.evidence` → `org.hypercerts.claim.attachment`
|
|
14
|
+
- All existing evidence records must be migrated to use the new lexicon ID
|
|
15
|
+
- **Schema structure changes (`org.hypercerts.claim.attachment`):**
|
|
16
|
+
- Changed `subject` (single strongRef) to `subjects` (array of strongRefs, maxLength: 100)
|
|
17
|
+
- Changed `content` from single union (uri/blob) to array of unions (maxLength: 100)
|
|
18
|
+
- Added `contentType` field (string, maxLength: 64) to specify attachment type
|
|
19
|
+
- Removed `relationType` field (previously used to indicate supports/challenges/clarifies)
|
|
20
|
+
- Removed `contributors` field
|
|
21
|
+
- Removed `locations` field
|
|
22
|
+
- Added rich text support: `shortDescriptionFacets` and `descriptionFacets` (arrays of `app.bsky.richtext.facet`)
|
|
23
|
+
- Updated required fields: `["title", "content", "createdAt"]` (content is now required)
|
|
24
|
+
- **Common definitions (`org.hypercerts.defs`):**
|
|
25
|
+
- Added `weightedContributor` def for contributor references with optional weights
|
|
26
|
+
- Added `contributorIdentity` def for string-based contributor identification
|
|
27
|
+
|
|
28
|
+
**Migration:**
|
|
29
|
+
|
|
30
|
+
**Lexicon ID:** Update all references from `org.hypercerts.claim.evidence` to `org.hypercerts.claim.attachment`.
|
|
31
|
+
|
|
32
|
+
**Schema migration:**
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
// Before (org.hypercerts.claim.evidence)
|
|
36
|
+
{
|
|
37
|
+
"$type": "org.hypercerts.claim.evidence",
|
|
38
|
+
"subject": { "uri": "...", "cid": "..." },
|
|
39
|
+
"content": { "uri": "https://..." },
|
|
40
|
+
"title": "Evidence Title",
|
|
41
|
+
"relationType": "supports",
|
|
42
|
+
"createdAt": "..."
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// After (org.hypercerts.claim.attachment)
|
|
46
|
+
{
|
|
47
|
+
"$type": "org.hypercerts.claim.attachment",
|
|
48
|
+
"subjects": [{ "uri": "...", "cid": "..." }],
|
|
49
|
+
"content": [{ "uri": "https://..." }],
|
|
50
|
+
"contentType": "evidence",
|
|
51
|
+
"title": "Evidence Title",
|
|
52
|
+
"createdAt": "..."
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Field mapping:**
|
|
57
|
+
- `subject` → `subjects` (wrap in array)
|
|
58
|
+
- `content` (single) → `content` (array, wrap existing value)
|
|
59
|
+
- `relationType` → remove (no direct replacement)
|
|
60
|
+
- `contributors` → remove (no direct replacement)
|
|
61
|
+
- `locations` → remove (no direct replacement)
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- [#118](https://github.com/hypercerts-org/hypercerts-lexicon/pull/118) [`8427780`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/8427780888759ee749a683528f49e6b0da2b97c2) Thanks [@holkexyz](https://github.com/holkexyz)! - Add location property to attachment schema
|
|
66
|
+
|
|
67
|
+
**New Feature:**
|
|
68
|
+
- **`location` field** (`org.hypercerts.claim.attachment`):
|
|
69
|
+
- Added optional `location` property as a strong reference (`com.atproto.repo.strongRef`)
|
|
70
|
+
- Allows attachments to associate location metadata directly without using the sidecar pattern
|
|
71
|
+
- The referenced record must conform to the `app.certified.location` lexicon
|
|
72
|
+
|
|
73
|
+
**Usage:**
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"$type": "org.hypercerts.claim.attachment",
|
|
78
|
+
"subjects": [
|
|
79
|
+
{
|
|
80
|
+
"uri": "at://did:plc:.../org.hypercerts.claim.activity/...",
|
|
81
|
+
"cid": "..."
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"content": [{ "uri": "https://..." }],
|
|
85
|
+
"title": "Field Report",
|
|
86
|
+
"location": {
|
|
87
|
+
"uri": "at://did:plc:.../app.certified.location/abc123",
|
|
88
|
+
"cid": "..."
|
|
89
|
+
},
|
|
90
|
+
"createdAt": "..."
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
This change aligns with the location property addition to collections (PR #123), providing a consistent pattern for associating location metadata across record types.
|
|
95
|
+
|
|
3
96
|
## 0.10.0-beta.12
|
|
4
97
|
|
|
5
98
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -89,6 +89,95 @@ await agent.api.com.atproto.repo.createRecord({
|
|
|
89
89
|
});
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
+
### Creating Location Records
|
|
93
|
+
|
|
94
|
+
Location records (`app.certified.location`) specify where work was performed
|
|
95
|
+
using geographic coordinates or other location formats. They can be referenced
|
|
96
|
+
by activities, collections, attachments, measurements, and evaluations.
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
import { LOCATION_NSID } from "@hypercerts-org/lexicon";
|
|
100
|
+
|
|
101
|
+
const locationRecord = {
|
|
102
|
+
$type: LOCATION_NSID,
|
|
103
|
+
lpVersion: "1.0", // Location Protocol version
|
|
104
|
+
srs: "http://www.opengis.net/def/crs/OGC/1.3/CRS84", // Spatial Reference System
|
|
105
|
+
locationType: "coordinate-decimal", // or "geojson-point"
|
|
106
|
+
location: {
|
|
107
|
+
uri: "https://example.com/location-data.geojson",
|
|
108
|
+
},
|
|
109
|
+
// Optional fields
|
|
110
|
+
name: "Project Site A",
|
|
111
|
+
description: "Primary research facility in the Amazon rainforest",
|
|
112
|
+
createdAt: new Date().toISOString(),
|
|
113
|
+
};
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
- `lpVersion` (required): Version of the Location Protocol specification
|
|
117
|
+
- `srs` (required): Spatial Reference System URI defining the coordinate system
|
|
118
|
+
- `locationType` (required): Format identifier (e.g., "coordinate-decimal", "geojson-point")
|
|
119
|
+
- `location` (required): Location data as URI, blob, or string
|
|
120
|
+
- `name` (optional): Human-readable name for the location
|
|
121
|
+
- `description` (optional): Additional context about the location
|
|
122
|
+
- `createdAt` (required): Timestamp when the record was created
|
|
123
|
+
|
|
124
|
+
**Location data formats:**
|
|
125
|
+
|
|
126
|
+
The `location` field accepts three formats:
|
|
127
|
+
|
|
128
|
+
1. **URI reference**: `{ uri: "https://..." }` - Link to external location data
|
|
129
|
+
2. **Small blob**: Embedded location data (up to 10MB)
|
|
130
|
+
3. **Location string**: Inline string wrapped in an object, containing coordinates or GeoJSON
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
133
|
+
// Example with embedded blob
|
|
134
|
+
const locationWithBlob = {
|
|
135
|
+
$type: LOCATION_NSID,
|
|
136
|
+
lpVersion: "1.0",
|
|
137
|
+
srs: "http://www.opengis.net/def/crs/OGC/1.3/CRS84",
|
|
138
|
+
locationType: "geojson-point",
|
|
139
|
+
location: {
|
|
140
|
+
blob: {
|
|
141
|
+
$type: "blob",
|
|
142
|
+
ref: {
|
|
143
|
+
$link: "bafyrei...", // CID of the uploaded blob
|
|
144
|
+
},
|
|
145
|
+
mimeType: "application/geo+json",
|
|
146
|
+
size: 123,
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
name: "Amazon Research Station",
|
|
150
|
+
createdAt: new Date().toISOString(),
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
// Example with inline string (coordinates)
|
|
154
|
+
const locationWithCoordinates = {
|
|
155
|
+
$type: LOCATION_NSID,
|
|
156
|
+
lpVersion: "1.0",
|
|
157
|
+
srs: "http://www.opengis.net/def/crs/OGC/1.3/CRS84",
|
|
158
|
+
locationType: "coordinate-decimal",
|
|
159
|
+
location: {
|
|
160
|
+
string: "-3.4653, -62.2159", // lat, lon
|
|
161
|
+
},
|
|
162
|
+
name: "Amazon Research Site",
|
|
163
|
+
description: "Field station coordinates",
|
|
164
|
+
createdAt: new Date().toISOString(),
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
// Example with inline GeoJSON string
|
|
168
|
+
const locationWithGeoJSON = {
|
|
169
|
+
$type: LOCATION_NSID,
|
|
170
|
+
lpVersion: "1.0",
|
|
171
|
+
srs: "http://www.opengis.net/def/crs/OGC/1.3/CRS84",
|
|
172
|
+
locationType: "geojson-point",
|
|
173
|
+
location: {
|
|
174
|
+
string: '{"type":"Point","coordinates":[-62.2159,-3.4653]}',
|
|
175
|
+
},
|
|
176
|
+
name: "Research Station Alpha",
|
|
177
|
+
createdAt: new Date().toISOString(),
|
|
178
|
+
};
|
|
179
|
+
```
|
|
180
|
+
|
|
92
181
|
### Accessing NSIDs (Lexicon IDs)
|
|
93
182
|
|
|
94
183
|
**Recommended**: Use individual NSID constants for cleaner, more readable code:
|
|
@@ -322,3 +411,56 @@ const collectionRecord = {
|
|
|
322
411
|
```
|
|
323
412
|
|
|
324
413
|
The `location` field is a strong reference to an `app.certified.location` record containing the same `uri` and `cid` fields as described above for activities.
|
|
414
|
+
|
|
415
|
+
### Creating Attachments
|
|
416
|
+
|
|
417
|
+
Attachments provide commentary, context, evidence, or documentary material
|
|
418
|
+
related to hypercert records. They can be linked to activities, evaluations,
|
|
419
|
+
measurements, or even other attachments:
|
|
420
|
+
|
|
421
|
+
```typescript
|
|
422
|
+
import { ATTACHMENT_NSID } from "@hypercerts-org/lexicon";
|
|
423
|
+
|
|
424
|
+
const attachmentRecord = {
|
|
425
|
+
$type: ATTACHMENT_NSID,
|
|
426
|
+
title: "Field Survey Report",
|
|
427
|
+
subjects: [
|
|
428
|
+
{
|
|
429
|
+
uri: "at://did:plc:alice/org.hypercerts.claim.activity/abc123",
|
|
430
|
+
cid: "...",
|
|
431
|
+
},
|
|
432
|
+
],
|
|
433
|
+
contentType: "report",
|
|
434
|
+
content: [
|
|
435
|
+
{ uri: "https://example.com/reports/survey-2024.pdf" },
|
|
436
|
+
{ uri: "ipfs://Qm..." },
|
|
437
|
+
],
|
|
438
|
+
shortDescription: "Quarterly field survey documenting project progress",
|
|
439
|
+
createdAt: new Date().toISOString(),
|
|
440
|
+
};
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
**Key fields:**
|
|
444
|
+
|
|
445
|
+
- `title` (required): String title for the attachment
|
|
446
|
+
- `shortDescription`/`description`: Support rich text via facet annotations
|
|
447
|
+
- `subjects` (optional): Array of strong references to records this attachment relates to
|
|
448
|
+
- `contentType` (optional): Type descriptor (e.g., "report", "audit", "evidence", "testimonial")
|
|
449
|
+
- `content` (required): Array of URIs or blobs containing the attachment files
|
|
450
|
+
- `location` (optional): Strong reference to an `app.certified.location` record
|
|
451
|
+
- `createdAt` (required): Timestamp when the attachment was created
|
|
452
|
+
|
|
453
|
+
**Adding Location to Attachments:**
|
|
454
|
+
|
|
455
|
+
```typescript
|
|
456
|
+
const attachmentWithLocation = {
|
|
457
|
+
$type: ATTACHMENT_NSID,
|
|
458
|
+
title: "Site Inspection Photos",
|
|
459
|
+
content: [{ uri: "https://..." }],
|
|
460
|
+
location: {
|
|
461
|
+
uri: "at://did:plc:alice/app.certified.location/loc123",
|
|
462
|
+
cid: "...",
|
|
463
|
+
},
|
|
464
|
+
createdAt: new Date().toISOString(),
|
|
465
|
+
};
|
|
466
|
+
```
|
package/SCHEMAS.md
CHANGED
|
@@ -33,7 +33,7 @@ Hypercerts-specific lexicons for tracking impact work and claims.
|
|
|
33
33
|
|
|
34
34
|
#### Defs
|
|
35
35
|
|
|
36
|
-
##### contributor
|
|
36
|
+
##### `org.hypercerts.claim.activity#contributor`
|
|
37
37
|
|
|
38
38
|
| Property | Type | Required | Description |
|
|
39
39
|
| --------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
@@ -43,6 +43,95 @@ Hypercerts-specific lexicons for tracking impact work and claims.
|
|
|
43
43
|
|
|
44
44
|
---
|
|
45
45
|
|
|
46
|
+
### `org.hypercerts.claim.attachment`
|
|
47
|
+
|
|
48
|
+
**Description:** An attachment providing commentary, context, evidence, or documentary material related to a hypercert record (e.g. an activity, project, claim, or evaluation).
|
|
49
|
+
|
|
50
|
+
**Key:** `tid`
|
|
51
|
+
|
|
52
|
+
#### Properties
|
|
53
|
+
|
|
54
|
+
| Property | Type | Required | Description | Comments |
|
|
55
|
+
| ------------------------ | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
|
|
56
|
+
| `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 |
|
|
57
|
+
| `contentType` | `string` | ❌ | The type of attachment, e.g. report, audit, evidence, testimonial, methodology, etc. | maxLength: 64 |
|
|
58
|
+
| `content` | `union` | ✅ | The files, documents, or external references included in this attachment record. | maxLength: 100 |
|
|
59
|
+
| `title` | `string` | ✅ | Title of this attachment. | maxLength: 256 |
|
|
60
|
+
| `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 |
|
|
61
|
+
| `shortDescriptionFacets` | `ref` | ❌ | Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc). | |
|
|
62
|
+
| `description` | `string` | ❌ | Optional longer description of this attachment, including context or interpretation. Rich text annotations may be provided via `descriptionFacets`. | maxLength: 30000, maxGraphemes: 3000 |
|
|
63
|
+
| `descriptionFacets` | `ref` | ❌ | Rich text annotations for `description` (mentions, URLs, hashtags, etc). | |
|
|
64
|
+
| `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. | |
|
|
65
|
+
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created. | |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
### `org.hypercerts.claim.collection`
|
|
70
|
+
|
|
71
|
+
**Description:** A collection/group of items (activities and/or other collections). Collections support recursive nesting.
|
|
72
|
+
|
|
73
|
+
**Key:** `tid`
|
|
74
|
+
|
|
75
|
+
#### Properties
|
|
76
|
+
|
|
77
|
+
| Property | Type | Required | Description | Comments |
|
|
78
|
+
| ------------------ | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
|
|
79
|
+
| `type` | `string` | ❌ | The type of this collection. Possible fields can be 'favorites', 'project', or any other type of collection. | |
|
|
80
|
+
| `title` | `string` | ✅ | The title of this collection | maxLength: 800, maxGraphemes: 80 |
|
|
81
|
+
| `shortDescription` | `string` | ❌ | Short summary of this collection, suitable for previews and list views | maxLength: 3000, maxGraphemes: 300 |
|
|
82
|
+
| `description` | `ref` | ❌ | Rich-text description, represented as a Leaflet linear document. | |
|
|
83
|
+
| `avatar` | `union` | ❌ | The collection's avatar/profile image as a URI or image blob. | |
|
|
84
|
+
| `banner` | `union` | ❌ | Larger horizontal image to display behind the collection view. | |
|
|
85
|
+
| `items` | `ref` | ✅ | Array of items in this collection with optional weights. | |
|
|
86
|
+
| `location` | `ref` | ❌ | A strong reference to the location where this collection's activities were performed. The record referenced must conform with the lexicon app.certified.location. | |
|
|
87
|
+
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
|
|
88
|
+
|
|
89
|
+
#### Defs
|
|
90
|
+
|
|
91
|
+
##### `org.hypercerts.claim.collection#item`
|
|
92
|
+
|
|
93
|
+
| Property | Type | Required | Description |
|
|
94
|
+
| ---------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
95
|
+
| `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). |
|
|
96
|
+
| `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. |
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
### `org.hypercerts.claim.contributionDetails`
|
|
101
|
+
|
|
102
|
+
**Description:** Details about a specific contribution including role, description, and timeframe.
|
|
103
|
+
|
|
104
|
+
**Key:** `tid`
|
|
105
|
+
|
|
106
|
+
#### Properties
|
|
107
|
+
|
|
108
|
+
| Property | Type | Required | Description | Comments |
|
|
109
|
+
| ------------------------- | -------- | -------- | ------------------------------------------------------------------------------------ | ------------------------------------ |
|
|
110
|
+
| `role` | `string` | ❌ | Role or title of the contributor. | maxLength: 100 |
|
|
111
|
+
| `contributionDescription` | `string` | ❌ | What the contribution concretely was. | maxLength: 10000, maxGraphemes: 1000 |
|
|
112
|
+
| `startDate` | `string` | ❌ | When this contribution started. This should be a subset of the hypercert timeframe. | |
|
|
113
|
+
| `endDate` | `string` | ❌ | When this contribution finished. This should be a subset of the hypercert timeframe. | |
|
|
114
|
+
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created. | |
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### `org.hypercerts.claim.contributorInformation`
|
|
119
|
+
|
|
120
|
+
**Description:** Contributor information including identifier, display name, and image.
|
|
121
|
+
|
|
122
|
+
**Key:** `tid`
|
|
123
|
+
|
|
124
|
+
#### Properties
|
|
125
|
+
|
|
126
|
+
| Property | Type | Required | Description | Comments |
|
|
127
|
+
| ------------- | -------- | -------- | ------------------------------------------------------------------ | -------------- |
|
|
128
|
+
| `identifier` | `string` | ❌ | DID or a URI to a social profile of the contributor. | |
|
|
129
|
+
| `displayName` | `string` | ❌ | Display name of the contributor. | maxLength: 100 |
|
|
130
|
+
| `image` | `union` | ❌ | The contributor visual representation as a URI or image blob. | |
|
|
131
|
+
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created. | |
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
46
135
|
### `org.hypercerts.claim.evaluation`
|
|
47
136
|
|
|
48
137
|
**Description:** An evaluation of a hypercert record (e.g. an activity and its impact).
|
|
@@ -64,7 +153,7 @@ Hypercerts-specific lexicons for tracking impact work and claims.
|
|
|
64
153
|
|
|
65
154
|
#### Defs
|
|
66
155
|
|
|
67
|
-
##### score
|
|
156
|
+
##### `org.hypercerts.claim.evaluation#score`
|
|
68
157
|
|
|
69
158
|
| Property | Type | Required | Description |
|
|
70
159
|
| -------- | --------- | -------- | -------------------------------------------- |
|
|
@@ -74,26 +163,6 @@ Hypercerts-specific lexicons for tracking impact work and claims.
|
|
|
74
163
|
|
|
75
164
|
---
|
|
76
165
|
|
|
77
|
-
### `org.hypercerts.claim.evidence`
|
|
78
|
-
|
|
79
|
-
**Description:** A piece of evidence related to a hypercert record (e.g. an activity, project, claim, or evaluation). Evidence may support, clarify, or challenge the referenced subject.
|
|
80
|
-
|
|
81
|
-
**Key:** `tid`
|
|
82
|
-
|
|
83
|
-
#### Properties
|
|
84
|
-
|
|
85
|
-
| Property | Type | Required | Description | Comments |
|
|
86
|
-
| ------------------ | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
|
|
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 | |
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
166
|
### `org.hypercerts.claim.measurement`
|
|
98
167
|
|
|
99
168
|
**Description:** Measurement data related to a hypercert record (e.g. an activity and its impact).
|
|
@@ -121,37 +190,6 @@ Hypercerts-specific lexicons for tracking impact work and claims.
|
|
|
121
190
|
|
|
122
191
|
---
|
|
123
192
|
|
|
124
|
-
### `org.hypercerts.claim.collection`
|
|
125
|
-
|
|
126
|
-
**Description:** A collection/group of items (activities and/or other collections). Collections support recursive nesting.
|
|
127
|
-
|
|
128
|
-
**Key:** `tid`
|
|
129
|
-
|
|
130
|
-
#### Properties
|
|
131
|
-
|
|
132
|
-
| Property | Type | Required | Description | Comments |
|
|
133
|
-
| ------------------ | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
|
|
134
|
-
| `type` | `string` | ❌ | The type of this collection. Possible fields can be 'favorites', 'project', or any other type of collection. | |
|
|
135
|
-
| `title` | `string` | ✅ | The title of this collection | maxLength: 800, maxGraphemes: 80 |
|
|
136
|
-
| `shortDescription` | `string` | ❌ | Short summary of this collection, suitable for previews and list views | maxLength: 3000, maxGraphemes: 300 |
|
|
137
|
-
| `description` | `ref` | ❌ | Rich-text description, represented as a Leaflet linear document. | |
|
|
138
|
-
| `avatar` | `union` | ❌ | The collection's avatar/profile image as a URI or image blob. | |
|
|
139
|
-
| `banner` | `union` | ❌ | Larger horizontal image to display behind the collection view. | |
|
|
140
|
-
| `items` | `ref` | ✅ | Array of items in this collection with optional weights. | |
|
|
141
|
-
| `location` | `ref` | ❌ | A strong reference to the location where this collection's activities were performed. The record referenced must conform with the lexicon app.certified.location. | |
|
|
142
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
|
|
143
|
-
|
|
144
|
-
#### Defs
|
|
145
|
-
|
|
146
|
-
##### item
|
|
147
|
-
|
|
148
|
-
| Property | Type | Required | Description |
|
|
149
|
-
| ---------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
150
|
-
| `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). |
|
|
151
|
-
| `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. |
|
|
152
|
-
|
|
153
|
-
---
|
|
154
|
-
|
|
155
193
|
### `org.hypercerts.claim.rights`
|
|
156
194
|
|
|
157
195
|
**Description:** Describes the rights that a contributor and/or an owner has, such as whether the hypercert can be sold, transferred, and under what conditions.
|
|
@@ -194,26 +232,31 @@ Hypercerts-specific lexicons for tracking impact work and claims.
|
|
|
194
232
|
|
|
195
233
|
---
|
|
196
234
|
|
|
197
|
-
|
|
235
|
+
### `org.hypercerts.helper.workScopeTag`
|
|
198
236
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
### `org.hypercerts.defs`
|
|
237
|
+
**Description:** A reusable scope atom for work scope logic expressions. Scopes can represent topics, languages, domains, deliverables, methods, regions, tags, or other categorical labels.
|
|
202
238
|
|
|
203
|
-
**
|
|
239
|
+
**Key:** `tid`
|
|
204
240
|
|
|
205
|
-
####
|
|
241
|
+
#### Properties
|
|
206
242
|
|
|
207
|
-
|
|
|
208
|
-
|
|
|
209
|
-
| `
|
|
210
|
-
| `
|
|
211
|
-
| `
|
|
212
|
-
| `
|
|
213
|
-
| `
|
|
243
|
+
| Property | Type | Required | Description | Comments |
|
|
244
|
+
| ------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------ | ------------------------------------ |
|
|
245
|
+
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
|
|
246
|
+
| `key` | `string` | ✅ | Lowercase, hyphenated machine-readable key for this scope (e.g., 'ipfs', 'go-lang', 'filecoin'). | maxLength: 120 |
|
|
247
|
+
| `label` | `string` | ✅ | Human-readable label for this scope. | maxLength: 200 |
|
|
248
|
+
| `kind` | `string` | ❌ | Category type of this scope. Recommended values: topic, language, domain, method, tag. | maxLength: 50 |
|
|
249
|
+
| `description` | `string` | ❌ | Optional longer description of this scope. | maxLength: 10000, maxGraphemes: 1000 |
|
|
250
|
+
| `parent` | `ref` | ❌ | Optional strong reference to a parent scope record for taxonomy/hierarchy support. | |
|
|
251
|
+
| `aliases` | `string` | ❌ | Optional array of alternative names or identifiers for this scope. | maxLength: 50 |
|
|
252
|
+
| `externalReference` | `union` | ❌ | Optional external reference for this scope as a URI or blob. | |
|
|
214
253
|
|
|
215
254
|
---
|
|
216
255
|
|
|
256
|
+
## Certified Lexicons
|
|
257
|
+
|
|
258
|
+
Certified lexicons are common/shared lexicons that can be used across multiple protocols.
|
|
259
|
+
|
|
217
260
|
### `app.certified.location`
|
|
218
261
|
|
|
219
262
|
**Description:** A location reference
|
|
@@ -227,11 +270,19 @@ Certified lexicons are common/shared lexicons that can be used across multiple p
|
|
|
227
270
|
| `lpVersion` | `string` | ✅ | The version of the Location Protocol | maxLength: 10 |
|
|
228
271
|
| `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 |
|
|
229
272
|
| `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` |
|
|
230
|
-
| `location` | `union` | ✅ | The location of where the work was performed as a URI or
|
|
273
|
+
| `location` | `union` | ✅ | The location of where the work was performed as a URI, blob, or inline string. | |
|
|
231
274
|
| `name` | `string` | ❌ | Optional name for this location | maxLength: 1000, maxGraphemes: 100 |
|
|
232
275
|
| `description` | `string` | ❌ | Optional description for this location | maxLength: 2000, maxGraphemes: 500 |
|
|
233
276
|
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
|
|
234
277
|
|
|
278
|
+
#### Defs
|
|
279
|
+
|
|
280
|
+
##### `app.certified.location#string`
|
|
281
|
+
|
|
282
|
+
| Property | Type | Required | Description |
|
|
283
|
+
| -------- | -------- | -------- | ------------------------- |
|
|
284
|
+
| `string` | `string` | ✅ | The location string value |
|
|
285
|
+
|
|
235
286
|
---
|
|
236
287
|
|
|
237
288
|
### `app.certified.badge.definition`
|
|
@@ -287,6 +338,62 @@ Certified lexicons are common/shared lexicons that can be used across multiple p
|
|
|
287
338
|
|
|
288
339
|
---
|
|
289
340
|
|
|
341
|
+
### `app.certified.defs`
|
|
342
|
+
|
|
343
|
+
**Description:** Common type definitions used across certified protocols.
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Type Definitions
|
|
348
|
+
|
|
349
|
+
Common type definitions used across all protocols.
|
|
350
|
+
|
|
351
|
+
### `org.hypercerts.defs`
|
|
352
|
+
|
|
353
|
+
#### Defs
|
|
354
|
+
|
|
355
|
+
##### `org.hypercerts.defs#uri`
|
|
356
|
+
|
|
357
|
+
| Property | Type | Required | Description |
|
|
358
|
+
| -------- | -------- | -------- | -------------------- |
|
|
359
|
+
| `uri` | `string` | ✅ | URI to external data |
|
|
360
|
+
|
|
361
|
+
##### `org.hypercerts.defs#smallBlob`
|
|
362
|
+
|
|
363
|
+
| Property | Type | Required | Description |
|
|
364
|
+
| -------- | ------ | -------- | ---------------------------------- |
|
|
365
|
+
| `blob` | `blob` | ✅ | Blob to external data (up to 10MB) |
|
|
366
|
+
|
|
367
|
+
##### `org.hypercerts.defs#largeBlob`
|
|
368
|
+
|
|
369
|
+
| Property | Type | Required | Description |
|
|
370
|
+
| -------- | ------ | -------- | ----------------------------------- |
|
|
371
|
+
| `blob` | `blob` | ✅ | Blob to external data (up to 100MB) |
|
|
372
|
+
|
|
373
|
+
##### `org.hypercerts.defs#smallImage`
|
|
374
|
+
|
|
375
|
+
| Property | Type | Required | Description |
|
|
376
|
+
| -------- | ------ | -------- | ----------------- |
|
|
377
|
+
| `image` | `blob` | ✅ | Image (up to 5MB) |
|
|
378
|
+
|
|
379
|
+
##### `org.hypercerts.defs#largeImage`
|
|
380
|
+
|
|
381
|
+
| Property | Type | Required | Description |
|
|
382
|
+
| -------- | ------ | -------- | ------------------ |
|
|
383
|
+
| `image` | `blob` | ✅ | Image (up to 10MB) |
|
|
384
|
+
|
|
385
|
+
---
|
|
386
|
+
|
|
387
|
+
## External Lexicons
|
|
388
|
+
|
|
389
|
+
External lexicons from other protocols and systems.
|
|
390
|
+
|
|
391
|
+
### `com.atproto.repo.strongRef`
|
|
392
|
+
|
|
393
|
+
**Key:** `tid`
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
290
397
|
## Notes
|
|
291
398
|
|
|
292
399
|
- All timestamps use the `datetime` format (ISO 8601)
|