@reeve-iot/workflow-client 0.0.0-stage → 1.1.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.
@@ -0,0 +1,270 @@
1
+ import type { CanvasPathSegment, CompilationDiagnostic, WorkflowResponse } from './types.js';
2
+ export interface CompilationReportResponse {
3
+ readonly failed: ReadonlyArray<CompilationVersionResponse>;
4
+ readonly invalid: ReadonlyArray<WorkflowCompilationResponse>;
5
+ readonly shared: ReadonlyArray<CompilationSharedVersion>;
6
+ readonly skip: number;
7
+ readonly take: number;
8
+ readonly totalCount: number;
9
+ readonly unsaved: ReadonlyArray<CompilationVersionResponse>;
10
+ }
11
+ export interface CompilationSharedVersion {
12
+ readonly workflowIds: ReadonlyArray<string>;
13
+ readonly workflowVersionId: string;
14
+ }
15
+ export interface CompilationVersionResponse {
16
+ readonly workflowId: string;
17
+ readonly workflowVersionId: string;
18
+ }
19
+ export interface CreateWorkflowRequest {
20
+ readonly checkpointPolicyJson: string | null;
21
+ readonly definitionJson: string | null;
22
+ readonly description: string | null;
23
+ readonly executionTimeoutSeconds: number | null;
24
+ readonly hostMetadata: Readonly<Record<string, string>> | null;
25
+ readonly importWarningsJson: string | null;
26
+ readonly inputParametersJson: string | null;
27
+ readonly maxConcurrentRuns: number | null;
28
+ readonly maxQueuedRuns: number | null;
29
+ readonly mode: string | null;
30
+ readonly name: string;
31
+ readonly origin: string | null;
32
+ readonly outputParametersJson: string | null;
33
+ readonly overflowBehavior: string | null;
34
+ readonly retryPolicyJson: string | null;
35
+ }
36
+ export interface DraftAnalysisRequest {
37
+ readonly definitionJson: string | null;
38
+ readonly inputParametersJson: string | null;
39
+ readonly outputParametersJson: string | null;
40
+ readonly revision: number;
41
+ readonly workflowId: string | null;
42
+ }
43
+ export interface DraftAnalysisResponse {
44
+ readonly diagnostics: ReadonlyArray<CompilationDiagnostic>;
45
+ readonly nodes: ReadonlyArray<NodeAnalysis>;
46
+ readonly registryGeneration: number;
47
+ readonly revision: number;
48
+ }
49
+ export interface NodeAnalysis {
50
+ readonly canvasPath: ReadonlyArray<CanvasPathSegment>;
51
+ readonly inputs: ReadonlyArray<PortAnalysis>;
52
+ readonly nodeId: string;
53
+ readonly outputs: ReadonlyArray<PortAnalysis>;
54
+ readonly typeArguments: Readonly<Record<string, string | null>>;
55
+ }
56
+ export interface PortAnalysis {
57
+ readonly declared: string | null;
58
+ readonly effective: string | null;
59
+ readonly expression: string | null;
60
+ readonly name: string;
61
+ readonly projection: string | null;
62
+ readonly state: string;
63
+ readonly unbound: ReadonlyArray<string>;
64
+ }
65
+ export interface PortCapabilityDescriptor {
66
+ readonly associated: ReadonlyArray<string> | null;
67
+ readonly name: string;
68
+ }
69
+ export interface PortLiteralDescriptor {
70
+ readonly format: string | null;
71
+ readonly gradedAs: string;
72
+ }
73
+ export interface PortTypeConstructorDescriptor {
74
+ readonly allowedArguments: ReadonlyArray<string> | null;
75
+ readonly arity: number;
76
+ readonly implements: ReadonlyArray<string>;
77
+ readonly key: string | null;
78
+ readonly literal: PortLiteralDescriptor | null;
79
+ readonly name: string;
80
+ readonly owner: string;
81
+ readonly variance: string;
82
+ }
83
+ export interface PortTypeDescriptor {
84
+ readonly aliases: ReadonlyArray<string>;
85
+ readonly implements: ReadonlyArray<string>;
86
+ readonly literal: PortLiteralDescriptor | null;
87
+ readonly name: string;
88
+ readonly owner: string;
89
+ readonly widensTo: ReadonlyArray<string>;
90
+ }
91
+ export interface PortTypeVocabularyResponse {
92
+ readonly capabilities: ReadonlyArray<PortCapabilityDescriptor>;
93
+ readonly constructors: ReadonlyArray<PortTypeConstructorDescriptor>;
94
+ readonly generation: number;
95
+ readonly secretCodec: boolean;
96
+ readonly types: ReadonlyArray<PortTypeDescriptor>;
97
+ }
98
+ export interface UpdateWorkflowRequest {
99
+ readonly autoPublish: boolean;
100
+ readonly changeMessage: string | null;
101
+ readonly checkpointPolicyJson: string | null;
102
+ readonly definitionJson: string | null;
103
+ readonly description: string | null;
104
+ readonly executionTimeoutSeconds: number | null;
105
+ readonly expectedRevision: number | null;
106
+ readonly hostMetadata: Readonly<Record<string, string>> | null;
107
+ readonly inputParametersJson: string | null;
108
+ readonly maxConcurrentRuns: number | null;
109
+ readonly maxQueuedRuns: number | null;
110
+ readonly mode: string | null;
111
+ readonly name: string;
112
+ readonly outputParametersJson: string | null;
113
+ readonly overflowBehavior: string | null;
114
+ readonly retryPolicyJson: string | null;
115
+ }
116
+ export interface WorkflowCompilationResponse {
117
+ readonly diagnostics: ReadonlyArray<CompilationDiagnostic>;
118
+ readonly isValid: boolean;
119
+ readonly workflowId: string;
120
+ readonly workflowVersionId: string;
121
+ }
122
+ export interface WorkflowSaveUnpublishedProblemDetails {
123
+ readonly detail: string;
124
+ readonly status: number;
125
+ readonly title: string;
126
+ readonly type: string;
127
+ readonly versionId: string;
128
+ readonly versionNumber: number;
129
+ readonly workflow: WorkflowResponse;
130
+ }
131
+ export interface WorkflowEditorOperations {
132
+ readonly createWorkflow: {
133
+ readonly method: 'POST';
134
+ readonly path: '/api/workflows';
135
+ readonly query: never;
136
+ readonly args: {
137
+ readonly body: CreateWorkflowRequest;
138
+ };
139
+ readonly result: WorkflowResponse;
140
+ };
141
+ readonly analyzeDraft: {
142
+ readonly method: 'POST';
143
+ readonly path: '/api/workflows/analysis';
144
+ readonly query: never;
145
+ readonly args: {
146
+ readonly body: DraftAnalysisRequest;
147
+ };
148
+ readonly result: DraftAnalysisResponse;
149
+ };
150
+ readonly getInvalidCompilations: {
151
+ readonly method: 'GET';
152
+ readonly path: '/api/workflows/compilation/invalid';
153
+ readonly query: 'skip' | 'take';
154
+ readonly args: {
155
+ readonly skip?: number;
156
+ readonly take?: number;
157
+ };
158
+ readonly result: CompilationReportResponse;
159
+ };
160
+ readonly getPortTypes: {
161
+ readonly method: 'GET';
162
+ readonly path: '/api/workflows/port-types';
163
+ readonly query: never;
164
+ readonly args: Record<never, never>;
165
+ readonly result: PortTypeVocabularyResponse;
166
+ };
167
+ readonly deleteWorkflow: {
168
+ readonly method: 'DELETE';
169
+ readonly path: '/api/workflows/{id}';
170
+ readonly query: never;
171
+ readonly args: {
172
+ readonly id: string;
173
+ };
174
+ readonly result: void;
175
+ };
176
+ readonly updateWorkflow: {
177
+ readonly method: 'PUT';
178
+ readonly path: '/api/workflows/{id}';
179
+ readonly query: never;
180
+ readonly args: {
181
+ readonly id: string;
182
+ readonly body: UpdateWorkflowRequest;
183
+ };
184
+ readonly result: WorkflowResponse;
185
+ };
186
+ readonly publishWorkflow: {
187
+ readonly method: 'POST';
188
+ readonly path: '/api/workflows/{id}/publish';
189
+ readonly query: never;
190
+ readonly args: {
191
+ readonly id: string;
192
+ };
193
+ readonly result: WorkflowResponse;
194
+ };
195
+ readonly rollbackWorkflow: {
196
+ readonly method: 'POST';
197
+ readonly path: '/api/workflows/{id}/versions/{versionNumber}/rollback';
198
+ readonly query: never;
199
+ readonly args: {
200
+ readonly id: string;
201
+ readonly versionNumber: number;
202
+ };
203
+ readonly result: WorkflowResponse;
204
+ };
205
+ readonly getVersionCompilation: {
206
+ readonly method: 'GET';
207
+ readonly path: '/api/workflows/{versionId}/compilation';
208
+ readonly query: never;
209
+ readonly args: {
210
+ readonly versionId: string;
211
+ };
212
+ readonly result: WorkflowCompilationResponse;
213
+ };
214
+ }
215
+ export declare const WORKFLOW_EDITOR_ROUTES: {
216
+ readonly createWorkflow: {
217
+ readonly method: "POST";
218
+ readonly path: "/api/workflows";
219
+ readonly query: readonly [];
220
+ readonly empty: false;
221
+ };
222
+ readonly analyzeDraft: {
223
+ readonly method: "POST";
224
+ readonly path: "/api/workflows/analysis";
225
+ readonly query: readonly [];
226
+ readonly empty: false;
227
+ };
228
+ readonly getInvalidCompilations: {
229
+ readonly method: "GET";
230
+ readonly path: "/api/workflows/compilation/invalid";
231
+ readonly query: readonly ["skip", "take"];
232
+ readonly empty: false;
233
+ };
234
+ readonly getPortTypes: {
235
+ readonly method: "GET";
236
+ readonly path: "/api/workflows/port-types";
237
+ readonly query: readonly [];
238
+ readonly empty: false;
239
+ };
240
+ readonly deleteWorkflow: {
241
+ readonly method: "DELETE";
242
+ readonly path: "/api/workflows/{id}";
243
+ readonly query: readonly [];
244
+ readonly empty: true;
245
+ };
246
+ readonly updateWorkflow: {
247
+ readonly method: "PUT";
248
+ readonly path: "/api/workflows/{id}";
249
+ readonly query: readonly [];
250
+ readonly empty: false;
251
+ };
252
+ readonly publishWorkflow: {
253
+ readonly method: "POST";
254
+ readonly path: "/api/workflows/{id}/publish";
255
+ readonly query: readonly [];
256
+ readonly empty: false;
257
+ };
258
+ readonly rollbackWorkflow: {
259
+ readonly method: "POST";
260
+ readonly path: "/api/workflows/{id}/versions/{versionNumber}/rollback";
261
+ readonly query: readonly [];
262
+ readonly empty: false;
263
+ };
264
+ readonly getVersionCompilation: {
265
+ readonly method: "GET";
266
+ readonly path: "/api/workflows/{versionId}/compilation";
267
+ readonly query: readonly [];
268
+ readonly empty: false;
269
+ };
270
+ };
@@ -0,0 +1,13 @@
1
+ // Generated from surface.editor.json by generateTypes(). Do not edit by hand.
2
+ // generated.test.ts writes editor.ts.actual beside this file when the two disagree.
3
+ export const WORKFLOW_EDITOR_ROUTES = {
4
+ createWorkflow: { method: 'POST', path: '/api/workflows', query: [], empty: false },
5
+ analyzeDraft: { method: 'POST', path: '/api/workflows/analysis', query: [], empty: false },
6
+ getInvalidCompilations: { method: 'GET', path: '/api/workflows/compilation/invalid', query: ['skip', 'take'], empty: false },
7
+ getPortTypes: { method: 'GET', path: '/api/workflows/port-types', query: [], empty: false },
8
+ deleteWorkflow: { method: 'DELETE', path: '/api/workflows/{id}', query: [], empty: true },
9
+ updateWorkflow: { method: 'PUT', path: '/api/workflows/{id}', query: [], empty: false },
10
+ publishWorkflow: { method: 'POST', path: '/api/workflows/{id}/publish', query: [], empty: false },
11
+ rollbackWorkflow: { method: 'POST', path: '/api/workflows/{id}/versions/{versionNumber}/rollback', query: [], empty: false },
12
+ getVersionCompilation: { method: 'GET', path: '/api/workflows/{versionId}/compilation', query: [], empty: false },
13
+ };