diff --git a/openapi/schemas/audience.openapi.json b/openapi/schemas/audience.openapi.json index d3de0a30..26f82bef 100644 --- a/openapi/schemas/audience.openapi.json +++ b/openapi/schemas/audience.openapi.json @@ -11,12 +11,12 @@ } ], "paths": { - "/audience/{audienceId}/recruit": { - "post": { + "/audience/{audienceId}": { + "delete": { "tags": [ "Audience" ], - "summary": "Starts recruiting users for the specified audience.", + "summary": "Deletes the specified audience.", "parameters": [ { "name": "audienceId", @@ -48,52 +48,7 @@ "description": "Forbidden" } } - } - }, - "/audiences": { - "get": { - "tags": [ - "Audience" - ], - "summary": "Queries all available audiences.", - "parameters": [ - { - "name": "request", - "in": "query", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryModel" - } - } - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" - } - } - } - } - } - } - }, - "/audience/{audienceId}": { + }, "get": { "tags": [ "Audience" @@ -175,6 +130,134 @@ } } }, + "/audience/{audienceId}/jobs": { + "get": { + "tags": [ + "Audience" + ], + "summary": "Queries all jobs for the specified audience.", + "parameters": [ + { + "name": "audienceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedResultOfQueryJobsResult" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/audience/{audienceId}/recruit": { + "post": { + "tags": [ + "Audience" + ], + "summary": "Starts recruiting users for the specified audience.", + "parameters": [ + { + "name": "audienceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/audiences": { + "get": { + "tags": [ + "Audience" + ], + "summary": "Queries all available audiences.", + "parameters": [ + { + "name": "request", + "in": "query", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryModel" + } + } + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" + } + } + } + } + } + } + }, "/audience": { "post": { "tags": [ @@ -1834,6 +1917,12 @@ "$ref": "#/components/schemas/QueryAudiencesResult" } }, + "ListOfQueryJobsResult": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryJobsResult" + } + }, "ListOfQueryRapidsForAudienceResult": { "type": "array", "items": { @@ -1966,6 +2055,36 @@ } } }, + "PagedResultOfQueryJobsResult": { + "required": [ + "total", + "page", + "pageSize", + "items" + ], + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64" + }, + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { + "$ref": "#/components/schemas/ListOfQueryJobsResult" + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, "PagedResultOfQueryRapidsForAudienceResult": { "required": [ "total", @@ -2050,6 +2169,43 @@ } } }, + "QueryJobsResult": { + "required": [ + "jobId", + "name", + "definitionId", + "audienceId", + "revisionNumber", + "status", + "createdAt" + ], + "type": "object", + "properties": { + "jobId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "definitionId": { + "type": "string" + }, + "audienceId": { + "type": "string" + }, + "revisionNumber": { + "type": "integer", + "format": "int32" + }, + "status": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, "QueryModel": { "type": "object", "properties": { diff --git a/openapi/schemas/leaderboard.openapi.json b/openapi/schemas/leaderboard.openapi.json index b7204b14..5dc68251 100644 --- a/openapi/schemas/leaderboard.openapi.json +++ b/openapi/schemas/leaderboard.openapi.json @@ -2498,6 +2498,7 @@ "name", "isPublic", "createdAt", + "ownerId", "ownerMail" ], "type": "object", @@ -2515,6 +2516,10 @@ "type": "string", "format": "date-time" }, + "ownerId": { + "type": "string", + "format": "uuid" + }, "ownerMail": { "type": "string" } diff --git a/openapi/schemas/order.openapi.json b/openapi/schemas/order.openapi.json index 312a436b..83638a4a 100644 --- a/openapi/schemas/order.openapi.json +++ b/openapi/schemas/order.openapi.json @@ -159,12 +159,12 @@ } } }, - "/job/definition/{definitionId}/revision/{revisionNumber}": { - "get": { + "/job/definition/{definitionId}": { + "delete": { "tags": [ "Job" ], - "summary": "Gets a specific revision for a job definition.", + "summary": "Deletes a job definition and all its revisions.", "parameters": [ { "name": "definitionId", @@ -173,14 +173,42 @@ "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + }, + "get": { + "tags": [ + "Job" + ], + "summary": "Gets a job definition by its id.", + "parameters": [ { - "name": "revisionNumber", + "name": "definitionId", "in": "path", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } } ], @@ -190,7 +218,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetJobRevisionEndpoint_Output" + "$ref": "#/components/schemas/GetJobDefinitionByIdEndpoint_Output" } } } @@ -212,9 +240,7 @@ "description": "Forbidden" } } - } - }, - "/job/definition/{definitionId}": { + }, "patch": { "tags": [ "Job" @@ -263,6 +289,61 @@ } } }, + "/job/definition/{definitionId}/revision/{revisionNumber}": { + "get": { + "tags": [ + "Job" + ], + "summary": "Gets a specific revision for a job definition.", + "parameters": [ + { + "name": "definitionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "revisionNumber", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetJobRevisionEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, "/feedback": { "post": { "tags": [ @@ -1519,6 +1600,10 @@ "type": "integer", "format": "int32" }, + "name": { + "type": "string", + "nullable": true + }, "priority": { "type": "integer", "format": "int32" @@ -1527,44 +1612,36 @@ }, "CreateJobEndpoint_Output": { "required": [ - "jobId" + "jobId", + "recruitingStarted" ], "type": "object", "properties": { "jobId": { "type": "string" + }, + "recruitingStarted": { + "type": "boolean" } } }, "CreateJobRevisionEndpoint_Input": { - "required": [ - "workflow", - "referee", - "datasetId" - ], "type": "object", "properties": { "workflow": { - "$ref": "#/components/schemas/IOrderWorkflowModel" + "$ref": "#/components/schemas/OptionOfIOrderWorkflowModel" }, "referee": { - "$ref": "#/components/schemas/IRefereeModel" + "$ref": "#/components/schemas/OptionOfIRefereeModel" }, "datasetId": { - "type": "string" + "$ref": "#/components/schemas/OptionOfstring" }, "featureFlags": { - "$ref": "#/components/schemas/ListOfFeatureFlag" + "$ref": "#/components/schemas/OptionOfIReadOnlyListOfFeatureFlag" }, "aggregatorType": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/AggregatorType" - } - ] + "$ref": "#/components/schemas/OptionOfAggregatorType" } } }, @@ -1725,22 +1802,23 @@ } } }, - "EloConfig": { - "type": "object", - "properties": { - "startingElo": { - "type": "integer", - "format": "int32" - }, - "kFactor": { - "type": "integer", - "format": "int32" - }, - "scalingFactor": { - "type": "integer", - "format": "int32" - } - } + "DefinitionType": { + "enum": [ + "Unknown", + "Classify", + "Compare", + "BoundingBox", + "Line", + "Polygon", + "Locate", + "Transcription", + "NamedEntity", + "FreeText", + "Scrub", + "Ranking", + "GroupedRanking", + "Evaluation" + ] }, "EloConfigModel": { "type": "object", @@ -1812,14 +1890,6 @@ "type": "string", "format": "binary" }, - "FileType": { - "enum": [ - "Unknown", - "Image", - "Video", - "Audio" - ] - }, "Filter": { "type": "object", "properties": { @@ -1853,13 +1923,38 @@ "In" ] }, + "GetJobDefinitionByIdEndpoint_Output": { + "required": [ + "definitionId", + "name", + "definitionType", + "createdAt" + ], + "type": "object", + "properties": { + "definitionId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "definitionType": { + "$ref": "#/components/schemas/DefinitionType" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, "GetJobRevisionEndpoint_Output": { "required": [ "definitionId", "revisionNumber", "pipelineId", "datasetId", - "workflowConfig", + "workflow", + "referee", "featureFlags", "createdAt", "createdById", @@ -1890,8 +1985,11 @@ } ] }, - "workflowConfig": { - "$ref": "#/components/schemas/IWorkflowConfig" + "workflow": { + "$ref": "#/components/schemas/IOrderWorkflowModel" + }, + "referee": { + "$ref": "#/components/schemas/IRefereeModel" }, "featureFlags": { "$ref": "#/components/schemas/ListOfFeatureFlag" @@ -1960,55 +2058,6 @@ } } }, - "IAsset": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IAssetFileAsset" - }, - { - "$ref": "#/components/schemas/IAssetMultiAsset" - }, - { - "$ref": "#/components/schemas/IAssetNullAsset" - }, - { - "$ref": "#/components/schemas/IAssetTextAsset" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "FileAsset": "#/components/schemas/IAssetFileAsset", - "MultiAsset": "#/components/schemas/IAssetMultiAsset", - "NullAsset": "#/components/schemas/IAssetNullAsset", - "TextAsset": "#/components/schemas/IAssetTextAsset" - } - } - }, - "IAssetFileAsset": { - "required": [ - "fileName", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "FileAsset" - ], - "type": "string" - }, - "fileName": { - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataCollection" - } - } - }, "IAssetInput": { "required": [ "_t" @@ -2127,239 +2176,45 @@ } } }, - "IAssetMultiAsset": { + "IDatasetModel": { "required": [ - "assets", "_t" ], - "properties": { - "_t": { - "enum": [ - "MultiAsset" - ], - "type": "string" - }, - "assets": { - "$ref": "#/components/schemas/ListOfIAsset" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataCollection" + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IDatasetModelCloneDatasetModel" } - } - }, - "IAssetNullAsset": { - "required": [ - "_t" ], - "properties": { - "_t": { - "enum": [ - "NullAsset" - ], - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataCollection" + "discriminator": { + "propertyName": "_t", + "mapping": { + "CloneDatasetModel": "#/components/schemas/IDatasetModelCloneDatasetModel" } } }, - "IAssetTextAsset": { + "IDatasetModelCloneDatasetModel": { "required": [ - "text", + "datasetToCloneId", + "datasetName", "_t" ], "properties": { "_t": { "enum": [ - "TextAsset" + "CloneDatasetModel" ], "type": "string" }, - "text": { + "datasetToCloneId": { "type": "string" }, - "metadata": { - "$ref": "#/components/schemas/MetadataCollection" + "datasetName": { + "type": "string" } } }, - "IDatasetModel": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IDatasetModelCloneDatasetModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "CloneDatasetModel": "#/components/schemas/IDatasetModelCloneDatasetModel" - } - } - }, - "IDatasetModelCloneDatasetModel": { - "required": [ - "datasetToCloneId", - "datasetName", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "CloneDatasetModel" - ], - "type": "string" - }, - "datasetToCloneId": { - "type": "string" - }, - "datasetName": { - "type": "string" - } - } - }, - "IMetadata": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IMetadataClassificationMetadata" - }, - { - "$ref": "#/components/schemas/IMetadataCountMetadata" - }, - { - "$ref": "#/components/schemas/IMetadataFileTypeMetadata" - }, - { - "$ref": "#/components/schemas/IMetadataImageDimensionMetadata" - }, - { - "$ref": "#/components/schemas/IMetadataLocationMetadata" - }, - { - "$ref": "#/components/schemas/IMetadataOriginalFilenameMetadata" - }, - { - "$ref": "#/components/schemas/IMetadataSourceUrlMetadata" - }, - { - "$ref": "#/components/schemas/IMetadataStreamsMetadata" - }, - { - "$ref": "#/components/schemas/IMetadataTextMetadata" - }, - { - "$ref": "#/components/schemas/IMetadataVideoDurationMetadata" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "ClassificationMetadata": "#/components/schemas/IMetadataClassificationMetadata", - "CountMetadata": "#/components/schemas/IMetadataCountMetadata", - "FileTypeMetadata": "#/components/schemas/IMetadataFileTypeMetadata", - "ImageDimensionMetadata": "#/components/schemas/IMetadataImageDimensionMetadata", - "LocationMetadata": "#/components/schemas/IMetadataLocationMetadata", - "OriginalFilenameMetadata": "#/components/schemas/IMetadataOriginalFilenameMetadata", - "SourceUrlMetadata": "#/components/schemas/IMetadataSourceUrlMetadata", - "StreamsMetadata": "#/components/schemas/IMetadataStreamsMetadata", - "TextMetadata": "#/components/schemas/IMetadataTextMetadata", - "VideoDurationMetadata": "#/components/schemas/IMetadataVideoDurationMetadata" - } - } - }, - "IMetadataClassificationMetadata": { - "required": [ - "classification", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "ClassificationMetadata" - ], - "type": "string" - }, - "classification": { - "type": "string" - }, - "visibilities": { - "$ref": "#/components/schemas/MetadataVisibilities" - } - } - }, - "IMetadataCountMetadata": { - "required": [ - "count", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "CountMetadata" - ], - "type": "string" - }, - "count": { - "type": "integer", - "format": "int32" - }, - "visibilities": { - "$ref": "#/components/schemas/MetadataVisibilities" - } - } - }, - "IMetadataFileTypeMetadata": { - "required": [ - "fileType", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "FileTypeMetadata" - ], - "type": "string" - }, - "fileType": { - "$ref": "#/components/schemas/FileType" - }, - "visibilities": { - "$ref": "#/components/schemas/MetadataVisibilities" - } - } - }, - "IMetadataImageDimensionMetadata": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "ImageDimensionMetadata" - ], - "type": "string" - }, - "height": { - "type": "integer", - "format": "int32" - }, - "width": { - "type": "integer", - "format": "int32" - }, - "visibilities": { - "$ref": "#/components/schemas/MetadataVisibilities" - } - } - }, - "IMetadataInput": { + "IMetadataInput": { "required": [ "_t" ], @@ -2398,139 +2253,6 @@ } } }, - "IMetadataLocationMetadata": { - "required": [ - "x", - "y", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "LocationMetadata" - ], - "type": "string" - }, - "x": { - "type": "number", - "format": "float" - }, - "y": { - "type": "number", - "format": "float" - }, - "visibilities": { - "$ref": "#/components/schemas/MetadataVisibilities" - } - } - }, - "IMetadataOriginalFilenameMetadata": { - "required": [ - "originalFilename", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "OriginalFilenameMetadata" - ], - "type": "string" - }, - "originalFilename": { - "type": "string" - }, - "visibilities": { - "$ref": "#/components/schemas/MetadataVisibilities" - } - } - }, - "IMetadataSourceUrlMetadata": { - "required": [ - "url", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "SourceUrlMetadata" - ], - "type": "string" - }, - "url": { - "type": "string" - }, - "visibilities": { - "$ref": "#/components/schemas/MetadataVisibilities" - } - } - }, - "IMetadataStreamsMetadata": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "StreamsMetadata" - ], - "type": "string" - }, - "hasAudio": { - "type": "boolean" - }, - "hasVideo": { - "type": "boolean" - }, - "hasSubtitles": { - "type": "boolean" - }, - "visibilities": { - "$ref": "#/components/schemas/MetadataVisibilities" - } - } - }, - "IMetadataTextMetadata": { - "required": [ - "text", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "TextMetadata" - ], - "type": "string" - }, - "text": { - "type": "string", - "nullable": true - }, - "visibilities": { - "$ref": "#/components/schemas/MetadataVisibilities" - } - } - }, - "IMetadataVideoDurationMetadata": { - "required": [ - "duration", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "VideoDurationMetadata" - ], - "type": "string" - }, - "duration": { - "type": "string", - "format": "date-time" - }, - "visibilities": { - "$ref": "#/components/schemas/MetadataVisibilities" - } - } - }, "IOrderWorkflowModel": { "required": [ "_t" @@ -2698,23 +2420,6 @@ } } }, - "IPairMakerConfig": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IPairMakerConfigOnlinePairMakerConfig" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "OnlinePairMakerConfig": "#/components/schemas/IPairMakerConfigOnlinePairMakerConfig" - } - } - }, "IPairMakerConfigModel": { "required": [ "_t" @@ -2753,27 +2458,6 @@ } } }, - "IPairMakerConfigOnlinePairMakerConfig": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "OnlinePairMakerConfig" - ], - "type": "string" - }, - "randomMatchesRatio": { - "type": "number", - "format": "float" - }, - "totalComparisonBudget": { - "type": "integer", - "format": "int32" - } - } - }, "IPipelineArtifactModel": { "required": [ "_t" @@ -3160,151 +2844,73 @@ "target", "classes", "_t" - ], - "properties": { - "_t": { - "enum": [ - "NamedEntityBlueprint" - ], - "type": "string" - }, - "target": { - "type": "string" - }, - "classes": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "IRapidBlueprintPolygonRapidBlueprint": { - "required": [ - "target", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "PolygonBlueprint" - ], - "type": "string" - }, - "target": { - "type": "string" - } - } - }, - "IRapidBlueprintScrubRapidBlueprint": { - "required": [ - "target", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "ScrubBlueprint" - ], - "type": "string" - }, - "target": { - "type": "string" - } - } - }, - "IRapidBlueprintTranscriptionRapidBlueprint": { - "required": [ - "title", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "TranscriptionBlueprint" - ], - "type": "string" - }, - "title": { - "type": "string" - } - } - }, - "IRefereeConfig": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IRefereeConfigNaiveRefereeConfig" + ], + "properties": { + "_t": { + "enum": [ + "NamedEntityBlueprint" + ], + "type": "string" }, - { - "$ref": "#/components/schemas/IRefereeConfigNeverEndingRefereeConfig" + "target": { + "type": "string" }, - { - "$ref": "#/components/schemas/IRefereeConfigProbabilisticAttachCategoryRefereeConfig" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "NaiveRefereeConfig": "#/components/schemas/IRefereeConfigNaiveRefereeConfig", - "NeverEndingRefereeConfig": "#/components/schemas/IRefereeConfigNeverEndingRefereeConfig", - "ProbabilisticAttachCategoryRefereeConfig": "#/components/schemas/IRefereeConfigProbabilisticAttachCategoryRefereeConfig" + "classes": { + "type": "array", + "items": { + "type": "string" + } } } }, - "IRefereeConfigNaiveRefereeConfig": { + "IRapidBlueprintPolygonRapidBlueprint": { "required": [ + "target", "_t" ], "properties": { "_t": { "enum": [ - "NaiveRefereeConfig" + "PolygonBlueprint" ], "type": "string" }, - "guessesRequired": { - "type": "integer", - "format": "int32" + "target": { + "type": "string" } } }, - "IRefereeConfigNeverEndingRefereeConfig": { + "IRapidBlueprintScrubRapidBlueprint": { "required": [ + "target", "_t" ], "properties": { "_t": { "enum": [ - "NeverEndingRefereeConfig" + "ScrubBlueprint" ], "type": "string" + }, + "target": { + "type": "string" } } }, - "IRefereeConfigProbabilisticAttachCategoryRefereeConfig": { + "IRapidBlueprintTranscriptionRapidBlueprint": { "required": [ - "threshold", - "maxVotes", + "title", "_t" ], "properties": { "_t": { "enum": [ - "ProbabilisticAttachCategoryRefereeConfig" + "TranscriptionBlueprint" ], "type": "string" }, - "threshold": { - "type": "number", - "format": "double" - }, - "maxVotes": { - "type": "integer", - "format": "int32" + "title": { + "type": "string" } } }, @@ -3940,187 +3546,6 @@ } } }, - "IWorkflowConfig": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IWorkflowConfigCompareWorkflowConfig" - }, - { - "$ref": "#/components/schemas/IWorkflowConfigEvaluationWorkflowConfig" - }, - { - "$ref": "#/components/schemas/IWorkflowConfigGroupedRankingWorkflowConfig" - }, - { - "$ref": "#/components/schemas/IWorkflowConfigSimpleWorkflowConfig" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "CompareWorkflowConfig": "#/components/schemas/IWorkflowConfigCompareWorkflowConfig", - "EvaluationWorkflowConfig": "#/components/schemas/IWorkflowConfigEvaluationWorkflowConfig", - "GroupedRankingWorkflowConfig": "#/components/schemas/IWorkflowConfigGroupedRankingWorkflowConfig", - "SimpleWorkflowConfig": "#/components/schemas/IWorkflowConfigSimpleWorkflowConfig" - } - } - }, - "IWorkflowConfigCompareWorkflowConfig": { - "required": [ - "criteria", - "referee", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "CompareWorkflowConfig" - ], - "type": "string" - }, - "criteria": { - "type": "string" - }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "context": { - "type": "string", - "nullable": true - }, - "contextAsset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAsset" - } - ] - }, - "eloConfig": { - "$ref": "#/components/schemas/EloConfig" - }, - "pairMakerConfig": { - "$ref": "#/components/schemas/IPairMakerConfig" - }, - "featureFlags": { - "$ref": "#/components/schemas/ListOfFeatureFlag" - } - } - }, - "IWorkflowConfigEvaluationWorkflowConfig": { - "required": [ - "validationSetId", - "referee", - "shouldAcceptIncorrect", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "EvaluationWorkflowConfig" - ], - "type": "string" - }, - "validationSetId": { - "type": "string" - }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "shouldAcceptIncorrect": { - "type": "boolean" - }, - "featureFlags": { - "$ref": "#/components/schemas/ListOfFeatureFlag" - } - } - }, - "IWorkflowConfigGroupedRankingWorkflowConfig": { - "required": [ - "criteria", - "referee", - "targetCountryCodes", - "maxParallelism", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "GroupedRankingWorkflowConfig" - ], - "type": "string" - }, - "criteria": { - "type": "string" - }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "targetCountryCodes": { - "type": "array", - "items": { - "type": "string" - } - }, - "maxParallelism": { - "type": "integer", - "format": "int32" - }, - "contexts": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "nullable": true - }, - "contextAssets": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IAsset" - }, - "nullable": true - }, - "eloConfig": { - "$ref": "#/components/schemas/EloConfig" - }, - "pairMakerConfig": { - "$ref": "#/components/schemas/IPairMakerConfig" - }, - "featureFlags": { - "$ref": "#/components/schemas/ListOfFeatureFlag" - } - } - }, - "IWorkflowConfigSimpleWorkflowConfig": { - "required": [ - "referee", - "blueprint", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "SimpleWorkflowConfig" - ], - "type": "string" - }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "blueprint": { - "$ref": "#/components/schemas/IRapidBlueprint" - }, - "featureFlags": { - "$ref": "#/components/schemas/ListOfFeatureFlag" - } - } - }, "ListOfAggregatedOrdersModel": { "type": "array", "items": { @@ -4157,12 +3582,6 @@ "$ref": "#/components/schemas/Filter" } }, - "ListOfIAsset": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAsset" - } - }, "ListOfIAssetInput": { "type": "array", "items": { @@ -4318,12 +3737,6 @@ } } }, - "MetadataCollection": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IMetadata" - } - }, "MetadataInputCollection": { "type": "object", "additionalProperties": { @@ -4344,6 +3757,55 @@ "type": "string" } }, + "OptionOfAggregatorType": { + "enum": [ + "NonCommittal", + "MajorityVote", + "SimpleMatchup", + "LocateCluster", + "Classification", + "Locate", + "BoundingBox", + "Line", + "Transcription", + "SinglePointLocate", + "FreeText", + "Scrub", + "Ranking", + "MultiRanking", + null + ] + }, + "OptionOfIOrderWorkflowModel": { + "oneOf": [ + { + "$ref": "#/components/schemas/IOrderWorkflowModel" + }, + { + "nullable": true + } + ] + }, + "OptionOfIReadOnlyListOfFeatureFlag": { + "oneOf": [ + { + "$ref": "#/components/schemas/ListOfFeatureFlag" + }, + { + "nullable": true + } + ] + }, + "OptionOfIRefereeModel": { + "oneOf": [ + { + "$ref": "#/components/schemas/IRefereeModel" + }, + { + "nullable": true + } + ] + }, "OptionOfstring": { "type": "string", "nullable": true @@ -4596,6 +4058,7 @@ "required": [ "definitionId", "name", + "definitionType", "createdAt", "revisionCount" ], @@ -4607,6 +4070,9 @@ "name": { "type": "string" }, + "definitionType": { + "$ref": "#/components/schemas/DefinitionType" + }, "createdAt": { "type": "string", "format": "date-time" @@ -4641,6 +4107,7 @@ "QueryJobsResult": { "required": [ "jobId", + "name", "definitionId", "audienceId", "revisionNumber", @@ -4652,6 +4119,9 @@ "jobId": { "type": "string" }, + "name": { + "type": "string" + }, "definitionId": { "type": "string" }, diff --git a/openapi/schemas/rapidata.filtered.openapi.json b/openapi/schemas/rapidata.filtered.openapi.json index 86018283..13bdceba 100644 --- a/openapi/schemas/rapidata.filtered.openapi.json +++ b/openapi/schemas/rapidata.filtered.openapi.json @@ -317,12 +317,12 @@ ] } }, - "/audience/{audienceId}/recruit": { - "post": { + "/audience/{audienceId}": { + "delete": { "tags": [ "Audience" ], - "summary": "Starts recruiting users for the specified audience.", + "summary": "Deletes the specified audience.", "parameters": [ { "name": "audienceId", @@ -369,24 +369,20 @@ ] } ] - } - }, - "/audiences": { + }, "get": { "tags": [ "Audience" ], - "summary": "Queries all available audiences.", + "summary": "Gets an audience by its Id.", "parameters": [ { - "name": "request", - "in": "query", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryModel" - } - } + "name": "audienceId", + "in": "path", + "description": "The id of the audience to get.", + "required": true, + "schema": { + "type": "string" } } ], @@ -396,17 +392,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" + "$ref": "#/components/schemas/GetAudienceByIdResult" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" + "$ref": "#/components/schemas/GetAudienceByIdResult" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" + "$ref": "#/components/schemas/GetAudienceByIdResult" } } } @@ -427,19 +423,74 @@ ] } ] + }, + "patch": { + "tags": [ + "Audience" + ], + "summary": "Patches an existing audience.", + "parameters": [ + { + "name": "audienceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAudienceRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAudienceRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateAudienceRequest" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "security": [ + { + "Bearer": [], + "OpenIdConnect": [ + "openid", + "profile", + "email" + ], + "OAuth2": [ + "openid", + "profile", + "email" + ] + } + ] } }, - "/audience/{audienceId}": { + "/audience/{audienceId}/jobs": { "get": { "tags": [ "Audience" ], - "summary": "Gets an audience by its Id.", + "summary": "Queries all jobs for the specified audience.", "parameters": [ { "name": "audienceId", "in": "path", - "description": "The id of the audience to get.", "required": true, "schema": { "type": "string" @@ -450,22 +501,28 @@ "200": { "description": "OK", "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/GetAudienceByIdResult" - } - }, "application/json": { "schema": { - "$ref": "#/components/schemas/GetAudienceByIdResult" + "$ref": "#/components/schemas/PagedResultOfQueryJobsResult" } - }, - "text/json": { + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { "schema": { - "$ref": "#/components/schemas/GetAudienceByIdResult" + "$ref": "#/components/schemas/ValidationProblemDetails" } } } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" } }, "security": [ @@ -483,12 +540,14 @@ ] } ] - }, - "patch": { + } + }, + "/audience/{audienceId}/recruit": { + "post": { "tags": [ "Audience" ], - "summary": "Patches an existing audience.", + "summary": "Starts recruiting users for the specified audience.", "parameters": [ { "name": "audienceId", @@ -499,29 +558,83 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateAudienceRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateAudienceRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateAudienceRequest" + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } } } }, - "required": true + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } }, + "security": [ + { + "Bearer": [], + "OpenIdConnect": [ + "openid", + "profile", + "email" + ], + "OAuth2": [ + "openid", + "profile", + "email" + ] + } + ] + } + }, + "/audiences": { + "get": { + "tags": [ + "Audience" + ], + "summary": "Queries all available audiences.", + "parameters": [ + { + "name": "request", + "in": "query", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryModel" + } + } + } + } + ], "responses": { - "204": { - "description": "No Content" + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" + } + } + } } }, "security": [ @@ -4471,12 +4584,12 @@ ] } }, - "/job/definition/{definitionId}/revision/{revisionNumber}": { - "get": { + "/job/definition/{definitionId}": { + "delete": { "tags": [ "Job" ], - "summary": "Gets a specific revision for a job definition.", + "summary": "Deletes a job definition and all its revisions.", "parameters": [ { "name": "definitionId", @@ -4485,27 +4598,11 @@ "schema": { "type": "string" } - }, - { - "name": "revisionNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } } ], "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetJobRevisionEndpoint_Output" - } - } - } + "204": { + "description": "No Content" }, "400": { "description": "Bad Request", @@ -4539,14 +4636,12 @@ ] } ] - } - }, - "/job/definition/{definitionId}": { - "patch": { + }, + "get": { "tags": [ "Job" ], - "summary": "Updates a job definition.", + "summary": "Gets a job definition by its id.", "parameters": [ { "name": "definitionId", @@ -4557,11 +4652,70 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateJobDefinitionEndpoint_Input" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetJobDefinitionByIdEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "Bearer": [], + "OpenIdConnect": [ + "openid", + "profile", + "email" + ], + "OAuth2": [ + "openid", + "profile", + "email" + ] + } + ] + }, + "patch": { + "tags": [ + "Job" + ], + "summary": "Updates a job definition.", + "parameters": [ + { + "name": "definitionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateJobDefinitionEndpoint_Input" } } }, @@ -4605,6 +4759,76 @@ ] } }, + "/job/definition/{definitionId}/revision/{revisionNumber}": { + "get": { + "tags": [ + "Job" + ], + "summary": "Gets a specific revision for a job definition.", + "parameters": [ + { + "name": "definitionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "revisionNumber", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetJobRevisionEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "Bearer": [], + "OpenIdConnect": [ + "openid", + "profile", + "email" + ], + "OAuth2": [ + "openid", + "profile", + "email" + ] + } + ] + } + }, "/feedback": { "post": { "tags": [ @@ -10059,6 +10283,12 @@ "$ref": "#/components/schemas/QueryAudiencesResult" } }, + "ListOfQueryJobsResult": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryJobsResult" + } + }, "ListOfQueryRapidsForAudienceResult": { "type": "array", "items": { @@ -10177,6 +10407,36 @@ } } }, + "PagedResultOfQueryJobsResult": { + "required": [ + "total", + "page", + "pageSize", + "items" + ], + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64" + }, + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { + "$ref": "#/components/schemas/ListOfQueryJobsResult" + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, "PagedResultOfQueryRapidsForAudienceResult": { "required": [ "total", @@ -10261,6 +10521,43 @@ } } }, + "QueryJobsResult": { + "required": [ + "jobId", + "name", + "definitionId", + "audienceId", + "revisionNumber", + "status", + "createdAt" + ], + "type": "object", + "properties": { + "jobId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "definitionId": { + "type": "string" + }, + "audienceId": { + "type": "string" + }, + "revisionNumber": { + "type": "integer", + "format": "int32" + }, + "status": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, "QueryModel": { "type": "object", "properties": { @@ -11811,6 +12108,7 @@ "name", "isPublic", "createdAt", + "ownerId", "ownerMail" ], "type": "object", @@ -11828,6 +12126,10 @@ "type": "string", "format": "date-time" }, + "ownerId": { + "type": "string", + "format": "uuid" + }, "ownerMail": { "type": "string" } @@ -13788,6 +14090,10 @@ "type": "integer", "format": "int32" }, + "name": { + "type": "string", + "nullable": true + }, "priority": { "type": "integer", "format": "int32" @@ -13796,44 +14102,36 @@ }, "CreateJobEndpoint_Output": { "required": [ - "jobId" + "jobId", + "recruitingStarted" ], "type": "object", "properties": { "jobId": { "type": "string" + }, + "recruitingStarted": { + "type": "boolean" } } }, "CreateJobRevisionEndpoint_Input": { - "required": [ - "workflow", - "referee", - "datasetId" - ], "type": "object", "properties": { "workflow": { - "$ref": "#/components/schemas/IOrderWorkflowModel" + "$ref": "#/components/schemas/OptionOfIOrderWorkflowModel" }, "referee": { - "$ref": "#/components/schemas/IRefereeModel" + "$ref": "#/components/schemas/OptionOfIRefereeModel" }, "datasetId": { - "type": "string" + "$ref": "#/components/schemas/OptionOfstring" }, "featureFlags": { - "$ref": "#/components/schemas/ListOfFeatureFlag" + "$ref": "#/components/schemas/OptionOfIReadOnlyListOfFeatureFlag" }, "aggregatorType": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/AggregatorType" - } - ] + "$ref": "#/components/schemas/OptionOfAggregatorType" } } }, @@ -13994,22 +14292,23 @@ } } }, - "EloConfig": { - "type": "object", - "properties": { - "startingElo": { - "type": "integer", - "format": "int32" - }, - "kFactor": { - "type": "integer", - "format": "int32" - }, - "scalingFactor": { - "type": "integer", - "format": "int32" - } - } + "DefinitionType": { + "enum": [ + "Unknown", + "Classify", + "Compare", + "BoundingBox", + "Line", + "Polygon", + "Locate", + "Transcription", + "NamedEntity", + "FreeText", + "Scrub", + "Ranking", + "GroupedRanking", + "Evaluation" + ] }, "EloConfigModel": { "type": "object", @@ -14051,13 +14350,38 @@ "type": "string", "format": "binary" }, - "GetJobRevisionEndpoint_Output": { + "GetJobDefinitionByIdEndpoint_Output": { + "required": [ + "definitionId", + "name", + "definitionType", + "createdAt" + ], + "type": "object", + "properties": { + "definitionId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "definitionType": { + "$ref": "#/components/schemas/DefinitionType" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "GetJobRevisionEndpoint_Output": { "required": [ "definitionId", "revisionNumber", "pipelineId", "datasetId", - "workflowConfig", + "workflow", + "referee", "featureFlags", "createdAt", "createdById", @@ -14088,8 +14412,11 @@ } ] }, - "workflowConfig": { - "$ref": "#/components/schemas/IWorkflowConfig" + "workflow": { + "$ref": "#/components/schemas/IOrderWorkflowModel" + }, + "referee": { + "$ref": "#/components/schemas/IRefereeModel" }, "featureFlags": { "$ref": "#/components/schemas/ListOfFeatureFlag" @@ -14158,111 +14485,6 @@ } } }, - "IAsset": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IAssetFileAsset" - }, - { - "$ref": "#/components/schemas/IAssetMultiAsset" - }, - { - "$ref": "#/components/schemas/IAssetNullAsset" - }, - { - "$ref": "#/components/schemas/IAssetTextAsset" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "FileAsset": "#/components/schemas/IAssetFileAsset", - "MultiAsset": "#/components/schemas/IAssetMultiAsset", - "NullAsset": "#/components/schemas/IAssetNullAsset", - "TextAsset": "#/components/schemas/IAssetTextAsset" - } - } - }, - "IAssetFileAsset": { - "required": [ - "fileName", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "FileAsset" - ], - "type": "string" - }, - "fileName": { - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataCollection" - } - } - }, - "IAssetMultiAsset": { - "required": [ - "assets", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "MultiAsset" - ], - "type": "string" - }, - "assets": { - "$ref": "#/components/schemas/ListOfIAsset" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataCollection" - } - } - }, - "IAssetNullAsset": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "NullAsset" - ], - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataCollection" - } - } - }, - "IAssetTextAsset": { - "required": [ - "text", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "TextAsset" - ], - "type": "string" - }, - "text": { - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataCollection" - } - } - }, "IDatasetModel": { "required": [ "_t" @@ -14468,23 +14690,6 @@ } } }, - "IPairMakerConfig": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IPairMakerConfigOnlinePairMakerConfig" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "OnlinePairMakerConfig": "#/components/schemas/IPairMakerConfigOnlinePairMakerConfig" - } - } - }, "IPairMakerConfigModel": { "required": [ "_t" @@ -14523,27 +14728,6 @@ } } }, - "IPairMakerConfigOnlinePairMakerConfig": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "OnlinePairMakerConfig" - ], - "type": "string" - }, - "randomMatchesRatio": { - "type": "number", - "format": "float" - }, - "totalComparisonBudget": { - "type": "integer", - "format": "int32" - } - } - }, "IPipelineArtifactModel": { "required": [ "_t" @@ -15000,84 +15184,6 @@ } } }, - "IRefereeConfig": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IRefereeConfigNaiveRefereeConfig" - }, - { - "$ref": "#/components/schemas/IRefereeConfigNeverEndingRefereeConfig" - }, - { - "$ref": "#/components/schemas/IRefereeConfigProbabilisticAttachCategoryRefereeConfig" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "NaiveRefereeConfig": "#/components/schemas/IRefereeConfigNaiveRefereeConfig", - "NeverEndingRefereeConfig": "#/components/schemas/IRefereeConfigNeverEndingRefereeConfig", - "ProbabilisticAttachCategoryRefereeConfig": "#/components/schemas/IRefereeConfigProbabilisticAttachCategoryRefereeConfig" - } - } - }, - "IRefereeConfigNaiveRefereeConfig": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "NaiveRefereeConfig" - ], - "type": "string" - }, - "guessesRequired": { - "type": "integer", - "format": "int32" - } - } - }, - "IRefereeConfigNeverEndingRefereeConfig": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "NeverEndingRefereeConfig" - ], - "type": "string" - } - } - }, - "IRefereeConfigProbabilisticAttachCategoryRefereeConfig": { - "required": [ - "threshold", - "maxVotes", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "ProbabilisticAttachCategoryRefereeConfig" - ], - "type": "string" - }, - "threshold": { - "type": "number", - "format": "double" - }, - "maxVotes": { - "type": "integer", - "format": "int32" - } - } - }, "IRefereeModel": { "required": [ "_t" @@ -15399,187 +15505,6 @@ } } }, - "IWorkflowConfig": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IWorkflowConfigCompareWorkflowConfig" - }, - { - "$ref": "#/components/schemas/IWorkflowConfigEvaluationWorkflowConfig" - }, - { - "$ref": "#/components/schemas/IWorkflowConfigGroupedRankingWorkflowConfig" - }, - { - "$ref": "#/components/schemas/IWorkflowConfigSimpleWorkflowConfig" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "CompareWorkflowConfig": "#/components/schemas/IWorkflowConfigCompareWorkflowConfig", - "EvaluationWorkflowConfig": "#/components/schemas/IWorkflowConfigEvaluationWorkflowConfig", - "GroupedRankingWorkflowConfig": "#/components/schemas/IWorkflowConfigGroupedRankingWorkflowConfig", - "SimpleWorkflowConfig": "#/components/schemas/IWorkflowConfigSimpleWorkflowConfig" - } - } - }, - "IWorkflowConfigCompareWorkflowConfig": { - "required": [ - "criteria", - "referee", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "CompareWorkflowConfig" - ], - "type": "string" - }, - "criteria": { - "type": "string" - }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "context": { - "type": "string", - "nullable": true - }, - "contextAsset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAsset" - } - ] - }, - "eloConfig": { - "$ref": "#/components/schemas/EloConfig" - }, - "pairMakerConfig": { - "$ref": "#/components/schemas/IPairMakerConfig" - }, - "featureFlags": { - "$ref": "#/components/schemas/ListOfFeatureFlag" - } - } - }, - "IWorkflowConfigEvaluationWorkflowConfig": { - "required": [ - "validationSetId", - "referee", - "shouldAcceptIncorrect", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "EvaluationWorkflowConfig" - ], - "type": "string" - }, - "validationSetId": { - "type": "string" - }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "shouldAcceptIncorrect": { - "type": "boolean" - }, - "featureFlags": { - "$ref": "#/components/schemas/ListOfFeatureFlag" - } - } - }, - "IWorkflowConfigGroupedRankingWorkflowConfig": { - "required": [ - "criteria", - "referee", - "targetCountryCodes", - "maxParallelism", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "GroupedRankingWorkflowConfig" - ], - "type": "string" - }, - "criteria": { - "type": "string" - }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "targetCountryCodes": { - "type": "array", - "items": { - "type": "string" - } - }, - "maxParallelism": { - "type": "integer", - "format": "int32" - }, - "contexts": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "nullable": true - }, - "contextAssets": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IAsset" - }, - "nullable": true - }, - "eloConfig": { - "$ref": "#/components/schemas/EloConfig" - }, - "pairMakerConfig": { - "$ref": "#/components/schemas/IPairMakerConfig" - }, - "featureFlags": { - "$ref": "#/components/schemas/ListOfFeatureFlag" - } - } - }, - "IWorkflowConfigSimpleWorkflowConfig": { - "required": [ - "referee", - "blueprint", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "SimpleWorkflowConfig" - ], - "type": "string" - }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "blueprint": { - "$ref": "#/components/schemas/IRapidBlueprint" - }, - "featureFlags": { - "$ref": "#/components/schemas/ListOfFeatureFlag" - } - } - }, "ListOfAggregatedOrdersModel": { "type": "array", "items": { @@ -15598,12 +15523,6 @@ "$ref": "#/components/schemas/ConditionalValidationSelection_ValidationChance" } }, - "ListOfIAsset": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAsset" - } - }, "ListOfIPipelineArtifactModel": { "type": "array", "items": { @@ -15652,12 +15571,6 @@ "$ref": "#/components/schemas/QueryJobRevisionsResult" } }, - "ListOfQueryJobsResult": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryJobsResult" - } - }, "Metadata_IOrderMetadataInput": { "required": [ "_t" @@ -15734,6 +15647,55 @@ } } }, + "OptionOfAggregatorType": { + "enum": [ + "NonCommittal", + "MajorityVote", + "SimpleMatchup", + "LocateCluster", + "Classification", + "Locate", + "BoundingBox", + "Line", + "Transcription", + "SinglePointLocate", + "FreeText", + "Scrub", + "Ranking", + "MultiRanking", + null + ] + }, + "OptionOfIOrderWorkflowModel": { + "oneOf": [ + { + "$ref": "#/components/schemas/IOrderWorkflowModel" + }, + { + "nullable": true + } + ] + }, + "OptionOfIReadOnlyListOfFeatureFlag": { + "oneOf": [ + { + "$ref": "#/components/schemas/ListOfFeatureFlag" + }, + { + "nullable": true + } + ] + }, + "OptionOfIRefereeModel": { + "oneOf": [ + { + "$ref": "#/components/schemas/IRefereeModel" + }, + { + "nullable": true + } + ] + }, "OrderModel": { "required": [ "id", @@ -15908,54 +15870,24 @@ } } }, - "PagedResultOfQueryJobsResult": { + "PreviewOrderModel": { + "type": "object", + "properties": { + "ignoreFailedDatapoints": { + "type": "boolean" + } + } + }, + "PublicOrderModel": { "required": [ - "total", - "page", - "pageSize", - "items" + "id", + "name", + "isPublic" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { - "type": "integer", - "format": "int32" - }, - "items": { - "$ref": "#/components/schemas/ListOfQueryJobsResult" - }, - "totalPages": { - "type": "integer", - "format": "int32" - } - } - }, - "PreviewOrderModel": { - "type": "object", - "properties": { - "ignoreFailedDatapoints": { - "type": "boolean" - } - } - }, - "PublicOrderModel": { - "required": [ - "id", - "name", - "isPublic" - ], - "type": "object", - "properties": { - "id": { - "type": "string" + "id": { + "type": "string" }, "name": { "type": "string" @@ -15969,6 +15901,7 @@ "required": [ "definitionId", "name", + "definitionType", "createdAt", "revisionCount" ], @@ -15980,6 +15913,9 @@ "name": { "type": "string" }, + "definitionType": { + "$ref": "#/components/schemas/DefinitionType" + }, "createdAt": { "type": "string", "format": "date-time" @@ -16011,39 +15947,6 @@ } } }, - "QueryJobsResult": { - "required": [ - "jobId", - "definitionId", - "audienceId", - "revisionNumber", - "status", - "createdAt" - ], - "type": "object", - "properties": { - "jobId": { - "type": "string" - }, - "definitionId": { - "type": "string" - }, - "audienceId": { - "type": "string" - }, - "revisionNumber": { - "type": "integer", - "format": "int32" - }, - "status": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - } - } - }, "RetrievalMode": { "enum": [ "Random", @@ -16102,6 +16005,23 @@ } } }, + "EloConfig": { + "type": "object", + "properties": { + "startingElo": { + "type": "integer", + "format": "int32" + }, + "kFactor": { + "type": "integer", + "format": "int32" + }, + "scalingFactor": { + "type": "integer", + "format": "int32" + } + } + }, "GetPipelineByIdResult": { "required": [ "artifacts", @@ -16258,6 +16178,414 @@ } } }, + "IAsset": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IAssetFileAsset" + }, + { + "$ref": "#/components/schemas/IAssetMultiAsset" + }, + { + "$ref": "#/components/schemas/IAssetNullAsset" + }, + { + "$ref": "#/components/schemas/IAssetTextAsset" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "FileAsset": "#/components/schemas/IAssetFileAsset", + "MultiAsset": "#/components/schemas/IAssetMultiAsset", + "NullAsset": "#/components/schemas/IAssetNullAsset", + "TextAsset": "#/components/schemas/IAssetTextAsset" + } + } + }, + "IAssetFileAsset": { + "required": [ + "fileName", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "FileAsset" + ], + "type": "string" + }, + "fileName": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataCollection" + } + } + }, + "IAssetMultiAsset": { + "required": [ + "assets", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "MultiAsset" + ], + "type": "string" + }, + "assets": { + "$ref": "#/components/schemas/ListOfIAsset" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataCollection" + } + } + }, + "IAssetNullAsset": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "NullAsset" + ], + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataCollection" + } + } + }, + "IAssetTextAsset": { + "required": [ + "text", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "TextAsset" + ], + "type": "string" + }, + "text": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataCollection" + } + } + }, + "IPairMakerConfig": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IPairMakerConfigOnlinePairMakerConfig" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "OnlinePairMakerConfig": "#/components/schemas/IPairMakerConfigOnlinePairMakerConfig" + } + } + }, + "IPairMakerConfigOnlinePairMakerConfig": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "OnlinePairMakerConfig" + ], + "type": "string" + }, + "randomMatchesRatio": { + "type": "number", + "format": "float" + }, + "totalComparisonBudget": { + "type": "integer", + "format": "int32" + } + } + }, + "IRefereeConfig": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IRefereeConfigNaiveRefereeConfig" + }, + { + "$ref": "#/components/schemas/IRefereeConfigNeverEndingRefereeConfig" + }, + { + "$ref": "#/components/schemas/IRefereeConfigProbabilisticAttachCategoryRefereeConfig" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "NaiveRefereeConfig": "#/components/schemas/IRefereeConfigNaiveRefereeConfig", + "NeverEndingRefereeConfig": "#/components/schemas/IRefereeConfigNeverEndingRefereeConfig", + "ProbabilisticAttachCategoryRefereeConfig": "#/components/schemas/IRefereeConfigProbabilisticAttachCategoryRefereeConfig" + } + } + }, + "IRefereeConfigNaiveRefereeConfig": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "NaiveRefereeConfig" + ], + "type": "string" + }, + "guessesRequired": { + "type": "integer", + "format": "int32" + } + } + }, + "IRefereeConfigNeverEndingRefereeConfig": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "NeverEndingRefereeConfig" + ], + "type": "string" + } + } + }, + "IRefereeConfigProbabilisticAttachCategoryRefereeConfig": { + "required": [ + "threshold", + "maxVotes", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "ProbabilisticAttachCategoryRefereeConfig" + ], + "type": "string" + }, + "threshold": { + "type": "number", + "format": "double" + }, + "maxVotes": { + "type": "integer", + "format": "int32" + } + } + }, + "IWorkflowConfig": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IWorkflowConfigCompareWorkflowConfig" + }, + { + "$ref": "#/components/schemas/IWorkflowConfigEvaluationWorkflowConfig" + }, + { + "$ref": "#/components/schemas/IWorkflowConfigGroupedRankingWorkflowConfig" + }, + { + "$ref": "#/components/schemas/IWorkflowConfigSimpleWorkflowConfig" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "CompareWorkflowConfig": "#/components/schemas/IWorkflowConfigCompareWorkflowConfig", + "EvaluationWorkflowConfig": "#/components/schemas/IWorkflowConfigEvaluationWorkflowConfig", + "GroupedRankingWorkflowConfig": "#/components/schemas/IWorkflowConfigGroupedRankingWorkflowConfig", + "SimpleWorkflowConfig": "#/components/schemas/IWorkflowConfigSimpleWorkflowConfig" + } + } + }, + "IWorkflowConfigCompareWorkflowConfig": { + "required": [ + "criteria", + "referee", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "CompareWorkflowConfig" + ], + "type": "string" + }, + "criteria": { + "type": "string" + }, + "referee": { + "$ref": "#/components/schemas/IRefereeConfig" + }, + "context": { + "type": "string", + "nullable": true + }, + "contextAsset": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/IAsset" + } + ] + }, + "eloConfig": { + "$ref": "#/components/schemas/EloConfig" + }, + "pairMakerConfig": { + "$ref": "#/components/schemas/IPairMakerConfig" + }, + "featureFlags": { + "$ref": "#/components/schemas/ListOfFeatureFlag" + } + } + }, + "IWorkflowConfigEvaluationWorkflowConfig": { + "required": [ + "validationSetId", + "referee", + "shouldAcceptIncorrect", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "EvaluationWorkflowConfig" + ], + "type": "string" + }, + "validationSetId": { + "type": "string" + }, + "referee": { + "$ref": "#/components/schemas/IRefereeConfig" + }, + "shouldAcceptIncorrect": { + "type": "boolean" + }, + "featureFlags": { + "$ref": "#/components/schemas/ListOfFeatureFlag" + } + } + }, + "IWorkflowConfigGroupedRankingWorkflowConfig": { + "required": [ + "criteria", + "referee", + "targetCountryCodes", + "maxParallelism", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "GroupedRankingWorkflowConfig" + ], + "type": "string" + }, + "criteria": { + "type": "string" + }, + "referee": { + "$ref": "#/components/schemas/IRefereeConfig" + }, + "targetCountryCodes": { + "type": "array", + "items": { + "type": "string" + } + }, + "maxParallelism": { + "type": "integer", + "format": "int32" + }, + "contexts": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + }, + "contextAssets": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IAsset" + }, + "nullable": true + }, + "eloConfig": { + "$ref": "#/components/schemas/EloConfig" + }, + "pairMakerConfig": { + "$ref": "#/components/schemas/IPairMakerConfig" + }, + "featureFlags": { + "$ref": "#/components/schemas/ListOfFeatureFlag" + } + } + }, + "IWorkflowConfigSimpleWorkflowConfig": { + "required": [ + "referee", + "blueprint", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "SimpleWorkflowConfig" + ], + "type": "string" + }, + "referee": { + "$ref": "#/components/schemas/IRefereeConfig" + }, + "blueprint": { + "$ref": "#/components/schemas/IRapidBlueprint" + }, + "featureFlags": { + "$ref": "#/components/schemas/ListOfFeatureFlag" + } + } + }, + "ListOfIAsset": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IAsset" + } + }, "PreliminaryDownloadModel": { "type": "object", "properties": { diff --git a/openapi/schemas/rapidata.openapi.json b/openapi/schemas/rapidata.openapi.json index 7fbc0ae7..eee713e5 100644 --- a/openapi/schemas/rapidata.openapi.json +++ b/openapi/schemas/rapidata.openapi.json @@ -317,12 +317,12 @@ ] } }, - "/audience/{audienceId}/recruit": { - "post": { + "/audience/{audienceId}": { + "delete": { "tags": [ "Audience" ], - "summary": "Starts recruiting users for the specified audience.", + "summary": "Deletes the specified audience.", "parameters": [ { "name": "audienceId", @@ -369,24 +369,20 @@ ] } ] - } - }, - "/audiences": { + }, "get": { "tags": [ "Audience" ], - "summary": "Queries all available audiences.", + "summary": "Gets an audience by its Id.", "parameters": [ { - "name": "request", - "in": "query", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryModel" - } - } + "name": "audienceId", + "in": "path", + "description": "The id of the audience to get.", + "required": true, + "schema": { + "type": "string" } } ], @@ -396,17 +392,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" + "$ref": "#/components/schemas/GetAudienceByIdResult" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" + "$ref": "#/components/schemas/GetAudienceByIdResult" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" + "$ref": "#/components/schemas/GetAudienceByIdResult" } } } @@ -427,19 +423,74 @@ ] } ] + }, + "patch": { + "tags": [ + "Audience" + ], + "summary": "Patches an existing audience.", + "parameters": [ + { + "name": "audienceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAudienceRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAudienceRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateAudienceRequest" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "security": [ + { + "Bearer": [], + "OpenIdConnect": [ + "openid", + "profile", + "email" + ], + "OAuth2": [ + "openid", + "profile", + "email" + ] + } + ] } }, - "/audience/{audienceId}": { + "/audience/{audienceId}/jobs": { "get": { "tags": [ "Audience" ], - "summary": "Gets an audience by its Id.", + "summary": "Queries all jobs for the specified audience.", "parameters": [ { "name": "audienceId", "in": "path", - "description": "The id of the audience to get.", "required": true, "schema": { "type": "string" @@ -450,22 +501,28 @@ "200": { "description": "OK", "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/GetAudienceByIdResult" - } - }, "application/json": { "schema": { - "$ref": "#/components/schemas/GetAudienceByIdResult" + "$ref": "#/components/schemas/PagedResultOfQueryJobsResult" } - }, - "text/json": { + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { "schema": { - "$ref": "#/components/schemas/GetAudienceByIdResult" + "$ref": "#/components/schemas/ValidationProblemDetails" } } } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" } }, "security": [ @@ -483,12 +540,14 @@ ] } ] - }, - "patch": { + } + }, + "/audience/{audienceId}/recruit": { + "post": { "tags": [ "Audience" ], - "summary": "Patches an existing audience.", + "summary": "Starts recruiting users for the specified audience.", "parameters": [ { "name": "audienceId", @@ -499,29 +558,83 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateAudienceRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateAudienceRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateAudienceRequest" + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } } } }, - "required": true + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } }, + "security": [ + { + "Bearer": [], + "OpenIdConnect": [ + "openid", + "profile", + "email" + ], + "OAuth2": [ + "openid", + "profile", + "email" + ] + } + ] + } + }, + "/audiences": { + "get": { + "tags": [ + "Audience" + ], + "summary": "Queries all available audiences.", + "parameters": [ + { + "name": "request", + "in": "query", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryModel" + } + } + } + } + ], "responses": { - "204": { - "description": "No Content" + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" + } + } + } } }, "security": [ @@ -5336,12 +5449,12 @@ ] } }, - "/job/definition/{definitionId}/revision/{revisionNumber}": { - "get": { + "/job/definition/{definitionId}": { + "delete": { "tags": [ "Job" ], - "summary": "Gets a specific revision for a job definition.", + "summary": "Deletes a job definition and all its revisions.", "parameters": [ { "name": "definitionId", @@ -5350,27 +5463,11 @@ "schema": { "type": "string" } - }, - { - "name": "revisionNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } } ], "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetJobRevisionEndpoint_Output" - } - } - } + "204": { + "description": "No Content" }, "400": { "description": "Bad Request", @@ -5404,14 +5501,12 @@ ] } ] - } - }, - "/job/definition/{definitionId}": { - "patch": { + }, + "get": { "tags": [ "Job" ], - "summary": "Updates a job definition.", + "summary": "Gets a job definition by its id.", "parameters": [ { "name": "definitionId", @@ -5422,11 +5517,70 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateJobDefinitionEndpoint_Input" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetJobDefinitionByIdEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "Bearer": [], + "OpenIdConnect": [ + "openid", + "profile", + "email" + ], + "OAuth2": [ + "openid", + "profile", + "email" + ] + } + ] + }, + "patch": { + "tags": [ + "Job" + ], + "summary": "Updates a job definition.", + "parameters": [ + { + "name": "definitionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateJobDefinitionEndpoint_Input" } } }, @@ -5470,6 +5624,76 @@ ] } }, + "/job/definition/{definitionId}/revision/{revisionNumber}": { + "get": { + "tags": [ + "Job" + ], + "summary": "Gets a specific revision for a job definition.", + "parameters": [ + { + "name": "definitionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "revisionNumber", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetJobRevisionEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "Bearer": [], + "OpenIdConnect": [ + "openid", + "profile", + "email" + ], + "OAuth2": [ + "openid", + "profile", + "email" + ] + } + ] + } + }, "/feedback": { "post": { "tags": [ @@ -11144,6 +11368,12 @@ "$ref": "#/components/schemas/QueryAudiencesResult" } }, + "ListOfQueryJobsResult": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryJobsResult" + } + }, "ListOfQueryRapidsForAudienceResult": { "type": "array", "items": { @@ -11262,6 +11492,36 @@ } } }, + "PagedResultOfQueryJobsResult": { + "required": [ + "total", + "page", + "pageSize", + "items" + ], + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64" + }, + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { + "$ref": "#/components/schemas/ListOfQueryJobsResult" + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, "PagedResultOfQueryRapidsForAudienceResult": { "required": [ "total", @@ -11346,6 +11606,43 @@ } } }, + "QueryJobsResult": { + "required": [ + "jobId", + "name", + "definitionId", + "audienceId", + "revisionNumber", + "status", + "createdAt" + ], + "type": "object", + "properties": { + "jobId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "definitionId": { + "type": "string" + }, + "audienceId": { + "type": "string" + }, + "revisionNumber": { + "type": "integer", + "format": "int32" + }, + "status": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, "QueryModel": { "type": "object", "properties": { @@ -12896,6 +13193,7 @@ "name", "isPublic", "createdAt", + "ownerId", "ownerMail" ], "type": "object", @@ -12913,6 +13211,10 @@ "type": "string", "format": "date-time" }, + "ownerId": { + "type": "string", + "format": "uuid" + }, "ownerMail": { "type": "string" } @@ -14873,6 +15175,10 @@ "type": "integer", "format": "int32" }, + "name": { + "type": "string", + "nullable": true + }, "priority": { "type": "integer", "format": "int32" @@ -14881,44 +15187,36 @@ }, "CreateJobEndpoint_Output": { "required": [ - "jobId" + "jobId", + "recruitingStarted" ], "type": "object", "properties": { "jobId": { "type": "string" + }, + "recruitingStarted": { + "type": "boolean" } } }, "CreateJobRevisionEndpoint_Input": { - "required": [ - "workflow", - "referee", - "datasetId" - ], "type": "object", "properties": { "workflow": { - "$ref": "#/components/schemas/IOrderWorkflowModel" + "$ref": "#/components/schemas/OptionOfIOrderWorkflowModel" }, "referee": { - "$ref": "#/components/schemas/IRefereeModel" + "$ref": "#/components/schemas/OptionOfIRefereeModel" }, "datasetId": { - "type": "string" + "$ref": "#/components/schemas/OptionOfstring" }, "featureFlags": { - "$ref": "#/components/schemas/ListOfFeatureFlag" + "$ref": "#/components/schemas/OptionOfIReadOnlyListOfFeatureFlag" }, "aggregatorType": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/AggregatorType" - } - ] + "$ref": "#/components/schemas/OptionOfAggregatorType" } } }, @@ -15079,22 +15377,23 @@ } } }, - "EloConfig": { - "type": "object", - "properties": { - "startingElo": { - "type": "integer", - "format": "int32" - }, - "kFactor": { - "type": "integer", - "format": "int32" - }, - "scalingFactor": { - "type": "integer", - "format": "int32" - } - } + "DefinitionType": { + "enum": [ + "Unknown", + "Classify", + "Compare", + "BoundingBox", + "Line", + "Polygon", + "Locate", + "Transcription", + "NamedEntity", + "FreeText", + "Scrub", + "Ranking", + "GroupedRanking", + "Evaluation" + ] }, "EloConfigModel": { "type": "object", @@ -15136,13 +15435,38 @@ "type": "string", "format": "binary" }, - "GetJobRevisionEndpoint_Output": { + "GetJobDefinitionByIdEndpoint_Output": { + "required": [ + "definitionId", + "name", + "definitionType", + "createdAt" + ], + "type": "object", + "properties": { + "definitionId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "definitionType": { + "$ref": "#/components/schemas/DefinitionType" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "GetJobRevisionEndpoint_Output": { "required": [ "definitionId", "revisionNumber", "pipelineId", "datasetId", - "workflowConfig", + "workflow", + "referee", "featureFlags", "createdAt", "createdById", @@ -15173,8 +15497,11 @@ } ] }, - "workflowConfig": { - "$ref": "#/components/schemas/IWorkflowConfig" + "workflow": { + "$ref": "#/components/schemas/IOrderWorkflowModel" + }, + "referee": { + "$ref": "#/components/schemas/IRefereeModel" }, "featureFlags": { "$ref": "#/components/schemas/ListOfFeatureFlag" @@ -15243,111 +15570,6 @@ } } }, - "IAsset": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IAssetFileAsset" - }, - { - "$ref": "#/components/schemas/IAssetMultiAsset" - }, - { - "$ref": "#/components/schemas/IAssetNullAsset" - }, - { - "$ref": "#/components/schemas/IAssetTextAsset" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "FileAsset": "#/components/schemas/IAssetFileAsset", - "MultiAsset": "#/components/schemas/IAssetMultiAsset", - "NullAsset": "#/components/schemas/IAssetNullAsset", - "TextAsset": "#/components/schemas/IAssetTextAsset" - } - } - }, - "IAssetFileAsset": { - "required": [ - "fileName", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "FileAsset" - ], - "type": "string" - }, - "fileName": { - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataCollection" - } - } - }, - "IAssetMultiAsset": { - "required": [ - "assets", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "MultiAsset" - ], - "type": "string" - }, - "assets": { - "$ref": "#/components/schemas/ListOfIAsset" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataCollection" - } - } - }, - "IAssetNullAsset": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "NullAsset" - ], - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataCollection" - } - } - }, - "IAssetTextAsset": { - "required": [ - "text", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "TextAsset" - ], - "type": "string" - }, - "text": { - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataCollection" - } - } - }, "IDatasetModel": { "required": [ "_t" @@ -15553,23 +15775,6 @@ } } }, - "IPairMakerConfig": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IPairMakerConfigOnlinePairMakerConfig" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "OnlinePairMakerConfig": "#/components/schemas/IPairMakerConfigOnlinePairMakerConfig" - } - } - }, "IPairMakerConfigModel": { "required": [ "_t" @@ -15608,27 +15813,6 @@ } } }, - "IPairMakerConfigOnlinePairMakerConfig": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "OnlinePairMakerConfig" - ], - "type": "string" - }, - "randomMatchesRatio": { - "type": "number", - "format": "float" - }, - "totalComparisonBudget": { - "type": "integer", - "format": "int32" - } - } - }, "IPipelineArtifactModel": { "required": [ "_t" @@ -16085,84 +16269,6 @@ } } }, - "IRefereeConfig": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IRefereeConfigNaiveRefereeConfig" - }, - { - "$ref": "#/components/schemas/IRefereeConfigNeverEndingRefereeConfig" - }, - { - "$ref": "#/components/schemas/IRefereeConfigProbabilisticAttachCategoryRefereeConfig" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "NaiveRefereeConfig": "#/components/schemas/IRefereeConfigNaiveRefereeConfig", - "NeverEndingRefereeConfig": "#/components/schemas/IRefereeConfigNeverEndingRefereeConfig", - "ProbabilisticAttachCategoryRefereeConfig": "#/components/schemas/IRefereeConfigProbabilisticAttachCategoryRefereeConfig" - } - } - }, - "IRefereeConfigNaiveRefereeConfig": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "NaiveRefereeConfig" - ], - "type": "string" - }, - "guessesRequired": { - "type": "integer", - "format": "int32" - } - } - }, - "IRefereeConfigNeverEndingRefereeConfig": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "NeverEndingRefereeConfig" - ], - "type": "string" - } - } - }, - "IRefereeConfigProbabilisticAttachCategoryRefereeConfig": { - "required": [ - "threshold", - "maxVotes", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "ProbabilisticAttachCategoryRefereeConfig" - ], - "type": "string" - }, - "threshold": { - "type": "number", - "format": "double" - }, - "maxVotes": { - "type": "integer", - "format": "int32" - } - } - }, "IRefereeModel": { "required": [ "_t" @@ -16484,187 +16590,6 @@ } } }, - "IWorkflowConfig": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IWorkflowConfigCompareWorkflowConfig" - }, - { - "$ref": "#/components/schemas/IWorkflowConfigEvaluationWorkflowConfig" - }, - { - "$ref": "#/components/schemas/IWorkflowConfigGroupedRankingWorkflowConfig" - }, - { - "$ref": "#/components/schemas/IWorkflowConfigSimpleWorkflowConfig" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "CompareWorkflowConfig": "#/components/schemas/IWorkflowConfigCompareWorkflowConfig", - "EvaluationWorkflowConfig": "#/components/schemas/IWorkflowConfigEvaluationWorkflowConfig", - "GroupedRankingWorkflowConfig": "#/components/schemas/IWorkflowConfigGroupedRankingWorkflowConfig", - "SimpleWorkflowConfig": "#/components/schemas/IWorkflowConfigSimpleWorkflowConfig" - } - } - }, - "IWorkflowConfigCompareWorkflowConfig": { - "required": [ - "criteria", - "referee", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "CompareWorkflowConfig" - ], - "type": "string" - }, - "criteria": { - "type": "string" - }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "context": { - "type": "string", - "nullable": true - }, - "contextAsset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAsset" - } - ] - }, - "eloConfig": { - "$ref": "#/components/schemas/EloConfig" - }, - "pairMakerConfig": { - "$ref": "#/components/schemas/IPairMakerConfig" - }, - "featureFlags": { - "$ref": "#/components/schemas/ListOfFeatureFlag" - } - } - }, - "IWorkflowConfigEvaluationWorkflowConfig": { - "required": [ - "validationSetId", - "referee", - "shouldAcceptIncorrect", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "EvaluationWorkflowConfig" - ], - "type": "string" - }, - "validationSetId": { - "type": "string" - }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "shouldAcceptIncorrect": { - "type": "boolean" - }, - "featureFlags": { - "$ref": "#/components/schemas/ListOfFeatureFlag" - } - } - }, - "IWorkflowConfigGroupedRankingWorkflowConfig": { - "required": [ - "criteria", - "referee", - "targetCountryCodes", - "maxParallelism", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "GroupedRankingWorkflowConfig" - ], - "type": "string" - }, - "criteria": { - "type": "string" - }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "targetCountryCodes": { - "type": "array", - "items": { - "type": "string" - } - }, - "maxParallelism": { - "type": "integer", - "format": "int32" - }, - "contexts": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "nullable": true - }, - "contextAssets": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IAsset" - }, - "nullable": true - }, - "eloConfig": { - "$ref": "#/components/schemas/EloConfig" - }, - "pairMakerConfig": { - "$ref": "#/components/schemas/IPairMakerConfig" - }, - "featureFlags": { - "$ref": "#/components/schemas/ListOfFeatureFlag" - } - } - }, - "IWorkflowConfigSimpleWorkflowConfig": { - "required": [ - "referee", - "blueprint", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "SimpleWorkflowConfig" - ], - "type": "string" - }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "blueprint": { - "$ref": "#/components/schemas/IRapidBlueprint" - }, - "featureFlags": { - "$ref": "#/components/schemas/ListOfFeatureFlag" - } - } - }, "ListOfAggregatedOrdersModel": { "type": "array", "items": { @@ -16683,12 +16608,6 @@ "$ref": "#/components/schemas/ConditionalValidationSelection_ValidationChance" } }, - "ListOfIAsset": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAsset" - } - }, "ListOfIPipelineArtifactModel": { "type": "array", "items": { @@ -16737,12 +16656,6 @@ "$ref": "#/components/schemas/QueryJobRevisionsResult" } }, - "ListOfQueryJobsResult": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryJobsResult" - } - }, "Metadata_IOrderMetadataInput": { "required": [ "_t" @@ -16819,6 +16732,55 @@ } } }, + "OptionOfAggregatorType": { + "enum": [ + "NonCommittal", + "MajorityVote", + "SimpleMatchup", + "LocateCluster", + "Classification", + "Locate", + "BoundingBox", + "Line", + "Transcription", + "SinglePointLocate", + "FreeText", + "Scrub", + "Ranking", + "MultiRanking", + null + ] + }, + "OptionOfIOrderWorkflowModel": { + "oneOf": [ + { + "$ref": "#/components/schemas/IOrderWorkflowModel" + }, + { + "nullable": true + } + ] + }, + "OptionOfIReadOnlyListOfFeatureFlag": { + "oneOf": [ + { + "$ref": "#/components/schemas/ListOfFeatureFlag" + }, + { + "nullable": true + } + ] + }, + "OptionOfIRefereeModel": { + "oneOf": [ + { + "$ref": "#/components/schemas/IRefereeModel" + }, + { + "nullable": true + } + ] + }, "OrderModel": { "required": [ "id", @@ -16993,54 +16955,24 @@ } } }, - "PagedResultOfQueryJobsResult": { + "PreviewOrderModel": { + "type": "object", + "properties": { + "ignoreFailedDatapoints": { + "type": "boolean" + } + } + }, + "PublicOrderModel": { "required": [ - "total", - "page", - "pageSize", - "items" + "id", + "name", + "isPublic" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { - "type": "integer", - "format": "int32" - }, - "items": { - "$ref": "#/components/schemas/ListOfQueryJobsResult" - }, - "totalPages": { - "type": "integer", - "format": "int32" - } - } - }, - "PreviewOrderModel": { - "type": "object", - "properties": { - "ignoreFailedDatapoints": { - "type": "boolean" - } - } - }, - "PublicOrderModel": { - "required": [ - "id", - "name", - "isPublic" - ], - "type": "object", - "properties": { - "id": { - "type": "string" + "id": { + "type": "string" }, "name": { "type": "string" @@ -17054,6 +16986,7 @@ "required": [ "definitionId", "name", + "definitionType", "createdAt", "revisionCount" ], @@ -17065,6 +16998,9 @@ "name": { "type": "string" }, + "definitionType": { + "$ref": "#/components/schemas/DefinitionType" + }, "createdAt": { "type": "string", "format": "date-time" @@ -17096,39 +17032,6 @@ } } }, - "QueryJobsResult": { - "required": [ - "jobId", - "definitionId", - "audienceId", - "revisionNumber", - "status", - "createdAt" - ], - "type": "object", - "properties": { - "jobId": { - "type": "string" - }, - "definitionId": { - "type": "string" - }, - "audienceId": { - "type": "string" - }, - "revisionNumber": { - "type": "integer", - "format": "int32" - }, - "status": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - } - } - }, "RetrievalMode": { "enum": [ "Random", @@ -17187,6 +17090,23 @@ } } }, + "EloConfig": { + "type": "object", + "properties": { + "startingElo": { + "type": "integer", + "format": "int32" + }, + "kFactor": { + "type": "integer", + "format": "int32" + }, + "scalingFactor": { + "type": "integer", + "format": "int32" + } + } + }, "GetPipelineByIdResult": { "required": [ "artifacts", @@ -17343,6 +17263,414 @@ } } }, + "IAsset": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IAssetFileAsset" + }, + { + "$ref": "#/components/schemas/IAssetMultiAsset" + }, + { + "$ref": "#/components/schemas/IAssetNullAsset" + }, + { + "$ref": "#/components/schemas/IAssetTextAsset" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "FileAsset": "#/components/schemas/IAssetFileAsset", + "MultiAsset": "#/components/schemas/IAssetMultiAsset", + "NullAsset": "#/components/schemas/IAssetNullAsset", + "TextAsset": "#/components/schemas/IAssetTextAsset" + } + } + }, + "IAssetFileAsset": { + "required": [ + "fileName", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "FileAsset" + ], + "type": "string" + }, + "fileName": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataCollection" + } + } + }, + "IAssetMultiAsset": { + "required": [ + "assets", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "MultiAsset" + ], + "type": "string" + }, + "assets": { + "$ref": "#/components/schemas/ListOfIAsset" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataCollection" + } + } + }, + "IAssetNullAsset": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "NullAsset" + ], + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataCollection" + } + } + }, + "IAssetTextAsset": { + "required": [ + "text", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "TextAsset" + ], + "type": "string" + }, + "text": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataCollection" + } + } + }, + "IPairMakerConfig": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IPairMakerConfigOnlinePairMakerConfig" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "OnlinePairMakerConfig": "#/components/schemas/IPairMakerConfigOnlinePairMakerConfig" + } + } + }, + "IPairMakerConfigOnlinePairMakerConfig": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "OnlinePairMakerConfig" + ], + "type": "string" + }, + "randomMatchesRatio": { + "type": "number", + "format": "float" + }, + "totalComparisonBudget": { + "type": "integer", + "format": "int32" + } + } + }, + "IRefereeConfig": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IRefereeConfigNaiveRefereeConfig" + }, + { + "$ref": "#/components/schemas/IRefereeConfigNeverEndingRefereeConfig" + }, + { + "$ref": "#/components/schemas/IRefereeConfigProbabilisticAttachCategoryRefereeConfig" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "NaiveRefereeConfig": "#/components/schemas/IRefereeConfigNaiveRefereeConfig", + "NeverEndingRefereeConfig": "#/components/schemas/IRefereeConfigNeverEndingRefereeConfig", + "ProbabilisticAttachCategoryRefereeConfig": "#/components/schemas/IRefereeConfigProbabilisticAttachCategoryRefereeConfig" + } + } + }, + "IRefereeConfigNaiveRefereeConfig": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "NaiveRefereeConfig" + ], + "type": "string" + }, + "guessesRequired": { + "type": "integer", + "format": "int32" + } + } + }, + "IRefereeConfigNeverEndingRefereeConfig": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "NeverEndingRefereeConfig" + ], + "type": "string" + } + } + }, + "IRefereeConfigProbabilisticAttachCategoryRefereeConfig": { + "required": [ + "threshold", + "maxVotes", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "ProbabilisticAttachCategoryRefereeConfig" + ], + "type": "string" + }, + "threshold": { + "type": "number", + "format": "double" + }, + "maxVotes": { + "type": "integer", + "format": "int32" + } + } + }, + "IWorkflowConfig": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IWorkflowConfigCompareWorkflowConfig" + }, + { + "$ref": "#/components/schemas/IWorkflowConfigEvaluationWorkflowConfig" + }, + { + "$ref": "#/components/schemas/IWorkflowConfigGroupedRankingWorkflowConfig" + }, + { + "$ref": "#/components/schemas/IWorkflowConfigSimpleWorkflowConfig" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "CompareWorkflowConfig": "#/components/schemas/IWorkflowConfigCompareWorkflowConfig", + "EvaluationWorkflowConfig": "#/components/schemas/IWorkflowConfigEvaluationWorkflowConfig", + "GroupedRankingWorkflowConfig": "#/components/schemas/IWorkflowConfigGroupedRankingWorkflowConfig", + "SimpleWorkflowConfig": "#/components/schemas/IWorkflowConfigSimpleWorkflowConfig" + } + } + }, + "IWorkflowConfigCompareWorkflowConfig": { + "required": [ + "criteria", + "referee", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "CompareWorkflowConfig" + ], + "type": "string" + }, + "criteria": { + "type": "string" + }, + "referee": { + "$ref": "#/components/schemas/IRefereeConfig" + }, + "context": { + "type": "string", + "nullable": true + }, + "contextAsset": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/IAsset" + } + ] + }, + "eloConfig": { + "$ref": "#/components/schemas/EloConfig" + }, + "pairMakerConfig": { + "$ref": "#/components/schemas/IPairMakerConfig" + }, + "featureFlags": { + "$ref": "#/components/schemas/ListOfFeatureFlag" + } + } + }, + "IWorkflowConfigEvaluationWorkflowConfig": { + "required": [ + "validationSetId", + "referee", + "shouldAcceptIncorrect", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "EvaluationWorkflowConfig" + ], + "type": "string" + }, + "validationSetId": { + "type": "string" + }, + "referee": { + "$ref": "#/components/schemas/IRefereeConfig" + }, + "shouldAcceptIncorrect": { + "type": "boolean" + }, + "featureFlags": { + "$ref": "#/components/schemas/ListOfFeatureFlag" + } + } + }, + "IWorkflowConfigGroupedRankingWorkflowConfig": { + "required": [ + "criteria", + "referee", + "targetCountryCodes", + "maxParallelism", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "GroupedRankingWorkflowConfig" + ], + "type": "string" + }, + "criteria": { + "type": "string" + }, + "referee": { + "$ref": "#/components/schemas/IRefereeConfig" + }, + "targetCountryCodes": { + "type": "array", + "items": { + "type": "string" + } + }, + "maxParallelism": { + "type": "integer", + "format": "int32" + }, + "contexts": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + }, + "contextAssets": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IAsset" + }, + "nullable": true + }, + "eloConfig": { + "$ref": "#/components/schemas/EloConfig" + }, + "pairMakerConfig": { + "$ref": "#/components/schemas/IPairMakerConfig" + }, + "featureFlags": { + "$ref": "#/components/schemas/ListOfFeatureFlag" + } + } + }, + "IWorkflowConfigSimpleWorkflowConfig": { + "required": [ + "referee", + "blueprint", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "SimpleWorkflowConfig" + ], + "type": "string" + }, + "referee": { + "$ref": "#/components/schemas/IRefereeConfig" + }, + "blueprint": { + "$ref": "#/components/schemas/IRapidBlueprint" + }, + "featureFlags": { + "$ref": "#/components/schemas/ListOfFeatureFlag" + } + } + }, + "ListOfIAsset": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IAsset" + } + }, "PreliminaryDownloadModel": { "type": "object", "properties": { diff --git a/src/rapidata/api_client/api/audience_api.py b/src/rapidata/api_client/api/audience_api.py index 66433758..d472aef7 100644 --- a/src/rapidata/api_client/api/audience_api.py +++ b/src/rapidata/api_client/api/audience_api.py @@ -24,6 +24,7 @@ from rapidata.api_client.models.create_audience_result import CreateAudienceResult from rapidata.api_client.models.get_audience_by_id_result import GetAudienceByIdResult from rapidata.api_client.models.paged_result_of_query_audiences_result import PagedResultOfQueryAudiencesResult +from rapidata.api_client.models.paged_result_of_query_jobs_result import PagedResultOfQueryJobsResult from rapidata.api_client.models.paged_result_of_query_rapids_for_audience_result import PagedResultOfQueryRapidsForAudienceResult from rapidata.api_client.models.query_model import QueryModel from rapidata.api_client.models.update_audience_request import UpdateAudienceRequest @@ -46,6 +47,275 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client + @validate_call + def audience_audience_id_delete( + self, + audience_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Deletes the specified audience. + + + :param audience_id: (required) + :type audience_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._audience_audience_id_delete_serialize( + audience_id=audience_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def audience_audience_id_delete_with_http_info( + self, + audience_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Deletes the specified audience. + + + :param audience_id: (required) + :type audience_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._audience_audience_id_delete_serialize( + audience_id=audience_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def audience_audience_id_delete_without_preload_content( + self, + audience_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Deletes the specified audience. + + + :param audience_id: (required) + :type audience_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._audience_audience_id_delete_serialize( + audience_id=audience_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _audience_audience_id_delete_serialize( + self, + audience_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if audience_id is not None: + _path_params['audienceId'] = audience_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OpenIdConnect', + 'Bearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/audience/{audienceId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def audience_audience_id_get( self, @@ -308,6 +578,275 @@ def _audience_audience_id_get_serialize( + @validate_call + def audience_audience_id_jobs_get( + self, + audience_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PagedResultOfQueryJobsResult: + """Queries all jobs for the specified audience. + + + :param audience_id: (required) + :type audience_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._audience_audience_id_jobs_get_serialize( + audience_id=audience_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PagedResultOfQueryJobsResult", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def audience_audience_id_jobs_get_with_http_info( + self, + audience_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PagedResultOfQueryJobsResult]: + """Queries all jobs for the specified audience. + + + :param audience_id: (required) + :type audience_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._audience_audience_id_jobs_get_serialize( + audience_id=audience_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PagedResultOfQueryJobsResult", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def audience_audience_id_jobs_get_without_preload_content( + self, + audience_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Queries all jobs for the specified audience. + + + :param audience_id: (required) + :type audience_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._audience_audience_id_jobs_get_serialize( + audience_id=audience_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PagedResultOfQueryJobsResult", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _audience_audience_id_jobs_get_serialize( + self, + audience_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if audience_id is not None: + _path_params['audienceId'] = audience_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OpenIdConnect', + 'Bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/audience/{audienceId}/jobs', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def audience_audience_id_patch( self, diff --git a/src/rapidata/api_client/api/job_api.py b/src/rapidata/api_client/api/job_api.py index 5dfba15d..0d8e7ae6 100644 --- a/src/rapidata/api_client/api/job_api.py +++ b/src/rapidata/api_client/api/job_api.py @@ -25,6 +25,7 @@ from rapidata.api_client.models.create_job_endpoint_output import CreateJobEndpointOutput from rapidata.api_client.models.create_job_revision_endpoint_input import CreateJobRevisionEndpointInput from rapidata.api_client.models.create_job_revision_endpoint_output import CreateJobRevisionEndpointOutput +from rapidata.api_client.models.get_job_definition_by_id_endpoint_output import GetJobDefinitionByIdEndpointOutput from rapidata.api_client.models.get_job_revision_endpoint_output import GetJobRevisionEndpointOutput from rapidata.api_client.models.paged_result_of_query_job_definitions_result import PagedResultOfQueryJobDefinitionsResult from rapidata.api_client.models.paged_result_of_query_job_revisions_result import PagedResultOfQueryJobRevisionsResult @@ -50,6 +51,544 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client + @validate_call + def job_definition_definition_id_delete( + self, + definition_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Deletes a job definition and all its revisions. + + + :param definition_id: (required) + :type definition_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_definition_definition_id_delete_serialize( + definition_id=definition_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def job_definition_definition_id_delete_with_http_info( + self, + definition_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Deletes a job definition and all its revisions. + + + :param definition_id: (required) + :type definition_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_definition_definition_id_delete_serialize( + definition_id=definition_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def job_definition_definition_id_delete_without_preload_content( + self, + definition_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Deletes a job definition and all its revisions. + + + :param definition_id: (required) + :type definition_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_definition_definition_id_delete_serialize( + definition_id=definition_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _job_definition_definition_id_delete_serialize( + self, + definition_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if definition_id is not None: + _path_params['definitionId'] = definition_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OpenIdConnect', + 'Bearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/job/definition/{definitionId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def job_definition_definition_id_get( + self, + definition_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetJobDefinitionByIdEndpointOutput: + """Gets a job definition by its id. + + + :param definition_id: (required) + :type definition_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_definition_definition_id_get_serialize( + definition_id=definition_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetJobDefinitionByIdEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def job_definition_definition_id_get_with_http_info( + self, + definition_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetJobDefinitionByIdEndpointOutput]: + """Gets a job definition by its id. + + + :param definition_id: (required) + :type definition_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_definition_definition_id_get_serialize( + definition_id=definition_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetJobDefinitionByIdEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def job_definition_definition_id_get_without_preload_content( + self, + definition_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Gets a job definition by its id. + + + :param definition_id: (required) + :type definition_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_definition_definition_id_get_serialize( + definition_id=definition_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetJobDefinitionByIdEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _job_definition_definition_id_get_serialize( + self, + definition_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if definition_id is not None: + _path_params['definitionId'] = definition_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OpenIdConnect', + 'Bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/job/definition/{definitionId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def job_definition_definition_id_patch( self, diff --git a/src/rapidata/api_client/models/create_job_endpoint_input.py b/src/rapidata/api_client/models/create_job_endpoint_input.py index e61ee4e5..03d5e10d 100644 --- a/src/rapidata/api_client/models/create_job_endpoint_input.py +++ b/src/rapidata/api_client/models/create_job_endpoint_input.py @@ -29,8 +29,9 @@ class CreateJobEndpointInput(BaseModel): job_definition_id: StrictStr = Field(alias="jobDefinitionId") audience_id: StrictStr = Field(alias="audienceId") revision_number: Optional[StrictInt] = Field(default=None, alias="revisionNumber") + name: Optional[StrictStr] = None priority: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = ["jobDefinitionId", "audienceId", "revisionNumber", "priority"] + __properties: ClassVar[List[str]] = ["jobDefinitionId", "audienceId", "revisionNumber", "name", "priority"] model_config = ConfigDict( populate_by_name=True, @@ -71,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + return _dict @classmethod @@ -86,6 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "jobDefinitionId": obj.get("jobDefinitionId"), "audienceId": obj.get("audienceId"), "revisionNumber": obj.get("revisionNumber"), + "name": obj.get("name"), "priority": obj.get("priority") }) return _obj diff --git a/src/rapidata/api_client/models/create_job_endpoint_output.py b/src/rapidata/api_client/models/create_job_endpoint_output.py index d9e5b8a2..1585a83b 100644 --- a/src/rapidata/api_client/models/create_job_endpoint_output.py +++ b/src/rapidata/api_client/models/create_job_endpoint_output.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,8 @@ class CreateJobEndpointOutput(BaseModel): CreateJobEndpointOutput """ # noqa: E501 job_id: StrictStr = Field(alias="jobId") - __properties: ClassVar[List[str]] = ["jobId"] + recruiting_started: StrictBool = Field(alias="recruitingStarted") + __properties: ClassVar[List[str]] = ["jobId", "recruitingStarted"] model_config = ConfigDict( populate_by_name=True, @@ -80,7 +81,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "jobId": obj.get("jobId") + "jobId": obj.get("jobId"), + "recruitingStarted": obj.get("recruitingStarted") }) return _obj diff --git a/src/rapidata/api_client/models/create_job_revision_endpoint_input.py b/src/rapidata/api_client/models/create_job_revision_endpoint_input.py index e88d4f02..7b0bf497 100644 --- a/src/rapidata/api_client/models/create_job_revision_endpoint_input.py +++ b/src/rapidata/api_client/models/create_job_revision_endpoint_input.py @@ -19,10 +19,10 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from rapidata.api_client.models.aggregator_type import AggregatorType from rapidata.api_client.models.feature_flag import FeatureFlag from rapidata.api_client.models.i_order_workflow_model import IOrderWorkflowModel from rapidata.api_client.models.i_referee_model import IRefereeModel +from rapidata.api_client.models.option_of_aggregator_type import OptionOfAggregatorType from typing import Optional, Set from typing_extensions import Self @@ -30,11 +30,11 @@ class CreateJobRevisionEndpointInput(BaseModel): """ CreateJobRevisionEndpointInput """ # noqa: E501 - workflow: IOrderWorkflowModel - referee: IRefereeModel - dataset_id: StrictStr = Field(alias="datasetId") + workflow: Optional[IOrderWorkflowModel] = None + referee: Optional[IRefereeModel] = None + dataset_id: Optional[StrictStr] = Field(default=None, alias="datasetId") feature_flags: Optional[List[FeatureFlag]] = Field(default=None, alias="featureFlags") - aggregator_type: Optional[AggregatorType] = Field(default=None, alias="aggregatorType") + aggregator_type: Optional[OptionOfAggregatorType] = Field(default=None, alias="aggregatorType") __properties: ClassVar[List[str]] = ["workflow", "referee", "datasetId", "featureFlags", "aggregatorType"] model_config = ConfigDict( @@ -89,10 +89,20 @@ def to_dict(self) -> Dict[str, Any]: if _item_feature_flags: _items.append(_item_feature_flags.to_dict()) _dict['featureFlags'] = _items - # set to None if aggregator_type (nullable) is None + # set to None if workflow (nullable) is None # and model_fields_set contains the field - if self.aggregator_type is None and "aggregator_type" in self.model_fields_set: - _dict['aggregatorType'] = None + if self.workflow is None and "workflow" in self.model_fields_set: + _dict['workflow'] = None + + # set to None if referee (nullable) is None + # and model_fields_set contains the field + if self.referee is None and "referee" in self.model_fields_set: + _dict['referee'] = None + + # set to None if dataset_id (nullable) is None + # and model_fields_set contains the field + if self.dataset_id is None and "dataset_id" in self.model_fields_set: + _dict['datasetId'] = None return _dict diff --git a/src/rapidata/api_client/models/definition_type.py b/src/rapidata/api_client/models/definition_type.py new file mode 100644 index 00000000..e0a16226 --- /dev/null +++ b/src/rapidata/api_client/models/definition_type.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class DefinitionType(str, Enum): + """ + DefinitionType + """ + + """ + allowed enum values + """ + UNKNOWN = 'Unknown' + CLASSIFY = 'Classify' + COMPARE = 'Compare' + BOUNDINGBOX = 'BoundingBox' + LINE = 'Line' + POLYGON = 'Polygon' + LOCATE = 'Locate' + TRANSCRIPTION = 'Transcription' + NAMEDENTITY = 'NamedEntity' + FREETEXT = 'FreeText' + SCRUB = 'Scrub' + RANKING = 'Ranking' + GROUPEDRANKING = 'GroupedRanking' + EVALUATION = 'Evaluation' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DefinitionType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/src/rapidata/api_client/models/get_benchmark_by_id_result.py b/src/rapidata/api_client/models/get_benchmark_by_id_result.py index f80000b2..f8a14130 100644 --- a/src/rapidata/api_client/models/get_benchmark_by_id_result.py +++ b/src/rapidata/api_client/models/get_benchmark_by_id_result.py @@ -31,8 +31,9 @@ class GetBenchmarkByIdResult(BaseModel): name: StrictStr is_public: StrictBool = Field(alias="isPublic") created_at: datetime = Field(alias="createdAt") + owner_id: StrictStr = Field(alias="ownerId") owner_mail: StrictStr = Field(alias="ownerMail") - __properties: ClassVar[List[str]] = ["id", "name", "isPublic", "createdAt", "ownerMail"] + __properties: ClassVar[List[str]] = ["id", "name", "isPublic", "createdAt", "ownerId", "ownerMail"] model_config = ConfigDict( populate_by_name=True, @@ -89,6 +90,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "isPublic": obj.get("isPublic"), "createdAt": obj.get("createdAt"), + "ownerId": obj.get("ownerId"), "ownerMail": obj.get("ownerMail") }) return _obj diff --git a/src/rapidata/api_client/models/get_job_definition_by_id_endpoint_output.py b/src/rapidata/api_client/models/get_job_definition_by_id_endpoint_output.py new file mode 100644 index 00000000..cfb44c24 --- /dev/null +++ b/src/rapidata/api_client/models/get_job_definition_by_id_endpoint_output.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from rapidata.api_client.models.definition_type import DefinitionType +from typing import Optional, Set +from typing_extensions import Self + +class GetJobDefinitionByIdEndpointOutput(BaseModel): + """ + GetJobDefinitionByIdEndpointOutput + """ # noqa: E501 + definition_id: StrictStr = Field(alias="definitionId") + name: StrictStr + definition_type: DefinitionType = Field(alias="definitionType") + created_at: datetime = Field(alias="createdAt") + __properties: ClassVar[List[str]] = ["definitionId", "name", "definitionType", "createdAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetJobDefinitionByIdEndpointOutput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetJobDefinitionByIdEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "definitionId": obj.get("definitionId"), + "name": obj.get("name"), + "definitionType": obj.get("definitionType"), + "createdAt": obj.get("createdAt") + }) + return _obj + + diff --git a/src/rapidata/api_client/models/get_job_revision_endpoint_output.py b/src/rapidata/api_client/models/get_job_revision_endpoint_output.py index 340b88dd..12950ea0 100644 --- a/src/rapidata/api_client/models/get_job_revision_endpoint_output.py +++ b/src/rapidata/api_client/models/get_job_revision_endpoint_output.py @@ -22,7 +22,8 @@ from typing import Any, ClassVar, Dict, List, Optional from rapidata.api_client.models.aggregator_type import AggregatorType from rapidata.api_client.models.feature_flag import FeatureFlag -from rapidata.api_client.models.i_workflow_config import IWorkflowConfig +from rapidata.api_client.models.i_order_workflow_model import IOrderWorkflowModel +from rapidata.api_client.models.i_referee_model import IRefereeModel from typing import Optional, Set from typing_extensions import Self @@ -35,12 +36,13 @@ class GetJobRevisionEndpointOutput(BaseModel): pipeline_id: StrictStr = Field(alias="pipelineId") dataset_id: StrictStr = Field(alias="datasetId") aggregator_type: Optional[AggregatorType] = Field(default=None, alias="aggregatorType") - workflow_config: IWorkflowConfig = Field(alias="workflowConfig") + workflow: IOrderWorkflowModel + referee: IRefereeModel feature_flags: List[FeatureFlag] = Field(alias="featureFlags") created_at: datetime = Field(alias="createdAt") created_by_id: StrictStr = Field(alias="createdById") created_by_mail: StrictStr = Field(alias="createdByMail") - __properties: ClassVar[List[str]] = ["definitionId", "revisionNumber", "pipelineId", "datasetId", "aggregatorType", "workflowConfig", "featureFlags", "createdAt", "createdById", "createdByMail"] + __properties: ClassVar[List[str]] = ["definitionId", "revisionNumber", "pipelineId", "datasetId", "aggregatorType", "workflow", "referee", "featureFlags", "createdAt", "createdById", "createdByMail"] model_config = ConfigDict( populate_by_name=True, @@ -81,9 +83,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of workflow_config - if self.workflow_config: - _dict['workflowConfig'] = self.workflow_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of workflow + if self.workflow: + _dict['workflow'] = self.workflow.to_dict() + # override the default output from pydantic by calling `to_dict()` of referee + if self.referee: + _dict['referee'] = self.referee.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in feature_flags (list) _items = [] if self.feature_flags: @@ -113,7 +118,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "pipelineId": obj.get("pipelineId"), "datasetId": obj.get("datasetId"), "aggregatorType": obj.get("aggregatorType"), - "workflowConfig": IWorkflowConfig.from_dict(obj["workflowConfig"]) if obj.get("workflowConfig") is not None else None, + "workflow": IOrderWorkflowModel.from_dict(obj["workflow"]) if obj.get("workflow") is not None else None, + "referee": IRefereeModel.from_dict(obj["referee"]) if obj.get("referee") is not None else None, "featureFlags": [FeatureFlag.from_dict(_item) for _item in obj["featureFlags"]] if obj.get("featureFlags") is not None else None, "createdAt": obj.get("createdAt"), "createdById": obj.get("createdById"), diff --git a/src/rapidata/api_client/models/option_of_aggregator_type.py b/src/rapidata/api_client/models/option_of_aggregator_type.py new file mode 100644 index 00000000..d7e90f61 --- /dev/null +++ b/src/rapidata/api_client/models/option_of_aggregator_type.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class OptionOfAggregatorType(str, Enum): + """ + OptionOfAggregatorType + """ + + """ + allowed enum values + """ + NONCOMMITTAL = 'NonCommittal' + MAJORITYVOTE = 'MajorityVote' + SIMPLEMATCHUP = 'SimpleMatchup' + LOCATECLUSTER = 'LocateCluster' + CLASSIFICATION = 'Classification' + LOCATE = 'Locate' + BOUNDINGBOX = 'BoundingBox' + LINE = 'Line' + TRANSCRIPTION = 'Transcription' + SINGLEPOINTLOCATE = 'SinglePointLocate' + FREETEXT = 'FreeText' + SCRUB = 'Scrub' + RANKING = 'Ranking' + MULTIRANKING = 'MultiRanking' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OptionOfAggregatorType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/src/rapidata/api_client/models/query_job_definitions_result.py b/src/rapidata/api_client/models/query_job_definitions_result.py index abeb597f..136f9806 100644 --- a/src/rapidata/api_client/models/query_job_definitions_result.py +++ b/src/rapidata/api_client/models/query_job_definitions_result.py @@ -20,6 +20,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List +from rapidata.api_client.models.definition_type import DefinitionType from typing import Optional, Set from typing_extensions import Self @@ -29,9 +30,10 @@ class QueryJobDefinitionsResult(BaseModel): """ # noqa: E501 definition_id: StrictStr = Field(alias="definitionId") name: StrictStr + definition_type: DefinitionType = Field(alias="definitionType") created_at: datetime = Field(alias="createdAt") revision_count: StrictInt = Field(alias="revisionCount") - __properties: ClassVar[List[str]] = ["definitionId", "name", "createdAt", "revisionCount"] + __properties: ClassVar[List[str]] = ["definitionId", "name", "definitionType", "createdAt", "revisionCount"] model_config = ConfigDict( populate_by_name=True, @@ -86,6 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "definitionId": obj.get("definitionId"), "name": obj.get("name"), + "definitionType": obj.get("definitionType"), "createdAt": obj.get("createdAt"), "revisionCount": obj.get("revisionCount") }) diff --git a/src/rapidata/api_client/models/query_jobs_result.py b/src/rapidata/api_client/models/query_jobs_result.py index 31c82d90..e34d2747 100644 --- a/src/rapidata/api_client/models/query_jobs_result.py +++ b/src/rapidata/api_client/models/query_jobs_result.py @@ -28,12 +28,13 @@ class QueryJobsResult(BaseModel): QueryJobsResult """ # noqa: E501 job_id: StrictStr = Field(alias="jobId") + name: StrictStr definition_id: StrictStr = Field(alias="definitionId") audience_id: StrictStr = Field(alias="audienceId") revision_number: StrictInt = Field(alias="revisionNumber") status: StrictStr created_at: datetime = Field(alias="createdAt") - __properties: ClassVar[List[str]] = ["jobId", "definitionId", "audienceId", "revisionNumber", "status", "createdAt"] + __properties: ClassVar[List[str]] = ["jobId", "name", "definitionId", "audienceId", "revisionNumber", "status", "createdAt"] model_config = ConfigDict( populate_by_name=True, @@ -87,6 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "jobId": obj.get("jobId"), + "name": obj.get("name"), "definitionId": obj.get("definitionId"), "audienceId": obj.get("audienceId"), "revisionNumber": obj.get("revisionNumber"), diff --git a/src/rapidata/api_client_README.md b/src/rapidata/api_client_README.md index 6ac5157c..c24b2bcb 100644 --- a/src/rapidata/api_client_README.md +++ b/src/rapidata/api_client_README.md @@ -78,7 +78,9 @@ Class | Method | HTTP request | Description *AssetApi* | [**asset_file_name_metadata_get**](rapidata/api_client/docs/AssetApi.md#asset_file_name_metadata_get) | **GET** /asset/{fileName}/metadata | Gets the metadata for an asset by file name. *AssetApi* | [**asset_file_post**](rapidata/api_client/docs/AssetApi.md#asset_file_post) | **POST** /asset/file | Uploads a single asset to S3 and returns the asset details. *AssetApi* | [**asset_url_post**](rapidata/api_client/docs/AssetApi.md#asset_url_post) | **POST** /asset/url | Uploads a single asset to S3 and returns the asset details. +*AudienceApi* | [**audience_audience_id_delete**](rapidata/api_client/docs/AudienceApi.md#audience_audience_id_delete) | **DELETE** /audience/{audienceId} | Deletes the specified audience. *AudienceApi* | [**audience_audience_id_get**](rapidata/api_client/docs/AudienceApi.md#audience_audience_id_get) | **GET** /audience/{audienceId} | Gets an audience by its Id. +*AudienceApi* | [**audience_audience_id_jobs_get**](rapidata/api_client/docs/AudienceApi.md#audience_audience_id_jobs_get) | **GET** /audience/{audienceId}/jobs | Queries all jobs for the specified audience. *AudienceApi* | [**audience_audience_id_patch**](rapidata/api_client/docs/AudienceApi.md#audience_audience_id_patch) | **PATCH** /audience/{audienceId} | Patches an existing audience. *AudienceApi* | [**audience_audience_id_rapid_post**](rapidata/api_client/docs/AudienceApi.md#audience_audience_id_rapid_post) | **POST** /audience/{audienceId}/rapid | Adds a new rapid to be used to train users for the specified audience. *AudienceApi* | [**audience_audience_id_rapids_get**](rapidata/api_client/docs/AudienceApi.md#audience_audience_id_rapids_get) | **GET** /audience/{audienceId}/rapids | Queries all rapids for the specified audience. @@ -136,6 +138,8 @@ Class | Method | HTTP request | Description *IdentityApi* | [**identity_bridge_token_post**](rapidata/api_client/docs/IdentityApi.md#identity_bridge_token_post) | **POST** /identity/bridge-token | Creates a pair of read and write keys for a client. The write key is used to store the authentication result. The read key is used to retrieve the authentication result. *IdentityApi* | [**identity_google_one_tap_post**](rapidata/api_client/docs/IdentityApi.md#identity_google_one_tap_post) | **POST** /identity/google-one-tap | Signs in a user using a token received from Google One Tap. *IdentityApi* | [**identity_referrer_post**](rapidata/api_client/docs/IdentityApi.md#identity_referrer_post) | **POST** /identity/referrer | Sets the referrer for the current customer. +*JobApi* | [**job_definition_definition_id_delete**](rapidata/api_client/docs/JobApi.md#job_definition_definition_id_delete) | **DELETE** /job/definition/{definitionId} | Deletes a job definition and all its revisions. +*JobApi* | [**job_definition_definition_id_get**](rapidata/api_client/docs/JobApi.md#job_definition_definition_id_get) | **GET** /job/definition/{definitionId} | Gets a job definition by its id. *JobApi* | [**job_definition_definition_id_patch**](rapidata/api_client/docs/JobApi.md#job_definition_definition_id_patch) | **PATCH** /job/definition/{definitionId} | Updates a job definition. *JobApi* | [**job_definition_definition_id_revision_post**](rapidata/api_client/docs/JobApi.md#job_definition_definition_id_revision_post) | **POST** /job/definition/{definitionId}/revision | Creates a new revision for an existing job definition. *JobApi* | [**job_definition_definition_id_revision_revision_number_get**](rapidata/api_client/docs/JobApi.md#job_definition_definition_id_revision_revision_number_get) | **GET** /job/definition/{definitionId}/revision/{revisionNumber} | Gets a specific revision for a job definition. @@ -276,6 +280,7 @@ Class | Method | HTTP request | Description - [CreateUnsupportedOrderModel](rapidata/api_client/docs/CreateUnsupportedOrderModel.md) - [CreateValidationSetModel](rapidata/api_client/docs/CreateValidationSetModel.md) - [DatapointState](rapidata/api_client/docs/DatapointState.md) + - [DefinitionType](rapidata/api_client/docs/DefinitionType.md) - [DynamicClientRegistrationRequest](rapidata/api_client/docs/DynamicClientRegistrationRequest.md) - [EloConfig](rapidata/api_client/docs/EloConfig.md) - [EloConfigModel](rapidata/api_client/docs/EloConfigModel.md) @@ -305,6 +310,7 @@ Class | Method | HTTP request | Description - [GetFileMetadataResult](rapidata/api_client/docs/GetFileMetadataResult.md) - [GetGroupedRankingWorkflowResultsModel](rapidata/api_client/docs/GetGroupedRankingWorkflowResultsModel.md) - [GetGroupedRankingWorkflowResultsResult](rapidata/api_client/docs/GetGroupedRankingWorkflowResultsResult.md) + - [GetJobDefinitionByIdEndpointOutput](rapidata/api_client/docs/GetJobDefinitionByIdEndpointOutput.md) - [GetJobRevisionEndpointOutput](rapidata/api_client/docs/GetJobRevisionEndpointOutput.md) - [GetLeaderboardByIdResult](rapidata/api_client/docs/GetLeaderboardByIdResult.md) - [GetOrderByIdResult](rapidata/api_client/docs/GetOrderByIdResult.md) @@ -526,6 +532,7 @@ Class | Method | HTTP request | Description - [NamedClassification](rapidata/api_client/docs/NamedClassification.md) - [NewsletterModel](rapidata/api_client/docs/NewsletterModel.md) - [NotAvailableYetResult](rapidata/api_client/docs/NotAvailableYetResult.md) + - [OptionOfAggregatorType](rapidata/api_client/docs/OptionOfAggregatorType.md) - [OrderModel](rapidata/api_client/docs/OrderModel.md) - [OrderState](rapidata/api_client/docs/OrderState.md) - [PageInfo](rapidata/api_client/docs/PageInfo.md)