/// <reference types="lodash" />
import { AnyEvent, ApiConfig, Asset, Collection, DeviceInfo, Feature, Modal, ModalReason, ShareResult, ShareType, SharedSpace, StatusEmitter, Toast, ToastReason, UploadData, UserInfo } from '@showpad/experience-app-types';
/**
 * @returns Information of the current device.
 *
 * @category Offline
 */
export declare const getDeviceInfo: (() => Promise<DeviceInfo>) & import("lodash").MemoizedFunction;
/**
 * @returns Information of the active user.
 *
 * @category Offline
 */
export declare const getUserInfo: (() => Promise<UserInfo>) & import("lodash").MemoizedFunction;
/**
 * Use this method to know if a specific feature is supported on the app your content is running in.
 *
 * @category Offline
 */
export declare const hasFeature: ((feature: Feature) => Promise<boolean>) & import("lodash").MemoizedFunction;
/**
 * Track an event in your Experience App. This is used to track how conversations are happening within the experience.
 * The events currently aren't visualized in the Online-Platform but can be exported through Showpad's Export API.
 *
 * @category Offline
 */
export declare const trackEvent: (event: AnyEvent | AnyEvent[]) => void;
/**
 * Shows a modal view to share contents. The provided assets will be added so they can be shared.
 *
 * @param type The type of the modal is either email or link.
 *
 * @returns If some of the assets are not shareable (expired, deleted, unshareable, …),
 * the modal will still be shown, but the callback function will be called with result partial.
 * In this case, the Showpad client will show a warning message to the user that some content cannot be shared.
 * If none of the provided assets can be shared, a warning will be shown, but no sharing modal will be displayed and the result will be error.
 *
 * @category Offline
 */
export declare const share: (type: ShareType, assetSlugs: Asset['slug'][]) => Promise<ShareResult>;
/**
 * @remarks Asset files are cached for 10 minutes. Can be busted by adding a timestamp to the request URL. For example `${your url}?ts=${Date.now()}`
 *
 * @param size The maximum dimension for the width or height.
 *
 * @returns pre authorized URL to asset preview.
 *
 * @category Offline
 */
export declare const getAssetPreviewUrl: (assetId: Asset['id'], assetSlug: Asset['slug'], size: number) => Promise<string>;
/**
 * @remarks Asset files are cached for 10 minutes. Can be busted by adding a timestamp to the request URL. For example `${your url}?ts=${Date.now()}`
 *
 * @returns pre authorized URL to asset.
 *
 * @category Offline
 */
export declare const getAssetFileUrl: (assetId: Asset['id'], assetSlug: Asset['slug']) => Promise<string>;
/**
 * @returns List of assets that have all the given tags (AND).
 *
 * @category Offline
 */
export declare const getAssetsByTags: (tags: string[]) => Promise<Asset[]>;
/**
 * @param folder Folder is a string that is the last part of the folder app link, eg. xyz2250 in showpad://folder/xyz2250.
 * You can assign folders trough the experience app editor (https://showpad.pages.showpad.io/public-sdk/experience_app_editor.html).
 *
 * @returns List of assets that can be found in the given folder. This will not work recursively and will only return actual assets.
 * So it does not return values from deeper levels nor will it return folders.
 *
 * @category Offline
 */
export declare const getAssetsInFolder: (folder: string) => Promise<Asset[]>;
/**
 * @param query A string we'll look for in the asset displayName. Internally, this will translate in WHERE displayName LIKE "%{query}%".
 *
 * @returns List of assets that match with the given query.
 *
 * @category Offline
 */
export declare const getAssetsByQuery: (query: string) => Promise<Asset[]>;
/**
 * @returns List of collections
 *
 * @category Offline
 */
export declare const getCollections: (() => Promise<Collection[]>) & import("lodash").MemoizedFunction;
/**
 * Shows a modal view with the contents of the collection. This view allows for the collection to be shared.
 *
 * @category Offline
 */
export declare const openCollection: (collectionId: Collection['id']) => Promise<void>;
/**
 * Creates a new collection with the specified name.
 *
 * @returns Id of the new collection the assets were added to.
 *
 * @category Offline
 */
