@sphereon/ssi-sdk.xstate-machine-persistence 0.33.1-next.3 → 0.33.1-next.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1014 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{ssi-sdk.xstate-machine-persistence.d.ts → index.d.cts} +426 -467
- package/dist/index.d.ts +425 -5
- package/dist/index.js +982 -21
- package/dist/index.js.map +1 -1
- package/package.json +25 -14
- package/plugin.schema.json +80 -320
- package/src/__tests__/localAgent.test.ts +1 -0
- package/src/__tests__/restAgent.test.ts +4 -1
- package/src/__tests__/shared/MachineStatePersistenceAgentLogic.ts +1 -0
- package/dist/agent/MachineStatePersistence.d.ts +0 -26
- package/dist/agent/MachineStatePersistence.d.ts.map +0 -1
- package/dist/agent/MachineStatePersistence.js +0 -197
- package/dist/agent/MachineStatePersistence.js.map +0 -1
- package/dist/functions/index.d.ts +0 -4
- package/dist/functions/index.d.ts.map +0 -1
- package/dist/functions/index.js +0 -20
- package/dist/functions/index.js.map +0 -1
- package/dist/functions/machineRegistration.d.ts +0 -130
- package/dist/functions/machineRegistration.d.ts.map +0 -1
- package/dist/functions/machineRegistration.js +0 -303
- package/dist/functions/machineRegistration.js.map +0 -1
- package/dist/functions/stateEventEmitter.d.ts +0 -10
- package/dist/functions/stateEventEmitter.d.ts.map +0 -1
- package/dist/functions/stateEventEmitter.js +0 -21
- package/dist/functions/stateEventEmitter.js.map +0 -1
- package/dist/functions/stateMapper.d.ts +0 -34
- package/dist/functions/stateMapper.d.ts.map +0 -1
- package/dist/functions/stateMapper.js +0 -83
- package/dist/functions/stateMapper.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/tsdoc-metadata.json +0 -11
- package/dist/types/IMachineStatePersistence.d.ts +0 -62
- package/dist/types/IMachineStatePersistence.d.ts.map +0 -1
- package/dist/types/IMachineStatePersistence.js +0 -3
- package/dist/types/IMachineStatePersistence.js.map +0 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -19
- package/dist/types/index.js.map +0 -1
- package/dist/types/types.d.ts +0 -173
- package/dist/types/types.d.ts.map +0 -1
- package/dist/types/types.js +0 -13
- package/dist/types/types.js.map +0 -1
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.MachineStatePersistence = void 0;
|
|
16
|
-
const debug_1 = __importDefault(require("debug"));
|
|
17
|
-
const uuid_1 = require("uuid");
|
|
18
|
-
const functions_1 = require("../functions");
|
|
19
|
-
const index_1 = require("../index");
|
|
20
|
-
const debug = (0, debug_1.default)('sphereon:ssi-sdk:machine-state:xstate-persistence');
|
|
21
|
-
/**
|
|
22
|
-
* This class implements the IMachineStatePersistence interface using a datastore.
|
|
23
|
-
*
|
|
24
|
-
* This allows you to store and retrieve the State of a state machine/application by their types.
|
|
25
|
-
*
|
|
26
|
-
* @beta This API may change without a BREAKING CHANGE notice.
|
|
27
|
-
*/
|
|
28
|
-
class MachineStatePersistence {
|
|
29
|
-
get store() {
|
|
30
|
-
if (!this._store) {
|
|
31
|
-
throw Error('No store available in options');
|
|
32
|
-
}
|
|
33
|
-
return this._store;
|
|
34
|
-
}
|
|
35
|
-
constructor(opts) {
|
|
36
|
-
this.schema = index_1.schema.IMachineStatePersistence;
|
|
37
|
-
const { store, eventTypes, isRESTClient } = opts;
|
|
38
|
-
this.eventTypes = eventTypes;
|
|
39
|
-
this.methods = {
|
|
40
|
-
machineStatesFindActive: this.machineStatesFindActive.bind(this),
|
|
41
|
-
machineStatesDeleteExpired: this.machineStatesDeleteExpired.bind(this),
|
|
42
|
-
machineStateInit: this.machineStateInit.bind(this),
|
|
43
|
-
machineStatePersist: this.machineStatePersist.bind(this),
|
|
44
|
-
machineStateGet: this.machineStateGet.bind(this),
|
|
45
|
-
machineStateDelete: this.machineStateDelete.bind(this),
|
|
46
|
-
};
|
|
47
|
-
this._store = store;
|
|
48
|
-
if (isRESTClient) {
|
|
49
|
-
// Methods are delegated to the REMOTE Agent. We need the above eventTypes however, to ensure the local eventBus works
|
|
50
|
-
// We do set the store, because we might have some local and some remote methods
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
else if (!store) {
|
|
54
|
-
throw Error('No store available in options');
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
onEvent(event, context) {
|
|
58
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
-
var _a, _b;
|
|
60
|
-
debug(`Received machine state persistence event '${event.type}' counter: ${event.data._eventCounter}}`);
|
|
61
|
-
if (!this.eventTypes.includes(event.type)) {
|
|
62
|
-
console.log(`event type ${event.type} not registered for agent. Registered: ${JSON.stringify(this.eventTypes)}`);
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
// Below we are calling the context of the agent instead of this to make sure the REST client is called when configured
|
|
66
|
-
switch (event.type) {
|
|
67
|
-
case index_1.MachineStatePersistEventType.INIT:
|
|
68
|
-
yield context.agent.machineStateInit(Object.assign({}, event.data));
|
|
69
|
-
break;
|
|
70
|
-
case index_1.MachineStatePersistEventType.EVERY:
|
|
71
|
-
// We are keeping track of the update counter in the events, ensuring we do not process out of order
|
|
72
|
-
yield context.agent.machineStatePersist(Object.assign(Object.assign({}, event.data), { cleanupOnFinalState: (_a = event.data.cleanupOnFinalState) !== null && _a !== void 0 ? _a : event.data._cleanupOnFinalState, updatedCount: (_b = event.data._eventCounter) !== null && _b !== void 0 ? _b : event.data.updatedCount }));
|
|
73
|
-
break;
|
|
74
|
-
default:
|
|
75
|
-
return Promise.reject(Error(`Event type ${event.type} not supported`));
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
machineStateInit(args, context) {
|
|
80
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
-
var _a;
|
|
82
|
-
const { tenantId, machineName, expiresAt, customInstanceId, existingInstanceId, cleanupAllOtherInstances } = args;
|
|
83
|
-
debug(`machineStateInit for machine name ${machineName}, tenant ${tenantId}, custom instance ${customInstanceId}, existing id ${existingInstanceId}`);
|
|
84
|
-
if (customInstanceId && existingInstanceId) {
|
|
85
|
-
return Promise.reject(new Error(`Cannot have both a custom and existing instance id at the same time`));
|
|
86
|
-
}
|
|
87
|
-
if (cleanupAllOtherInstances) {
|
|
88
|
-
// First remove all states for this machine name and tenant that are in done state
|
|
89
|
-
yield context.agent.machineStatesDeleteExpired({ machineName, tenantId, deleteDoneStates: true });
|
|
90
|
-
// Now cleanup all states for this machine name and tenant that are expired
|
|
91
|
-
yield context.agent.machineStatesDeleteExpired({ machineName, tenantId, deleteDoneStates: false });
|
|
92
|
-
// Now remove all machines that are not equal to the existing instance id if provided, or all others if not provided
|
|
93
|
-
const activeMachineStates = (yield context.agent.machineStatesFindActive({ machineName, tenantId })).filter((state) => !existingInstanceId || state.instanceId !== existingInstanceId);
|
|
94
|
-
yield Promise.all(activeMachineStates.map((state) => context.agent.machineStateDelete({
|
|
95
|
-
instanceId: state.instanceId,
|
|
96
|
-
tenantId,
|
|
97
|
-
})));
|
|
98
|
-
}
|
|
99
|
-
let machineInit = undefined;
|
|
100
|
-
let machineState;
|
|
101
|
-
if (existingInstanceId) {
|
|
102
|
-
// A existing instanceId is provided. First lookup whether this id is persisted, if not an error is thrown
|
|
103
|
-
debug(`machineStateInit is using a previously persisted instance id (${existingInstanceId})`);
|
|
104
|
-
machineState = yield context.agent.machineStateGet({ tenantId, instanceId: existingInstanceId });
|
|
105
|
-
machineInit = (0, functions_1.machineStateToMachineInit)(Object.assign(Object.assign({}, machineState), { machineState: machineState, stateType: 'existing' }), Object.assign(Object.assign({}, machineState), { state: (0, functions_1.serializeMachineState)(machineState.state) }));
|
|
106
|
-
}
|
|
107
|
-
if (customInstanceId) {
|
|
108
|
-
// A custom instanceId is provided.
|
|
109
|
-
debug(`machineStateInit is using a custom instance id (${customInstanceId})`);
|
|
110
|
-
}
|
|
111
|
-
if (!machineInit) {
|
|
112
|
-
machineInit = {
|
|
113
|
-
machineName,
|
|
114
|
-
tenantId,
|
|
115
|
-
expiresAt,
|
|
116
|
-
instanceId: customInstanceId !== null && customInstanceId !== void 0 ? customInstanceId : (0, uuid_1.v4)(),
|
|
117
|
-
createdAt: (_a = args.createdAt) !== null && _a !== void 0 ? _a : new Date(),
|
|
118
|
-
stateType: 'new',
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
return machineInit;
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
machineStatePersist(args, context) {
|
|
125
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
-
const { instanceId, tenantId, machineName, updatedCount } = args;
|
|
127
|
-
const cleanupOnFinalState = args.cleanupOnFinalState !== false;
|
|
128
|
-
debug(`machineStatePersist for machine name ${machineName}, updateCount: ${updatedCount}, instance ${instanceId} and tenant ${tenantId}...`);
|
|
129
|
-
try {
|
|
130
|
-
const queriedStates = yield this.store.findMachineStates({ filter: [{ instanceId, tenantId }] });
|
|
131
|
-
const existingState = queriedStates.length === 1 ? queriedStates[0] : undefined;
|
|
132
|
-
const storeInfoArgs = (0, functions_1.machineStateToStoreInfo)(args, existingState);
|
|
133
|
-
let storedState;
|
|
134
|
-
if (updatedCount !== undefined && updatedCount > 1 && storeInfoArgs.latestEventType === 'xstate.init') {
|
|
135
|
-
console.log(`Not persisting machine state for resumed init event for machine ${machineName}, tenant ${tenantId} and state with id ${instanceId}`);
|
|
136
|
-
storedState = storeInfoArgs;
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
storedState = yield this.store.persistMachineState(storeInfoArgs);
|
|
140
|
-
}
|
|
141
|
-
const machineStateInfo = Object.assign(Object.assign({}, storedState), { state: (0, functions_1.deserializeMachineState)(storedState.state) });
|
|
142
|
-
debug(`machineStatePersist success for machine name ${machineName}, instance ${instanceId}, update count ${machineStateInfo.updatedCount}, tenant ${tenantId}, last event: ${machineStateInfo.latestEventType}, last state: ${machineStateInfo.latestStateName}`);
|
|
143
|
-
if (cleanupOnFinalState && machineStateInfo.state.done) {
|
|
144
|
-
debug(`reached final state for machine ${machineName} instance ${instanceId} and auto cleanup was enabled. Deleting machine state`);
|
|
145
|
-
yield context.agent.machineStateDelete(machineStateInfo);
|
|
146
|
-
}
|
|
147
|
-
return machineStateInfo;
|
|
148
|
-
}
|
|
149
|
-
catch (error) {
|
|
150
|
-
console.log(error);
|
|
151
|
-
return Promise.reject(error);
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
machineStatesFindActive(args) {
|
|
156
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
-
const { machineName, tenantId } = args;
|
|
158
|
-
debug(`machineStateFindActive for machine name ${machineName} and tenant ${tenantId}...`);
|
|
159
|
-
const storedStates = yield this.store.findActiveMachineStates(args);
|
|
160
|
-
const machineStateInfos = storedStates.map((storedState) => {
|
|
161
|
-
return Object.assign(Object.assign({}, storedState), { state: (0, functions_1.deserializeMachineState)(storedState.state) });
|
|
162
|
-
});
|
|
163
|
-
debug(`machineStateFindActive returned ${machineStateInfos.length} results for machine name ${machineName} and tenant ${tenantId}`);
|
|
164
|
-
return machineStateInfos;
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
machineStatesDeleteExpired(args) {
|
|
168
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
169
|
-
const { machineName, tenantId } = args;
|
|
170
|
-
debug(`machineStatesDeleteExpired for machine name ${machineName} and tenant ${tenantId}...`);
|
|
171
|
-
const deleteResult = yield this.store.deleteExpiredMachineStates(args);
|
|
172
|
-
debug(`machineStatesDeleteExpired result for machine name ${machineName} and tenant ${tenantId}: ${deleteResult}`);
|
|
173
|
-
return deleteResult;
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
machineStateGet(args, context) {
|
|
177
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
-
const { instanceId, tenantId } = args;
|
|
179
|
-
debug(`machineStateGet for machine instance ${instanceId} and tenant ${tenantId}...`);
|
|
180
|
-
const storedState = yield this.store.getMachineState(args);
|
|
181
|
-
const machineInfo = Object.assign(Object.assign({}, storedState), { state: (0, functions_1.deserializeMachineState)(storedState.state) });
|
|
182
|
-
debug(`machineStateGet success for machine instance ${instanceId} and tenant ${tenantId}`);
|
|
183
|
-
return machineInfo;
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
machineStateDelete(args, context) {
|
|
187
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
-
const { instanceId, tenantId } = args;
|
|
189
|
-
debug(`machineStateDelete for machine instance ${instanceId} and tenant ${tenantId}...`);
|
|
190
|
-
const deleteResult = yield this.store.deleteMachineState(args);
|
|
191
|
-
debug(`machineStateDelete result for machine instance ${instanceId} and tenant ${tenantId}: ${deleteResult}`);
|
|
192
|
-
return deleteResult;
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
exports.MachineStatePersistence = MachineStatePersistence;
|
|
197
|
-
//# sourceMappingURL=MachineStatePersistence.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|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,KAAE,KAAK,EAAE,IAAA,mCAAuB,EAAC,WAAW,CAAC,KAAK,CAAC,GAAE,CAAA;YACzF,KAAK,CAAC,gDAAgD,UAAU,eAAe,QAAQ,EAAE,CAAC,CAAA;YAC1F,OAAO,WAAW,CAAA;QACpB,CAAC;KAAA;IAEa,kBAAkB,CAAC,IAA4B,EAAE,OAAwB;;YACrF,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;YACrC,KAAK,CAAC,2CAA2C,UAAU,eAAe,QAAQ,KAAK,CAAC,CAAA;YACxF,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAA;YAC9D,KAAK,CAAC,kDAAkD,UAAU,eAAe,QAAQ,KAAK,YAAY,EAAE,CAAC,CAAA;YAC7G,OAAO,YAAY,CAAA;QACrB,CAAC;KAAA;CACF;AA1LD,0DA0LC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA"}
|
package/dist/functions/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./machineRegistration"), exports);
|
|
18
|
-
__exportStar(require("./stateMapper"), exports);
|
|
19
|
-
__exportStar(require("./stateEventEmitter"), exports);
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAqC;AACrC,gDAA6B;AAC7B,sDAAmC"}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { IAgentContext } from '@veramo/core';
|
|
2
|
-
import { DefaultContext, EventObject, Interpreter, StateSchema, TypegenDisabled, Typestate } from 'xstate';
|
|
3
|
-
import { IMachineStatePersistence, InitMachineStateArgs, MachineStateInfo, MachineStateInit, MachineStateInitType, MachineStatePersistenceOpts, StartedInterpreterInfo } from '../types';
|
|
4
|
-
/**
|
|
5
|
-
* Initialize the machine state persistence. Returns a unique instanceId and the machine name amongst others
|
|
6
|
-
*
|
|
7
|
-
* @param {Object} opts - The options for initializing the machine state persistence.
|
|
8
|
-
* @param {InitMachineStateArgs} opts - The arguments for initializing the machine state.
|
|
9
|
-
* @param {IAgentContext<any>} opts.context - The agent context.
|
|
10
|
-
* @returns {Promise<MachineStateInit | undefined>} - A promise that resolves to the initialized machine state, or undefined if the agent isn't using the Xstate plugin.
|
|
11
|
-
*/
|
|
12
|
-
export declare const machineStatePersistInit: (opts: InitMachineStateArgs & Pick<MachineStatePersistenceOpts, "existingInstanceId" | "customInstanceId"> & {
|
|
13
|
-
context: IAgentContext<any>;
|
|
14
|
-
}) => Promise<MachineStateInit | undefined>;
|
|
15
|
-
/**
|
|
16
|
-
* This function allows for the persistence of machine state on every xstate transition. It emits an event with the new state
|
|
17
|
-
* and other relevant data to be handled by the persistence plugin when enabled.
|
|
18
|
-
*
|
|
19
|
-
* @param {Object} opts - The options object.
|
|
20
|
-
* @param {Interpreter} opts.instance - The XState machine interpreter instance.
|
|
21
|
-
* @param {IAgentContext<any>} opts.context - The agent context.
|
|
22
|
-
* @param {MachineStateInit} opts.init - The initial persistence options, containing the unique instanceId.
|
|
23
|
-
* @returns {Promise<void>} - A promise that resolves when the persistence event is emitted.
|
|
24
|
-
*/
|
|
25
|
-
export declare const machineStatePersistOnTransition: <TContext = DefaultContext, TStateSchema extends StateSchema = any, TEvent extends EventObject = EventObject, TTypestate extends Typestate<TContext> = {
|
|
26
|
-
value: any;
|
|
27
|
-
context: TContext;
|
|
28
|
-
}, TResolvedTypesMeta = TypegenDisabled>(opts: {
|
|
29
|
-
interpreter: Interpreter<TContext, TStateSchema, TEvent, TTypestate, TResolvedTypesMeta>;
|
|
30
|
-
context: IAgentContext<any>;
|
|
31
|
-
init: MachineStateInit;
|
|
32
|
-
cleanupOnFinalState?: boolean;
|
|
33
|
-
}) => Promise<void>;
|
|
34
|
-
/**
|
|
35
|
-
* Persist the initial state of a machine and register it with the given machine instance.
|
|
36
|
-
*
|
|
37
|
-
* @param {InitMachineStateArgs & {instance: Interpreter<TContext, TStateSchema, TEvent, TTypestate, TResolvedTypesMeta>, context: IAgentContext<any>}} args - The options for initializing
|
|
38
|
-
* machine state and registering it.
|
|
39
|
-
* @returns {Promise<MachineStateInit | undefined>} - A promise that resolves to the initial state of the machine, or undefined if the agent isn't using the Xstate plugin.
|
|
40
|
-
*/
|
|
41
|
-
export declare const machineStatePersistRegistration: <TContext = DefaultContext, TStateSchema extends StateSchema = any, TEvent extends EventObject = EventObject, TTypestate extends Typestate<TContext> = {
|
|
42
|
-
value: any;
|
|
43
|
-
context: TContext;
|
|
44
|
-
}, TResolvedTypesMeta = TypegenDisabled>(args: Omit<InitMachineStateArgs, "machineName"> & Partial<Pick<InitMachineStateArgs, "machineName">> & MachineStatePersistenceOpts & {
|
|
45
|
-
cleanupOnFinalState?: boolean;
|
|
46
|
-
cleanupAllOtherInstances?: boolean;
|
|
47
|
-
interpreter: Interpreter<TContext, TStateSchema, TEvent, TTypestate, TResolvedTypesMeta>;
|
|
48
|
-
context: IAgentContext<any>;
|
|
49
|
-
}) => Promise<MachineStateInit | undefined>;
|
|
50
|
-
/**
|
|
51
|
-
* Resumes the interpreter from a given state.
|
|
52
|
-
*
|
|
53
|
-
* @param {Object} args - The arguments for resuming the interpreter.
|
|
54
|
-
* @param {MachineStateInfo} args.machineState - The machine state information.
|
|
55
|
-
* @param {boolean} [args.noRegistration] - If true, no registration will be performed.
|
|
56
|
-
* @param {Interpreter} args.interpreter - The interpreter instance.
|
|
57
|
-
* @param {IAgentContext<IMachineStatePersistence>} args.context - The context for machine state persistence.
|
|
58
|
-
*
|
|
59
|
-
* @returns {Promise<Interpreter>} - A promise that resolves to the resumed interpreter.
|
|
60
|
-
*/
|
|
61
|
-
export declare const interpreterResumeFromState: <TContext = DefaultContext, TStateSchema extends StateSchema = any, TEvent extends EventObject = EventObject, TTypestate extends Typestate<TContext> = {
|
|
62
|
-
value: any;
|
|
63
|
-
context: TContext;
|
|
64
|
-
}, TResolvedTypesMeta = TypegenDisabled>(args: {
|
|
65
|
-
machineState: MachineStateInfo;
|
|
66
|
-
noRegistration?: boolean;
|
|
67
|
-
cleanupAllOtherInstances?: boolean;
|
|
68
|
-
cleanupOnFinalState?: boolean;
|
|
69
|
-
interpreter: Interpreter<TContext, TStateSchema, TEvent, TTypestate, TResolvedTypesMeta>;
|
|
70
|
-
context: IAgentContext<IMachineStatePersistence>;
|
|
71
|
-
}) => Promise<StartedInterpreterInfo<TContext, TStateSchema, TEvent, TTypestate, TResolvedTypesMeta>>;
|
|
72
|
-
/**
|
|
73
|
-
* Resumes or starts the interpreter from the initial machine state.
|
|
74
|
-
*
|
|
75
|
-
* @async
|
|
76
|
-
* @param {Object} args - The arguments for the function.
|
|
77
|
-
* @param {MachineStateInit & {stateType?: MachineStateInitType}} args.init - The initialization state of the machine.
|
|
78
|
-
* @param {boolean} args.noRegistration - Whether registration is required, defaults to false.
|
|
79
|
-
* @param {Interpreter<TContext, TStateSchema, TEvent, TTypestate, TResolvedTypesMeta>} args.interpreter - The interpreter object.
|
|
80
|
-
* @param {IAgentContext<IMachineStatePersistence>} args.context - The context object.
|
|
81
|
-
* @returns {Promise} - A promise that resolves to the interpreter instance.
|
|
82
|
-
* @throws {Error} - If the machine name from init does not match the interpreter id.
|
|
83
|
-
*/
|
|
84
|
-
export declare const interpreterStartOrResumeFromInit: <TContext = DefaultContext, TStateSchema extends StateSchema = any, TEvent extends EventObject = EventObject, TTypestate extends Typestate<TContext> = {
|
|
85
|
-
value: any;
|
|
86
|
-
context: TContext;
|
|
87
|
-
}, TResolvedTypesMeta = TypegenDisabled>(args: {
|
|
88
|
-
init: MachineStateInit & {
|
|
89
|
-
stateType?: MachineStateInitType;
|
|
90
|
-
};
|
|
91
|
-
cleanupAllOtherInstances?: boolean;
|
|
92
|
-
cleanupOnFinalState?: boolean;
|
|
93
|
-
noRegistration?: boolean;
|
|
94
|
-
interpreter: Interpreter<TContext, TStateSchema, TEvent, TTypestate, TResolvedTypesMeta>;
|
|
95
|
-
context: IAgentContext<IMachineStatePersistence>;
|
|
96
|
-
}) => Promise<StartedInterpreterInfo<TContext, TStateSchema, TEvent, TTypestate, TResolvedTypesMeta>>;
|
|
97
|
-
/**
|
|
98
|
-
* Starts or resumes the given state machine interpreter.
|
|
99
|
-
*
|
|
100
|
-
* @async
|
|
101
|
-
* @param {Object} args - The arguments for starting or resuming the interpreter.
|
|
102
|
-
* @param {MachineStateInitType | 'auto'} [args.stateType] - The state type. Defaults to 'auto'.
|
|
103
|
-
* @param {string} [args.instanceId] - The instance ID.
|
|
104
|
-
* @param {string} [args.machineName] - The machine name.
|
|
105
|
-
* @param {string} [args.tenantId] - The tenant ID.
|
|
106
|
-
* @param {boolean} args.singletonCheck - Whether to perform a singleton check or not. If more than one machine instance is found an error will be thrown
|
|
107
|
-
* @param {boolean} [args.noRegistration] - Whether to skip state change event registration or not.
|
|
108
|
-
* @param {Interpreter<TContext, TStateSchema, TEvent, TTypestate, TResolvedTypesMeta>} args.interpreter - The interpreter to start or resume.
|
|
109
|
-
* @param {IAgentContext<IMachineStatePersistence>} args.context - The agent context.
|
|
110
|
-
* @returns {Promise} A promise that resolves when the interpreter is started or resumed.
|
|
111
|
-
* @throws {Error} If there are multiple active instances of the machine and singletonCheck is true.
|
|
112
|
-
* @throws {Error} If a new instance was requested with the same ID as an existing active instance.
|
|
113
|
-
* @throws {Error} If the existing state machine with the given machine name and instance ID cannot be found.
|
|
114
|
-
*/
|
|
115
|
-
export declare const interpreterStartOrResume: <TContext = DefaultContext, TStateSchema extends StateSchema = any, TEvent extends EventObject = EventObject, TTypestate extends Typestate<TContext> = {
|
|
116
|
-
value: any;
|
|
117
|
-
context: TContext;
|
|
118
|
-
}, TResolvedTypesMeta = TypegenDisabled>(args: {
|
|
119
|
-
stateType?: MachineStateInitType | "auto";
|
|
120
|
-
instanceId?: string;
|
|
121
|
-
machineName?: string;
|
|
122
|
-
tenantId?: string;
|
|
123
|
-
singletonCheck: boolean;
|
|
124
|
-
noRegistration?: boolean;
|
|
125
|
-
cleanupAllOtherInstances?: boolean;
|
|
126
|
-
cleanupOnFinalState?: boolean;
|
|
127
|
-
interpreter: Interpreter<TContext, TStateSchema, TEvent, TTypestate, TResolvedTypesMeta>;
|
|
128
|
-
context: IAgentContext<IMachineStatePersistence>;
|
|
129
|
-
}) => Promise<StartedInterpreterInfo<TContext, TStateSchema, TEvent, TTypestate, TResolvedTypesMeta>>;
|
|
130
|
-
//# sourceMappingURL=machineRegistration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"machineRegistration.d.ts","sourceRoot":"","sources":["../../src/functions/machineRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAA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