1 | import { RequestEnvelope } from 'ask-sdk-model';
|
2 | /**
|
3 | * An interface for storing and retrieving persistent attributes from persistence tier given request envelope.
|
4 | */
|
5 | export interface PersistenceAdapter {
|
6 | getAttributes(requestEnvelope: RequestEnvelope): Promise<{
|
7 | [key: string]: any;
|
8 | }>;
|
9 | saveAttributes(requestEnvelope: RequestEnvelope, attributes: {
|
10 | [key: string]: any;
|
11 | }): Promise<void>;
|
12 | deleteAttributes?(requestEnvelope: RequestEnvelope): Promise<void>;
|
13 | }
|