Stores a string in the eitri-app storage
Example:
await Eitri.storage.setItem('myDataKey', "myData")
await Eitri.storage.setItem('mySecureDataKey', "mySecureData", {secure: true})
await Eitri.storage.setItem('mySharedDataKey', "mySharedData", {shared: true})
await Eitri.storage.setItem('mySharedSecureDataKey', "mySharedSecureData", {shared: true, secure: true})
Key for registration
Value to be saved
Optional options: StorageOptionsOptions for storage operation
- API LEVEL
1- Functionality added- API LEVEL
33-secure storagesupport added
Stores an Object in the eitri-app storage
Example:
let myObject = {myData: 'valueOfMyData'}
await Eitri.storage.setItemJson('myData', myObject)
let mySecureObject = {mySecureData: 'valueOfMySecureData'}
await Eitri.storage.setItemJson('mySecureData', mySecureObject, {secure: true})
let mySharedObject = {mySharedData: 'valueOfMySharedData'}
await Eitri.storage.setItemJson('mySharedData', mySharedObject, {shared: true})
Key for registration
JSON object to be saved
Optional options: StorageOptionsOptions for storage operation
- API LEVEL
1- Functionality added- API LEVEL
33-secure storagesupport added
Retrieves a stored string from the eitri-app storage
Example:
const storedValue = await Eitri.storage.getItem('myData')
const secureStoredValue = await Eitri.storage.getItem('mySecureData', {secure: true})
const sharedStoredValue = await Eitri.storage.getItem('mySharedData', {shared: true})
const sharedSecureStoredValue = await Eitri.storage.getItem('mySharedSecureData', {shared: true, secure: true})
- API LEVEL
1- Functionality added- API LEVEL
33-secure storagesupport added
Registration key
Optional options: StorageOptionsOptions for storage operation
Retrieves a stored Object from the eitri-app storage
Example:
const myObject = await Eitri.storage.getItemJson('myData')
const mySecureObject = await Eitri.storage.getItemJson('mySecureData', {secure: true})
const mySharedObject = await Eitri.storage.getItemJson('mySharedData', {shared: true})
const mySharedSecureObject = await Eitri.storage.getItemJson('mySharedSecureData', {shared: true, secure: true})
Registration key
Optional options: StorageOptionsOptions for storage operation
- API LEVEL
1- Functionality added- API LEVEL
33-secure storagesupport added
Deletes the data associated with the specified key from the eitri-app storage
Example:
await Eitri.storage.removeItem('myData')
await Eitri.storage.removeItem('mySecureData', {secure: true})
await Eitri.storage.removeItem('mySharedData', {shared: true})
await Eitri.storage.removeItem('mySharedSecureData', {shared: true, secure: true})
- API LEVEL
1- Functionality added- API LEVEL
33-secure storagesupport added
Registration key
Optional options: StorageOptionsOptions for storage operation
Clears all data created by the respective eitri-app from storage
Note:
This method does not clear other data saved by other eitri-apps
Example:
await Eitri.storage.clear()
- API LEVEL
1- Functionality added- API LEVEL
33-secure storagesupport added
Optional options: StorageOptionsOptions for storage operation
Clears all data created by the respective eitri-app from all storage namespaces (normal, shared, secure, and secure+shared)
Note:
This method does not clear other data saved by other eitri-apps
Example:
await Eitri.storage.clearAll()
- API LEVEL
33- Functionality added
Retrieves all registration keys stored by the respective eitri-app from storage
Example:
const myKeys = await Eitri.storage.keys()
const mySharedDataKeys = await Eitri.storage.keys({shared: true})
const mySecureDataKeys = await Eitri.storage.keys({secure: true})
- API LEVEL
1- Functionality added- API LEVEL
33-secure storagesupport added
Optional options: StorageOptionstype of data whose associated keys are to be retrieved (keys for shared data, secure data, etc.).
Retrieves all registration keys stored by the respective eitri-app from all storage namespaces (normal, shared, secure, and secure+shared)
Each entry includes the key name and its namespace flags (secure, shared).
Example:
const allKeys = await Eitri.storage.keysAll()
// [{ key: "token", secure: false, shared: false }, { key: "secret", secure: true, shared: false }, ...]
- API LEVEL
33- Functionality added
Generated using TypeDoc
Set of methods to operate eitri-app data storage
Notes:
Storage data is not shared between different eitri-apps. Data is transmitted as a string and handled with JSON encoding/decoding. Pay attention to the size of the data to avoid affecting the experience.