import { HttpBackend, HttpClient, HttpParams } from '@angular/common/http'; import { Observable } from 'rxjs'; import { Environment, MessageService } from '../core/public-api'; import { Hit, Organization, SearchResponse } from '../entities/public-api'; /** * The URL to the root api. */ export declare const ROOT_API: string; /** * The object with the URLs to the endpoint apis. */ export declare const ENDPOINT_APIS: { organizations: string; }; /** * The backend service in order to communicate with a remote server over HTTP. */ export declare class OrganizationService { private _http; private _messageService; /** * The `httpOptions` object that contains the headers and will be passed to every `HttpClient` save method. */ private readonly _httpOptions; constructor(_http: HttpClient, _messageService: MessageService); /** * Gets data from the server. * If an error occurs, lets the app keep running by returning the specified safe `optionalResult`. * @param url The endpoint api URL. * @param optionalResult If an error occurs, lets the app keep running by returning a safe optional value * as the observable result. */ get(url: string, optionalResult: T): Observable; /** * Gets data from the server that meets the specified `query`. * If an error occurs, lets the app keep running by returning the specified safe `optionalResult`. * @param url The endpoint api URL. * @param query The query to search. * @param optionalResult If an error occurs, lets the app keep running by returning a safe optional value * as the observable result. */ search(url: string, query: string, optionalResult: T): Observable; /** * Adds `data` to the server. Expects the server to generate an `id` for the new `data`. * If an error occurs, lets the app keep running by returning the specified safe `optionalResult`. * @param url The endpoint api URL. * @param data The data to add. * @param optionalResult If an error occurs, lets the app keep running by returning a safe optional value * as the observable result. */ add(url: string, data: T, optionalResult: T): Observable; /** * Updates `data` on the server. Returns an Observable of that `data` if the `data` is inserted (does * not exist) on the server; otherwise, returns an Observable of null (if the `data` is only updated). * If an error occurs, lets the app keep running by returning the specified safe `optionalResult`. * @param url The endpoint api URL. * @param data The data to update. * @param optionalResult If an error occurs, lets the app keep running by returning a safe optional value * as the observable result. */ update(url: string, data: T, optionalResult: T): Observable; /** * Deletes data from the server. * If an error occurs, lets the app keep running by returning the specified safe `optionalResult`. * @param url The endpoint api URL. * @param id The unique identifier that identifies the data to delete. * @param optionalResult If an error occurs, lets the app keep running by returning a safe optional value * as the observable result. */ delete(url: string, id: string, optionalResult: T): Observable; /** * Logs an `OrganizationService` message with the `MessageService`. * @param message The message to log. */ private log; } export declare class OrganizationServiceNoAuth { private env; private handler; http: HttpClient; path: string; constructor(env: Environment, handler: HttpBackend); getOrganizationByUUID(uuid: any): Observable>; getOrganizationRelationships(uuid: any, relType?: any): Observable>>; getOrganizationByPID(pid: any): Observable>; getOrganizations(params: HttpParams): Observable>; }