diff --git a/.changeset/sparkly-doors-bet.md b/.changeset/sparkly-doors-bet.md new file mode 100644 index 00000000..611968b3 --- /dev/null +++ b/.changeset/sparkly-doors-bet.md @@ -0,0 +1,5 @@ +--- +"@hypercerts-org/lexicon": minor +--- + +Add support for multiple locations in an activity claim. diff --git a/ERD.puml b/ERD.puml index 20c8fce7..028c9f0c 100644 --- a/ERD.puml +++ b/ERD.puml @@ -63,7 +63,7 @@ dataclass activity <> #B4E5D0 { startDate endDate contributions[]? - location? + locations[]? rights? project? createdAt @@ -304,7 +304,7 @@ project::location --> location activity::contributions -l--> contribution activity::rights --> rights -activity::location --> location +activity::locations --> location activity::project --> project contribution::contributors --> contributor : made by diff --git a/README.md b/README.md index 4e453b16..0cf66643 100644 --- a/README.md +++ b/README.md @@ -286,20 +286,20 @@ Hypercerts-specific lexicons for tracking impact work and claims. #### Properties -| Property | Type | Required | Description | Comments | -| ------------------ | -------- | -------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `title` | `string` | ✅ | Title of the hypercert | | -| `shortDescription` | `string` | ✅ | Short blurb of the impact work done. | | -| `description` | `string` | ❌ | Optional longer description of the impact work done. | | -| `image` | `union` | ❌ | The hypercert visual representation as a URI or image blob | | -| `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` | -| `rights` | `ref` | ❌ | A strong reference to the rights that this hypercert has | References must conform to `org.hypercerts.claim.rights` | -| `location` | `ref` | ❌ | A strong reference to the location where the work for done hypercert was located | References must conform to `app.certified.location` | -| `project` | `string` | ❌ | A reference (AT-URI) to the project record that this activity is part of | References must conform to `org.hypercerts.claim.project` | -| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | | +| Property | Type | Required | Description | Comments | +| ------------------ | -------- | -------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `title` | `string` | ✅ | Title of the hypercert | | +| `shortDescription` | `string` | ✅ | Short blurb of the impact work done. | | +| `description` | `string` | ❌ | Optional longer description of the impact work done. | | +| `image` | `union` | ❌ | The hypercert visual representation as a URI or image blob | | +| `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` | +| `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` | +| `project` | `string` | ❌ | A reference (AT-URI) to the project record that this activity is part of | References must conform to `org.hypercerts.claim.project` | +| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | | #### Defs diff --git a/bun.lockb b/bun.lockb deleted file mode 100755 index 50d65b09..00000000 Binary files a/bun.lockb and /dev/null differ diff --git a/lexicons/org/hypercerts/claim/activity.json b/lexicons/org/hypercerts/claim/activity.json index dbd23ae1..18f99b32 100644 --- a/lexicons/org/hypercerts/claim/activity.json +++ b/lexicons/org/hypercerts/claim/activity.json @@ -68,10 +68,13 @@ "ref": "com.atproto.repo.strongRef", "description": "A strong reference to the rights that this hypercert has. The record referenced must conform with the lexicon org.hypercerts.claim.rights." }, - "location": { - "type": "ref", - "ref": "com.atproto.repo.strongRef", - "description": "A strong reference to the location where the activity was performed. The record referenced must conform with the lexicon app.certified.location." + "locations": { + "type": "array", + "description": "An array of strong references to the location where activity was performed. The record referenced must conform with the lexicon app.certified.location.", + "items": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + } }, "project": { "type": "string",