import ActorId from "../ActorId"; import ActorClient from "../client/ActorClient/ActorClient"; import ActorStateChange from "./ActorStateChange"; export default class StateProvider { actorClient: ActorClient; constructor(actorClient: ActorClient); containsState(actorType: string, actorId: ActorId, stateName: string): Promise; tryLoadState(actorType: string, actorId: ActorId, stateName: string): Promise<[boolean, any]>; /** * Create and save the state through a transactional update request body. E.g. * [ * { * "operation": "upsert", * "request": { * "key": "key1", * "value": "myData" * } * }, * { * "operation": "delete", * "request": { * "key": "key2" * } * } * ] * @param actorType * @param actorId * @param stateChanges */ saveState(actorType: string, actorId: ActorId, stateChanges: ActorStateChange[]): Promise; }