Skip to content

Conversation

@ktzmishra
Copy link
Contributor

  • Add fetchFromEdge method in suggestions controller
  • Implement site and opportunity validation
  • Add URL format validation (HTTP/HTTPS only)
  • Custom User-Agent: Tokowaka-AI Tokowaka/1.0
  • Add unit tests (13 test cases)
  • Update OpenAPI documentation

Related Issues

https://github.com/adobe-rnd/tokowaka-worker/issues/386

@ktzmishra ktzmishra force-pushed the feat/tokowaka-edge-fetch-api branch from ca11a66 to 6cd883c Compare December 2, 2025 09:33
@github-actions
Copy link

github-actions bot commented Dec 2, 2025

This PR will trigger a minor release when merged.

@codecov
Copy link

codecov bot commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ktzmishra ktzmishra force-pushed the feat/tokowaka-edge-fetch-api branch 2 times, most recently from 9243467 to 1a6151d Compare December 2, 2025 12:53
@ktzmishra ktzmishra requested a review from nit23uec December 2, 2025 12:54
@ktzmishra ktzmishra force-pushed the feat/tokowaka-edge-fetch-api branch from 1a6151d to 2aecde2 Compare December 2, 2025 12:59
Add new endpoint to fetch live URL content for previewing deployed suggestions.

Features:
- fetchFromEdge method in suggestions controller
- Site and opportunity validation
- URL format validation (HTTP/HTTPS only)
- Custom User-Agent: Tokowaka-AI Tokowaka/1.0
- Logs x-tokowaka-request-id header on errors
- Returns HTML content in response structure similar to edge-preview

Technical changes:
- Endpoint: POST /sites/:siteId/opportunities/:opportunityId/suggestions/edge-live-preview
- Controller method: fetchFromEdge with full validation
- OpenAPI documentation: site-opportunity-suggestions-edge-live-preview
- Unit tests: 14 test cases with 100% coverage
- Route added to index.js
@ktzmishra ktzmishra force-pushed the feat/tokowaka-edge-fetch-api branch from 2aecde2 to ea6a6cf Compare December 2, 2025 16:50
@nit23uec nit23uec merged commit ed011b4 into main Dec 3, 2025
9 checks passed
@nit23uec nit23uec deleted the feat/tokowaka-edge-fetch-api branch December 3, 2025 12:25
solaris007 pushed a commit that referenced this pull request Dec 3, 2025
# [1.269.0](v1.268.1...v1.269.0) (2025-12-03)

### Features

* add edge-fetch API endpoint for Tokowaka URL fetching ([#1600](#1600)) ([ed011b4](ed011b4))
@solaris007
Copy link
Member

🎉 This PR is included in version 1.269.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants