Skip to content

Commit

Permalink
Add UI Extensions StorageAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Palad committed Jun 28, 2024
1 parent 227af2b commit 63d34fc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/ui-extensions/src/surfaces/point-of-sale/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,8 @@ export type {
export type {CountryCode} from './api/types/country-code';

export type {Session} from './api/types/session';

export type {
StorageApi,
StorageApiContent,
} from './api/storage-api/storage-api';
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type {LocaleApi} from '../locale-api/locale-api';
import type {SessionApi} from '../session-api/session-api';
import type {ToastApi} from '../toast-api/toast-api';
import type {ProductSearchApi} from '../product-search-api/product-search-api';
import {StorageApi} from '../storage-api/storage-api';

export type StandardApi<T> = {[key: string]: any} & {
extensionPoint: T;
Expand All @@ -12,4 +13,5 @@ export type StandardApi<T> = {[key: string]: any} & {
SessionApi &
ProductSearchApi &
DeviceApi &
StorageApi &
ConnectivityApi;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export interface StorageApi {
storage: StorageApiContent;
}

export interface StorageApiContent {
get(key: string): Promise<string | undefined>;
set(key: string, value: string): Promise<void>;
}

0 comments on commit 63d34fc

Please sign in to comment.