Skip to content

Commit d62f773

Browse files
authored
Merge pull request #56 from hypercerts-org/fix/sds_types_endpoint_polish
SDS types endpoint polish
2 parents 8c0b6e6 + caceacb commit d62f773

20 files changed

+734
-209
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@hypercerts-org/sdk-core": patch
3+
---
4+
5+
Fix SDS organization and collaborator operations to match API contracts
6+
7+
- Add required creatorDid parameter to organization.create endpoint
8+
- Fix organization.list to parse organizations field instead of repositories
9+
- Update accessType values to match SDS API: owner|shared|none (was owner|collaborator)
10+
- Add permission string array parser for collaborator.list endpoint
11+
- Update type definitions to match actual SDS API response formats
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
"@hypercerts-org/sdk-core": minor
3+
"@hypercerts-org/sdk-react": patch
4+
---
5+
6+
Add pagination support and fix React hooks for SDS operations
7+
8+
**Breaking Changes (sdk-core):**
9+
- `CollaboratorOperations.list()` now returns `{ collaborators: RepositoryAccessGrant[], cursor?: string }` instead of `RepositoryAccessGrant[]`
10+
- `OrganizationOperations.list()` now returns `{ organizations: OrganizationInfo[], cursor?: string }` instead of `OrganizationInfo[]`
11+
12+
**Features:**
13+
- Add cursor-based pagination support to collaborator and organization list operations
14+
- Support optional `limit` and `cursor` parameters for paginated queries
15+
- Update internal methods (`hasAccess`, `getRole`, `get`) to handle new pagination structure
16+
17+
**Bug Fixes (sdk-react):**
18+
- Fix `useCollaborators` hook to correctly destructure paginated response
19+
- Fix `useOrganizations` hook to correctly destructure paginated response
20+
- All React hooks now properly handle the new pagination structure
21+
22+
**Documentation:**
23+
- Comprehensive README updates with clear examples for all SDK operations
24+
- Added pagination examples throughout documentation
25+
- Improved code samples with realistic use cases
26+
27+
**Tests:**
28+
- All 317 tests passing (181 sdk-core + 136 sdk-react)
29+
- Updated test mocks to match new pagination response structure
30+
- Build completes with zero warnings

packages/lexicon/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/lexicon",
3-
"version": "0.3.0",
3+
"version": "0.4.0",
44
"description": "ATProto lexicon definitions and TypeScript types for the Hypercerts protocol",
55
"type": "module",
66
"main": "dist/index.cjs",

0 commit comments

Comments
 (0)