import { AppsDbEntry, Scalar } from '@showpad/experience-app-types';
import { AxiosInstance } from 'axios';
import { JsonValue } from 'type-fest';
/**
 * @param authentication AxiosInstance or Access token with the AppsDb OAuth Scope.
 * (In future versions only an AxiosInstance will be allowed.)
 *
 * This AxiosInstance should be retrieved with {@link getShowpadOAuthInstance}
 * or {@link getShowpadOAuthInstanceInteractive}.
 *
 * This parameter can be omitted if you know the user executing the function is
 * an administrator.
 *
 * @category Online
 *
 * @example
 * ```typescript
 * import { Showpad } from '@showpad/experience-app-sdk'
 *
 * // Use Showpad.getShowpadOAuthApiInteractive() if you want to prompt the password instead of passing it.
 * const apiConfig = await Showpad.getShowpadOAuthApi(
 *   '<clientId>',
 *   '<clientSecret>',
 *   '<password>',
 * )
 *
 * await Showpad.createStore('Contacts', apiConfig.accessToken)
 * ```
 */
export declare const createStore: (name: string, authentication?: AxiosInstance | string) => Promise<void>;
/**
 * If the generic type is passed, the result will immediately be typed correctly.
 *
 * If the value is a stringified JSON it will automatically be parsed.
 * Also booleans, strings and numbers will automatically be parsed correctly.
 *
 * @category Offline
 *
 * @example
 * ```typescript
 * import { Showpad } from '@showpad/experience-app-sdk'
 *
 * type Contact = {
 *   name: string
 *   surname: string
 * }
 *
 * const contacts = await Showpad.getStoreEntries<Contact>('Contacts')
 * ```
 */
export declare const getStoreEntries: <T extends JsonValue = JsonValue>(store: string) => Promise<AppsDbEntry<T>[]>;
/**
 * Entries larger than 250,000 characters will be chunked. Be carefull when
 * using together with the REST API.
 *
 * Objects and arrays will be automatically stringified to be stored in AppsDb.
 *
 * @param entryValue Limited to 10Mb (10,000,000 characters)
 *
 * @category Offline
 *
 * @example
 * ```typescript
 * import { Showpad } from '@showpad/experience-app-sdk'
 * import { v4 as uuidv4 } from 'uuid'
 *
 * type Contact = {
 *   name: string
 *   surname: string
 * }
 *
 * const contact: Contact = {
 *  name: 'John',
 *  surname: 'Doe'
 * }
 *
 * const appsDbEntries = await Showpad.setStoreEntryValue('Contacts', uuidv4(), contact)
 * ```
 */
export declare const setStoreEntryValue: (store: string, entryId: string, entryValue: Scalar) => Promise<Scalar>;
/**
 * If the generic type is passed, the result will immediately be typed correctly.
 *
 * If the value is a stringified JSON it will automatically be parsed.
 * Also booleans, strings and numbers will automatically be parsed correctly.
 *
 * @category Offline
 *
 * @example
 * ```typescript
 * import { Showpad } from '@showpad/experience-app-sdk'
 *
 * type Contact = {
 *   name: string
 *   surname: string
 * }
 *
 * const contact = await Showpad.getStoreEntryValue<Contact>('Contacts', '4aeed8ee-45d1-43c9-9c98-76ff57420b82')
 * ```
 */
export declare const getStoreEntryValue: <T extends JsonValue = JsonValue>(store: string, entryId: string) => Promise<T>;
/**
 * @category Offline
 *
 * @example
 * ```typescript
 * import { Showpad } from '@showpad/experience-app-sdk'
 *
 * await Showpad.deleteStoreEntry('Contacts', '4aeed8ee-45d1-43c9-9c98-76ff57420b82)
 * ```
 */
