import { AjaxOptions } from "./AjaxOptions.js"; import { App } from "../../App.js"; import { CacheSeconds } from "../CacheService.js"; import { IJsonParserOptions, JsonService } from "../JsonService.js"; export interface IHttpHeaders { [key: string]: string; } export interface IApiResponse { headers?: IHttpHeaders; value?: T; } export interface IMethodOptions { jsCacheSeconds?: CacheSeconds; accept?: string; headers?: IHttpHeaders; jsonOptions?: IJsonParserOptions; returnHeaders?: boolean; } export type RestAttr = (target: BaseService, propertyKey: string | symbol, parameterIndex: number) => void; export type RestParamAttr = (key: string, defaultValue?: any) => RestAttr; export type RestMethodAttr = (key: string, options?: IMethodOptions) => (target: BaseService, propertyKey: string | symbol, descriptor: any) => void; export declare const Path: RestParamAttr; export declare const Header: RestParamAttr; export declare const Query: RestParamAttr; export declare const Queries: RestAttr; export declare const Body: RestAttr; export declare const RawBody: RestAttr; export declare const BodyFormModel: RestAttr; export declare const XmlBody: RestAttr; export declare const Post: RestMethodAttr; export declare const Get: RestMethodAttr; export declare const Delete: RestMethodAttr; export declare const Put: RestMethodAttr; export declare const Patch: RestMethodAttr; export declare function Cancel(target: BaseService, propertyKey: string | symbol, parameterIndex: number): void; export declare class ServiceParameter { readonly type: string; readonly key: string; readonly defaultValue?: any; constructor(type: string, key: string, defaultValue?: any); } export default function BaseUrl(baseUrl: string): ((target: any) => void); export declare class BaseService { protected readonly app: App; readonly jsonService: JsonService; static baseUrls: { [key: string]: string; }; baseUrl: string; testMode: boolean; showProgress: boolean; showError: boolean; methods: any; methodReturns: any; jsonOptions: IJsonParserOptions; headers: { [key: string]: string | number | null | undefined; }; constructor(app: App, jsonService: JsonService); protected encodeData(o: AjaxOptions): AjaxOptions; protected sendResult(result: any, error?: any): Promise; protected invoke(url: string, method: string, bag: ServiceParameter[], values: any[], methodOptions: IMethodOptions): Promise; protected parseHeaders(headers: string | any): IHttpHeaders; protected ajax(url: string, options: AjaxOptions): Promise; } //# sourceMappingURL=RestService.d.ts.map