From 629a798fd0a883edc863176c705a8f0ee27d96b5 Mon Sep 17 00:00:00 2001 From: Luca Marchesini Date: Thu, 10 Feb 2022 10:52:32 +0100 Subject: [PATCH] [types] Improved exposed typings --- index.d.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/index.d.ts b/index.d.ts index ee8076d..c0e450f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -8,6 +8,18 @@ declare module 'vue/types/vue' { } } +export interface Backends { + [name: string]: Backend +} + +export interface Backend { + host: string; + options: { + port: number; + sslConnection: boolean + } +} + /** * The VueKuzzle plugin. Makes the Kuzzle SDK available in Vue components as * `this.$kuzzle`. @@ -18,3 +30,11 @@ declare module 'vue/types/vue' { * @see https://docs.kuzzle.io/sdk/js/7/core-classes/kuzzle/constructor/#options */ export declare function VueKuzzle(Vue: typeof _Vue, options: any): void; + +/** + * Instantiates the Kuzzle SDK by resolving the backend from the given config. + * + * @param backendsConfig + * @param sdkOptions + */ +export declare function instantiateKuzzleSDK(backendsConfig: Backends, sdkOptions: any): Kuzzle \ No newline at end of file