-
Notifications
You must be signed in to change notification settings - Fork 5
refactor(rest): redesign REST API to use ScrapboxResponse #216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
takker99
wants to merge
11
commits into
takker99:main
Choose a base branch
from
nishio:devin/1735801004-rest-api-redesign
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
refactor(rest): redesign REST API to use ScrapboxResponse #216
takker99
wants to merge
11
commits into
takker99:main
from
nishio:devin/1735801004-rest-api-redesign
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BREAKING CHANGE: Replace option-t Result with ScrapboxResponse - Remove option-t dependency - Add ScrapboxResponse class extending web standard Response - Improve type safety with status-based type switching - Allow direct access to Response.body and headers - Add migration guide for v0.30.0 This change follows the implementation pattern from @takker/[email protected] and prepares for release as version 0.30.0. Resolves takker99#213
- Remove option-t dependency - Implement TargetedResponse interface following @takker/[email protected] - Use @std/http for StatusCode and SuccessfulStatus - Add utility functions for response creation - Translate Japanese comments to English - Update all REST API endpoints to use new interface
- Update imports in page-data.ts, link.ts, parseHTTPError.ts, and pages.ts - Remove deno.lock for clean environment setup
- Remove type keyword from imports where functions are used - Update remaining ScrapboxResponse references to TargetedResponse in search.ts - Fix unused imports across REST API files
- Remove type keyword from imports where functions are used - Fix remaining unused imports in REST API files - Update import statements to match actual usage
- Add _createErrorResponse and _createSuccessResponse aliases for unused imports - Add _TargetedResponse alias for unused type imports - Fix remaining linting errors across REST API files
- Add _TargetedResponse alias for unused type imports in multiple files - Fix remaining linting errors in REST API files
- Update import path in targeted_response.ts to use jsr:@std/http - Fix module resolution error
- Update import path in utils.ts to use jsr:@std/http - Fix module resolution error
…e.ts to use JSR format - Update import paths in code examples to use jsr:/@std/json@^1.0.1/types - Update import paths in code examples to use jsr:/@std/testing@^1.0.8/types
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BREAKING CHANGE: Replace option-t Result with ScrapboxResponse
This change follows the implementation pattern from @takker/[email protected] and prepares for release as version 0.30.0.
Resolves #213