UNPKG

angular-odata

Version:

Client side OData typescript library for Angular

85 lines (84 loc) 3.91 kB
import { Observable } from 'rxjs'; import { ODataApi } from '../../api'; import { ODataCollection, ODataModel } from '../../models'; import { ODataPathSegments } from '../path'; import { ODataResource } from '../resource'; import { ODataEntitiesOptions, ODataEntityOptions, ODataOptions, ODataPropertyOptions } from './options'; import { ODataEntities, ODataEntity, ODataProperty } from '../response'; export declare class ODataActionResource<P, R> extends ODataResource<R> { static factory<P, R>(api: ODataApi, { path, outgoingType, incomingType, bindingType, segments, }: { path: string; outgoingType?: string; incomingType?: string; bindingType?: string; segments?: ODataPathSegments; }): ODataActionResource<P, R>; static fromResource<P, R>(resource: ODataResource<any>, path: string): ODataActionResource<P, R>; clone(): ODataActionResource<P, R>; protected post(params: P | null, options?: ODataEntityOptions & ODataEntitiesOptions & ODataPropertyOptions): Observable<any>; /** * Execute the action * @param params Parameters to be sent to the action * @param options Options for the request */ call(params: P | null, options?: ODataEntityOptions): Observable<ODataEntity<R>>; call(params: P | null, options?: ODataEntitiesOptions): Observable<ODataEntities<R>>; call(params: P | null, options?: ODataPropertyOptions): Observable<ODataProperty<R>>; call(params: P | null, options?: { alias?: boolean; responseType?: 'blob'; } & ODataOptions): Observable<Blob>; call(params: P | null, options?: { alias?: boolean; responseType?: 'arraybuffer'; } & ODataOptions): Observable<ArrayBuffer>; call(params: P | null, options?: { alias?: boolean; responseType?: 'none'; } & ODataOptions): Observable<null>; /** * Execute the action and return the result as a property * @param params Parameters for the action * @param options Options for the request * @returns Observable of the result of the action */ callProperty(params: P | null, options?: ODataOptions): Observable<R | null>; /** * Execute the action and return the result as a entity * @param params Parameters for the action * @param options Options for the request * @returns Observable of the result of the action */ callEntity(params: P | null, options?: ODataOptions): Observable<R | null>; /** * Execute the action and return the result as a model * @param params Parameters for the action * @param options Options for the request * @returns Observable of the result of the action */ callModel(params: P | null, options?: ODataOptions & { ModelType?: typeof ODataModel; }): Observable<(ODataModel<R> & import("../../models").ModelInterface<R>) | null>; /** * Execute the action and return the result as a entities * @param params Parameters for the action * @param options Options for the request * @returns Observable of the result of the action */ callEntities(params: P | null, options?: ODataOptions): Observable<R[] | null>; /** * Execute the action and return the result as a collection * @param params Parameters for the action * @param options Options for the request * @returns Observable of the result of the action */ callCollection(params: P | null, options?: ODataOptions & { CollectionType?: typeof ODataCollection; }): Observable<ODataCollection<R, ODataModel<R> & import("../../models").ModelInterface<R>> | null>; callArraybuffer(params: P | null, { alias, ...options }?: { alias?: boolean; } & ODataOptions): Observable<ArrayBuffer>; callBlob(params: P | null, { alias, ...options }?: { alias?: boolean; } & ODataOptions): Observable<Blob>; }