kinto
Version:
An Offline-First JavaScript client for Kinto.
30 lines (29 loc) • 1.14 kB
TypeScript
import KintoClient from "./http";
import BaseAdapter, { AbstractBaseAdapter } from "./adapters/base";
import IDB from "./adapters/IDB";
import KintoBase from "./KintoBase";
import { getDeepKey } from "./utils";
import type { KintoBaseOptions } from "./KintoBase";
import type { StorageProxy } from "./adapters/base";
import type Collection from "./collection";
import type { CollectionSyncOptions, Conflict, RecordStatus } from "./types";
export default class Kinto<B extends {
id: string;
last_modified?: number;
_status?: RecordStatus;
} = any> extends KintoBase<B> {
/**
* Provides a public access to the base adapter classes. Users can create
* a custom DB adapter by extending BaseAdapter.
*
* @type {Object}
*/
static get adapters(): {
BaseAdapter: typeof BaseAdapter;
IDB: typeof IDB;
};
get ApiClass(): typeof KintoClient;
constructor(options?: KintoBaseOptions);
}
export type { StorageProxy, RecordStatus, KintoBaseOptions, Collection, CollectionSyncOptions, Conflict, };
export { KintoClient, KintoBase, BaseAdapter, AbstractBaseAdapter, getDeepKey };