@stackend/api
Version:
JS bindings to api.stackend.com
36 lines • 1.49 kB
TypeScript
import { Config, GetInitialStoreValuesRequest, GetInitialStoreValuesResult, Thunk } from './index';
import { AnyAction } from 'redux';
import Logger from '../util/Logger';
import { LoadJsonResult } from './LoadJson';
export interface InitializeRequest extends GetInitialStoreValuesRequest {
config?: Partial<Config>;
logger?: Logger;
}
/**
* Initialize the stackend API.
* Supply either communityId or permalink
* @param props
*/
export declare function initialize(props: InitializeRequest): Thunk<Promise<GetInitialStoreValuesResult>>;
/**
* @deprecated Use GetInitialStoreValuesRequest instead
*/
export declare type LoadInitialStoreValuesRequest = GetInitialStoreValuesRequest;
export declare function loadInitialStoreValues(params: GetInitialStoreValuesRequest): Thunk<Promise<GetInitialStoreValuesResult>>;
/**
* Signals that an api access has failed due to some error, for example server down or insufficient privileges.
* A custom reducer could set up logic to handle re-authentication
*/
export declare const XCAP_API_ACCESS_FAILED = "XCAP_API_ACCESS_FAILED";
export declare type ApiAccessFailedAction = AnyAction & {
url: string;
result: LoadJsonResult;
};
/**
* Signals that an api access has failed due to some error, for example server down or insufficient privileges
*
* @param url
* @param result
*/
export declare function signalApiAccessFailed(url: string, result: LoadJsonResult): ApiAccessFailedAction;
//# sourceMappingURL=actions.d.ts.map