Action Queue
Structure of an Action Item
type ActionItem = {
// Name of the function to be invoked
functionName: string;
// Arguments to be passed to the function
args: unknown[];
// Timestamp indicating when the action was added
dateAdded: string;
// Current state of the action
state: ActionState;
// Unique identifier for the action
key: string;
};
Possible States of an Action Item
declare enum ActionState {
ENQUEUED = "ENQUEUED",
PENDING = "PENDING",
RESOLVING = "RESOLVING",
SUCCESS = "RESOLVED",
ERROR = "REJECTED"
}