import { Observable } from 'rxjs'; import { XBaseRangeRequestDto } from 'x-framework-core'; import { HttpEvent, HttpResponse } from '@angular/common/http'; import { XQueryDto, XQueryResultDto } from 'x-framework-identity-sdk'; export interface IXEntityActions { // //#region Repository Implementation ... // //#region Retrieve ... // //#region Get ... /** * Retrieve Specified Item based on Id * * @param id the Object ID ... * @param containsDetail specify retrieve full details * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ callGet( id: TKey, containsDetail?: boolean, observe?: 'body', reportProgress?: boolean ): Observable; callGet( id: TKey, containsDetail?: boolean, observe?: 'response', reportProgress?: boolean ): Observable>; callGet( id: TKey, containsDetail?: boolean, observe?: 'events', reportProgress?: boolean ): Observable>; callGet( id: TKey, containsDetail?: boolean, observe?: any, reportProgress?: boolean ): Observable; //#endregion // //#region GetAll ... /** * Retrieve all Items * * @param containsDetail specify retrieve full details * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ callGetAll( containsDetail?: boolean, observe?: 'body', reportProgress?: boolean ): Observable>; callGetAll( containsDetail?: boolean, observe?: 'response', reportProgress?: boolean ): Observable>>; callGetAll( containsDetail?: boolean, observe?: 'events', reportProgress?: boolean ): Observable>>; callGetAll( containsDetail?: boolean, observe?: any, reportProgress?: boolean ): Observable; //#endregion // //#region FindOne ... /** * Fine first Item which matched to the query string * * @param query search pattern * @param containsDetail specify retrieve full details * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ callFindOne( query: string, containsDetail?: boolean, observe?: 'body', reportProgress?: boolean ): Observable; callFindOne( query: string, containsDetail?: boolean, observe?: 'response', reportProgress?: boolean ): Observable>; callFindOne( query: string, containsDetail?: boolean, observe?: 'events', reportProgress?: boolean ): Observable>; callFindOne( query: string, containsDetail?: boolean, observe?: any, reportProgress?: boolean ): Observable; //#endregion // //#region FindMany ... /** * Find a Collection of items which matched to Specified Query string * * @param query search pattern * @param containsDetail specify retrieve full details * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ callFindMany( query: string, containsDetail?: boolean, observe?: 'body', reportProgress?: boolean ): Observable>; callFindMany( query: string, containsDetail?: boolean, observe?: 'response', reportProgress?: boolean ): Observable>>; callFindMany( query: string, containsDetail?: boolean, observe?: 'events', reportProgress?: boolean ): Observable>>; callFindMany( query: string, containsDetail?: boolean, observe?: any, reportProgress?: boolean ): Observable; //#endregion // //#region Query ... /** * Retrieve Items based on XQuery model * * @param query specify data projection attributes * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ callQuery( query: XQueryDto, observe?: 'body', reportProgress?: boolean ): Observable>; callQuery( query: XQueryDto, observe?: 'response', reportProgress?: boolean ): Observable>>; callQuery( query: XQueryDto, observe?: 'events', reportProgress?: boolean ): Observable>>; callQuery( query: XQueryDto, observe?: any, reportProgress?: boolean ): Observable; //#endregion //#endregion // //#region Add ... // //#region Add ... /** * Add New Item * * @param body the new Content which requires to add * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ callAdd( body: TModel, connectionId?: string, observe?: 'body', reportProgress?: boolean ): Observable; callAdd( body: TModel, connectionId?: string, observe?: 'response', reportProgress?: boolean ): Observable>; callAdd( body: TModel, connectionId?: string, observe?: 'events', reportProgress?: boolean ): Observable>; callAdd( body: TModel, connectionId?: string, observe?: any, reportProgress?: boolean ): Observable; //#endregion // //#region AddOrUpdate ... /** * Add New Item or Update Exists Item * * @param body hte instance of Entity * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ callAddOrUpdate( body: TModel, connectionId?: string, observe?: 'body', reportProgress?: boolean ): Observable; callAddOrUpdate( body: TModel, connectionId?: string, observe?: 'response', reportProgress?: boolean ): Observable>; callAddOrUpdate( body: TModel, connectionId?: string, observe?: 'events', reportProgress?: boolean ): Observable>; callAddOrUpdate( body: TModel, connectionId?: string, observe?: any, reportProgress?: boolean ): Observable; //#endregion // //#region AddMany ... /** * Add a Collection of items * * @param body an instance of XBaseRangeRequest which contains a collection of items * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ callAddMany( body: XBaseRangeRequestDto, connectionId?: string, observe?: 'body', reportProgress?: boolean ): Observable; callAddMany( body: XBaseRangeRequestDto, connectionId?: string, observe?: 'response', reportProgress?: boolean ): Observable>; callAddMany( body: XBaseRangeRequestDto, connectionId?: string, observe?: 'events', reportProgress?: boolean ): Observable>; callAddMany( body: XBaseRangeRequestDto, connectionId?: string, observe?: any, reportProgress?: boolean ): Observable; //#endregion //#endregion // //#region Update ... // //#region Update ... /** * Update Specified Item * * @param body the instance with all changes * @param id the Id of Object which are going to replace or update with this * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ callUpdate( id: TKey, body: TModel, connectionId?: string, observe?: 'body', reportProgress?: boolean ): Observable; callUpdate( id: TKey, body: TModel, connectionId?: string, observe?: 'response', reportProgress?: boolean ): Observable>; callUpdate( id: TKey, body: TModel, connectionId?: string, observe?: 'events', reportProgress?: boolean ): Observable>; callUpdate( id: TKey, body: TModel, connectionId?: string, observe?: any, reportProgress?: boolean ): Observable; //#endregion // //#region UpdateMany ... /** * Update a Collection of Items * * @param body an instance of XBaseRangeRequestDto * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ callUpdateMany( body: XBaseRangeRequestDto, connectionId?: string, observe?: 'body', reportProgress?: boolean ): Observable; callUpdateMany( body: XBaseRangeRequestDto, connectionId?: string, observe?: 'response', reportProgress?: boolean ): Observable>; callUpdateMany( body: XBaseRangeRequestDto, connectionId?: string, observe?: 'events', reportProgress?: boolean ): Observable>; callUpdateMany( body: XBaseRangeRequestDto, connectionId?: string, observe?: any, reportProgress?: boolean ): Observable; //#endregion //#endregion // //#region Exists ... /** * Check an items is Exists or not * * @param id the id of item * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ callIsExists( id: TKey, observe?: 'body', reportProgress?: boolean ): Observable; callIsExists( id: TKey, observe?: 'response', reportProgress?: boolean ): Observable>; callIsExists( id: TKey, observe?: 'events', reportProgress?: boolean ): Observable>; callIsExists( id: TKey, observe?: any, reportProgress?: boolean ): Observable; //#endregion // //#region Remove ... // //#region Remove ... /** * Remove Specified item by its ID * * @param id pointer to specific instance * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ callRemove( id: TKey, connectionId?: string, observe?: 'body', reportProgress?: boolean ): Observable; callRemove( id: TKey, connectionId?: string, observe?: 'response', reportProgress?: boolean ): Observable>; callRemove( id: TKey, connectionId?: string, observe?: 'events', reportProgress?: boolean ): Observable>; callRemove( id: TKey, connectionId?: string, observe?: any, reportProgress?: boolean ): Observable; //#endregion // //#region RemoveMany ... /** * Remove a Collection of Items base on RangeRequest * * @param body an instance of XBaseRangeRequestDto * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ callRemoveMany( body: XBaseRangeRequestDto, connectionId?: string, observe?: 'body', reportProgress?: boolean ): Observable; callRemoveMany( body: XBaseRangeRequestDto, connectionId?: string, observe?: 'response', reportProgress?: boolean ): Observable>; callRemoveMany( body: XBaseRangeRequestDto, connectionId?: string, observe?: 'events', reportProgress?: boolean ): Observable>; callRemoveMany( body: XBaseRangeRequestDto, connectionId?: string, observe?: any, reportProgress?: boolean ): Observable; //#endregion //#endregion //#endregion }