Skip to content

Commit bbfd170

Browse files
Fix: Remove incorrect /api/v2 prefix from all API endpoints (#3)
* fix: Remove incorrect /api/v2 prefix from all API endpoints The Hypernative API endpoints don't use the /api/v2 prefix. Updated all endpoints to use the correct format: - /api/v2/watchlists → /watchlists - /api/v2/custom-agents → /custom-agents - /api/v2/notification-channels → /notification-channels - /api/v2/alerts → /alerts This fixes the 404 errors when trying to interact with the Hypernative API. Changes: - Updated all provider files to use correct endpoints - Fixed test files and mocks - Updated documentation and examples - Cleaned up example YAML configurations 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com> * fix: Resolve CI formatting issues and update golden tests - Fix Prettier formatting issues in notification channel provider files - Update golden test framework to support UPDATE_GOLDEN environment variable - Regenerate golden test files for API endpoint changes - Ensure all linting and formatting checks pass 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * chore: Clean up outdated documentation and improve organization - Removed outdated QA reports and ticket tracking files - Removed completed implementation documentation - Moved platform API reference to docs/reference/ for better organization - Added test CSV directories and .hypernative to .gitignore These files were from the development phase and are no longer needed in the main repository. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 74d6752 commit bbfd170

26 files changed

+193
-1203
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,5 @@ qa-testing/
123123
*.tgz
124124

125125
# Yarn Integrity file
126-
.yarn-integrity
126+
.yarn-integrity.test-csv-*
127+
.hypernative/

.memento/tickets/done/CRITICAL-003: Fix CSV Upload Node.js Compatibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ formData.append('file', createReadStream(csvPath), {
5959
Ensure the API client properly handles form-data content-type headers:
6060
```typescript
6161
const response = await this.apiClient.post(
62-
`/api/v2/watchlists/${watchlistId}/upload-csv`,
62+
`/watchlists/${watchlistId}/upload-csv`,
6363
formData,
6464
{
6565
headers: {

.memento/tickets/done/HIGH-002: Fix API Response Wrapper Format.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ import { unwrapApiListResponse } from '../lib/api-response.js';
9393

9494
async list(limit = 50, offset = 0): Promise<Watchlist[]> {
9595
try {
96-
const response = await this.apiClient.get('/api/v2/watchlists', {
96+
const response = await this.apiClient.get('/watchlists', {
9797
params: { limit, offset },
9898
});
9999

@@ -113,7 +113,7 @@ import { unwrapApiResponse } from '../lib/api-response.js';
113113

114114
async getById(id: string): Promise<Watchlist | null> {
115115
try {
116-
const response = await this.apiClient.get(`/api/v2/watchlists/${id}`);
116+
const response = await this.apiClient.get(`/watchlists/${id}`);
117117
return unwrapApiResponse<Watchlist>(response);
118118
} catch (error: any) {
119119
if (error.status === 404) {
@@ -132,7 +132,7 @@ Fix methods that access nested response properties:
132132
async create(config: WatchlistConfig): Promise<Watchlist> {
133133
try {
134134
const payload = this.buildWatchlistPayload(config);
135-
const response = await this.apiClient.post('/api/v2/watchlists', payload);
135+
const response = await this.apiClient.post('/watchlists', payload);
136136
const created = unwrapApiResponse<Watchlist>(response);
137137

138138
log.info(`Created watchlist: ${created.name} (${created.id})`);
@@ -153,7 +153,7 @@ async uploadCsv(watchlistId: string, csvPath: string, replaceAssets = false): Pr
153153
// ... form data creation ...
154154

155155
const response = await this.apiClient.post(
156-
`/api/v2/watchlists/${watchlistId}/upload-csv`,
156+
`/watchlists/${watchlistId}/upload-csv`,
157157
formData,
158158
{ headers: formData.getHeaders() }
159159
);

.memento/tickets/done/NEXT-009-Provider-Watchlists.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ Acceptance Criteria
1717
- CSV upload supports dry-run mode to preview import counts
1818

1919
References
20-
- GET/POST/PATCH/DELETE `/api/v2/watchlists`
21-
- POST `/api/v2/watchlists/{id}/upload-csv`
20+
- GET/POST/PATCH/DELETE `/watchlists`
21+
- POST `/watchlists/{id}/upload-csv`
2222

.memento/tickets/done/NEXT-010-Provider-Custom-Agents.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ Acceptance Criteria
1818
- Channel references resolved; failures reported with actionable hints
1919

2020
References
21-
- GET/POST/PATCH/DELETE `/api/v2/custom-agents`
22-
- GET `/api/v2/custom-agents/{id}/status`
21+
- GET/POST/PATCH/DELETE `/custom-agents`
22+
- GET `/custom-agents/{id}/status`
2323

.memento/tickets/done/NEXT-011-Provider-Notification-Channels.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ Acceptance Criteria
1616
- Secrets are never logged; redactions verified in debug logs
1717

1818
References
19-
- GET/POST/PATCH/DELETE `/api/v2/notification-channels`
20-
- POST `/api/v2/notification-channels/{id}/test`
19+
- GET/POST/PATCH/DELETE `/notification-channels`
20+
- POST `/notification-channels/{id}/test`
2121

CUSTOM_AGENTS_IMPLEMENTATION.md

Lines changed: 0 additions & 188 deletions
This file was deleted.

0 commit comments

Comments
 (0)