export declare const createCollection: (name: Collection['name']) => Promise<Collection['id']>;
/**
 * Opens a modal with all collections to choose from
 * and adds asset(s) to it
 *
 * @returns Id of the collection the assets were added to.
 *
 * @category Offline
 */
export declare const addAssetsToCollection: (assetSlugs: Asset['slug'][]) => Promise<Collection['id']>;
/**
 * Opens a modal with all Collections to choose from and adds asset(s) to the
 * selected ones.
 *
 * Multiple Collections can be picked at once if enabled.
 *
 * @returns Ids of the collections the assets were added to.
 *
 * @category Offline
 */
export declare const addAssetsToCollections: (assetSlugs: Asset['slug'][]) => Promise<Collection['id'][]>;
/**
 * Will add the given assets to the collection with the given id.
 *
 * @returns Id of the collection the assets were added to.
 *
 * @category Offline
 */
export declare const addAssetsToCollectionWithId: (collectionId: Collection['id'], assetSlugs: Asset['slug'][]) => Promise<Collection['id']>;
/**
 * Removes all the items from the given collection.
 *
 * @category Offline
 */
export declare const clearCollection: (collectionId: Collection['id']) => Promise<void>;
/**
 * Opens modal with all Shared Spaces to choose from and adds asset(s) to it.
 *
 * @returns Id of the shared space the assets were added to.
 *
 * @category Online
 */
export declare const addAssetsToSharedSpace: (assetSlugs: Asset['slug'][]) => Promise<SharedSpace['id']>;
/**
 * Opens modal with all Shared Spaces to choose from and adds asset(s) to the selected Shared Spaces.
 *
 * @returns Ids of the shared spaces the assets were added to.
 *
 * @category Online
 */
export declare const addAssetsToSharedSpaces: (assetSlugs: Asset['slug'][]) => Promise<SharedSpace['id'][]>;
/**
 * Opens a modal to preview the assets you want to add to the current context
 * (i.e. the feature the user is currently in, could be a Shared Space, a Collection, My Files, ...).
 * before actually adding these assets to the current context on confirm
 *
 * @returns Slugs of the assets that were added.
 *
 * @category Online
 */
export declare const addAssetsToCurrentContext: (assetSlugs: Asset['slug'][]) => Promise<Asset['slug'][]>;
/**
 * This method will refresh the Showpad access token.
 *
 * @returns Object with the required information to do an HTTP request to the Showpad API.
 *
 * @category Offline
 */
export declare const refreshShowpadApi: () => Promise<ApiConfig>;
/**
 * @returns Object with the required information to do an HTTP request to the Showpad API.
 *
 * @category Offline
 */
export declare const getShowpadApi: () => Promise<ApiConfig>;
/**
 * This method will refresh the Salesforce access token.
 *
 * @returns Object with the required information to do an HTTP request to the Showpad API.
 *
 * @category Online
 */
export declare const refreshSalesforceApi: () => Promise<ApiConfig>;
/**
 * @returns Object with the required information to do an HTTP request to the Salesforce API.
 *
 * @category Online
 */
export declare const getSalesforceApi: () => Promise<ApiConfig>;
/**
 * Uploads a single file to “My files”.
 *
 * @returns statusEmitter which emits the upload status.
 *
 * @support [Windows] Only online support.
 *
 * @support [iOS, Android] Will fire the failed event offline. The expected behavior
 *          indicates that the upload can't be done at the moment because there
 *          is no internet connection. If you switch to the "My Files" tab, you
 *          will see the uploaded items with the "failed" label. Once the app
 *          re-establish a connection, the file will be uploaded and processed.
 *
 * @category Offline
 */
export declare const upload: (uploadData: UploadData) => StatusEmitter;
/**
 * Displays a native modal with a title, text and clickable buttons.
 *
 * @returns Reason the dialog was closed. This is either a reason from the passed ModalButtons or `cancel` if the user closed the dialog.
 *
 * @category Offline
 */
export declare const displayModal: (modal: Modal) => Promise<ModalReason>;
/**
 * Display a native toast.
 *
 * @category Offline
 */
export declare const displayToast: (toast: Toast) => Promise<ToastReason>;
/**
 * Closes an extension
 *
 * @category Offline
 */
export declare const closeExtension: () => void;
