/* * Copyright (c) 2023 Discover Financial Services * Licensed under Apache-2.0 License. See License.txt in the project root for license information */ /** * The StorageElement interface defines the minimum requirements for each element * that is stored. */ export interface StorageElement { metadata: Object; } /** * The Storage interface which defines what must be implemented in order to create * persistent storage for the Theme Builder. */ export interface Storage { /** Get the value associated with a key */ get(key: string): Promise; /** Set the value associated with a key */ set(key: string, value: StorageElement): Promise; /** Delete the value associated with a key */ delete(key: string): Promise; /** List all of the keys stored */ listKeys(): Promise; /** List the metadata associated with each entry */ listMetadata(): Promise; }