import { FilterParams, PagingParams, DataPage, ConfigParams } from "pip-services3-commons-nodex"; import { CommandableHttpClient } from "pip-services3-rpc-nodex"; import { CurrentPostStateV1 } from "./CurrentPostStateV1"; import { ICurrentPostStatesClientV1 } from "./ICurrentPostStatesClientV1"; export class CurrentPostStatesCommandableClientV1 extends CommandableHttpClient implements ICurrentPostStatesClientV1 { public constructor(config?: ConfigParams) { super("v1/states"); if (config != null) this.configure(config); } public async getStates(correlationId: string, filter: FilterParams, paging: PagingParams): Promise> { return this.callCommand( 'get_states', correlationId, { filter: filter, paging: paging } ); } public async getStateById(correlationId: string, id: string) { return this.callCommand( 'get_state_by_id', correlationId, { state_id: id } ); } public async setState(correlationId: string, state: CurrentPostStateV1): Promise { return this.callCommand( 'set_state', correlationId, { state: state } ); } public async setStates(correlationId: string, states: CurrentPostStateV1[]): Promise { return this.callCommand( 'set_states', correlationId, { states: states } ); } public async deleteStatesByFilter(correlationId: string, filter: FilterParams): Promise { return this.callCommand( 'delete_states_by_filter', correlationId, { filter: filter } ); } public async deleteStatesById(correlationId: string, id: string): Promise { return this.callCommand( 'delete_state_by_id', correlationId, { state_id: id } ); } }