Skip to content

Create lib/api/agreements.tsand migrate agreements off Supabase #102

Description

@ManuelJG1999

Depends on: Issue Thalos-Infrastructure/ThalosBackend#8

Task Description

lib/actions/agreements.ts still queries Supabase directly and is the dependency for disputes logic. Create a backend client and migrate consumers.

Deliverable

  • New lib/api/agreements.ts mapping to backend endpoints.
  • Consumers updated to use it; Supabase queries removed.

Requirements

  • Map functions to: POST /agreements, GET /agreements, GET /agreements/:id, PATCH /agreements/:id/status, PATCH /agreements/:id/milestones, GET /agreements/:id/activity, GET /agreements/by-contract/:contractId.
  • Preserve updateAgreementStatus and logAgreementActivity signatures (used by lib/actions/disputes.ts).

Validation System

  • Create/read/update agreements works end-to-end via backend.
  • Grep shows no supabase.from("agreements") / agreement_activity in the FE.

Technical Requirements

Additional Notes

Do this before Issue Thalos-Infrastructure/ThalosBackend#5 — disputes call updateAgreementStatus and logAgreementActivity.

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions