Skip to content

Commit 3d711df

Browse files
chore: version packages (beta)
- @hypercerts-org/sdk-core: 0.10.0-beta.6 - @hypercerts-org/sdk-react: 0.10.0-beta.7
1 parent 26526cf commit 3d711df

5 files changed

Lines changed: 84 additions & 2 deletions

File tree

.changeset/pre.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
},
88
"changesets": [
99
"add-project-support",
10+
"align-collection-project-types",
1011
"base-operations",
1112
"configurable-agent-routing",
1213
"custom-lexicon-docs",

packages/sdk-core/CHANGELOG.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,78 @@
11
# @hypercerts-org/sdk-core
22

3+
## 0.10.0-beta.6
4+
5+
### Minor Changes
6+
7+
- [#101](https://github.com/hypercerts-org/hypercerts-sdk/pull/101)
8+
[`bf93b3c`](https://github.com/hypercerts-org/hypercerts-sdk/commit/bf93b3cf5d5eccb12de31c4fe6f95ed3676c746e) Thanks
9+
[@aspiers](https://github.com/aspiers)! - feat: align collection/project types with lexicon + add inline location
10+
support
11+
12+
This is a BREAKING change.
13+
14+
**Type Alignment with Lexicon:**
15+
- Changed `createCollection` to use lexicon-aligned `items` array instead of `claims`
16+
- Updated avatar/banner handling to use proper lexicon union types
17+
- Simplified project methods to delegate to collection methods
18+
- Added `CreateCollectionParams`, `UpdateCollectionParams`, and result types derived from lexicon
19+
- Improved type safety by deriving SDK input types from lexicon definitions
20+
21+
**Inline Location Support:**
22+
23+
`AttachLocationParams` now supports three ways to specify location:
24+
1. **StrongRef** - Direct reference with uri and cid (no record creation)
25+
2. **AT-URI string** - Reference to existing location record
26+
3. **Location object** - Full location data to create a new location record
27+
28+
**Changes:**
29+
- Add `AttachLocationParams` union type supporting StrongRef, string URI, or location object
30+
- Add optional `location` field to `CreateCollectionParams`
31+
- Add optional `location` field to `UpdateCollectionParams` (supports `null` to remove)
32+
- Update `CreateCollectionResult` to include optional `locationUri` field
33+
- Implement location handling in `createCollection()` - supports all three forms
34+
- Add tests for collection creation with StrongRef, string URI, and location object
35+
36+
**Example Usage:**
37+
38+
```typescript
39+
// Create a project with location (StrongRef - direct reference)
40+
const project = await repo.hypercerts.createProject({
41+
title: "Climate Initiative",
42+
items: [...],
43+
location: { uri: "at://did:plc:alice/app.certified.location/abc", cid: "bafy..." },
44+
});
45+
46+
// Create with location (AT-URI string - fetches CID)
47+
const project2 = await repo.hypercerts.createProject({
48+
title: "Forest Project",
49+
items: [...],
50+
location: "at://did:plc:bob/app.certified.location/xyz",
51+
});
52+
53+
// Create with location (location object - creates new record)
54+
const project3 = await repo.hypercerts.createProject({
55+
title: "Ocean Project",
56+
items: [...],
57+
location: {
58+
lpVersion: "1.0",
59+
srs: "EPSG:4326",
60+
locationType: "coordinate-decimal",
61+
location: "37.7749, -122.4194",
62+
},
63+
});
64+
65+
// Update project to change location
66+
await repo.hypercerts.updateProject(project.uri, {
67+
location: "at://did:plc:alice/app.certified.location/new",
68+
});
69+
70+
// Remove location
71+
await repo.hypercerts.updateProject(project.uri, {
72+
location: null,
73+
});
74+
```
75+
376
## 0.10.0-beta.5
477

578
### Minor Changes

packages/sdk-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hypercerts-org/sdk-core",
3-
"version": "0.10.0-beta.5",
3+
"version": "0.10.0-beta.6",
44
"description": "Framework-agnostic ATProto SDK core for authentication, repository operations, and lexicon management",
55
"main": "dist/index.cjs",
66
"repository": {

packages/sdk-react/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @hypercerts-org/sdk-react
22

3+
## 0.10.0-beta.7
4+
5+
### Patch Changes
6+
7+
- Updated dependencies
8+
[[`bf93b3c`](https://github.com/hypercerts-org/hypercerts-sdk/commit/bf93b3cf5d5eccb12de31c4fe6f95ed3676c746e)]:
9+
- @hypercerts-org/sdk-core@0.10.0-beta.6
10+
311
## 0.10.0-beta.6
412

513
### Minor Changes

packages/sdk-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hypercerts-org/sdk-react",
3-
"version": "0.10.0-beta.6",
3+
"version": "0.10.0-beta.7",
44
"description": "React hooks and components for the Hypercerts ATProto SDK",
55
"type": "module",
66
"main": "dist/index.cjs",

0 commit comments

Comments
 (0)