@ptkl/sdk 1.14.0 → 1.15.0

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.
@@ -1,6 +1,6 @@
1
1
  import { AxiosResponse } from 'axios';
2
2
  import PlatformBaseClient from "./platformBaseClient";
3
- import { WorkflowModel, WorkflowCreatePayload, WorkflowUpdatePayload, WorkflowListResponse } from '../types/workflow';
3
+ import { WorkflowModel, WorkflowCreatePayload, WorkflowUpdatePayload, WorkflowListResponse, WorkflowInstallPayload, WorkflowHistoryQuery, WorkflowHistoryListResponse, WorkflowHistoryEntry, WorkflowStatsQuery, WorkflowStats, WorkflowRunningQuery, WorkflowRunningListResponse, WorkflowRunningExecution, WorkflowControlResponse, WorkflowRestartOptions, WorkflowRestartResponse, WorkflowNodeControlOptions, WorkflowErrorListResponse } from '../types/workflow';
4
4
  export default class Workflow extends PlatformBaseClient {
5
5
  create(data: WorkflowCreatePayload): Promise<AxiosResponse<WorkflowModel>>;
6
6
  update(id: string, data: WorkflowUpdatePayload): Promise<AxiosResponse<WorkflowModel>>;
@@ -9,4 +9,28 @@ export default class Workflow extends PlatformBaseClient {
9
9
  delete(id: string): Promise<AxiosResponse<void>>;
10
10
  trigger(id: string, event: string, data: any): Promise<AxiosResponse<any, any>>;
11
11
  publish(event: string, data: any): Promise<AxiosResponse<any, any>>;
12
+ /**
13
+ * Install (create + publish) a workflow in one call.
14
+ * Rejects if a workflow with the same name + integrator already exists.
15
+ */
16
+ install(data: WorkflowInstallPayload): Promise<AxiosResponse<WorkflowModel>>;
17
+ getHistory(query?: WorkflowHistoryQuery): Promise<AxiosResponse<WorkflowHistoryListResponse>>;
18
+ getHistoryEntry(executionUuid: string): Promise<AxiosResponse<WorkflowHistoryEntry>>;
19
+ getStats(query?: WorkflowStatsQuery): Promise<AxiosResponse<WorkflowStats>>;
20
+ getRunning(query?: WorkflowRunningQuery): Promise<AxiosResponse<WorkflowRunningListResponse>>;
21
+ getRunningEntry(executionUuid: string): Promise<AxiosResponse<WorkflowRunningExecution>>;
22
+ pause(executionUuid: string): Promise<AxiosResponse<WorkflowControlResponse>>;
23
+ resume(executionUuid: string): Promise<AxiosResponse<WorkflowControlResponse>>;
24
+ kill(executionUuid: string): Promise<AxiosResponse<WorkflowControlResponse>>;
25
+ /**
26
+ * Restart a failed/killed workflow execution from history.
27
+ * `clearState: true` discards prior node state instead of a smart resume.
28
+ */
29
+ restart(executionUuid: string, options?: WorkflowRestartOptions): Promise<AxiosResponse<WorkflowRestartResponse>>;
30
+ pauseNode(executionUuid: string, nodeId: number, options?: WorkflowNodeControlOptions): Promise<AxiosResponse<WorkflowControlResponse>>;
31
+ resumeNode(executionUuid: string, nodeId: number, options?: WorkflowNodeControlOptions): Promise<AxiosResponse<WorkflowControlResponse>>;
32
+ killNode(executionUuid: string, nodeId: number, options?: WorkflowNodeControlOptions): Promise<AxiosResponse<WorkflowControlResponse>>;
33
+ getErrors(): Promise<AxiosResponse<WorkflowErrorListResponse>>;
34
+ removeError(id: string): Promise<AxiosResponse<WorkflowControlResponse>>;
35
+ removeAllErrors(): Promise<AxiosResponse<WorkflowControlResponse>>;
12
36
  }