import { CubaApp, PropertyType } from "@cuba-platform/rest"; import * as React from "react"; import { MainStore } from "./MainStore"; export interface CubaAppContextValue { cubaREST?: CubaApp; config?: CubaAppConfig; } export declare function getCubaREST(): CubaApp | undefined; export declare function getMainStore(): MainStore; export declare function getCubaAppConfig(): CubaAppConfig | undefined; export interface CubaAppConfig { /** * Serialization formats for entity properties of temporal types. * Can be used to override the default formats used to (de)serialize the data transferred by REST API. * See @{link https://momentjs.com/docs/#/displaying/ | Moment documentation} * for details on available formats. */ dataTransferFormats?: Partial>; /** * Display formats for entity properties of temporal types. * Can be used to override the formats used for data presentation. * See @{link https://momentjs.com/docs/#/displaying/ | Moment documentation} * for details on available formats. */ displayFormats?: Partial>; } export interface CubaAppProviderProps { /** * REST API facade */ cubaREST: CubaApp; children: React.ReactNode | React.ReactNode[] | null; /** * A callback that retrieves REST API token from an external storage. * Used, for example, in native mobile apps. * * @returns a promise that resolves into a `string` representing a valid REST API token * or `undefined` if no valid token is available. */ retrieveRestApiToken?: () => Promise; /** * Configuration object. */ config?: CubaAppConfig; } export declare const CubaAppProvider: React.FC;