export declare const deleteStoreEntry: (store: string, entryId: string) => Promise<void>;
/**
 * If the generic type is passed, the result will immediately be typed correctly.
 *
 * If the value is a stringified JSON it will automatically be parsed.
 * Also booleans, strings and numbers will automatically be parsed correctly.
 *
 * @category Offline
 *
 * @example
 * ```typescript
 * import { Showpad } from '@showpad/experience-app-sdk'
 *
 * type Contact = {
 *   name: string
 *   surname: string
 * }
 *
 * const contacts = await Showpad.getGlobalStoreEntries<Contact>('Contacts')
 * ```
 */
export declare const getGlobalStoreEntries: <T extends JsonValue = JsonValue>(store: string) => Promise<AppsDbEntry<T>[]>;
/**
 * Entries larger than 250,000 characters will be chunked. Be carefull when
 * using together with the REST API.
 *
 * Objects and arrays will be automatically stringified to be stored in AppsDb
 *
 * @param entryValue Limited to 10Mb (10,000,000 characters)
 *
 * @param authentication AxiosInstance or Access token with the AppsDb OAuth Scope.
 * (In future versions only an AxiosInstance will be allowed.)
 *
 * This AxiosInstance should be retrieved with {@link getShowpadOAuthInstance}
 * or {@link getShowpadOAuthInstanceInteractive}.
 *
 * This parameter can be omitted if you know the user executing the function is
 * an administrator.
 *
 * @category Online
 *
 * @example
 * ```typescript
 * import { Showpad } from '@showpad/experience-app-sdk'
 * import { v4 as uuidv4 } from 'uuid'
 *
 * // Use Showpad.getShowpadOAuthApiInteractive() if you want to prompt the password instead of passing it.
 * const apiConfig = await Showpad.getShowpadOAuthApi(
 *   '<clientId>',
 *   '<clientSecret>',
 *   '<password>',
 * )
 *
 * const contact: Contact = {
 *  name: 'John',
 *  surname: 'Doe'
 * }
 *
 * const appsDbEntries = await Showpad.setStoreEntryValue('Contacts', uuidv4(), contact, apiConfig.accessToken)
 * ```
 */
export declare const setGlobalStoreEntryValue: (store: string, entryId: string, entryValue: Scalar, authentication?: AxiosInstance | string) => Promise<Scalar>;
/**
 * If the generic type is passed, the result will immediately be typed correctly.
 *
 * If the value is a stringified JSON it will automatically be parsed.
 * Also booleans, strings and numbers will automatically be parsed correctly.
 *
 * @category Offline
 *
 * @example
 * ```typescript
 * import { Showpad } from '@showpad/experience-app-sdk'
 *
 * type Contact = {
 *   name: string
 *   surname: string
 * }
 *
 * const contact = await Showpad.getGlobalStoreEntryValue<Contact>('Contacts', '4aeed8ee-45d1-43c9-9c98-76ff57420b82')
 * ```
 */
export declare const getGlobalStoreEntryValue: <T extends JsonValue = JsonValue>(store: string, entryId: string) => Promise<T>;
/**
 * @param authentication AxiosInstance or Access token with the AppsDb OAuth Scope.
 * (In future versions only an AxiosInstance will be allowed.)
 *
 * This AxiosInstance should be retrieved with {@link getShowpadOAuthInstance}
 * or {@link getShowpadOAuthInstanceInteractive}.
 *
 * This parameter can be omitted if you know the user executing the function is
 * an administrator.
 *
 * @category Online
 *
 * @example
 * ```typescript
 * import { Showpad } from '@showpad/experience-app-sdk'
 *
 * // Use Showpad.getShowpadOAuthApiInteractive() if you want to prompt the password instead of passing it.
 * const apiConfig = await Showpad.getShowpadOAuthApi(
 *   '<clientId>',
 *   '<clientSecret>',
 *   '<password>',
 * )
 *
 * await Showpad.deleteStoreEntry('Contacts', '4aeed8ee-45d1-43c9-9c98-76ff57420b82, apiConfig.accessToken)
 * ```
 */
export declare const deleteGlobalStoreEntry: (store: string, entryId: string, authentication?: AxiosInstance | string) => Promise<void>;
