import { JsonObject } from 'type-fest';
import { SdmRecord } from '@showpad/experience-app-types';
/**
 * Gets all SDM records in a store.
 * These records can be of multiple types. Type guards should be used to be
 * type safe.
 *
 * @category Offline
 *
 * @example
 * ```typescript
 * import { Sdm } from '@showpad/experience-app-sdk'
 *
 * const storeRecords = await Sdm.getStoreRecords('<sdmStoreId>')
 * ```
 */
export declare const getStoreRecords: <T extends JsonObject>(sdmStoreId: string) => Promise<SdmRecord<T>[]>;
/**
 * Gets all SDM records in a store for a specific sdmSchemaId.
 * The type of the records should be passed as a generic template to be type safe.
 *
 * @category Offline
 *
 * @example
 * ```typescript
 * import { Sdm } from '@showpad/experience-app-sdk'
 *
 * interface MyRecordType {
 *   field1: number
 *   field2: string
 * }
 *
 * const records = await Sdm.getRecords<MyRecordType>(
 *   '<sdmStoreId>',
 *   '<sdmSchemaId>',
 * )
 * ```
 */
export declare const getRecords: <T extends JsonObject>(sdmStoreId: string, sdmSchemaId: string) => Promise<SdmRecord<T>[]>;
/**
 * Gets a SDM record in a store with a specific id.
 * The type of the record should be passed as a generic template to be type safe.
 *
 * @returns The SDM record if found, and null if not found
 *
 * @category Offline
 *
 * @example
 * ```typescript
 * import { Sdm } from '@showpad/experience-app-sdk'
 *
 * interface MyRecordType {
 *   field1: number
 *   field2: string
 * }
 *
 * const record = await Sdm.getRecordById<MyRecordType>('<sdmStoreId>', '<id>')
 * ```
 */
export declare const getRecordById: <T extends JsonObject>(sdmStoreId: string, id: string) => Promise<SdmRecord<T>>;
