import RESTClient, { BodyGenerator } from './rest-client'; /** * Please use `@Headers`, `@Queries` or `@Fields` instead * * @deprecated * @publicApi */ export interface RestParam { key: string; /** * @deprecated */ defaultValue?: any; } export interface RestAdvParam extends RestParam { parameterIndex: number; } /** * @publicApi */ export interface RestMethodOptions { /** * Function to generate the body of a request, can be neither * `GenerateBody.FormUrlEncoded` nor `GenerateBody.Json`. * * You can write the custom function that return the string of the body * * _Default Value:_ `GenerateBody.Json` */ generateBody?: BodyGenerator; /** * Specify the consumption type will be returned * * - **promise** - return call as `Promise`⋅ * - **observable** - filter segment from `Observable` of `HttpResponseBase.ok` * - **raw** - ignore `RESTClient.responseInterceptor` and return raw `Observable` * - **httpResponse** - filter segment from `Observable` instance of `HttpResponse` */ responseStrategy?: string; } export interface Injector { get(token: any, notFoundValue?: T): T; } export declare type HeaderValue = string | string[] | number; export interface RestDescriptorParam { url: string; method: string; headers: Record; normalizedHeaders: Record; body: string; propertyKey: string; args: any[]; interceptRequest(request: REQ): REQ; } export declare type RESTHeaders = Record; export declare type RESTAuthenticationHeaders = RESTHeaders & { 'X-Auth-Token'?: string; 'Authentication'?: string; };