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
11 changes: 11 additions & 0 deletions .changeset/fix-sds-api-contracts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@hypercerts-org/sdk-core": patch
---

Fix SDS organization and collaborator operations to match API contracts

- Add required creatorDid parameter to organization.create endpoint
- Fix organization.list to parse organizations field instead of repositories
- Update accessType values to match SDS API: owner|shared|none (was owner|collaborator)
- Add permission string array parser for collaborator.list endpoint
- Update type definitions to match actual SDS API response formats
30 changes: 30 additions & 0 deletions .changeset/pagination-and-react-hooks-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
"@hypercerts-org/sdk-core": minor
"@hypercerts-org/sdk-react": patch
---

Add pagination support and fix React hooks for SDS operations

**Breaking Changes (sdk-core):**
- `CollaboratorOperations.list()` now returns `{ collaborators: RepositoryAccessGrant[], cursor?: string }` instead of `RepositoryAccessGrant[]`
- `OrganizationOperations.list()` now returns `{ organizations: OrganizationInfo[], cursor?: string }` instead of `OrganizationInfo[]`

**Features:**
- Add cursor-based pagination support to collaborator and organization list operations
- Support optional `limit` and `cursor` parameters for paginated queries
- Update internal methods (`hasAccess`, `getRole`, `get`) to handle new pagination structure

**Bug Fixes (sdk-react):**
- Fix `useCollaborators` hook to correctly destructure paginated response
- Fix `useOrganizations` hook to correctly destructure paginated response
- All React hooks now properly handle the new pagination structure

**Documentation:**
- Comprehensive README updates with clear examples for all SDK operations
- Added pagination examples throughout documentation
- Improved code samples with realistic use cases

**Tests:**
- All 317 tests passing (181 sdk-core + 136 sdk-react)
- Updated test mocks to match new pagination response structure
- Build completes with zero warnings
2 changes: 1 addition & 1 deletion packages/lexicon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hypercerts-org/lexicon",
"version": "0.3.0",
"version": "0.4.0",
"description": "ATProto lexicon definitions and TypeScript types for the Hypercerts protocol",
"type": "module",
"main": "dist/index.cjs",
Expand Down
Loading
Loading