import { Injector } from '@angular/core'; import { BaseHttpService } from './base-http.service'; import { Observable } from 'rxjs'; import { AEntity } from '../models/a-entity'; /** Manage the main CRUD method to a given http route */ export declare abstract class CrudService extends BaseHttpService { private _type; protected baseUrl: string; /** * Create a CRUD service to manage @param baseUrl data * @param baseUrl - relative root url api to access to the resource * @param injector - injector root service used in app.module */ constructor(baseUrl: string, _injector: Injector, _type: new () => T); /** * Get all records */ readAll(filter?: string): Observable; /** * Get a specific record * @param id - Id of the specific record */ readOne(id: number): Observable; /** * Store a new record * @param model - New record to store */ createOne(model: T): Observable; /** * Update an existing model in the store * @param model - Existing model to update according to its id */ updateOne(model: T): Observable; /** * Update partially an existing model in the store with provided properties * @param model - Existing model to update according to its id */ partialUpdateOne(id: number, partialModel: any): Observable; /** * Delete an existing model from the store * @param id - Id of an existing record */ deleteOne(id: number): Observable; }