Difficulty: Intermediate
Type: feature
Background
packages/sdk-lite is described as "a minimal HTTP client for the access API," intended to wrap all four MVP endpoints (/v1/memberships/:wallet, /v1/members/:wallet, /v1/access/check, /v1/communities/:communityId/members).
Problem
As a minimal client, sdk-lite may not yet cover all four endpoints with fully typed methods, forcing consumers to fall back to raw fetch calls for some of them and lose type safety from packages/shared-types.
Expected outcome
sdk-lite exposes a typed method per documented endpoint (getMembershipStatus, getMemberProfile, checkAccess, listCommunityMembers), all using shared request/response types from packages/shared-types, with consistent error handling (throwing a typed SDK error on non-2xx responses).
Suggested implementation
- Audit
packages/sdk-lite's current exported methods against the four documented endpoints and fill any gaps.
- Ensure every method's params/return type is imported from
packages/shared-types, not locally re-declared.
- Add a small
SdkError class capturing status code and parsed error envelope (see error-standardization issue, if implemented alongside).
- Add unit tests using a mocked HTTP layer (e.g.,
nock or msw) for each method's success and failure paths.
Acceptance criteria
Likely affected files/directories
packages/sdk-lite/
packages/shared-types/
Difficulty: Intermediate
Type: feature
Background
packages/sdk-liteis described as "a minimal HTTP client for the access API," intended to wrap all four MVP endpoints (/v1/memberships/:wallet,/v1/members/:wallet,/v1/access/check,/v1/communities/:communityId/members).Problem
As a minimal client,
sdk-litemay not yet cover all four endpoints with fully typed methods, forcing consumers to fall back to rawfetchcalls for some of them and lose type safety frompackages/shared-types.Expected outcome
sdk-liteexposes a typed method per documented endpoint (getMembershipStatus,getMemberProfile,checkAccess,listCommunityMembers), all using shared request/response types frompackages/shared-types, with consistent error handling (throwing a typed SDK error on non-2xx responses).Suggested implementation
packages/sdk-lite's current exported methods against the four documented endpoints and fill any gaps.packages/shared-types, not locally re-declared.SdkErrorclass capturing status code and parsed error envelope (see error-standardization issue, if implemented alongside).nockormsw) for each method's success and failure paths.Acceptance criteria
packages/shared-types, not duplicatedsdk-lite(or root README) documents usage examplesLikely affected files/directories
packages/sdk-lite/packages/shared-types/