Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

Update exchange.ts

Developers Digest5c6d1e471eae
diff --git a/apps/api/src/routes/exchange.ts b/apps/api/src/routes/exchange.ts
index bede4d92b..1804e8c66 100644
--- a/apps/api/src/routes/exchange.ts
+++ b/apps/api/src/routes/exchange.ts
@@ -10,6 +10,7 @@ const DISCOVER_TIMEOUT_MS = 10_000;
const RETRIEVE_TIMEOUT_MS = 50_000;
const ANALYTICS_TIMEOUT_MS = 20_000;
const APPLICATIONS_TIMEOUT_MS = 15_000;
+const CLAIMS_TIMEOUT_MS = 20_000;
const FORWARDED_REQUEST_HEADERS = ["accept", "x-request-id"];
const FORWARDED_RESPONSE_HEADERS = ["content-type", "x-request-id"];
@@ -129,8 +130,44 @@ exchangeRouter.get(
wrap(exchangeProxy(ANALYTICS_TIMEOUT_MS)),
);
+exchangeRouter.get(
+ "/platform{/*path}",
+ authMiddleware(RateLimiterMode.Labs),
+ wrap(exchangeProxy(ANALYTICS_TIMEOUT_MS, { requiresRetrieveFlag: false })),
+);
+
+exchangeRouter.post(
+ "/platform{/*path}",
+ authMiddleware(RateLimiterMode.Labs),
+ wrap(exchangeProxy(ANALYTICS_TIMEOUT_MS, { requiresRetrieveFlag: false })),
+);
+
+exchangeRouter.get(
+ "/publisher{/*path}",
+ authMiddleware(RateLimiterMode.Labs),
+ wrap(exchangeProxy(ANALYTICS_TIMEOUT_MS, { requiresRetrieveFlag: false })),
+);
+
exchangeRouter.post(
"/applications",
authMiddleware(RateLimiterMode.Labs),
wrap(exchangeProxy(APPLICATIONS_TIMEOUT_MS, { requiresRetrieveFlag: false })),
);
+
+exchangeRouter.get(
+ "/claims",
+ authMiddleware(RateLimiterMode.Labs),
+ wrap(exchangeProxy(CLAIMS_TIMEOUT_MS, { requiresRetrieveFlag: false })),
+);
+
+exchangeRouter.post(
+ "/claims",
+ authMiddleware(RateLimiterMode.Labs),
+ wrap(exchangeProxy(CLAIMS_TIMEOUT_MS, { requiresRetrieveFlag: false })),
+);
+
+exchangeRouter.post(
+ "/claims/:id/verify",
+ authMiddleware(RateLimiterMode.Labs),
+ wrap(exchangeProxy(CLAIMS_TIMEOUT_MS, { requiresRetrieveFlag: false })),
+);