Skip to content

Commit 63d34fc

Browse files
committed
Add UI Extensions StorageAPI
1 parent 227af2b commit 63d34fc

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

packages/ui-extensions/src/surfaces/point-of-sale/api.ts

+5
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,8 @@ export type {
100100
export type {CountryCode} from './api/types/country-code';
101101

102102
export type {Session} from './api/types/session';
103+
104+
export type {
105+
StorageApi,
106+
StorageApiContent,
107+
} from './api/storage-api/storage-api';

packages/ui-extensions/src/surfaces/point-of-sale/api/standard/standard-api.ts

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type {LocaleApi} from '../locale-api/locale-api';
44
import type {SessionApi} from '../session-api/session-api';
55
import type {ToastApi} from '../toast-api/toast-api';
66
import type {ProductSearchApi} from '../product-search-api/product-search-api';
7+
import {StorageApi} from '../storage-api/storage-api';
78

89
export type StandardApi<T> = {[key: string]: any} & {
910
extensionPoint: T;
@@ -12,4 +13,5 @@ export type StandardApi<T> = {[key: string]: any} & {
1213
SessionApi &
1314
ProductSearchApi &
1415
DeviceApi &
16+
StorageApi &
1517
ConnectivityApi;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export interface StorageApi {
2+
storage: StorageApiContent;
3+
}
4+
5+
export interface StorageApiContent {
6+
get(key: string): Promise<string | undefined>;
7+
set(key: string, value: string): Promise<void>;
8+
}

0 commit comments

Comments
 (0)