dochub-sdk 0.1.52 → 0.1.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.ts +1 -0
- package/interfaces/core.ts +2 -0
- package/interfaces/localstorage.ts +11 -0
- package/package.json +1 -1
package/index.ts
CHANGED
@@ -12,6 +12,7 @@ export * from './interfaces/constructors';
|
|
12
12
|
export * from './interfaces/contents';
|
13
13
|
export * from './interfaces/objects';
|
14
14
|
export * from './interfaces/ui';
|
15
|
+
export * from './interfaces/localstorage';
|
15
16
|
|
16
17
|
export const DocHub: IDocHubCore = window['DocHub'];
|
17
18
|
export const Vue2 = () => window['Vue'];
|
package/interfaces/core.ts
CHANGED
@@ -6,6 +6,7 @@ import { IDocHubDataLake } from './datalake';
|
|
6
6
|
import { IDocHubConstructors } from './constructors';
|
7
7
|
import { IDocHubObjects } from './objects';
|
8
8
|
import { IDocHubUI } from './ui';
|
9
|
+
import { IDocHubLocalStorage } from './localstorage';
|
9
10
|
|
10
11
|
export interface IDocHubEnv {
|
11
12
|
[id: string]: string
|
@@ -96,6 +97,7 @@ export interface IDocHubEventBus {
|
|
96
97
|
export interface IDocHubCore {
|
97
98
|
problems: IDocHubProblems; // Проблемы
|
98
99
|
settings: IDocHubSettings; // Пользовательские настройки
|
100
|
+
localStore: IDocHubLocalStorage; // Интерфейс локального хранилища
|
99
101
|
router: IDocHubRouter; // Работа с UI роутами
|
100
102
|
contentProviders: IDocHubContentProviders; // Провайдеры контента
|
101
103
|
protocols: IDocHubProtocols; // Протоколы доступа к данным
|
@@ -0,0 +1,11 @@
|
|
1
|
+
// Интерфейс локального хранилища.
|
2
|
+
// Его данные могут быть потеряны в любой момент.
|
3
|
+
|
4
|
+
export interface IDocHubLocalStorage {
|
5
|
+
// Устанавливает значение для указанного ключа
|
6
|
+
setItem(key: string, data: any): Promise<boolean>;
|
7
|
+
// Возвращает значение по указанному ключу
|
8
|
+
getItem(key: string): Promise<any>;
|
9
|
+
// Удаляет ключ и значение
|
10
|
+
removeItem(key: string): Promise<boolean>;
|
11
|
+
}
|