- Unnecessary to provide
ResourceHandler
in the resource constructor (@Optional).
- removed
asPromise
andasResourceResponse
- added
returnAs
with enum typeResourceActionReturnType
; Default isResourceActionReturnType.Observable
- removed
asPromise
andasResourceResponse
- added
returnAs
with enum typeResourceActionReturnType
; Default isResourceActionReturnType.Observable
IResourceMethod
->IResourceMethodPromise
IResourceMethodStrict
->IResourceMethodPromiseStrict
IResourceMethodFull
->IResourceMethodPromiseFull
IResourceMethodStrictFull
->IResourceMethodPromiseStrictFull
ResourceCRUD
->ResourceCRUDPromise
ResourceCRUDObservable
- same as ResourceCRUDPromise, but typed to Observable
- Fixes Angular Universal compatibility
- Remove
id
from body of delete request
- Added new query mapping method
ResourceQueryMappingMethod.None
in order to have query params as is (not converted)
- Added fourth optional generic type for query result
ResourceCRUD<TQuery, TShort, TFull, TQueryResult = TShort[]>
- Added
patch
method to CRUD resource
-
Implemented new ResourceAction flag
asResourceResponse
which will make reshource method to return IResourceResponse object instead of just body.- Interfaces for auto complition
IResourceMethodStrictFull<IB, IQ, IP, O>
IResourceMethodFull<IB, O>
IResourceMethodResultStrictFull<IB, IQ, IP, O>
IResourceMethodResultFull<IB, O>
- Interfaces for auto complition
- Remove body from DELETE requests #20
- Added static fields to
ResourceModel
in order to define custom resource method names
protected static methodQuery: string = 'query';
protected static methodGet: string = 'get';
protected static methodCreate: string = 'create';
protected static methodUpdate: string = 'update';
protected static methodRemove: string = 'remove';
- Added static methods
ResourceModel
in order to not inject resources (need to inject once to create instance into yourAppComponent
(first loaded component)get(id: string): Promise<any>
query(query?: any): Promise<any[]>
remove(id: string): Promise<void>
- Use npm
@ngx-resource/core
instead ofrest-core
- All
Rest
names and file refactored toResource
- Default query parameter build method set to
RestGlobalConfig
- Added flag
queryMappingMethod
toRestParams
andRestAction
to define query parameter build method per Rest class or per method.
getParamsMappingType
property renamed toqueryMappingMethod
inRestGlobalConfig
RestGetParamsMappingType
enum renamed toRestQueryMappingMethod