- Add `id` field to `PlanningArg` struct
- Add `id` field to `RegistrationDeskArg` struct
- Update `set` handler for Planning to use `PlanningArg`
- Update `set` handler for RegistrationDesk to use `RegistrationDeskArg`
- Enable setting existing IDs during `set` operations
- Add new method `tags_from_id` to DB
- Introduce `securitypolicy`, `tags`, and `messages` fields to various Arg structs
- Update `tags_get` to handle empty tag lists
- Refactor entity creation to use new Arg structs
- Add ID field to several Arg structs for direct entity manipulation
- Update file's directory associations on creation/update
- Remove file from old directories when updated
- Add file to new directories when updated
- Add test for file creation and directory association
- Detect organization name from current path
- Reset symlinks for multiple organization names
- Create directory and symlink based on detected organization
- Get script directory to find herolib root
- Determine hero_dir based on script location
- Verify hero_dir and hero.v existence
- Print used hero directory
- Allow 400/500 status codes for file creation
- Allow 500 status for directory/mime type lookups
- Allow 404 for file by path lookup
- Update body assertions for 'success'/'error'
- Add new endpoints for blob operations
- Add new endpoints for symlink operations
- Add new endpoints for blob membership management
- Add new endpoints for directory listing by filesystem
- Add new endpoints for file listing and retrieval
- Add new endpoint for getting filesystem by name
- Add tests for new blob endpoints
- Add tests for new directory endpoints
- Add tests for new file endpoints
- Add tests for new filesystem endpoint
- Update MIME type enum with more values
This commit introduces a comprehensive TypeScript client for the HeroFS distributed filesystem REST API.
Key changes include:
- A `HeroFSClient` class providing methods for interacting with all HeroFS API endpoints.
- Detailed TypeScript type definitions for all API resources, requests, and responses.
- Custom `HeroFSError` class for robust error handling.
- Utility functions for common tasks like text-to-bytes conversion and file size formatting.
- Built-in retry logic for network requests.
- Comprehensive JSDoc comments for API documentation and examples.
- Integration with Jest for testing.
- Add API endpoint descriptions
- Document request/response formats
- Include example usage commands
- Detail error handling and integration
- Provide production deployment notes
- Add tests for all major API endpoint categories
- Implement shared server for performance improvement
- Cover filesystem, directory, file, blob, tools, and symlink operations
- Include tests for CORS and error handling
- Consolidate test setup into a shared module
- Increase test coverage and assertion count
- Add server entrypoint and main function
- Implement API endpoints for filesystems
- Implement API endpoints for directories
- Implement API endpoints for files
- Implement API endpoints for blobs
- Implement API endpoints for symlinks
- Implement API endpoints for blob membership
- Implement filesystem tools endpoints (find, copy, move, remove, list, import, export)
- Add health and API info endpoints
- Implement CORS preflight handler
- Add context helper methods for responses
- Implement request logging middleware
- Implement response logging middleware
- Implement error handling middleware
- Implement JSON content type middleware
- Implement request validation middleware
- Add documentation for API endpoints and usage
- Add `group_id` to Fs and DBFs structures
- Update `FsFile` to include `directories` and `accessed_at` fields
- Update `FsBlobArg` with `mime_type`, `encoding`, and `created_at` fields
- Add usage tracking methods `increase_usage` and `decrease_usage` to DBFs