Context
Part of the Bounty Configure (Host a Bounty) milestone. Adds the features/bounties/ data layer for the v1 app, mirroring features/hackathons/. The app is REST-only (openapi-fetch + axios; no GraphQL).
Note: the bounty escrow paths/DTOs are already in lib/api/generated/schema.d.ts, so the escrow client can be built now. The bounty draft paths arrive after the backend draft controller lands and codegen is re-run.
Blueprint to mirror
features/hackathons/types.ts, api/keys.ts, api/draft-client.ts, api/use-draft.ts, api/escrow-client.ts, api/use-escrow.ts
Tasks
Acceptance criteria
- Hooks typecheck against the generated schema.
- Escrow client compiles against the existing bounty escrow paths.
Depends on
- Backend draft controller + codegen (for the draft types). Escrow portion is unblocked.
Context
Part of the Bounty Configure (Host a Bounty) milestone. Adds the
features/bounties/data layer for the v1 app, mirroringfeatures/hackathons/. The app is REST-only (openapi-fetch + axios; no GraphQL).Note: the bounty escrow paths/DTOs are already in
lib/api/generated/schema.d.ts, so the escrow client can be built now. The bounty draft paths arrive after the backend draft controller lands and codegen is re-run.Blueprint to mirror
features/hackathons/types.ts,api/keys.ts,api/draft-client.ts,api/use-draft.ts,api/escrow-client.ts,api/use-escrow.tsTasks
features/bounties/types.ts: alias the generated schema (BountyDraft,UpdateBountyDraftBody, section types,PublishBountyEscrowRequest,BountyEscrowOpResponse,FundingMode, terminal-status helpers).features/bounties/api/keys.ts:bountyKeysfactory.features/bounties/api/draft-client.ts+use-draft.ts:useDraft/useDraftList/useCreateDraft/useUpdateDraft/useDeleteDraftagainst/api/organizations/{organizationId}/bounties/draft[/{id}]and/drafts.features/bounties/api/escrow-client.ts+use-escrow.ts: wrap the bounty escrow paths and reuse the hackathonuseEscrowOpRunner/useEscrowOpmachinery (only the scope shape and theusePublishBountyEscrowwrapper differ).features/bounties/index.ts: public surface.Acceptance criteria
Depends on