@livetiles/reach-plugin-types 0.4.0-preview.432 → 0.4.0-preview.435

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.
Files changed (2) hide show
  1. package/lib/index.d.ts +39 -44
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -2339,54 +2339,19 @@ declare module "libs/reach/util/common/src/plugins/usePluginDeviceStore" {
2339
2339
  clearAll(): Promise<void>;
2340
2340
  }
2341
2341
  }
2342
- declare module "libs/reach/util/common/src/plugins/usePluginUserStore" {
2343
- import { DependencyList } from 'react';
2344
- import { Api } from 'restful.js';
2345
- export function usePluginUserStore(): PluginUserStore;
2346
- export function usePluginUserStoreValue<T>(key: string, deps?: DependencyList): {
2347
- data: T;
2348
- set: (newValue: T) => Promise<unknown>;
2349
- isLoading: boolean;
2350
- error: any;
2351
- refresh: () => void;
2352
- remove: () => Promise<unknown>;
2353
- };
2354
- export function getPluginUserStoreWrapper(pluginId: string, api: Api): PluginUserStore;
2355
- export interface PluginUserStore {
2356
- getPluginUserValue<T>(key: string): Promise<T>;
2357
- setPluginUserValue<T>(key: string, value: T): Promise<unknown>;
2358
- deletePluginUserValue(key: string): Promise<unknown>;
2359
- }
2360
- }
2361
- declare module "libs/reach/util/common/src/plugins/usePluginSubscriptionStore" {
2362
- import { DependencyList } from 'react';
2363
- import { Api } from 'restful.js';
2364
- export function usePluginSubscriptionStore(): PluginSubscriptionStore;
2365
- export function usePluginSubscriptionStoreValue<T>(key: string, deps?: DependencyList): {
2366
- data: T;
2367
- set: (newValue: T) => Promise<unknown>;
2368
- isLoading: boolean;
2369
- error: any;
2370
- refresh: () => void;
2371
- remove: () => Promise<unknown>;
2372
- };
2373
- export function getPluginSubscriptionStoreWrapper(pluginId: string, api: Api): PluginSubscriptionStore;
2374
- export interface PluginSubscriptionStore {
2375
- getPluginSubscriptionValue<T>(key: string): Promise<T>;
2376
- setPluginSubscriptionValue<T>(key: string, value: T): Promise<unknown>;
2377
- deletePluginSubscriptionValue(key: string): Promise<unknown>;
2378
- }
2379
- }
2380
2342
  declare module "libs/reach/util/common/src/plugins/PluginContext" {
2381
2343
  import { PluginSettings } from "libs/reach/util/common/src/user/Subscription";
2382
2344
  import { PluginStorage } from "libs/reach/util/common/src/plugins/usePluginDeviceStore";
2383
- import { PluginUserStore } from "libs/reach/util/common/src/plugins/usePluginUserStore";
2384
- import { PluginSubscriptionStore } from "libs/reach/util/common/src/plugins/usePluginSubscriptionStore";
2345
+ export interface PluginStore {
2346
+ get<T>(key: string): Promise<T>;
2347
+ set<T>(key: string, value: T): Promise<unknown>;
2348
+ delete(key: string): Promise<unknown>;
2349
+ }
2385
2350
  export const PluginContext: import("react").Context<{
2386
2351
  settings: PluginSettings;
2387
2352
  storage: PluginStorage;
2388
- userStore: PluginUserStore;
2389
- subscriptionStore: PluginSubscriptionStore;
2353
+ userStore: PluginStore;
2354
+ subscriptionStore: PluginStore;
2390
2355
  }>;
2391
2356
  export function usePluginSettings<T>(): T;
2392
2357
  export function useReachApiEndPoints(): {
@@ -2551,6 +2516,36 @@ declare module "libs/reach/util/common/src/plugins/usePluginExtensions" {
2551
2516
  export function useInjectedRemotePlugins(): DevPlugin[];
2552
2517
  export function useRemotePlugins(): WebPluginDefinition[];
2553
2518
  }
2519
+ declare module "libs/reach/util/common/src/plugins/usePluginUserStore" {
2520
+ import { DependencyList } from 'react';
2521
+ import { PluginStore } from "libs/reach/util/common/src/plugins/PluginContext";
2522
+ import { Api } from 'restful.js';
2523
+ export function usePluginUserStore(): PluginStore;
2524
+ export function usePluginUserStoreValue<T>(key: string, deps?: DependencyList): {
2525
+ data: T;
2526
+ set: (newValue: T) => Promise<unknown>;
2527
+ isLoading: boolean;
2528
+ error: any;
2529
+ refresh: () => void;
2530
+ remove: () => Promise<unknown>;
2531
+ };
2532
+ export function getPluginUserStoreWrapper(pluginId: string, api: Api): PluginStore;
2533
+ }
2534
+ declare module "libs/reach/util/common/src/plugins/usePluginSubscriptionStore" {
2535
+ import { DependencyList } from 'react';
2536
+ import { PluginStore } from "libs/reach/util/common/src/plugins/PluginContext";
2537
+ import { Api } from 'restful.js';
2538
+ export function usePluginSubscriptionStore(): PluginStore;
2539
+ export function usePluginSubscriptionStoreValue<T>(key: string, deps?: DependencyList): {
2540
+ data: T;
2541
+ set: (newValue: T) => Promise<unknown>;
2542
+ isLoading: boolean;
2543
+ error: any;
2544
+ refresh: () => void;
2545
+ remove: () => Promise<unknown>;
2546
+ };
2547
+ export function getPluginSubscriptionStoreWrapper(pluginId: string, api: Api): PluginStore;
2548
+ }
2554
2549
  declare module "libs/reach/util/common/src/plugins/PluginWrapper" {
2555
2550
  import { FC } from 'react';
2556
2551
  import { PluginProps } from "libs/reach/util/common/src/plugins/usePluginExtensions";
@@ -3366,7 +3361,7 @@ declare module "libs/reach/ui/common/src/PeoplePicker" {
3366
3361
  export const PeoplePicker: FC<Props>;
3367
3362
  }
3368
3363
  declare module "libs/reach/ui/common/src/plugins/reach-core" {
3369
- import { Account, AccountType, PluginProps, PluginNavigationNodeProps, useCurrentUser, useNotificationContext, usePluginSettings, usePluginDeviceStore, useReachApiEndPoints, useSubscriptionHandlePathBuilder, useTheme, usePluginSubscriptionStoreValue, usePluginUserStoreValue, usePluginUserStore, usePluginSubscriptionStore } from "libs/reach/util/common/src/index";
3364
+ import { Account, AccountType, PluginProps, PluginNavigationNodeProps, useCurrentUser, useNotificationContext, usePluginSettings, usePluginDeviceStore, useReachApiEndPoints, useSubscriptionHandlePathBuilder, useTheme, usePluginSubscriptionStoreValue, usePluginUserStoreValue, usePluginUserStore, usePluginSubscriptionStore, PluginStore, PluginStorage } from "libs/reach/util/common/src/index";
3370
3365
  import { LinkContext, ResourceContext } from "libs/reach/util/context/src/index";
3371
3366
  import { useAuthenticationContext } from "libs/shared/util/authentication/src/index";
3372
3367
  import { createId, logger } from "libs/shared/util/common/src/index";
@@ -3384,7 +3379,7 @@ declare module "libs/reach/ui/common/src/plugins/reach-core" {
3384
3379
  * @deprecated Please use `usePluginDeviceStore` instead
3385
3380
  */
3386
3381
  usePluginDeviceStore as usePluginStorage, usePluginDeviceStore, usePluginSubscriptionStore, usePluginSubscriptionStoreValue, usePluginUserStore, usePluginUserStoreValue, useReachApiEndPoints, AccountType, PeoplePicker, GutterToggle, EditorSettingsDialogWithFixedWidth as EditorSettingsDialog, Spinner, SelectionMode, EditorHighlight, useTheme, useSubscriptionHandlePathBuilder, };
3387
- export type { Account, PluginNavigationNodeProps, PluginProps };
3382
+ export type { Account, PluginNavigationNodeProps, PluginProps, PluginStorage, PluginStore, };
3388
3383
  }
3389
3384
  declare module "libs/reach/ui/common/src/content-keyword-utils" {
3390
3385
  import { CurrentUser, Keyword, KeywordGroup, KeywordsByGroupId } from "libs/reach/util/common/src/index";
package/package.json CHANGED
@@ -4,6 +4,6 @@
4
4
  "main": "",
5
5
  "types": "./index.d.ts",
6
6
  "license": "ISC",
7
- "version": "0.4.0-preview.432",
7
+ "version": "0.4.0-preview.435",
8
8
  "dependencies": {}
9
9
  }