@powerhousedao/reactor-workflow 6.2.3-dev.25 → 6.2.3-dev.26
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.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +110 -31
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { S as PieceResolver, h as WorkflowRunResult, i as AttachmentPort, n as p
|
|
|
2
2
|
import { ActionBase, TriggerBase } from "@powerhousedao/pieces-framework";
|
|
3
3
|
import { ILogger, OperationWithContext } from "document-model";
|
|
4
4
|
import { BaseReadModel, DocumentViewDatabase, IConsistencyTracker, IOperationIndex, IReactorClient, IWriteCache, ReadModelRegistrationStage } from "@powerhousedao/reactor";
|
|
5
|
+
import { AuthSubject } from "@powerhousedao/shared/document-model";
|
|
5
6
|
import { IRelationalDb, IWebhookScope, WebhookField, WebhookHashAlgorithm, WebhookPolicy, WebhookReply, WebhookRequest, WebhookSignatureEncoding } from "@powerhousedao/shared/processors";
|
|
6
7
|
//#region src/reactor/attachment-port.d.ts
|
|
7
8
|
interface AttachmentClientLike {
|
|
@@ -39,6 +40,7 @@ interface WorkflowRuntimeHostDeps {
|
|
|
39
40
|
reactorClient: IReactorClient;
|
|
40
41
|
assertCanRead(identifier: string, caller: WorkflowCaller): Promise<unknown>;
|
|
41
42
|
assertCanWrite(identifier: string, caller: WorkflowCaller): Promise<unknown>;
|
|
43
|
+
subjectOf?(caller: WorkflowCaller): AuthSubject;
|
|
42
44
|
webhooks?: IWebhookScope;
|
|
43
45
|
attachments?: AttachmentClientLike;
|
|
44
46
|
canReadAttachmentRef?(documentId: string, ref: string): Promise<boolean>;
|
|
@@ -152,6 +154,10 @@ interface StepExecutionRow {
|
|
|
152
154
|
started_at: string | null;
|
|
153
155
|
ended_at: string | null;
|
|
154
156
|
}
|
|
157
|
+
interface RunDocumentRow {
|
|
158
|
+
run_id: string;
|
|
159
|
+
document_id: string;
|
|
160
|
+
}
|
|
155
161
|
interface TriggerStateRow {
|
|
156
162
|
workflow_id: string;
|
|
157
163
|
block_type: string;
|
|
@@ -183,6 +189,7 @@ interface PieceStoreRow {
|
|
|
183
189
|
interface WorkflowRuntimeDB {
|
|
184
190
|
run: RunRow;
|
|
185
191
|
step_execution: StepExecutionRow;
|
|
192
|
+
run_document: RunDocumentRow;
|
|
186
193
|
trigger_state: TriggerStateRow;
|
|
187
194
|
trigger_dedupe: TriggerDedupeRow;
|
|
188
195
|
piece_store: PieceStoreRow;
|
|
@@ -223,6 +230,8 @@ declare class WorkflowRunStore {
|
|
|
223
230
|
listRuns(workflowId?: string | string[], limit?: number): Promise<RunRow[]>;
|
|
224
231
|
getRun(id: string): Promise<RunRow | undefined>;
|
|
225
232
|
getSteps(runId: string): Promise<StepExecutionRow[]>;
|
|
233
|
+
recordRunDocuments(runId: string, documentIds: string[]): Promise<void>;
|
|
234
|
+
getRunDocuments(runId: string): Promise<string[]>;
|
|
226
235
|
getTriggerState(workflowId: string): Promise<TriggerStateRow | undefined>;
|
|
227
236
|
upsertTriggerState(row: TriggerStateRow): Promise<void>;
|
|
228
237
|
setTriggerStatus(workflowId: string, status: string, error?: string): Promise<void>;
|
|
@@ -466,6 +475,9 @@ export declare class WorkflowRuntimeService {
|
|
|
466
475
|
private readableDocuments;
|
|
467
476
|
private readableRows;
|
|
468
477
|
private canReadDocument;
|
|
478
|
+
private servedRuns;
|
|
479
|
+
private servesDocuments;
|
|
480
|
+
private servesRunDocument;
|
|
469
481
|
private assertCanReadDocument;
|
|
470
482
|
private assertCanWriteDocument;
|
|
471
483
|
blockOptions(blockType: string, propName: string, input?: unknown, connectionId?: string, ctx?: WorkflowCaller): Promise<unknown>;
|