import { Observable } from 'rxjs'; import { RouteConfig } from '../providers'; import { ApiHttpClient } from '../client/api.client'; import { Duties, Index } from '../api'; import { Duty } from '../models'; export declare class DutyService { private readonly routes; private readonly http; constructor(routes: RouteConfig, http: ApiHttpClient); index(query?: Duties.Query): Observable>; show(id: number): Observable; /** * If the API "successfully fails" to create a duty, as distinct from an error * failure to create a duty, this will be the response data body: * * @example * * { * statusCode: 200, * message: "Successfully processed, but no period was added as it's the same as default." * } * * This occurs when the user tries to create a Duty period identical to their * default Duty settings. The response status is 201 Created. Until such time * that we resolve #2737, the service has to check whether the response * actually contains the expected record. * * @see https://github.com/D4H/decisions-project/issues/2737 */ create(body: Duties.New): Observable; update(id: number, body: Duties.Change): Observable; destroy(id: number): Observable; }