import { ActionsObservable } from 'redux-observable'; import { LDErrorMsgState } from './../LDError'; import { ILDOptionsMapStatePart } from '../store'; import { KVL } from '../../ldaccess/KVL'; import { ILDOptions } from '../../ldaccess/ildoptions'; import { OutputKVMap } from '../../ldaccess/ldBlueprint'; import { ILDWebResource } from '../../ldaccess/ildresource'; export declare const LDOPTIONS_CLIENTSIDE_CREATE = "metaexplorer.io/LDOPTIONS_CLIENTSIDE_CREATE"; export declare const LDOPTIONS_CLIENTSIDE_UPDATE = "metaexplorer.io/LDOPTIONS_CLIENTSIDE_UPDATE"; export declare const LDOPTIONS_REQUEST_ASYNC = "metaexplorer.io/LDOPTIONS_REQUEST_ASYNC"; export declare const LDOPTIONS_REQUEST_ERROR = "metaexplorer.io/LDOPTIONS_REQUEST_ERROR"; export declare const LDOPTIONS_REQUEST_RESULT = "metaexplorer.io/LDOPTIONS_REQUEST_RESULT"; export declare const LDOPTIONS_KV_UPDATE = "metaexplorer.io/LDOPTIONS_KV_UPDATE"; export declare const ACTION_LDACTION = "metaexplorer.io/ACTION_LDACTION"; export declare type LD_KVUpdateAction = { type: 'metaexplorer.io/LDOPTIONS_KV_UPDATE'; changedKvStores: KVL[]; thisLdTkStr: string; updatedKvMap: OutputKVMap; }; export declare type LDActionType = { type: 'metaexplorer.io/ACTION_LDACTION'; payload: any; idHandler: string; typeHandler: string; }; export declare type LDAction = { type: 'metaexplorer.io/LDOPTIONS_CLIENTSIDE_CREATE'; kvStores: KVL[]; lang: string; alias: string; } | { type: 'metaexplorer.io/LDOPTIONS_CLIENTSIDE_UPDATE'; updatedLDOptions: ILDOptions; } | { type: 'metaexplorer.io/LDOPTIONS_REQUEST_ASYNC'; isExternalAPICall: boolean; uploadData: ILDOptions; targetUrl: string; targetReceiverLnk: string; } | { type: 'metaexplorer.io/LDOPTIONS_REQUEST_RESULT'; ldOptionsPayload: ILDWebResource; targetReceiverLnk: string; } | { type: 'metaexplorer.io/LDOPTIONS_REQUEST_ERROR'; message: string; targetReceiverLnk: string; } | LD_KVUpdateAction | LDActionType; export declare const ldOptionsClientSideCreateAction: (kvStores: KVL[], lang: string, alias: string) => { type: string; kvStores: KVL[]; lang: string; alias: string; }; export declare const ldOptionsClientSideUpdateAction: (updatedLDOptions: ILDOptions) => { type: string; updatedLDOptions: ILDOptions; }; /** * used to wrap any calls to APIs so that they can be easily consumed by the state * @param apiCallOverride !!! if set, uploadData and targetUrl will be ignored. * @param uploadData default call: upload data for jsonld-POST request * @param targetUrl default call: REST endpoint (jsonld) * @param targetReceiverLnk the receiving interpreter's link */ export declare const ldOptionsRequestAction: (apiCallOverride: () => Promise, uploadData?: ILDOptions, targetUrl?: string, targetReceiverLnk?: any) => { isExternalAPICall: boolean; type: string; uploadData: ILDOptions; targetUrl: string; targetReceiverLnk: any; }; export declare const ldOptionsResultAction: (ldOptionsPayload: ILDWebResource, targetReceiverLnk: any) => { type: string; ldOptionsPayload: ILDWebResource; targetReceiverLnk: any; }; export declare const ldOptionsFailureAction: (message: string, targetReceiverLnk: any) => LDErrorMsgState; export declare const dispatchKvUpdateAction: (changedKvStores: KVL[], thisLdTkStr: string, updatedKvMap: OutputKVMap) => { type: string; changedKvStores: KVL[]; thisLdTkStr: string; updatedKvMap: OutputKVMap; }; /** * dispatches an LDAction that can be handled globally by a type- or id- action-handler. Used for handling button-pressing etc. * @param ldId one of id or ldType has to be defined * @param ldType one of id or ldType has to be defined * @param payload the payload for the actionhandler */ export declare const ldAction: (ldId: string, ldType: string, payload: any) => LDActionType; export declare const ldOptionsMapReducer: (state: ILDOptionsMapStatePart, action: LDAction) => ILDOptionsMapStatePart; export declare const requestLDOptionsEpic: (action$: ActionsObservable, store: any, { ldOptionsAPI }: any) => import("rxjs").Observable;