@livetiles/reach-plugin-types 0.4.0-preview.419 → 0.4.0-preview.422
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/lib/index.d.ts +24 -6
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -2337,22 +2337,40 @@ declare module "libs/reach/util/common/src/plugins/usePluginDeviceStore" {
|
|
|
2337
2337
|
}
|
|
2338
2338
|
}
|
|
2339
2339
|
declare module "libs/reach/util/common/src/plugins/usePluginUserStore" {
|
|
2340
|
+
import { DependencyList } from 'react';
|
|
2340
2341
|
import { Api } from 'restful.js';
|
|
2341
2342
|
export function usePluginUserStore(): PluginUserStore;
|
|
2343
|
+
export function usePluginUserStoreValue<T>(key: string, deps?: DependencyList): {
|
|
2344
|
+
data: T;
|
|
2345
|
+
set: (newValue: T) => Promise<unknown>;
|
|
2346
|
+
isLoading: boolean;
|
|
2347
|
+
error: any;
|
|
2348
|
+
refresh: () => void;
|
|
2349
|
+
remove: () => Promise<unknown>;
|
|
2350
|
+
};
|
|
2342
2351
|
export function getPluginUserStoreWrapper(pluginId: string, api: Api): PluginUserStore;
|
|
2343
2352
|
export interface PluginUserStore {
|
|
2344
|
-
getPluginUserValue(key: string): Promise<
|
|
2345
|
-
setPluginUserValue(key: string, value:
|
|
2353
|
+
getPluginUserValue<T>(key: string): Promise<T>;
|
|
2354
|
+
setPluginUserValue<T>(key: string, value: T): Promise<unknown>;
|
|
2346
2355
|
deletePluginUserValue(key: string): Promise<unknown>;
|
|
2347
2356
|
}
|
|
2348
2357
|
}
|
|
2349
2358
|
declare module "libs/reach/util/common/src/plugins/usePluginSubscriptionStore" {
|
|
2359
|
+
import { DependencyList } from 'react';
|
|
2350
2360
|
import { Api } from 'restful.js';
|
|
2351
2361
|
export function usePluginSubscriptionStore(): PluginSubscriptionStore;
|
|
2362
|
+
export function usePluginSubscriptionStoreValue<T>(key: string, deps?: DependencyList): {
|
|
2363
|
+
data: T;
|
|
2364
|
+
set: (newValue: T) => Promise<unknown>;
|
|
2365
|
+
isLoading: boolean;
|
|
2366
|
+
error: any;
|
|
2367
|
+
refresh: () => void;
|
|
2368
|
+
remove: () => Promise<unknown>;
|
|
2369
|
+
};
|
|
2352
2370
|
export function getPluginSubscriptionStoreWrapper(pluginId: string, api: Api): PluginSubscriptionStore;
|
|
2353
2371
|
export interface PluginSubscriptionStore {
|
|
2354
|
-
getPluginSubscriptionValue(key: string): Promise<
|
|
2355
|
-
setPluginSubscriptionValue(key: string, value:
|
|
2372
|
+
getPluginSubscriptionValue<T>(key: string): Promise<T>;
|
|
2373
|
+
setPluginSubscriptionValue<T>(key: string, value: T): Promise<unknown>;
|
|
2356
2374
|
deletePluginSubscriptionValue(key: string): Promise<unknown>;
|
|
2357
2375
|
}
|
|
2358
2376
|
}
|
|
@@ -3345,7 +3363,7 @@ declare module "libs/reach/ui/common/src/PeoplePicker" {
|
|
|
3345
3363
|
export const PeoplePicker: FC<Props>;
|
|
3346
3364
|
}
|
|
3347
3365
|
declare module "libs/reach/ui/common/src/plugins/reach-core" {
|
|
3348
|
-
import { Account, AccountType, PluginProps, PluginNavigationNodeProps, useCurrentUser, useNotificationContext, usePluginSettings, usePluginDeviceStore, useReachApiEndPoints, useSubscriptionHandlePathBuilder, useTheme,
|
|
3366
|
+
import { Account, AccountType, PluginProps, PluginNavigationNodeProps, useCurrentUser, useNotificationContext, usePluginSettings, usePluginDeviceStore, useReachApiEndPoints, useSubscriptionHandlePathBuilder, useTheme, usePluginSubscriptionStoreValue, usePluginUserStoreValue, usePluginUserStore, usePluginSubscriptionStore } from "libs/reach/util/common/src/index";
|
|
3349
3367
|
import { LinkContext, ResourceContext } from "libs/reach/util/context/src/index";
|
|
3350
3368
|
import { useAuthenticationContext } from "libs/shared/util/authentication/src/index";
|
|
3351
3369
|
import { createId, logger } from "libs/shared/util/common/src/index";
|
|
@@ -3362,7 +3380,7 @@ declare module "libs/reach/ui/common/src/plugins/reach-core" {
|
|
|
3362
3380
|
/**
|
|
3363
3381
|
* @deprecated Please use `usePluginDeviceStore` instead
|
|
3364
3382
|
*/
|
|
3365
|
-
usePluginDeviceStore as usePluginStorage, usePluginDeviceStore, usePluginSubscriptionStore, usePluginUserStore, useReachApiEndPoints, AccountType, PeoplePicker, GutterToggle, EditorSettingsDialogWithFixedWidth as EditorSettingsDialog, Spinner, SelectionMode, EditorHighlight, useTheme, useSubscriptionHandlePathBuilder, };
|
|
3383
|
+
usePluginDeviceStore as usePluginStorage, usePluginDeviceStore, usePluginSubscriptionStore, usePluginSubscriptionStoreValue, usePluginUserStore, usePluginUserStoreValue, useReachApiEndPoints, AccountType, PeoplePicker, GutterToggle, EditorSettingsDialogWithFixedWidth as EditorSettingsDialog, Spinner, SelectionMode, EditorHighlight, useTheme, useSubscriptionHandlePathBuilder, };
|
|
3366
3384
|
export type { Account, PluginNavigationNodeProps, PluginProps };
|
|
3367
3385
|
}
|
|
3368
3386
|
declare module "libs/reach/ui/common/src/content-keyword-utils" {
|