@things-factory/integration-label-studio 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.
- package/CHANGELOG.md +85 -0
- package/EXTERNAL_DATA_SOURCING.md +484 -0
- package/IMPLEMENTATION_GUIDE.md +469 -0
- package/INTEGRATION.md +279 -0
- package/README.md +1014 -0
- package/SETUP_GUIDE.md +577 -0
- package/TEST_GUIDE.md +387 -0
- package/UI_CUSTOMIZATION.md +395 -0
- package/USER_SYNC_GUIDE.md +514 -0
- package/client/bootstrap.ts +1 -0
- package/client/index.ts +1 -0
- package/client/label-studio-label-page.ts +52 -0
- package/client/label-studio-project-create.ts +216 -0
- package/client/label-studio-project-list.ts +214 -0
- package/client/label-studio-wrapper.ts +294 -0
- package/client/route.ts +15 -0
- package/client/tsconfig.json +13 -0
- package/config/config.development.js +124 -0
- package/config/config.production.js +182 -0
- package/dist-client/bootstrap.d.ts +1 -0
- package/dist-client/bootstrap.js +2 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/index.d.ts +1 -0
- package/dist-client/index.js +2 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/label-studio-label-page.d.ts +8 -0
- package/dist-client/label-studio-label-page.js +54 -0
- package/dist-client/label-studio-label-page.js.map +1 -0
- package/dist-client/label-studio-project-create.d.ts +16 -0
- package/dist-client/label-studio-project-create.js +235 -0
- package/dist-client/label-studio-project-create.js.map +1 -0
- package/dist-client/label-studio-project-list.d.ts +16 -0
- package/dist-client/label-studio-project-list.js +222 -0
- package/dist-client/label-studio-project-list.js.map +1 -0
- package/dist-client/label-studio-wrapper.d.ts +57 -0
- package/dist-client/label-studio-wrapper.js +304 -0
- package/dist-client/label-studio-wrapper.js.map +1 -0
- package/dist-client/route.d.ts +1 -0
- package/dist-client/route.js +14 -0
- package/dist-client/route.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-server/controller/label-studio-role-mapper.d.ts +35 -0
- package/dist-server/controller/label-studio-role-mapper.js +65 -0
- package/dist-server/controller/label-studio-role-mapper.js.map +1 -0
- package/dist-server/controller/user-provisioning-service.d.ts +66 -0
- package/dist-server/controller/user-provisioning-service.js +264 -0
- package/dist-server/controller/user-provisioning-service.js.map +1 -0
- package/dist-server/index.d.ts +7 -0
- package/dist-server/index.js +19 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/route/label-studio-sso.d.ts +2 -0
- package/dist-server/route/label-studio-sso.js +156 -0
- package/dist-server/route/label-studio-sso.js.map +1 -0
- package/dist-server/route/webhook.d.ts +65 -0
- package/dist-server/route/webhook.js +248 -0
- package/dist-server/route/webhook.js.map +1 -0
- package/dist-server/route.d.ts +1 -0
- package/dist-server/route.js +21 -0
- package/dist-server/route.js.map +1 -0
- package/dist-server/service/ai-prediction-service.d.ts +27 -0
- package/dist-server/service/ai-prediction-service.js +222 -0
- package/dist-server/service/ai-prediction-service.js.map +1 -0
- package/dist-server/service/dataset-labeling-integration.d.ts +44 -0
- package/dist-server/service/dataset-labeling-integration.js +512 -0
- package/dist-server/service/dataset-labeling-integration.js.map +1 -0
- package/dist-server/service/external-data-source-service.d.ts +78 -0
- package/dist-server/service/external-data-source-service.js +415 -0
- package/dist-server/service/external-data-source-service.js.map +1 -0
- package/dist-server/service/index.d.ts +12 -0
- package/dist-server/service/index.js +27 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/service/label-studio-sso-service.d.ts +38 -0
- package/dist-server/service/label-studio-sso-service.js +98 -0
- package/dist-server/service/label-studio-sso-service.js.map +1 -0
- package/dist-server/service/ml/ml-backend-service.d.ts +23 -0
- package/dist-server/service/ml/ml-backend-service.js +153 -0
- package/dist-server/service/ml/ml-backend-service.js.map +1 -0
- package/dist-server/service/prediction/prediction-management.d.ts +32 -0
- package/dist-server/service/prediction/prediction-management.js +299 -0
- package/dist-server/service/prediction/prediction-management.js.map +1 -0
- package/dist-server/service/project/project-management.d.ts +36 -0
- package/dist-server/service/project/project-management.js +309 -0
- package/dist-server/service/project/project-management.js.map +1 -0
- package/dist-server/service/task/task-management.d.ts +42 -0
- package/dist-server/service/task/task-management.js +372 -0
- package/dist-server/service/task/task-management.js.map +1 -0
- package/dist-server/service/user-provisioning/user-sync-mutation.d.ts +28 -0
- package/dist-server/service/user-provisioning/user-sync-mutation.js +111 -0
- package/dist-server/service/user-provisioning/user-sync-mutation.js.map +1 -0
- package/dist-server/service/webhook/webhook-management.d.ts +21 -0
- package/dist-server/service/webhook/webhook-management.js +134 -0
- package/dist-server/service/webhook/webhook-management.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/dist-server/types/dataset-labeling-types.d.ts +71 -0
- package/dist-server/types/dataset-labeling-types.js +259 -0
- package/dist-server/types/dataset-labeling-types.js.map +1 -0
- package/dist-server/types/label-studio-types.d.ts +128 -0
- package/dist-server/types/label-studio-types.js +494 -0
- package/dist-server/types/label-studio-types.js.map +1 -0
- package/dist-server/types/prediction-types.d.ts +39 -0
- package/dist-server/types/prediction-types.js +121 -0
- package/dist-server/types/prediction-types.js.map +1 -0
- package/dist-server/utils/annotation-exporter.d.ts +104 -0
- package/dist-server/utils/annotation-exporter.js +261 -0
- package/dist-server/utils/annotation-exporter.js.map +1 -0
- package/dist-server/utils/label-config-builder.d.ts +117 -0
- package/dist-server/utils/label-config-builder.js +286 -0
- package/dist-server/utils/label-config-builder.js.map +1 -0
- package/dist-server/utils/label-studio-api-client.d.ts +180 -0
- package/dist-server/utils/label-studio-api-client.js +401 -0
- package/dist-server/utils/label-studio-api-client.js.map +1 -0
- package/dist-server/utils/media-url-extractor.d.ts +45 -0
- package/dist-server/utils/media-url-extractor.js +152 -0
- package/dist-server/utils/media-url-extractor.js.map +1 -0
- package/dist-server/utils/task-transformer.d.ts +108 -0
- package/dist-server/utils/task-transformer.js +260 -0
- package/dist-server/utils/task-transformer.js.map +1 -0
- package/package.json +47 -0
- package/server/SERVER_STRUCTURE.md +351 -0
- package/server/controller/label-studio-role-mapper.ts +76 -0
- package/server/controller/user-provisioning-service.ts +340 -0
- package/server/index.ts +19 -0
- package/server/route/label-studio-sso.ts +194 -0
- package/server/route/webhook.ts +304 -0
- package/server/route.ts +35 -0
- package/server/service/ai-prediction-service.ts +239 -0
- package/server/service/dataset-labeling-integration.ts +590 -0
- package/server/service/external-data-source-service.ts +438 -0
- package/server/service/index.ts +24 -0
- package/server/service/label-studio-sso-service.ts +108 -0
- package/server/service/labeling-scenario-service.ts.deprecated +566 -0
- package/server/service/ml/ml-backend-service.ts +127 -0
- package/server/service/prediction/prediction-management.ts +281 -0
- package/server/service/project/project-management.ts +284 -0
- package/server/service/task/task-management.ts +363 -0
- package/server/service/user-provisioning/user-sync-mutation.ts +80 -0
- package/server/service/webhook/webhook-management.ts +109 -0
- package/server/tsconfig.json +11 -0
- package/server/types/dataset-labeling-types.ts +181 -0
- package/server/types/global.d.ts +23 -0
- package/server/types/label-studio-types.ts +346 -0
- package/server/types/prediction-types.ts +86 -0
- package/server/types/scenario-types.ts.deprecated +362 -0
- package/server/utils/annotation-exporter.ts +340 -0
- package/server/utils/label-config-builder.ts +340 -0
- package/server/utils/label-studio-api-client.ts +487 -0
- package/server/utils/media-url-extractor.ts +193 -0
- package/server/utils/task-transformer.ts +342 -0
- package/test-ai-prediction.js +268 -0
- package/test-dataset-integration.js +449 -0
- package/test-simple.js +89 -0
- package/things-factory.config.js +12 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dataset Labeling Integration Types
|
|
3
|
+
*
|
|
4
|
+
* Types for integrating DataSample with Label Studio tasks and AI predictions
|
|
5
|
+
*/
|
|
6
|
+
export declare class CreateLabelingTasksRequest {
|
|
7
|
+
projectId: number;
|
|
8
|
+
dataSetId: string;
|
|
9
|
+
imageField?: string;
|
|
10
|
+
autoGeneratePredictions?: boolean;
|
|
11
|
+
confidenceThreshold?: number;
|
|
12
|
+
modelId?: string;
|
|
13
|
+
sinceDate?: Date;
|
|
14
|
+
limit?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare class TaskCreationResult {
|
|
17
|
+
totalSamples: number;
|
|
18
|
+
tasksCreated: number;
|
|
19
|
+
tasksFailed: number;
|
|
20
|
+
tasksSkipped: number;
|
|
21
|
+
taskIds: number[];
|
|
22
|
+
predictionsCreated?: number;
|
|
23
|
+
error?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare class SyncAnnotationsRequest {
|
|
26
|
+
projectId: number;
|
|
27
|
+
dataSetId: string;
|
|
28
|
+
completedOnly?: boolean;
|
|
29
|
+
sinceDate?: Date;
|
|
30
|
+
}
|
|
31
|
+
export declare class SyncAnnotationsResult {
|
|
32
|
+
totalAnnotations: number;
|
|
33
|
+
samplesUpdated: number;
|
|
34
|
+
updatesFailed: number;
|
|
35
|
+
skipped: number;
|
|
36
|
+
error?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare class DatasetLabelingStatus {
|
|
39
|
+
dataSetId: string;
|
|
40
|
+
dataSetName: string;
|
|
41
|
+
totalSamples: number;
|
|
42
|
+
tasksCreated: number;
|
|
43
|
+
withPredictions: number;
|
|
44
|
+
withAnnotations: number;
|
|
45
|
+
annotationsCompleted: number;
|
|
46
|
+
notProcessed: number;
|
|
47
|
+
completionRate: number;
|
|
48
|
+
projectId?: number;
|
|
49
|
+
lastSyncedAt?: Date;
|
|
50
|
+
}
|
|
51
|
+
export declare class DataSampleTaskMapping {
|
|
52
|
+
dataSampleId: string;
|
|
53
|
+
dataSampleName: string;
|
|
54
|
+
taskId: number;
|
|
55
|
+
imageUrl?: string;
|
|
56
|
+
createdAt?: Date;
|
|
57
|
+
hasPrediction?: boolean;
|
|
58
|
+
hasAnnotation?: boolean;
|
|
59
|
+
isCompleted?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export declare class DatasetLabelingStatusRequest {
|
|
62
|
+
dataSetId: string;
|
|
63
|
+
projectId?: number;
|
|
64
|
+
}
|
|
65
|
+
export declare class GeneratePredictionsForDatasetRequest {
|
|
66
|
+
dataSetId: string;
|
|
67
|
+
projectId: number;
|
|
68
|
+
modelId?: string;
|
|
69
|
+
confidenceThreshold?: number;
|
|
70
|
+
forceRegenerate?: boolean;
|
|
71
|
+
}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GeneratePredictionsForDatasetRequest = exports.DatasetLabelingStatusRequest = exports.DataSampleTaskMapping = exports.DatasetLabelingStatus = exports.SyncAnnotationsResult = exports.SyncAnnotationsRequest = exports.TaskCreationResult = exports.CreateLabelingTasksRequest = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
/**
|
|
7
|
+
* Dataset Labeling Integration Types
|
|
8
|
+
*
|
|
9
|
+
* Types for integrating DataSample with Label Studio tasks and AI predictions
|
|
10
|
+
*/
|
|
11
|
+
let CreateLabelingTasksRequest = class CreateLabelingTasksRequest {
|
|
12
|
+
};
|
|
13
|
+
exports.CreateLabelingTasksRequest = CreateLabelingTasksRequest;
|
|
14
|
+
tslib_1.__decorate([
|
|
15
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Label Studio project ID' }),
|
|
16
|
+
tslib_1.__metadata("design:type", Number)
|
|
17
|
+
], CreateLabelingTasksRequest.prototype, "projectId", void 0);
|
|
18
|
+
tslib_1.__decorate([
|
|
19
|
+
(0, type_graphql_1.Field)({ description: 'DataSet ID to sync' }),
|
|
20
|
+
tslib_1.__metadata("design:type", String)
|
|
21
|
+
], CreateLabelingTasksRequest.prototype, "dataSetId", void 0);
|
|
22
|
+
tslib_1.__decorate([
|
|
23
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Image field name in DataSample.data or DataSample.rawData' }),
|
|
24
|
+
tslib_1.__metadata("design:type", String)
|
|
25
|
+
], CreateLabelingTasksRequest.prototype, "imageField", void 0);
|
|
26
|
+
tslib_1.__decorate([
|
|
27
|
+
(0, type_graphql_1.Field)({ nullable: true, defaultValue: true, description: 'Auto-generate AI predictions for created tasks' }),
|
|
28
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
29
|
+
], CreateLabelingTasksRequest.prototype, "autoGeneratePredictions", void 0);
|
|
30
|
+
tslib_1.__decorate([
|
|
31
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true, description: 'Confidence threshold for AI predictions' }),
|
|
32
|
+
tslib_1.__metadata("design:type", Number)
|
|
33
|
+
], CreateLabelingTasksRequest.prototype, "confidenceThreshold", void 0);
|
|
34
|
+
tslib_1.__decorate([
|
|
35
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'AI model ID to use for predictions' }),
|
|
36
|
+
tslib_1.__metadata("design:type", String)
|
|
37
|
+
], CreateLabelingTasksRequest.prototype, "modelId", void 0);
|
|
38
|
+
tslib_1.__decorate([
|
|
39
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Only create tasks for samples after this date' }),
|
|
40
|
+
tslib_1.__metadata("design:type", Date)
|
|
41
|
+
], CreateLabelingTasksRequest.prototype, "sinceDate", void 0);
|
|
42
|
+
tslib_1.__decorate([
|
|
43
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Maximum number of tasks to create' }),
|
|
44
|
+
tslib_1.__metadata("design:type", Number)
|
|
45
|
+
], CreateLabelingTasksRequest.prototype, "limit", void 0);
|
|
46
|
+
exports.CreateLabelingTasksRequest = CreateLabelingTasksRequest = tslib_1.__decorate([
|
|
47
|
+
(0, type_graphql_1.InputType)({ description: 'Request to create Label Studio tasks from DataSamples' })
|
|
48
|
+
], CreateLabelingTasksRequest);
|
|
49
|
+
let TaskCreationResult = class TaskCreationResult {
|
|
50
|
+
};
|
|
51
|
+
exports.TaskCreationResult = TaskCreationResult;
|
|
52
|
+
tslib_1.__decorate([
|
|
53
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Total DataSamples processed' }),
|
|
54
|
+
tslib_1.__metadata("design:type", Number)
|
|
55
|
+
], TaskCreationResult.prototype, "totalSamples", void 0);
|
|
56
|
+
tslib_1.__decorate([
|
|
57
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Number of tasks successfully created' }),
|
|
58
|
+
tslib_1.__metadata("design:type", Number)
|
|
59
|
+
], TaskCreationResult.prototype, "tasksCreated", void 0);
|
|
60
|
+
tslib_1.__decorate([
|
|
61
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Number of tasks that failed to create' }),
|
|
62
|
+
tslib_1.__metadata("design:type", Number)
|
|
63
|
+
], TaskCreationResult.prototype, "tasksFailed", void 0);
|
|
64
|
+
tslib_1.__decorate([
|
|
65
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Number of samples skipped (no image, already exists, etc.)' }),
|
|
66
|
+
tslib_1.__metadata("design:type", Number)
|
|
67
|
+
], TaskCreationResult.prototype, "tasksSkipped", void 0);
|
|
68
|
+
tslib_1.__decorate([
|
|
69
|
+
(0, type_graphql_1.Field)(type => [type_graphql_1.Int], { description: 'Array of created Label Studio task IDs' }),
|
|
70
|
+
tslib_1.__metadata("design:type", Array)
|
|
71
|
+
], TaskCreationResult.prototype, "taskIds", void 0);
|
|
72
|
+
tslib_1.__decorate([
|
|
73
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'Number of AI predictions generated' }),
|
|
74
|
+
tslib_1.__metadata("design:type", Number)
|
|
75
|
+
], TaskCreationResult.prototype, "predictionsCreated", void 0);
|
|
76
|
+
tslib_1.__decorate([
|
|
77
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Error message if operation partially failed' }),
|
|
78
|
+
tslib_1.__metadata("design:type", String)
|
|
79
|
+
], TaskCreationResult.prototype, "error", void 0);
|
|
80
|
+
exports.TaskCreationResult = TaskCreationResult = tslib_1.__decorate([
|
|
81
|
+
(0, type_graphql_1.ObjectType)({ description: 'Result of task creation from dataset' })
|
|
82
|
+
], TaskCreationResult);
|
|
83
|
+
let SyncAnnotationsRequest = class SyncAnnotationsRequest {
|
|
84
|
+
};
|
|
85
|
+
exports.SyncAnnotationsRequest = SyncAnnotationsRequest;
|
|
86
|
+
tslib_1.__decorate([
|
|
87
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Label Studio project ID' }),
|
|
88
|
+
tslib_1.__metadata("design:type", Number)
|
|
89
|
+
], SyncAnnotationsRequest.prototype, "projectId", void 0);
|
|
90
|
+
tslib_1.__decorate([
|
|
91
|
+
(0, type_graphql_1.Field)({ description: 'DataSet ID to sync annotations to' }),
|
|
92
|
+
tslib_1.__metadata("design:type", String)
|
|
93
|
+
], SyncAnnotationsRequest.prototype, "dataSetId", void 0);
|
|
94
|
+
tslib_1.__decorate([
|
|
95
|
+
(0, type_graphql_1.Field)({ nullable: true, defaultValue: false, description: 'Only sync completed annotations' }),
|
|
96
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
97
|
+
], SyncAnnotationsRequest.prototype, "completedOnly", void 0);
|
|
98
|
+
tslib_1.__decorate([
|
|
99
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Only sync annotations updated after this date' }),
|
|
100
|
+
tslib_1.__metadata("design:type", Date)
|
|
101
|
+
], SyncAnnotationsRequest.prototype, "sinceDate", void 0);
|
|
102
|
+
exports.SyncAnnotationsRequest = SyncAnnotationsRequest = tslib_1.__decorate([
|
|
103
|
+
(0, type_graphql_1.InputType)({ description: 'Request to sync Label Studio annotations back to DataSamples' })
|
|
104
|
+
], SyncAnnotationsRequest);
|
|
105
|
+
let SyncAnnotationsResult = class SyncAnnotationsResult {
|
|
106
|
+
};
|
|
107
|
+
exports.SyncAnnotationsResult = SyncAnnotationsResult;
|
|
108
|
+
tslib_1.__decorate([
|
|
109
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Total annotations processed' }),
|
|
110
|
+
tslib_1.__metadata("design:type", Number)
|
|
111
|
+
], SyncAnnotationsResult.prototype, "totalAnnotations", void 0);
|
|
112
|
+
tslib_1.__decorate([
|
|
113
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Number of DataSamples successfully updated' }),
|
|
114
|
+
tslib_1.__metadata("design:type", Number)
|
|
115
|
+
], SyncAnnotationsResult.prototype, "samplesUpdated", void 0);
|
|
116
|
+
tslib_1.__decorate([
|
|
117
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Number of updates that failed' }),
|
|
118
|
+
tslib_1.__metadata("design:type", Number)
|
|
119
|
+
], SyncAnnotationsResult.prototype, "updatesFailed", void 0);
|
|
120
|
+
tslib_1.__decorate([
|
|
121
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Number of annotations skipped' }),
|
|
122
|
+
tslib_1.__metadata("design:type", Number)
|
|
123
|
+
], SyncAnnotationsResult.prototype, "skipped", void 0);
|
|
124
|
+
tslib_1.__decorate([
|
|
125
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Error message if operation partially failed' }),
|
|
126
|
+
tslib_1.__metadata("design:type", String)
|
|
127
|
+
], SyncAnnotationsResult.prototype, "error", void 0);
|
|
128
|
+
exports.SyncAnnotationsResult = SyncAnnotationsResult = tslib_1.__decorate([
|
|
129
|
+
(0, type_graphql_1.ObjectType)({ description: 'Result of syncing annotations to dataset' })
|
|
130
|
+
], SyncAnnotationsResult);
|
|
131
|
+
let DatasetLabelingStatus = class DatasetLabelingStatus {
|
|
132
|
+
};
|
|
133
|
+
exports.DatasetLabelingStatus = DatasetLabelingStatus;
|
|
134
|
+
tslib_1.__decorate([
|
|
135
|
+
(0, type_graphql_1.Field)({ description: 'DataSet ID' }),
|
|
136
|
+
tslib_1.__metadata("design:type", String)
|
|
137
|
+
], DatasetLabelingStatus.prototype, "dataSetId", void 0);
|
|
138
|
+
tslib_1.__decorate([
|
|
139
|
+
(0, type_graphql_1.Field)({ description: 'DataSet name' }),
|
|
140
|
+
tslib_1.__metadata("design:type", String)
|
|
141
|
+
], DatasetLabelingStatus.prototype, "dataSetName", void 0);
|
|
142
|
+
tslib_1.__decorate([
|
|
143
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Total number of DataSamples in the dataset' }),
|
|
144
|
+
tslib_1.__metadata("design:type", Number)
|
|
145
|
+
], DatasetLabelingStatus.prototype, "totalSamples", void 0);
|
|
146
|
+
tslib_1.__decorate([
|
|
147
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Number of samples with Label Studio tasks' }),
|
|
148
|
+
tslib_1.__metadata("design:type", Number)
|
|
149
|
+
], DatasetLabelingStatus.prototype, "tasksCreated", void 0);
|
|
150
|
+
tslib_1.__decorate([
|
|
151
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Number of samples with AI predictions' }),
|
|
152
|
+
tslib_1.__metadata("design:type", Number)
|
|
153
|
+
], DatasetLabelingStatus.prototype, "withPredictions", void 0);
|
|
154
|
+
tslib_1.__decorate([
|
|
155
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Number of samples with human annotations' }),
|
|
156
|
+
tslib_1.__metadata("design:type", Number)
|
|
157
|
+
], DatasetLabelingStatus.prototype, "withAnnotations", void 0);
|
|
158
|
+
tslib_1.__decorate([
|
|
159
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Number of samples with completed annotations' }),
|
|
160
|
+
tslib_1.__metadata("design:type", Number)
|
|
161
|
+
], DatasetLabelingStatus.prototype, "annotationsCompleted", void 0);
|
|
162
|
+
tslib_1.__decorate([
|
|
163
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Number of samples not yet processed' }),
|
|
164
|
+
tslib_1.__metadata("design:type", Number)
|
|
165
|
+
], DatasetLabelingStatus.prototype, "notProcessed", void 0);
|
|
166
|
+
tslib_1.__decorate([
|
|
167
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { description: 'Labeling completion rate (0-1)' }),
|
|
168
|
+
tslib_1.__metadata("design:type", Number)
|
|
169
|
+
], DatasetLabelingStatus.prototype, "completionRate", void 0);
|
|
170
|
+
tslib_1.__decorate([
|
|
171
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Associated Label Studio project ID' }),
|
|
172
|
+
tslib_1.__metadata("design:type", Number)
|
|
173
|
+
], DatasetLabelingStatus.prototype, "projectId", void 0);
|
|
174
|
+
tslib_1.__decorate([
|
|
175
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Last sync timestamp' }),
|
|
176
|
+
tslib_1.__metadata("design:type", Date)
|
|
177
|
+
], DatasetLabelingStatus.prototype, "lastSyncedAt", void 0);
|
|
178
|
+
exports.DatasetLabelingStatus = DatasetLabelingStatus = tslib_1.__decorate([
|
|
179
|
+
(0, type_graphql_1.ObjectType)({ description: 'Labeling status for a dataset' })
|
|
180
|
+
], DatasetLabelingStatus);
|
|
181
|
+
let DataSampleTaskMapping = class DataSampleTaskMapping {
|
|
182
|
+
};
|
|
183
|
+
exports.DataSampleTaskMapping = DataSampleTaskMapping;
|
|
184
|
+
tslib_1.__decorate([
|
|
185
|
+
(0, type_graphql_1.Field)({ description: 'DataSample ID' }),
|
|
186
|
+
tslib_1.__metadata("design:type", String)
|
|
187
|
+
], DataSampleTaskMapping.prototype, "dataSampleId", void 0);
|
|
188
|
+
tslib_1.__decorate([
|
|
189
|
+
(0, type_graphql_1.Field)({ description: 'DataSample name' }),
|
|
190
|
+
tslib_1.__metadata("design:type", String)
|
|
191
|
+
], DataSampleTaskMapping.prototype, "dataSampleName", void 0);
|
|
192
|
+
tslib_1.__decorate([
|
|
193
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Label Studio task ID' }),
|
|
194
|
+
tslib_1.__metadata("design:type", Number)
|
|
195
|
+
], DataSampleTaskMapping.prototype, "taskId", void 0);
|
|
196
|
+
tslib_1.__decorate([
|
|
197
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Image URL used in the task' }),
|
|
198
|
+
tslib_1.__metadata("design:type", String)
|
|
199
|
+
], DataSampleTaskMapping.prototype, "imageUrl", void 0);
|
|
200
|
+
tslib_1.__decorate([
|
|
201
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Task creation timestamp' }),
|
|
202
|
+
tslib_1.__metadata("design:type", Date)
|
|
203
|
+
], DataSampleTaskMapping.prototype, "createdAt", void 0);
|
|
204
|
+
tslib_1.__decorate([
|
|
205
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Whether task has AI prediction' }),
|
|
206
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
207
|
+
], DataSampleTaskMapping.prototype, "hasPrediction", void 0);
|
|
208
|
+
tslib_1.__decorate([
|
|
209
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Whether task has human annotation' }),
|
|
210
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
211
|
+
], DataSampleTaskMapping.prototype, "hasAnnotation", void 0);
|
|
212
|
+
tslib_1.__decorate([
|
|
213
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Whether annotation is completed' }),
|
|
214
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
215
|
+
], DataSampleTaskMapping.prototype, "isCompleted", void 0);
|
|
216
|
+
exports.DataSampleTaskMapping = DataSampleTaskMapping = tslib_1.__decorate([
|
|
217
|
+
(0, type_graphql_1.ObjectType)({ description: 'Mapping between DataSample and Label Studio task' })
|
|
218
|
+
], DataSampleTaskMapping);
|
|
219
|
+
let DatasetLabelingStatusRequest = class DatasetLabelingStatusRequest {
|
|
220
|
+
};
|
|
221
|
+
exports.DatasetLabelingStatusRequest = DatasetLabelingStatusRequest;
|
|
222
|
+
tslib_1.__decorate([
|
|
223
|
+
(0, type_graphql_1.Field)({ description: 'DataSet ID' }),
|
|
224
|
+
tslib_1.__metadata("design:type", String)
|
|
225
|
+
], DatasetLabelingStatusRequest.prototype, "dataSetId", void 0);
|
|
226
|
+
tslib_1.__decorate([
|
|
227
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'Associated Label Studio project ID' }),
|
|
228
|
+
tslib_1.__metadata("design:type", Number)
|
|
229
|
+
], DatasetLabelingStatusRequest.prototype, "projectId", void 0);
|
|
230
|
+
exports.DatasetLabelingStatusRequest = DatasetLabelingStatusRequest = tslib_1.__decorate([
|
|
231
|
+
(0, type_graphql_1.InputType)({ description: 'Request to query dataset labeling status' })
|
|
232
|
+
], DatasetLabelingStatusRequest);
|
|
233
|
+
let GeneratePredictionsForDatasetRequest = class GeneratePredictionsForDatasetRequest {
|
|
234
|
+
};
|
|
235
|
+
exports.GeneratePredictionsForDatasetRequest = GeneratePredictionsForDatasetRequest;
|
|
236
|
+
tslib_1.__decorate([
|
|
237
|
+
(0, type_graphql_1.Field)({ description: 'DataSet ID' }),
|
|
238
|
+
tslib_1.__metadata("design:type", String)
|
|
239
|
+
], GeneratePredictionsForDatasetRequest.prototype, "dataSetId", void 0);
|
|
240
|
+
tslib_1.__decorate([
|
|
241
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Label Studio project ID' }),
|
|
242
|
+
tslib_1.__metadata("design:type", Number)
|
|
243
|
+
], GeneratePredictionsForDatasetRequest.prototype, "projectId", void 0);
|
|
244
|
+
tslib_1.__decorate([
|
|
245
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'AI model ID to use' }),
|
|
246
|
+
tslib_1.__metadata("design:type", String)
|
|
247
|
+
], GeneratePredictionsForDatasetRequest.prototype, "modelId", void 0);
|
|
248
|
+
tslib_1.__decorate([
|
|
249
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true, description: 'Confidence threshold' }),
|
|
250
|
+
tslib_1.__metadata("design:type", Number)
|
|
251
|
+
], GeneratePredictionsForDatasetRequest.prototype, "confidenceThreshold", void 0);
|
|
252
|
+
tslib_1.__decorate([
|
|
253
|
+
(0, type_graphql_1.Field)({ nullable: true, defaultValue: false, description: 'Regenerate predictions even if they already exist' }),
|
|
254
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
255
|
+
], GeneratePredictionsForDatasetRequest.prototype, "forceRegenerate", void 0);
|
|
256
|
+
exports.GeneratePredictionsForDatasetRequest = GeneratePredictionsForDatasetRequest = tslib_1.__decorate([
|
|
257
|
+
(0, type_graphql_1.InputType)({ description: 'Request to generate predictions for existing tasks' })
|
|
258
|
+
], GeneratePredictionsForDatasetRequest);
|
|
259
|
+
//# sourceMappingURL=dataset-labeling-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataset-labeling-types.js","sourceRoot":"","sources":["../../server/types/dataset-labeling-types.ts"],"names":[],"mappings":";;;;AAAA,+CAAuE;AAEvE;;;;GAIG;AAGI,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;CAwBtC,CAAA;AAxBY,gEAA0B;AAErC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;;6DAC9C;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;;6DAC5B;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,2DAA2D,EAAE,CAAC;;8DACjF;AAGnB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,gDAAgD,EAAE,CAAC;;2EAC5E;AAGjC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,yCAAyC,EAAE,CAAC;;uEACrE;AAG5B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,oCAAoC,EAAE,CAAC;;2DAC7D;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,I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Types\n *\n * Types for integrating DataSample with Label Studio tasks and AI predictions\n */\n\n@InputType({ description: 'Request to create Label Studio tasks from DataSamples' })\nexport class CreateLabelingTasksRequest {\n @Field(type => Int, { description: 'Label Studio project ID' })\n projectId: number\n\n @Field({ description: 'DataSet ID to sync' })\n dataSetId: string\n\n @Field({ nullable: true, description: 'Image field name in DataSample.data or DataSample.rawData' })\n imageField?: string\n\n @Field({ nullable: true, defaultValue: true, description: 'Auto-generate AI predictions for created tasks' })\n autoGeneratePredictions?: boolean\n\n @Field(type => Float, { nullable: true, description: 'Confidence threshold for AI predictions' })\n confidenceThreshold?: number\n\n @Field({ nullable: true, description: 'AI model ID to use for predictions' })\n modelId?: string\n\n @Field({ nullable: true, description: 'Only create tasks for samples after this date' })\n sinceDate?: Date\n\n @Field({ nullable: true, description: 'Maximum number of tasks to create' })\n limit?: number\n}\n\n@ObjectType({ description: 'Result of task creation from dataset' })\nexport class TaskCreationResult {\n @Field(type => Int, { description: 'Total DataSamples processed' })\n totalSamples: number\n\n @Field(type => Int, { description: 'Number of tasks successfully created' })\n tasksCreated: number\n\n @Field(type => Int, { description: 'Number of tasks that failed to create' })\n tasksFailed: number\n\n @Field(type => Int, { description: 'Number of samples skipped (no image, already exists, etc.)' })\n tasksSkipped: number\n\n @Field(type => [Int], { description: 'Array of created Label Studio task IDs' })\n taskIds: number[]\n\n @Field(type => Int, { nullable: true, description: 'Number of AI predictions generated' })\n predictionsCreated?: number\n\n @Field({ nullable: true, description: 'Error message if operation partially failed' })\n error?: string\n}\n\n@InputType({ description: 'Request to sync Label Studio annotations back to DataSamples' })\nexport class SyncAnnotationsRequest {\n @Field(type => Int, { description: 'Label Studio project ID' })\n projectId: number\n\n @Field({ description: 'DataSet ID to sync annotations to' })\n dataSetId: string\n\n @Field({ nullable: true, defaultValue: false, description: 'Only sync completed annotations' })\n completedOnly?: boolean\n\n @Field({ nullable: true, description: 'Only sync annotations updated after this date' })\n sinceDate?: Date\n}\n\n@ObjectType({ description: 'Result of syncing annotations to dataset' })\nexport class SyncAnnotationsResult {\n @Field(type => Int, { description: 'Total annotations processed' })\n totalAnnotations: number\n\n @Field(type => Int, { description: 'Number of DataSamples successfully updated' })\n samplesUpdated: number\n\n @Field(type => Int, { description: 'Number of updates that failed' })\n updatesFailed: number\n\n @Field(type => Int, { description: 'Number of annotations skipped' })\n skipped: number\n\n @Field({ nullable: true, description: 'Error message if operation partially failed' })\n error?: string\n}\n\n@ObjectType({ description: 'Labeling status for a dataset' })\nexport class DatasetLabelingStatus {\n @Field({ description: 'DataSet ID' })\n dataSetId: string\n\n @Field({ description: 'DataSet name' })\n dataSetName: string\n\n @Field(type => Int, { description: 'Total number of DataSamples in the dataset' })\n totalSamples: number\n\n @Field(type => Int, { description: 'Number of samples with Label Studio tasks' })\n tasksCreated: number\n\n @Field(type => Int, { description: 'Number of samples with AI predictions' })\n withPredictions: number\n\n @Field(type => Int, { description: 'Number of samples with human annotations' })\n withAnnotations: number\n\n @Field(type => Int, { description: 'Number of samples with completed annotations' })\n annotationsCompleted: number\n\n @Field(type => Int, { description: 'Number of samples not yet processed' })\n notProcessed: number\n\n @Field(type => Float, { description: 'Labeling completion rate (0-1)' })\n completionRate: number\n\n @Field({ nullable: true, description: 'Associated Label Studio project ID' })\n projectId?: number\n\n @Field({ nullable: true, description: 'Last sync timestamp' })\n lastSyncedAt?: Date\n}\n\n@ObjectType({ description: 'Mapping between DataSample and Label Studio task' })\nexport class DataSampleTaskMapping {\n @Field({ description: 'DataSample ID' })\n dataSampleId: string\n\n @Field({ description: 'DataSample name' })\n dataSampleName: string\n\n @Field(type => Int, { description: 'Label Studio task ID' })\n taskId: number\n\n @Field({ nullable: true, description: 'Image URL used in the task' })\n imageUrl?: string\n\n @Field({ nullable: true, description: 'Task creation timestamp' })\n createdAt?: Date\n\n @Field({ nullable: true, description: 'Whether task has AI prediction' })\n hasPrediction?: boolean\n\n @Field({ nullable: true, description: 'Whether task has human annotation' })\n hasAnnotation?: boolean\n\n @Field({ nullable: true, description: 'Whether annotation is completed' })\n isCompleted?: boolean\n}\n\n@InputType({ description: 'Request to query dataset labeling status' })\nexport class DatasetLabelingStatusRequest {\n @Field({ description: 'DataSet ID' })\n dataSetId: string\n\n @Field(type => Int, { nullable: true, description: 'Associated Label Studio project ID' })\n projectId?: number\n}\n\n@InputType({ description: 'Request to generate predictions for existing tasks' })\nexport class GeneratePredictionsForDatasetRequest {\n @Field({ description: 'DataSet ID' })\n dataSetId: string\n\n @Field(type => Int, { description: 'Label Studio project ID' })\n projectId: number\n\n @Field({ nullable: true, description: 'AI model ID to use' })\n modelId?: string\n\n @Field(type => Float, { nullable: true, description: 'Confidence threshold' })\n confidenceThreshold?: number\n\n @Field({ nullable: true, defaultValue: false, description: 'Regenerate predictions even if they already exist' })\n forceRegenerate?: boolean\n}\n"]}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
export declare class LabelStudioProject {
|
|
2
|
+
id: number;
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
labelConfig: string;
|
|
6
|
+
expertInstruction?: string;
|
|
7
|
+
taskCount: number;
|
|
8
|
+
completedTaskCount: number;
|
|
9
|
+
completionRate: number;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
updatedAt: Date;
|
|
12
|
+
}
|
|
13
|
+
export declare class CreateProjectInput {
|
|
14
|
+
title: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
labelConfig: string;
|
|
17
|
+
expertInstruction?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare class LabelConfigSpecInput {
|
|
20
|
+
dataType: string;
|
|
21
|
+
dataName?: string;
|
|
22
|
+
controls: string;
|
|
23
|
+
}
|
|
24
|
+
export declare class CreateProjectWithSpecInput {
|
|
25
|
+
title: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
labelConfigSpec: LabelConfigSpecInput;
|
|
28
|
+
expertInstruction?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare class ExportAnnotationsInput {
|
|
31
|
+
format: string;
|
|
32
|
+
taskIds?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare class AnnotationExportResult {
|
|
35
|
+
data: string;
|
|
36
|
+
count: number;
|
|
37
|
+
format: string;
|
|
38
|
+
}
|
|
39
|
+
export declare class LabelStudioTask {
|
|
40
|
+
id: number;
|
|
41
|
+
data: string;
|
|
42
|
+
annotationCount: number;
|
|
43
|
+
isCompleted: boolean;
|
|
44
|
+
createdAt?: Date;
|
|
45
|
+
}
|
|
46
|
+
export declare class TaskDataInput {
|
|
47
|
+
data: string;
|
|
48
|
+
}
|
|
49
|
+
export declare class TaskTransformRuleInput {
|
|
50
|
+
dataFields: string;
|
|
51
|
+
predictions?: string;
|
|
52
|
+
meta?: string;
|
|
53
|
+
}
|
|
54
|
+
export declare class ImportTasksWithTransformInput {
|
|
55
|
+
sourceData: string;
|
|
56
|
+
transformRule: TaskTransformRuleInput;
|
|
57
|
+
}
|
|
58
|
+
export declare class TaskImportResult {
|
|
59
|
+
imported: number;
|
|
60
|
+
failed: number;
|
|
61
|
+
taskIds: number[];
|
|
62
|
+
errors?: string[];
|
|
63
|
+
}
|
|
64
|
+
export declare class LabelStudioAnnotation {
|
|
65
|
+
id: number;
|
|
66
|
+
taskId: number;
|
|
67
|
+
result: string;
|
|
68
|
+
completedBy: string;
|
|
69
|
+
createdAt: Date;
|
|
70
|
+
leadTime?: number;
|
|
71
|
+
}
|
|
72
|
+
export declare class LabelStudioPrediction {
|
|
73
|
+
id: number;
|
|
74
|
+
taskId: number;
|
|
75
|
+
result: string;
|
|
76
|
+
score?: number;
|
|
77
|
+
modelVersion?: string;
|
|
78
|
+
createdAt?: Date;
|
|
79
|
+
}
|
|
80
|
+
export declare class PredictionInput {
|
|
81
|
+
taskId: number;
|
|
82
|
+
result: string;
|
|
83
|
+
score?: number;
|
|
84
|
+
modelVersion?: string;
|
|
85
|
+
}
|
|
86
|
+
export declare class BulkPredictionInput {
|
|
87
|
+
taskId: number;
|
|
88
|
+
result: string;
|
|
89
|
+
score?: number;
|
|
90
|
+
modelVersion?: string;
|
|
91
|
+
}
|
|
92
|
+
export declare class PredictionImportResult {
|
|
93
|
+
created: number;
|
|
94
|
+
failed: number;
|
|
95
|
+
errors?: string[];
|
|
96
|
+
}
|
|
97
|
+
export declare class ExportResult {
|
|
98
|
+
exportPath: string;
|
|
99
|
+
annotationCount: number;
|
|
100
|
+
format: string;
|
|
101
|
+
}
|
|
102
|
+
export declare class ProjectMetrics {
|
|
103
|
+
totalTasks: number;
|
|
104
|
+
completedTasks: number;
|
|
105
|
+
totalAnnotations: number;
|
|
106
|
+
avgAnnotationsPerTask: number;
|
|
107
|
+
completionRate: number;
|
|
108
|
+
avgTimePerTask?: number;
|
|
109
|
+
annotatorStats: AnnotatorStats[];
|
|
110
|
+
}
|
|
111
|
+
export declare class AnnotatorStats {
|
|
112
|
+
email: string;
|
|
113
|
+
annotationCount: number;
|
|
114
|
+
avgTime: number;
|
|
115
|
+
lastAnnotationDate: Date;
|
|
116
|
+
}
|
|
117
|
+
export declare class MLBackend {
|
|
118
|
+
id: number;
|
|
119
|
+
url: string;
|
|
120
|
+
title: string;
|
|
121
|
+
isInteractive: boolean;
|
|
122
|
+
modelVersion: string;
|
|
123
|
+
}
|
|
124
|
+
export declare class AddMLBackendInput {
|
|
125
|
+
url: string;
|
|
126
|
+
title: string;
|
|
127
|
+
isInteractive?: boolean;
|
|
128
|
+
}
|