Home Manual Reference Source
public class | source

BidRepository

Extends:

BaseRepository → BidRepository

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

async clone(bidId: number): Promise<BidEntity>

Create a clone of the bid

public

async get(params: Object): Promise<BidEntity[]>

Retrieves a list of bids

public

async moveToProject(bidId: *, projectId: *): Promise<AxiosResponse<any>>

Init a request to move a bid to a project via bid and project id.

Inherited Summary

From class BaseRepository
public
public

http: *

public
public

map: {"single": *, "multi": *}

public
public

params: {}

public

async create(entity: BidEntity): Promise<BidEntity>

Persists a new entity

public

async delete(id: number | string): Promise<Object>

Deletes a single entity by its id

public

Retrieves a single domain object by its id.

public

async get(params: Object): Promise<BidEntity[]>

Retrieves an array of results for the endpoint

public

async save(entity: BidEntity): Promise<BidEntity>

Persists an update to the entity

Public Constructors

public constructor() source

Creates an instance of BaseRepository.

Override:

BaseRepository#constructor

Public Methods

public async clone(bidId: number): Promise<BidEntity> source

Create a clone of the bid

Params:

NameTypeAttributeDescription
bidId number

Return:

Promise<BidEntity>

Bid clone

public async get(params: Object): Promise<BidEntity[]> source

Retrieves a list of bids

Override:

BaseRepository#get

Params:

NameTypeAttributeDescription
params Object
  • optional

A set of parameters to filter the bids by.

params.per_page number

Number of bids to to display per request (max 100)

params.page number

Page number

params.search string

Search term to apply to bid's title

params.sort_order string

'asc' or 'desc'

params.order_by string

The name of the property to sort the results by

params.statuses number[]

List of status ids to filter by (excluding this will include all statuses)

params.owner_id number

Specify the user id of the bids owner

Return:

Promise<BidEntity[]>

Filtered list of bids

public async moveToProject(bidId: *, projectId: *): Promise<AxiosResponse<any>> source

Init a request to move a bid to a project via bid and project id. returns the request status as fail or success.

Params:

NameTypeAttributeDescription
bidId *
projectId *

Return:

Promise<AxiosResponse<any>>