vue-api-query
vue-api-query copied to clipboard
feat(model): add method wrapper to define the api response wrapper / overrides
Checklist
- [x] Tests
- [x] Docs
- [x] Type definitions
Changes:
- Added wrap and _unwrap methods to Model.js to mimic Laravel's resource data wrapping. This makes for
$first,$find,$get, and$allobsolete but I kept them for backward compatibility. The the overloadablewrap()allows you to automatically unwrap using the standardfirst,find,get,allmethods but also change what the wrapper key is in case you don't want to use the standard 'data' property - Lock the defu package to 6.1.2. Version 6.1.3+ has a regression that prevents exported objects from merging with plain objects.
- Added unit tests for the new wrap() method
- Added new
wrap()type - Updated documentation for new
wrap()type