Skip to main content

Class: FetchService<S>

Type parameters

NameType
Sextends FetchStateFetchState

Hierarchy

Constructors

constructor

new FetchService<S>()

Type parameters

NameType
Sextends FetchStateFetchState

Inherited from

DefaultService.constructor

Properties

[combinedReducers]

[combinedReducers]: (state: any, action: any) => any

Type declaration

▸ (state, action): any

Parameters
NameType
stateany
actionany
Returns

any

Inherited from

DefaultService.[combinedReducers]

Defined in

onekijs/packages/onekijs-framework/src/core/Service.ts:63


[dispatch]

[dispatch]: any

Inherited from

DefaultService.[dispatch]

Defined in

onekijs/packages/onekijs-framework/src/core/Service.ts:62


[inReducer]

[inReducer]: boolean

Inherited from

DefaultService.[inReducer]

Defined in

onekijs/packages/onekijs-framework/src/core/Service.ts:64


[reducers]

[reducers]: any

Inherited from

DefaultService.[reducers]

Defined in

onekijs/packages/onekijs-framework/src/core/Service.ts:59


[sagas]

[sagas]: any

Inherited from

DefaultService.[sagas]

Defined in

onekijs/packages/onekijs-framework/src/core/Service.ts:61


[types]

[types]: any

Inherited from

DefaultService.[types]

Defined in

onekijs/packages/onekijs-framework/src/core/Service.ts:60


pullTask

Optional pullTask: Task

Defined in

onekijs/packages/onekijs-framework/src/core/FetchService.ts:10


state

state: S

Inherited from

DefaultService.state

Defined in

onekijs/packages/onekijs-framework/src/core/Service.ts:66

Methods

[create]

[create](initialState): void

Parameters

NameType
initialStateS

Returns

void

Inherited from

DefaultService.[create]

Defined in

onekijs/packages/onekijs-framework/src/core/Service.ts:69


[run]

[run](): void

Returns

void

Inherited from

DefaultService.[run]

Defined in

onekijs/packages/onekijs-framework/src/core/Service.ts:208


[stop]

[stop](): void

Returns

void

Inherited from

DefaultService.[stop]

Defined in

onekijs/packages/onekijs-framework/src/core/Service.ts:226


cancelPull

cancelPull(): Generator<undefined | void, void, unknown>

Returns

Generator<undefined | void, void, unknown>

Defined in

onekijs/packages/onekijs-framework/src/core/FetchService.ts:97


delayLoading

delayLoading(delay_ms?): Generator<void | CallEffect<true>, void, unknown>

Parameters

NameType
delay_ms?number

Returns

Generator<void | CallEffect<true>, void, unknown>

Defined in

onekijs/packages/onekijs-framework/src/core/FetchService.ts:13


delete

delete<R>(url, options?): Generator<Generator<void | ForkEffect<Generator<void | CallEffect<true>, void, unknown>> | Promise<any> | CancelEffect | CallEffect<unknown>, void, Task & Response>, void, unknown>

Type parameters

NameType
Rany

Parameters

NameType
urlstring
options?FetchOptions<R, never>

Returns

Generator<Generator<void | ForkEffect<Generator<void | CallEffect<true>, void, unknown>> | Promise<any> | CancelEffect | CallEffect<unknown>, void, Task & Response>, void, unknown>

Defined in

onekijs/packages/onekijs-framework/src/core/FetchService.ts:23


fetch

fetch<R, T>(url, method, body?, options?): Generator<void | ForkEffect<Generator<void | CallEffect<true>, void, unknown>> | Promise<any> | CancelEffect | CallEffect<unknown>, void, Task & Response>

Type parameters

NameType
Rany
Tany

Parameters

NameType
urlstring
methodFetchMethod
body?T
optionsFetchOptions<R, T>

Returns

Generator<void | ForkEffect<Generator<void | CallEffect<true>, void, unknown>> | Promise<any> | CancelEffect | CallEffect<unknown>, void, Task & Response>

Defined in

onekijs/packages/onekijs-framework/src/core/FetchService.ts:44


fetchError

fetchError(e): void

Parameters

NameType
eany

Returns

void

Defined in

onekijs/packages/onekijs-framework/src/core/FetchService.ts:29


fetchSuccess

fetchSuccess(result): void

Parameters

NameType
resultany

Returns

void

Defined in

onekijs/packages/onekijs-framework/src/core/FetchService.ts:36


get

get<R>(url, options?): any

Type parameters

NameType
Rany

Parameters

NameType
urlstring
options?FetchOptions<R, never>

Returns

any

Defined in

onekijs/packages/onekijs-framework/src/core/FetchService.ts:75


patch

patch<R, T>(url, body, options?): Generator<Generator<void | ForkEffect<Generator<void | CallEffect<true>, void, unknown>> | Promise<any> | CancelEffect | CallEffect<unknown>, void, Task & Response>, void, unknown>

Type parameters

NameType
Rany
Tany

Parameters

NameType
urlstring
bodyT
options?FetchOptions<R, T>

Returns

Generator<Generator<void | ForkEffect<Generator<void | CallEffect<true>, void, unknown>> | Promise<any> | CancelEffect | CallEffect<unknown>, void, Task & Response>, void, unknown>

Defined in

onekijs/packages/onekijs-framework/src/core/FetchService.ts:103


poll

poll(url, fixedRateInMs, options?): any

Parameters

NameType
urlstring
fixedRateInMsnumber
options?FetchOptions<any, never>

Returns

any

Defined in

onekijs/packages/onekijs-framework/src/core/FetchService.ts:90


pollFetch

pollFetch(url, fixedRateInMs, options?): any

Parameters

NameType
urlstring
fixedRateInMsnumber
options?FetchOptions<any, never>

Returns

any

Defined in

onekijs/packages/onekijs-framework/src/core/FetchService.ts:80


post

post<R, T>(url, body, options?): Generator<Generator<void | ForkEffect<Generator<void | CallEffect<true>, void, unknown>> | Promise<any> | CancelEffect | CallEffect<unknown>, void, Task & Response>, void, unknown>

Type parameters

NameType
Rany
Tany

Parameters

NameType
urlstring
bodyT
options?FetchOptions<R, T>

Returns

Generator<Generator<void | ForkEffect<Generator<void | CallEffect<true>, void, unknown>> | Promise<any> | CancelEffect | CallEffect<unknown>, void, Task & Response>, void, unknown>

Defined in

onekijs/packages/onekijs-framework/src/core/FetchService.ts:109


put

put<R, T>(url, body, options?): Generator<Generator<void | ForkEffect<Generator<void | CallEffect<true>, void, unknown>> | Promise<any> | CancelEffect | CallEffect<unknown>, void, Task & Response>, void, unknown>

Type parameters

NameType
Rany
Tany

Parameters

NameType
urlstring
bodyT
options?FetchOptions<R, T>

Returns

Generator<Generator<void | ForkEffect<Generator<void | CallEffect<true>, void, unknown>> | Promise<any> | CancelEffect | CallEffect<unknown>, void, Task & Response>, void, unknown>

Defined in

onekijs/packages/onekijs-framework/src/core/FetchService.ts:115


setLoading

setLoading(loading, fetching): void

Parameters

NameType
loadingboolean
fetchingboolean

Returns

void

Defined in

onekijs/packages/onekijs-framework/src/core/FetchService.ts:120