@things-factory/labeling 9.1.19

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/ENTITY_IMPLEMENTATION.md +351 -0
  3. package/INTEGRATION_COMPLETE.md +531 -0
  4. package/MIGRATION_GUIDE.md +310 -0
  5. package/README.md +551 -0
  6. package/REFACTORING_SUMMARY.md +212 -0
  7. package/UI_DOCUMENTATION.md +552 -0
  8. package/dist-client/index.d.ts +3 -0
  9. package/dist-client/index.js +9 -0
  10. package/dist-client/index.js.map +1 -0
  11. package/dist-client/pages/labeling-workflow-builder.d.ts +26 -0
  12. package/dist-client/pages/labeling-workflow-builder.js +636 -0
  13. package/dist-client/pages/labeling-workflow-builder.js.map +1 -0
  14. package/dist-client/pages/labeling-workflow-list.d.ts +24 -0
  15. package/dist-client/pages/labeling-workflow-list.js +495 -0
  16. package/dist-client/pages/labeling-workflow-list.js.map +1 -0
  17. package/dist-client/route.d.ts +1 -0
  18. package/dist-client/route.js +47 -0
  19. package/dist-client/route.js.map +1 -0
  20. package/dist-client/tsconfig.tsbuildinfo +1 -0
  21. package/dist-server/entities/index.d.ts +5 -0
  22. package/dist-server/entities/index.js +11 -0
  23. package/dist-server/entities/index.js.map +1 -0
  24. package/dist-server/index.d.ts +3 -0
  25. package/dist-server/index.js +7 -0
  26. package/dist-server/index.js.map +1 -0
  27. package/dist-server/route.d.ts +2 -0
  28. package/dist-server/route.js +6 -0
  29. package/dist-server/route.js.map +1 -0
  30. package/dist-server/service/index.d.ts +8 -0
  31. package/dist-server/service/index.js +21 -0
  32. package/dist-server/service/index.js.map +1 -0
  33. package/dist-server/service/labeling-workflow-service.d.ts +69 -0
  34. package/dist-server/service/labeling-workflow-service.js +521 -0
  35. package/dist-server/service/labeling-workflow-service.js.map +1 -0
  36. package/dist-server/service/labeling-workflow.d.ts +30 -0
  37. package/dist-server/service/labeling-workflow.js +119 -0
  38. package/dist-server/service/labeling-workflow.js.map +1 -0
  39. package/dist-server/service/workflow-execution-step.d.ts +28 -0
  40. package/dist-server/service/workflow-execution-step.js +115 -0
  41. package/dist-server/service/workflow-execution-step.js.map +1 -0
  42. package/dist-server/service/workflow-execution.d.ts +27 -0
  43. package/dist-server/service/workflow-execution.js +110 -0
  44. package/dist-server/service/workflow-execution.js.map +1 -0
  45. package/dist-server/tsconfig.tsbuildinfo +1 -0
  46. package/dist-server/types/workflow-types.d.ts +141 -0
  47. package/dist-server/types/workflow-types.js +488 -0
  48. package/dist-server/types/workflow-types.js.map +1 -0
  49. package/package.json +51 -0
  50. package/things-factory.config.js +11 -0
  51. package/translations/en.json +6 -0
  52. package/translations/ja.json +6 -0
  53. package/translations/ko.json +6 -0
  54. package/translations/ms.json +6 -0
  55. package/translations/zh.json +6 -0
