Skip to content

[S4] Add typed API response interfaces for Pool, Donation, and User #696

Description

@Akshola00

Description

Define TypeScript interfaces that match the API response shapes from the NestJS server so all API calls are type-safe.

Deliverables

  • Create lib/api-types.ts (or add to existing types file)
  • ApiPool: id, contractPoolId, title, description, category, creatorWallet, status, goal, raised, imageUrl, raisedOnChain, donorCount, createdAt
  • ApiDonation: id, txHash, poolId, poolTitle, donorWallet, amount, asset, createdAt
  • ApiUser: id, publicKey, displayName, createdAt
  • PaginatedResponse<T>: data, total, page, limit
  • All existing API call functions updated to use these types
  • npm run build passes with no type errors

Notes

Depends on #56–58. Keep interfaces separate from the Zustand store types — the store can have its own shape.

Metadata

Metadata

Assignees

Labels

EasyFrontendStellar WaveIssues in the Stellar wave programstage-4Frontend-Backend integration

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions