PagedRequest

Base request object for fetching paged data

Base request object for fetching paged data.

Extended by

Type Parameters

I

I extends PagedRequestInput = PagedRequestInput

T

T extends Required<PagedRequestInput> = I & Required<PagedRequestInput>

Constructors

Constructor

new PagedRequest<I, T>(data): PagedRequest<I, T>

Parameters

data

I

Returns

PagedRequest<I, T>

Inherited from

ValidationRequest<I, T & Required<PagedRequestInput>>.constructor

Methods

transformInput()

transformInput(input): T & Required<PagedRequestInput>

Allows classes to transform input data (I) into data of type T. This is useful when defaulting certain parameters or otherwise providing a different public api than what the internal api requries

This is the default no-op version of the method that should be overriden when types T and I are not the same or input and output data differ

Parameters

input

I

user provided data to transform to type T

Returns

T & Required<PagedRequestInput>

Overrides

ValidationRequest.transformInput


data()

data(): T & Required<PagedRequestInput>

Returns data encapsulated by the Request

Returns

T & Required<PagedRequestInput>

Inherited from

ValidationRequest.data


toJSON()

toJSON(): T & Required<PagedRequestInput>

Method to allow JSON serializers to only serialize the wrapped request data without serializing any of the Request object data

Returns

T & Required<PagedRequestInput>

See

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description

Inherited from

ValidationRequest.toJSON


validate()

validate(): BWellTransactionResult<null, ValidationError>

Validate the request.

Returns

BWellTransactionResult<null, ValidationError>

a BWellTransactionResult describing any validation errors found

Inherited from

ValidationRequest.validate