@@ -0,0 +1,141 @@
1
+ /**
2
+ * Labeling Workflow Types
3
+ *
4
+ * Defines end-to-end labeling workflows with multiple steps
5
+ */
6
+ export declare enum WorkflowStepType {
7
+ ImportData = "import_data",
8
+ GeneratePredictions = "generate_predictions",
9
+ WaitForAnnotations = "wait_for_annotations",
10
+ SyncAnnotations = "sync_annotations",
11
+ ValidateQuality = "validate_quality",
12
+ ExportResults = "export_results",
13
+ Notification = "notification"
14
+ }
15
+ export declare enum WorkflowStatus {
16
+ Draft = "draft",
17
+ Active = "active",
18
+ Paused = "paused",
19
+ Completed = "completed",
20
+ Failed = "failed"
21
+ }
22
+ export declare enum TriggerType {
23
+ Manual = "manual",
24
+ Schedule = "schedule",
25
+ DatasetUpdate = "dataset_update",
26
+ ExternalEvent = "external_event"
27
+ }
28
+ export declare class ImportDataStepConfig {
29
+ sourceType: 'dataset' | 'api' | 'file';
30
+ dataSetId?: string;
31
+ sourceUrl?: string;
32
+ imageField?: string;
33
+ limit?: number;
34
+ }
35
+ export declare class GeneratePredictionsStepConfig {
36
+ modelId?: string;
37
+ confidenceThreshold?: number;
38
+ forceRegenerate?: boolean;
39
+ }
40
+ export declare class WaitForAnnotationsStepConfig {
41
+ minAnnotations?: number;
42
+ minCompletionRate?: number;
43
+ maxWaitMinutes?: number;
44
+ autoProceed?: boolean;
45
+ }
46
+ export declare class SyncAnnotationsStepConfig {
47
+ completedOnly?: boolean;
48
+ sinceDate?: Date;
49
+ }
50
+ export declare class ValidateQualityStepConfig {
51
+ minQualityScore?: number;
52
+ validationRules?: string;
53
+ }
54
+ export declare class NotificationStepConfig {
55
+ message: string;
56
+ recipients?: string[];
57
+ webhookUrl?: string;
58
+ }
59
+ export declare class WorkflowStepInput {
60
+ name: string;
61
+ type: WorkflowStepType;
62
+ config: string;
63
+ condition?: string;
64
+ continueOnError?: boolean;
65
+ maxRetries?: number;
66
+ }
67
+ export declare class WorkflowStep {
68
+ name: string;
69
+ type: WorkflowStepType;
70
+ config: string;
71
+ condition?: string;
72
+ continueOnError: boolean;
73
+ maxRetries?: number;
74
+ order: number;
75
+ }
76
+ export declare class CreateWorkflowRequest {
77
+ name: string;
78
+ description?: string;
79
+ projectId: number;
80
+ triggerType: TriggerType;
81
+ triggerConfig?: string;
82
+ steps: WorkflowStepInput[];
83
+ autoStart?: boolean;
84
+ }
85
+ export declare class LabelingWorkflow {
86
+ id: string;
87
+ name: string;
88
+ description?: string;
89
+ projectId: number;
90
+ triggerType: TriggerType;
91
+ triggerConfig?: string;
92
+ steps: WorkflowStep[];
93
+ status: WorkflowStatus;
94
+ lastExecutedAt?: Date;
95
+ nextExecutionAt?: Date;
96
+ createdAt: Date;
97
+ updatedAt: Date;
98
+ }
99
+ export declare class ExecuteWorkflowRequest {
100
+ workflowId: string;
101
+ parameters?: string;
102
+ }
103
+ export declare class WorkflowExecutionStep {
104
+ stepName: string;
105
+ stepType: WorkflowStepType;
106
+ status: string;
107
+ output?: string;
108
+ error?: string;
109
+ startedAt?: Date;
110
+ completedAt?: Date;
111
+ durationMs?: number;
112
+ }
113
+ export declare class WorkflowExecution {
114
+ id: string;
115
+ workflowId: string;
116
+ workflowName: string;
117
+ status: string;
118
+ steps: WorkflowExecutionStep[];
119
+ summary?: string;
120
+ startedAt: Date;
121
+ completedAt?: Date;
122
+ totalDurationMs?: number;
123
+ error?: string;
124
+ }
125
+ export declare class WorkflowExecutionResult {
126
+ executionId: string;
127
+ status: string;
128
+ summary?: string;
129
+ error?: string;
130
+ }
131
+ export declare class LabelingWorkflowList {
132
+ items: LabelingWorkflow[];
133
+ total: number;
134
+ }
135
+ export declare class WorkflowExecutionList {
136
+ items: WorkflowExecution[];
137
+ total: number;
138
+ }
139
+ export declare class WorkflowStatusRequest {
140
+ workflowId: string;
141
+ }
@@ -0,0 +1,488 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WorkflowStatusRequest = exports.WorkflowExecutionList = exports.LabelingWorkflowList = exports.WorkflowExecutionResult = exports.WorkflowExecution = exports.WorkflowExecutionStep = exports.ExecuteWorkflowRequest = exports.LabelingWorkflow = exports.CreateWorkflowRequest = exports.WorkflowStep = exports.WorkflowStepInput = exports.NotificationStepConfig = exports.ValidateQualityStepConfig = exports.SyncAnnotationsStepConfig = exports.WaitForAnnotationsStepConfig = exports.GeneratePredictionsStepConfig = exports.ImportDataStepConfig = exports.TriggerType = exports.WorkflowStatus = exports.WorkflowStepType = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ /**
7
+ * Labeling Workflow Types
8
+ *
9
+ * Defines end-to-end labeling workflows with multiple steps
10
+ */
11
+ // ============================================================================
12
+ // Enums
13
+ // ============================================================================
14
+ var WorkflowStepType;
15
+ (function (WorkflowStepType) {
16
+ WorkflowStepType["ImportData"] = "import_data";
17
+ WorkflowStepType["GeneratePredictions"] = "generate_predictions";
18
+ WorkflowStepType["WaitForAnnotations"] = "wait_for_annotations";
19
+ WorkflowStepType["SyncAnnotations"] = "sync_annotations";
20
+ WorkflowStepType["ValidateQuality"] = "validate_quality";
21
+ WorkflowStepType["ExportResults"] = "export_results";
22
+ WorkflowStepType["Notification"] = "notification";
23
+ })(WorkflowStepType || (exports.WorkflowStepType = WorkflowStepType = {}));
24
+ (0, type_graphql_1.registerEnumType)(WorkflowStepType, {
25
+ name: 'WorkflowStepType',
26
+ description: 'Type of workflow step'
27
+ });
28
+ var WorkflowStatus;
29
+ (function (WorkflowStatus) {
30
+ WorkflowStatus["Draft"] = "draft";
31
+ WorkflowStatus["Active"] = "active";
32
+ WorkflowStatus["Paused"] = "paused";
33
+ WorkflowStatus["Completed"] = "completed";
34
+ WorkflowStatus["Failed"] = "failed";
35
+ })(WorkflowStatus || (exports.WorkflowStatus = WorkflowStatus = {}));
36
+ (0, type_graphql_1.registerEnumType)(WorkflowStatus, {
37
+ name: 'WorkflowStatus',
38
+ description: 'Status of labeling workflow'
39
+ });
40
+ var TriggerType;
41
+ (function (TriggerType) {
42
+ TriggerType["Manual"] = "manual";
43
+ TriggerType["Schedule"] = "schedule";
44
+ TriggerType["DatasetUpdate"] = "dataset_update";
45
+ TriggerType["ExternalEvent"] = "external_event";
46
+ })(TriggerType || (exports.TriggerType = TriggerType = {}));
47
+ (0, type_graphql_1.registerEnumType)(TriggerType, {
48
+ name: 'TriggerType',
49
+ description: 'How the workflow is triggered'
50
+ });
51
+ // ============================================================================
52
+ // Workflow Step Configuration Types
53
+ // ============================================================================
54
+ let ImportDataStepConfig = class ImportDataStepConfig {
55
+ };
56
+ exports.ImportDataStepConfig = ImportDataStepConfig;
57
+ tslib_1.__decorate([
58
+ (0, type_graphql_1.Field)({ description: 'Data source type: dataset, api, file' }),
59
+ tslib_1.__metadata("design:type", String)
60
+ ], ImportDataStepConfig.prototype, "sourceType", void 0);
61
+ tslib_1.__decorate([
62
+ (0, type_graphql_1.Field)({ nullable: true, description: 'DataSet ID if sourceType is dataset' }),
63
+ tslib_1.__metadata("design:type", String)
64
+ ], ImportDataStepConfig.prototype, "dataSetId", void 0);
65
+ tslib_1.__decorate([
66
+ (0, type_graphql_1.Field)({ nullable: true, description: 'External source URL if sourceType is api/file' }),
67
+ tslib_1.__metadata("design:type", String)
68
+ ], ImportDataStepConfig.prototype, "sourceUrl", void 0);
69
+ tslib_1.__decorate([
70
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Image field name' }),
71
+ tslib_1.__metadata("design:type", String)
72
+ ], ImportDataStepConfig.prototype, "imageField", void 0);
73
+ tslib_1.__decorate([
74
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Maximum items to import' }),
75
+ tslib_1.__metadata("design:type", Number)
76
+ ], ImportDataStepConfig.prototype, "limit", void 0);
77
+ exports.ImportDataStepConfig = ImportDataStepConfig = tslib_1.__decorate([
78
+ (0, type_graphql_1.InputType)()
79
+ ], ImportDataStepConfig);
80
+ let GeneratePredictionsStepConfig = class GeneratePredictionsStepConfig {
81
+ };
82
+ exports.GeneratePredictionsStepConfig = GeneratePredictionsStepConfig;
83
+ tslib_1.__decorate([
84
+ (0, type_graphql_1.Field)({ nullable: true, description: 'AI model ID to use' }),
85
+ tslib_1.__metadata("design:type", String)
86
+ ], GeneratePredictionsStepConfig.prototype, "modelId", void 0);
87
+ tslib_1.__decorate([
88
+ (0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true, description: 'Confidence threshold' }),
89
+ tslib_1.__metadata("design:type", Number)
90
+ ], GeneratePredictionsStepConfig.prototype, "confidenceThreshold", void 0);
91
+ tslib_1.__decorate([
92
+ (0, type_graphql_1.Field)({ nullable: true, defaultValue: false, description: 'Force regenerate existing predictions' }),
93
+ tslib_1.__metadata("design:type", Boolean)
94
+ ], GeneratePredictionsStepConfig.prototype, "forceRegenerate", void 0);
95
+ exports.GeneratePredictionsStepConfig = GeneratePredictionsStepConfig = tslib_1.__decorate([
96
+ (0, type_graphql_1.InputType)()
97
+ ], GeneratePredictionsStepConfig);
98
+ let WaitForAnnotationsStepConfig = class WaitForAnnotationsStepConfig {
99
+ };
100
+ exports.WaitForAnnotationsStepConfig = WaitForAnnotationsStepConfig;
101
+ tslib_1.__decorate([
102
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'Minimum number of annotations required' }),
103
+ tslib_1.__metadata("design:type", Number)
104
+ ], WaitForAnnotationsStepConfig.prototype, "minAnnotations", void 0);
105
+ tslib_1.__decorate([
106
+ (0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true, description: 'Minimum completion rate (0-1)' }),
107
+ tslib_1.__metadata("design:type", Number)
108
+ ], WaitForAnnotationsStepConfig.prototype, "minCompletionRate", void 0);
109
+ tslib_1.__decorate([
110
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'Maximum wait time in minutes' }),
111
+ tslib_1.__metadata("design:type", Number)
112
+ ], WaitForAnnotationsStepConfig.prototype, "maxWaitMinutes", void 0);
113
+ tslib_1.__decorate([
114
+ (0, type_graphql_1.Field)({ nullable: true, defaultValue: true, description: 'Auto-proceed when criteria met' }),
115
+ tslib_1.__metadata("design:type", Boolean)
116
+ ], WaitForAnnotationsStepConfig.prototype, "autoProceed", void 0);
117
+ exports.WaitForAnnotationsStepConfig = WaitForAnnotationsStepConfig = tslib_1.__decorate([
118
+ (0, type_graphql_1.InputType)()
119
+ ], WaitForAnnotationsStepConfig);
120
+ let SyncAnnotationsStepConfig = class SyncAnnotationsStepConfig {
121
+ };
122
+ exports.SyncAnnotationsStepConfig = SyncAnnotationsStepConfig;
123
+ tslib_1.__decorate([
124
+ (0, type_graphql_1.Field)({ nullable: true, defaultValue: true, description: 'Only sync completed annotations' }),
125
+ tslib_1.__metadata("design:type", Boolean)
126
+ ], SyncAnnotationsStepConfig.prototype, "completedOnly", void 0);
127
+ tslib_1.__decorate([
128
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Sync annotations updated after this date' }),
129
+ tslib_1.__metadata("design:type", Date)
130
+ ], SyncAnnotationsStepConfig.prototype, "sinceDate", void 0);
131
+ exports.SyncAnnotationsStepConfig = SyncAnnotationsStepConfig = tslib_1.__decorate([
132
+ (0, type_graphql_1.InputType)()
133
+ ], SyncAnnotationsStepConfig);
134
+ let ValidateQualityStepConfig = class ValidateQualityStepConfig {
135
+ };
136
+ exports.ValidateQualityStepConfig = ValidateQualityStepConfig;
137
+ tslib_1.__decorate([
138
+ (0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true, description: 'Minimum required quality score (0-1)' }),
139
+ tslib_1.__metadata("design:type", Number)
140
+ ], ValidateQualityStepConfig.prototype, "minQualityScore", void 0);
141
+ tslib_1.__decorate([
142
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Validation rules in JSON format' }),
143
+ tslib_1.__metadata("design:type", String)
144
+ ], ValidateQualityStepConfig.prototype, "validationRules", void 0);
145
+ exports.ValidateQualityStepConfig = ValidateQualityStepConfig = tslib_1.__decorate([
146
+ (0, type_graphql_1.InputType)()
147
+ ], ValidateQualityStepConfig);
148
+ let NotificationStepConfig = class NotificationStepConfig {
149
+ };
150
+ exports.NotificationStepConfig = NotificationStepConfig;
151
+ tslib_1.__decorate([
152
+ (0, type_graphql_1.Field)({ description: 'Notification message template' }),
153
+ tslib_1.__metadata("design:type", String)
154
+ ], NotificationStepConfig.prototype, "message", void 0);
155
+ tslib_1.__decorate([
156
+ (0, type_graphql_1.Field)(type => [String], { nullable: true, description: 'Email recipients' }),
157
+ tslib_1.__metadata("design:type", Array)
158
+ ], NotificationStepConfig.prototype, "recipients", void 0);
159
+ tslib_1.__decorate([
160
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Webhook URL to call' }),
161
+ tslib_1.__metadata("design:type", String)
162
+ ], NotificationStepConfig.prototype, "webhookUrl", void 0);
163
+ exports.NotificationStepConfig = NotificationStepConfig = tslib_1.__decorate([
164
+ (0, type_graphql_1.InputType)()
165
+ ], NotificationStepConfig);
166
+ // ============================================================================
167
+ // Workflow Step Definition
168
+ // ============================================================================
169
+ let WorkflowStepInput = class WorkflowStepInput {
170
+ };
171
+ exports.WorkflowStepInput = WorkflowStepInput;
172
+ tslib_1.__decorate([
173
+ (0, type_graphql_1.Field)({ description: 'Step name' }),
174
+ tslib_1.__metadata("design:type", String)
175
+ ], WorkflowStepInput.prototype, "name", void 0);
176
+ tslib_1.__decorate([
177
+ (0, type_graphql_1.Field)(type => WorkflowStepType, { description: 'Step type' }),
178
+ tslib_1.__metadata("design:type", String)
179
+ ], WorkflowStepInput.prototype, "type", void 0);
180
+ tslib_1.__decorate([
181
+ (0, type_graphql_1.Field)({ description: 'Step configuration as JSON string' }),
182
+ tslib_1.__metadata("design:type", String)
183
+ ], WorkflowStepInput.prototype, "config", void 0);
184
+ tslib_1.__decorate([
185
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Condition to execute this step (JSON logic)' }),
186
+ tslib_1.__metadata("design:type", String)
187
+ ], WorkflowStepInput.prototype, "condition", void 0);
188
+ tslib_1.__decorate([
189
+ (0, type_graphql_1.Field)({ nullable: true, defaultValue: true, description: 'Continue on error' }),
190
+ tslib_1.__metadata("design:type", Boolean)
191
+ ], WorkflowStepInput.prototype, "continueOnError", void 0);
192
+ tslib_1.__decorate([
193
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'Max retry attempts' }),
194
+ tslib_1.__metadata("design:type", Number)
195
+ ], WorkflowStepInput.prototype, "maxRetries", void 0);
196
+ exports.WorkflowStepInput = WorkflowStepInput = tslib_1.__decorate([
197
+ (0, type_graphql_1.InputType)()
198
+ ], WorkflowStepInput);
199
+ let WorkflowStep = class WorkflowStep {
200
+ };
201
+ exports.WorkflowStep = WorkflowStep;
202
+ tslib_1.__decorate([
203
+ (0, type_graphql_1.Field)({ description: 'Step name' }),
204
+ tslib_1.__metadata("design:type", String)
205
+ ], WorkflowStep.prototype, "name", void 0);
206
+ tslib_1.__decorate([
207
+ (0, type_graphql_1.Field)(type => WorkflowStepType, { description: 'Step type' }),
208
+ tslib_1.__metadata("design:type", String)
209
+ ], WorkflowStep.prototype, "type", void 0);
210
+ tslib_1.__decorate([
211
+ (0, type_graphql_1.Field)({ description: 'Step configuration' }),
212
+ tslib_1.__metadata("design:type", String)
213
+ ], WorkflowStep.prototype, "config", void 0);
214
+ tslib_1.__decorate([
215
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Execution condition' }),
216
+ tslib_1.__metadata("design:type", String)
217
+ ], WorkflowStep.prototype, "condition", void 0);
218
+ tslib_1.__decorate([
219
+ (0, type_graphql_1.Field)({ defaultValue: true, description: 'Continue on error' }),
220
+ tslib_1.__metadata("design:type", Boolean)
221
+ ], WorkflowStep.prototype, "continueOnError", void 0);
222
+ tslib_1.__decorate([
223
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'Max retry attempts' }),
224
+ tslib_1.__metadata("design:type", Number)
225
+ ], WorkflowStep.prototype, "maxRetries", void 0);
226
+ tslib_1.__decorate([
227
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Step order' }),
228
+ tslib_1.__metadata("design:type", Number)
229
+ ], WorkflowStep.prototype, "order", void 0);
230
+ exports.WorkflowStep = WorkflowStep = tslib_1.__decorate([
231
+ (0, type_graphql_1.ObjectType)()
232
+ ], WorkflowStep);
233
+ // ============================================================================
234
+ // Workflow Definition
235
+ // ============================================================================
236
+ let CreateWorkflowRequest = class CreateWorkflowRequest {
237
+ };
238
+ exports.CreateWorkflowRequest = CreateWorkflowRequest;
239
+ tslib_1.__decorate([
240
+ (0, type_graphql_1.Field)({ description: 'Workflow name' }),
241
+ tslib_1.__metadata("design:type", String)
242
+ ], CreateWorkflowRequest.prototype, "name", void 0);
243
+ tslib_1.__decorate([
244
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Workflow description' }),
245
+ tslib_1.__metadata("design:type", String)
246
+ ], CreateWorkflowRequest.prototype, "description", void 0);
247
+ tslib_1.__decorate([
248
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Label Studio project ID' }),
249
+ tslib_1.__metadata("design:type", Number)
250
+ ], CreateWorkflowRequest.prototype, "projectId", void 0);
251
+ tslib_1.__decorate([
252
+ (0, type_graphql_1.Field)(type => TriggerType, { description: 'How to trigger this workflow' }),
253
+ tslib_1.__metadata("design:type", String)
254
+ ], CreateWorkflowRequest.prototype, "triggerType", void 0);
255
+ tslib_1.__decorate([
256
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Trigger configuration (schedule, event, etc.)' }),
257
+ tslib_1.__metadata("design:type", String)
258
+ ], CreateWorkflowRequest.prototype, "triggerConfig", void 0);
259
+ tslib_1.__decorate([
260
+ (0, type_graphql_1.Field)(type => [WorkflowStepInput], { description: 'Workflow steps' }),
261
+ tslib_1.__metadata("design:type", Array)
262
+ ], CreateWorkflowRequest.prototype, "steps", void 0);
263
+ tslib_1.__decorate([
264
+ (0, type_graphql_1.Field)({ nullable: true, defaultValue: true, description: 'Auto-start workflow after creation' }),
265
+ tslib_1.__metadata("design:type", Boolean)
266
+ ], CreateWorkflowRequest.prototype, "autoStart", void 0);
267
+ exports.CreateWorkflowRequest = CreateWorkflowRequest = tslib_1.__decorate([
268
+ (0, type_graphql_1.InputType)()
269
+ ], CreateWorkflowRequest);
270
+ let LabelingWorkflow = class LabelingWorkflow {
271
+ };
272
+ exports.LabelingWorkflow = LabelingWorkflow;
273
+ tslib_1.__decorate([
274
+ (0, type_graphql_1.Field)({ description: 'Workflow ID' }),
275
+ tslib_1.__metadata("design:type", String)
276
+ ], LabelingWorkflow.prototype, "id", void 0);
277
+ tslib_1.__decorate([
278
+ (0, type_graphql_1.Field)({ description: 'Workflow name' }),
279
+ tslib_1.__metadata("design:type", String)
280
+ ], LabelingWorkflow.prototype, "name", void 0);
281
+ tslib_1.__decorate([
282
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Description' }),
283
+ tslib_1.__metadata("design:type", String)
284
+ ], LabelingWorkflow.prototype, "description", void 0);
285
+ tslib_1.__decorate([
286
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Label Studio project ID' }),
287
+ tslib_1.__metadata("design:type", Number)
288
+ ], LabelingWorkflow.prototype, "projectId", void 0);
289
+ tslib_1.__decorate([
290
+ (0, type_graphql_1.Field)(type => TriggerType, { description: 'Trigger type' }),
291
+ tslib_1.__metadata("design:type", String)
292
+ ], LabelingWorkflow.prototype, "triggerType", void 0);
293
+ tslib_1.__decorate([
294
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Trigger configuration' }),
295
+ tslib_1.__metadata("design:type", String)
296
+ ], LabelingWorkflow.prototype, "triggerConfig", void 0);
297
+ tslib_1.__decorate([
298
+ (0, type_graphql_1.Field)(type => [WorkflowStep], { description: 'Workflow steps' }),
299
+ tslib_1.__metadata("design:type", Array)
300
+ ], LabelingWorkflow.prototype, "steps", void 0);
301
+ tslib_1.__decorate([
302
+ (0, type_graphql_1.Field)(type => WorkflowStatus, { description: 'Current status' }),
303
+ tslib_1.__metadata("design:type", String)
304
+ ], LabelingWorkflow.prototype, "status", void 0);
305
+ tslib_1.__decorate([
306
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Last execution time' }),
307
+ tslib_1.__metadata("design:type", Date)
308
+ ], LabelingWorkflow.prototype, "lastExecutedAt", void 0);
309
+ tslib_1.__decorate([
310
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Next scheduled execution' }),
311
+ tslib_1.__metadata("design:type", Date)
312
+ ], LabelingWorkflow.prototype, "nextExecutionAt", void 0);
313
+ tslib_1.__decorate([
314
+ (0, type_graphql_1.Field)({ description: 'Created at' }),
315
+ tslib_1.__metadata("design:type", Date)
316
+ ], LabelingWorkflow.prototype, "createdAt", void 0);
317
+ tslib_1.__decorate([
318
+ (0, type_graphql_1.Field)({ description: 'Updated at' }),
319
+ tslib_1.__metadata("design:type", Date)
320
+ ], LabelingWorkflow.prototype, "updatedAt", void 0);
321
+ exports.LabelingWorkflow = LabelingWorkflow = tslib_1.__decorate([
322
+ (0, type_graphql_1.ObjectType)()
323
+ ], LabelingWorkflow);
324
+ // ============================================================================
325
+ // Workflow Execution
326
+ // ============================================================================
327
+ let ExecuteWorkflowRequest = class ExecuteWorkflowRequest {
328
+ };
329
+ exports.ExecuteWorkflowRequest = ExecuteWorkflowRequest;
330
+ tslib_1.__decorate([
331
+ (0, type_graphql_1.Field)({ description: 'Workflow ID to execute' }),
332
+ tslib_1.__metadata("design:type", String)
333
+ ], ExecuteWorkflowRequest.prototype, "workflowId", void 0);
334
+ tslib_1.__decorate([
335
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Override parameters as JSON' }),
336
+ tslib_1.__metadata("design:type", String)
337
+ ], ExecuteWorkflowRequest.prototype, "parameters", void 0);
338
+ exports.ExecuteWorkflowRequest = ExecuteWorkflowRequest = tslib_1.__decorate([
339
+ (0, type_graphql_1.InputType)()
340
+ ], ExecuteWorkflowRequest);
341
+ let WorkflowExecutionStep = class WorkflowExecutionStep {
342
+ };
343
+ exports.WorkflowExecutionStep = WorkflowExecutionStep;
344
+ tslib_1.__decorate([
345
+ (0, type_graphql_1.Field)({ description: 'Step name' }),
346
+ tslib_1.__metadata("design:type", String)
347
+ ], WorkflowExecutionStep.prototype, "stepName", void 0);
348
+ tslib_1.__decorate([
349
+ (0, type_graphql_1.Field)(type => WorkflowStepType, { description: 'Step type' }),
350
+ tslib_1.__metadata("design:type", String)
351
+ ], WorkflowExecutionStep.prototype, "stepType", void 0);
352
+ tslib_1.__decorate([
353
+ (0, type_graphql_1.Field)({ description: 'Step status: pending, running, completed, failed, skipped' }),
354
+ tslib_1.__metadata("design:type", String)
355
+ ], WorkflowExecutionStep.prototype, "status", void 0);
356
+ tslib_1.__decorate([
357
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Step output data' }),
358
+ tslib_1.__metadata("design:type", String)
359
+ ], WorkflowExecutionStep.prototype, "output", void 0);
360
+ tslib_1.__decorate([
361
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Error message if failed' }),
362
+ tslib_1.__metadata("design:type", String)
363
+ ], WorkflowExecutionStep.prototype, "error", void 0);
364
+ tslib_1.__decorate([
365
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Started at' }),
366
+ tslib_1.__metadata("design:type", Date)
367
+ ], WorkflowExecutionStep.prototype, "startedAt", void 0);
368
+ tslib_1.__decorate([
369
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Completed at' }),
370
+ tslib_1.__metadata("design:type", Date)
371
+ ], WorkflowExecutionStep.prototype, "completedAt", void 0);
372
+ tslib_1.__decorate([
373
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'Duration in milliseconds' }),
374
+ tslib_1.__metadata("design:type", Number)
375
+ ], WorkflowExecutionStep.prototype, "durationMs", void 0);
376
+ exports.WorkflowExecutionStep = WorkflowExecutionStep = tslib_1.__decorate([
377
+ (0, type_graphql_1.ObjectType)()
378
+ ], WorkflowExecutionStep);
379
+ let WorkflowExecution = class WorkflowExecution {
380
+ };
381
+ exports.WorkflowExecution = WorkflowExecution;
382
+ tslib_1.__decorate([
383
+ (0, type_graphql_1.Field)({ description: 'Execution ID' }),
384
+ tslib_1.__metadata("design:type", String)
385
+ ], WorkflowExecution.prototype, "id", void 0);
386
+ tslib_1.__decorate([
387
+ (0, type_graphql_1.Field)({ description: 'Workflow ID' }),
388
+ tslib_1.__metadata("design:type", String)
389
+ ], WorkflowExecution.prototype, "workflowId", void 0);
390
+ tslib_1.__decorate([
391
+ (0, type_graphql_1.Field)({ description: 'Workflow name' }),
392
+ tslib_1.__metadata("design:type", String)
393
+ ], WorkflowExecution.prototype, "workflowName", void 0);
394
+ tslib_1.__decorate([
395
+ (0, type_graphql_1.Field)({ description: 'Execution status: running, completed, failed' }),
396
+ tslib_1.__metadata("design:type", String)
397
+ ], WorkflowExecution.prototype, "status", void 0);
398
+ tslib_1.__decorate([
399
+ (0, type_graphql_1.Field)(type => [WorkflowExecutionStep], { description: 'Step executions' }),
400
+ tslib_1.__metadata("design:type", Array)
401
+ ], WorkflowExecution.prototype, "steps", void 0);
402
+ tslib_1.__decorate([
403
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Overall result summary' }),
404
+ tslib_1.__metadata("design:type", String)
405
+ ], WorkflowExecution.prototype, "summary", void 0);
406
+ tslib_1.__decorate([
407
+ (0, type_graphql_1.Field)({ description: 'Started at' }),
408
+ tslib_1.__metadata("design:type", Date)
409
+ ], WorkflowExecution.prototype, "startedAt", void 0);
410
+ tslib_1.__decorate([
411
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Completed at' }),
412
+ tslib_1.__metadata("design:type", Date)
413
+ ], WorkflowExecution.prototype, "completedAt", void 0);
414
+ tslib_1.__decorate([
415
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'Total duration in milliseconds' }),
416
+ tslib_1.__metadata("design:type", Number)
417
+ ], WorkflowExecution.prototype, "totalDurationMs", void 0);
418
+ tslib_1.__decorate([
419
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Error message if failed' }),
420
+ tslib_1.__metadata("design:type", String)
421
+ ], WorkflowExecution.prototype, "error", void 0);
422
+ exports.WorkflowExecution = WorkflowExecution = tslib_1.__decorate([
423
+ (0, type_graphql_1.ObjectType)()
424
+ ], WorkflowExecution);
425
+ let WorkflowExecutionResult = class WorkflowExecutionResult {
426
+ };
427
+ exports.WorkflowExecutionResult = WorkflowExecutionResult;
428
+ tslib_1.__decorate([
429
+ (0, type_graphql_1.Field)({ description: 'Execution ID' }),
430
+ tslib_1.__metadata("design:type", String)
431
+ ], WorkflowExecutionResult.prototype, "executionId", void 0);
432
+ tslib_1.__decorate([
433
+ (0, type_graphql_1.Field)({ description: 'Execution status' }),
434
+ tslib_1.__metadata("design:type", String)
435
+ ], WorkflowExecutionResult.prototype, "status", void 0);
436
+ tslib_1.__decorate([
437
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Execution summary' }),
438
+ tslib_1.__metadata("design:type", String)
439
+ ], WorkflowExecutionResult.prototype, "summary", void 0);
440
+ tslib_1.__decorate([
441
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Error if failed' }),
442
+ tslib_1.__metadata("design:type", String)
443
+ ], WorkflowExecutionResult.prototype, "error", void 0);
444
+ exports.WorkflowExecutionResult = WorkflowExecutionResult = tslib_1.__decorate([
445
+ (0, type_graphql_1.ObjectType)()
446
+ ], WorkflowExecutionResult);
447
+ // ============================================================================
448
+ // Workflow List and Status
449
+ // ============================================================================
450
+ let LabelingWorkflowList = class LabelingWorkflowList {
451
+ };
452
+ exports.LabelingWorkflowList = LabelingWorkflowList;
453
+ tslib_1.__decorate([
454
+ (0, type_graphql_1.Field)(type => [LabelingWorkflow], { description: 'List of workflows' }),
455
+ tslib_1.__metadata("design:type", Array)
456
+ ], LabelingWorkflowList.prototype, "items", void 0);
457
+ tslib_1.__decorate([
458
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Total count' }),
459
+ tslib_1.__metadata("design:type", Number)
460
+ ], LabelingWorkflowList.prototype, "total", void 0);
461
+ exports.LabelingWorkflowList = LabelingWorkflowList = tslib_1.__decorate([
462
+ (0, type_graphql_1.ObjectType)()
463
+ ], LabelingWorkflowList);
464
+ let WorkflowExecutionList = class WorkflowExecutionList {
465
+ };
466
+ exports.WorkflowExecutionList = WorkflowExecutionList;
467
+ tslib_1.__decorate([
468
+ (0, type_graphql_1.Field)(type => [WorkflowExecution], { description: 'List of executions' }),
469
+ tslib_1.__metadata("design:type", Array)
470
+ ], WorkflowExecutionList.prototype, "items", void 0);
471
+ tslib_1.__decorate([
472
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Total count' }),
473
+ tslib_1.__metadata("design:type", Number)
474
+ ], WorkflowExecutionList.prototype, "total", void 0);
475
+ exports.WorkflowExecutionList = WorkflowExecutionList = tslib_1.__decorate([
476
+ (0, type_graphql_1.ObjectType)()
477
+ ], WorkflowExecutionList);
478
+ let WorkflowStatusRequest = class WorkflowStatusRequest {
479
+ };
480
+ exports.WorkflowStatusRequest = WorkflowStatusRequest;
481
+ tslib_1.__decorate([
482
+ (0, type_graphql_1.Field)({ description: 'Workflow ID' }),
483
+ tslib_1.__metadata("design:type", String)
484
+ ], WorkflowStatusRequest.prototype, "workflowId", void 0);
485
+ exports.WorkflowStatusRequest = WorkflowStatusRequest = tslib_1.__decorate([
486
+ (0, type_graphql_1.InputType)()
487
+ ], WorkflowStatusRequest);
488
+ //# sourceMappingURL=workflow-types.js.map