import { JSONObject } from "kuzzle-sdk"; import { ApplicationManager } from "./index"; export type DefaultMappings = { [index: string]: { [collection: string]: { mappings: JSONObject; settings?: JSONObject; }; }; }; export declare class BackendImport extends ApplicationManager { /** * Import mappings. * * @example * { * index1: { * collection1: { mappings, settings }, * collection2: { mappings, settings } * ... * }, * index2: { ... }, * ... * } * * @param mappings Object containing index and their collections mappings */ mappings(mappings: DefaultMappings): void; /** * Import profiles. * * @example * { * profileA: { profile definition }, * profileB: { profile definition }, * ... * } * * @param profiles Object containing profiles and their definition */ profiles(profiles: JSONObject): void; /** * Import roles * * @example * { * roleA: { role definition }, * roleB: { role definition }, * ... * } * * @param roles Object containing roles and their definition */ roles(roles: JSONObject): void; /** * Import user mappings. * * @example * { * properties: { * fieldA: { type: 'keyword' }, * fieldB: { type: 'integer' }, * ... * } * } * * @param mappings User properties */ userMappings(mappings: JSONObject): void; /** * Import users. * * @example * { * kuidA: { user content }, * kuidB: { user content }, * } * * @param users Object containing users and their content * @param options onExistingUsers: Default to `skip`. Strategy to adopt when trying to create an already existing user. */ users(users: JSONObject, options?: { onExistingUsers?: "overwrite" | "skip"; }): void; }