diff --git a/openapi/schemas/audience.openapi.json b/openapi/schemas/audience.openapi.json index 4fe6f2f7..a215c609 100644 --- a/openapi/schemas/audience.openapi.json +++ b/openapi/schemas/audience.openapi.json @@ -11,6 +11,53 @@ } ], "paths": { + "/audience": { + "post": { + "tags": [ + "Audience" + ], + "summary": "Creates a new empty audience.", + "requestBody": { + "description": "The properties of the audience to create.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAudienceEndpoint_Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAudienceEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, "/audience/{audienceId}": { "delete": { "tags": [ @@ -54,12 +101,12 @@ "tags": [ "Audience" ], - "summary": "Gets an audience by its Id.", + "summary": "Returns the audience with the specified id.", "parameters": [ { "name": "audienceId", "in": "path", - "description": "The id of the audience to get.", + "description": "The unique identifier of the audience.", "required": true, "schema": { "type": "string" @@ -70,22 +117,28 @@ "200": { "description": "OK", "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/GetAudienceByIdResult" - } - }, "application/json": { "schema": { - "$ref": "#/components/schemas/GetAudienceByIdResult" + "$ref": "#/components/schemas/GetAudienceByIdEndpoint_Output" } - }, - "text/json": { + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { "schema": { - "$ref": "#/components/schemas/GetAudienceByIdResult" + "$ref": "#/components/schemas/ValidationProblemDetails" } } } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" } } }, @@ -98,6 +151,7 @@ { "name": "audienceId", "in": "path", + "description": "The unique identifier of the audience to update.", "required": true, "schema": { "type": "string" @@ -105,20 +159,11 @@ } ], "requestBody": { + "description": "The audience properties to update.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateAudienceRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateAudienceRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateAudienceRequest" + "$ref": "#/components/schemas/UpdateAudienceEndpoint_Input" } } }, @@ -127,6 +172,22 @@ "responses": { "204": { "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" } } } @@ -265,6 +326,360 @@ } } }, + "/audiences": { + "get": { + "tags": [ + "Audience" + ], + "summary": "Queries all audiences visible to the caller.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "The 1-based page index.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "page_size", + "in": "query", + "description": "The number of items per page.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "name", + "-name", + "created_at", + "-created_at", + "status", + "-status", + "qualified_user_count", + "-qualified_user_count" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "name": "name", + "in": "query", + "description": "Filter by name.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "status", + "in": "query", + "description": "Filter by status.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "is_public", + "in": "query", + "description": "Filter by is_public.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "is_distilling", + "in": "query", + "description": "Filter by is_distilling.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "owner_mail", + "in": "query", + "description": "Filter by owner_mail.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "created_at", + "in": "query", + "description": "Filter by created_at.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryAudiencesEndpoint_PagedResultOfOutput" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, "/audience/{audienceId}/rebuild-distilling-campaign": { "post": { "tags": [ @@ -703,256 +1118,6 @@ } } } - }, - "/audience/{audienceId}/rapid/{rapidId}": { - "patch": { - "tags": [ - "Rapids" - ], - "summary": "Updates a rapid's validation properties within an audience.", - "parameters": [ - { - "name": "audienceId", - "in": "path", - "description": "The unique identifier of the audience.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "rapidId", - "in": "path", - "description": "The unique identifier of the rapid to update.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "The rapid validation properties to update.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateAudienceRapidEndpoint_Input" - } - } - }, - "required": true - }, - "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": [ - "Audience" - ], - "summary": "Creates a new empty audience.", - "description": "An audience is a group of users that are trained to solve particular tasks.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAudienceRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/CreateAudienceRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/CreateAudienceRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/CreateAudienceResult" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAudienceResult" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/CreateAudienceResult" - } - } - } - } - } - } - }, - "/audience/{audienceId}/rapid": { - "post": { - "tags": [ - "Audience" - ], - "summary": "Adds a new rapid to be used to train users for the specified audience.", - "parameters": [ - { - "name": "audienceId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddRapidToAudienceModel" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AddRapidToAudienceModel" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AddRapidToAudienceModel" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "No Content" - } - }, - "deprecated": true - } - }, - "/audience/{audienceId}/rapids": { - "get": { - "tags": [ - "Audience" - ], - "summary": "Queries all rapids for the specified audience.", - "parameters": [ - { - "name": "audienceId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "request", - "in": "query", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryModel" - } - } - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryRapidsOutput" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryRapidsOutput" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryRapidsOutput" - } - } - } - } - }, - "deprecated": true - } } }, "components": { @@ -1037,168 +1202,59 @@ }, "description": "Input model for adding an example to an audience." }, - "AddRapidToAudienceModel": { + "AudienceJobState": { + "enum": [ + "Running", + "Completed", + "Failed" + ] + }, + "AudienceStatus": { + "enum": [ + "Created", + "Pending", + "Recruiting", + "Ready" + ], + "description": "The current status of the audience." + }, + "BoostLevel": { + "enum": [ + "None", + "Stable", + "Distilling", + "Global" + ], + "description": "The current boost level applied to the audience." + }, + "CreateAudienceEndpoint_Input": { "required": [ - "asset", - "payload", - "randomCorrectProbability" + "name" ], "type": "object", "properties": { - "asset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - } - ], - "description": "The asset to use for the rapid." + "name": { + "type": "string", + "description": "The name to give the newly created audience." }, - "payload": { - "allOf": [ - { - "$ref": "#/components/schemas/IRapidPayload" - } - ], - "description": "The payload to use for the rapid." + "description": { + "type": "string", + "description": "An optional markdown-supported description of the audience's purpose.", + "nullable": true }, - "truth": { + "filters": { "allOf": [ { - "$ref": "#/components/schemas/IValidationTruth" + "type": "array", + "items": { + "$ref": "#/components/schemas/IAudienceFilter" + }, + "nullable": true } ], - "description": "The ground truth for the rapid." + "description": "The filters to apply to any orders created for this audience.\n A filter can be used to restrict the audience to a specific subset of users." }, - "randomCorrectProbability": { - "type": "number", - "description": "The probability for an answer to be correct when randomly guessing.", - "format": "double" - }, - "explanation": { - "type": "string", - "description": "An explanation for the users if they answer the rapid incorrectly.", - "nullable": true - }, - "context": { - "type": "string", - "description": "An optional textual context that provides additional information to the user about the rapid.", - "nullable": true - }, - "contextAsset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - } - ], - "description": "An optional asset that provides additional context to the user about the rapid." - }, - "featureFlags": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - }, - "nullable": true - } - ], - "description": "The feature flags to enable for the rapid." - }, - "isCommonSense": { - "type": "boolean", - "description": "Whether this rapid should be treated as commonsense validation.", - "nullable": true - } - }, - "description": "The model for adding a validation rapid with asset in JSON body." - }, - "AudienceJobState": { - "enum": [ - "Running", - "Completed", - "Failed" - ] - }, - "AudienceStatus": { - "enum": [ - "Created", - "Pending", - "Recruiting", - "Ready" - ] - }, - "BoostLevel": { - "enum": [ - "None", - "Stable", - "Distilling", - "Global" - ] - }, - "BoxShape": { - "type": "object", - "properties": { - "xMin": { - "type": "number", - "format": "double" - }, - "yMin": { - "type": "number", - "format": "double" - }, - "xMax": { - "type": "number", - "format": "double" - }, - "yMax": { - "type": "number", - "format": "double" - } - } - }, - "ClassifyPayload_Category": { - "required": [ - "label", - "value" - ], - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "CreateAudienceRequest": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name to give the newly created audience." - }, - "description": { - "type": "string", - "description": "An optional markdown-supported description of the audience's purpose.", - "nullable": true - }, - "filters": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAudienceFilter" - }, - "nullable": true - } - ], - "description": "The filters to apply to any orders created for this audience.\n A filter can be used to restrict the audience to a specific subset of users." - }, - "graduationScore": { + "graduationScore": { "type": "number", "description": "The score used to determine whether a user graduates from the distilling campaign.", "format": "double" @@ -1236,24 +1292,6 @@ "description": "Score floor - users below this score exit the distilling campaign\n (only after completing DropMinResponses).\n Defaults to 0.2. Set to null to disable this exit condition.", "format": "double" }, - "minimumUserScore": { - "type": "number", - "description": "Use instead.", - "format": "double", - "deprecated": true - }, - "minDistillingScoreFloor": { - "type": "number", - "description": "Use instead.", - "format": "double", - "deprecated": true - }, - "minDistillingResponses": { - "type": "integer", - "description": "Use instead.", - "format": "uint32", - "deprecated": true - }, "isDistillingCampaignSticky": { "type": "boolean", "description": "Whether the distilling campaign should be sticky (users stay until filters don't match).\n Defaults to true (Temporary sticky)." @@ -1296,17 +1334,17 @@ "description": "Minimum graduated users before disabling distilling boost.\n Defaults to 100. Admin-only override.", "format": "int32" } - }, - "description": "The body request to create an audience." + } }, - "CreateAudienceResult": { + "CreateAudienceEndpoint_Output": { "required": [ "audienceId" ], "type": "object", "properties": { "audienceId": { - "type": "string" + "type": "string", + "description": "The unique identifier of the newly created audience." } } }, @@ -1315,7 +1353,8 @@ "Random", "Shuffled", "Sequential" - ] + ], + "description": "The retrieval mode used by the distilling campaign to select rapids for users.\n Defaults to Shuffled." }, "ExampleCategory": { "required": [ @@ -1380,44 +1419,7 @@ "Audio" ] }, - "Filter": { - "type": "object", - "properties": { - "field": { - "type": "string", - "nullable": true - }, - "value": { }, - "operator": { - "$ref": "#/components/schemas/FilterOperator" - }, - "logic": { - "$ref": "#/components/schemas/LogicOperator" - }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Filter" - } - } - } - }, - "FilterOperator": { - "enum": [ - "Eq", - "Neq", - "Gt", - "Gte", - "Lt", - "Lte", - "Contains", - "StartsWith", - "EndsWith", - "In", - "NotContains" - ] - }, - "GetAudienceByIdResult": { + "GetAudienceByIdEndpoint_Output": { "required": [ "id", "name", @@ -1436,13 +1438,16 @@ "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "description": "The unique identifier of the audience." }, "name": { - "type": "string" + "type": "string", + "description": "The name of the audience." }, "description": { "type": "string", + "description": "The markdown-supported description of the audience.", "nullable": true }, "status": { @@ -1450,1473 +1455,612 @@ }, "qualifiedUserCount": { "type": "integer", + "description": "The number of users that have qualified for this audience.", "format": "int64" }, "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAudienceFilter" - } + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/IAudienceFilter" + } + } + ], + "description": "The filters applied to this audience." }, "logo": { "type": "string", + "description": "The URL of the audience logo, if any.", "nullable": true }, "createdAt": { "type": "string", + "description": "The timestamp when the audience was created.", "format": "date-time" }, "ownerMail": { - "type": "string" + "type": "string", + "description": "The email of the audience owner." }, "isPublic": { - "type": "boolean" + "type": "boolean", + "description": "Whether the audience is publicly visible." }, "isDistilling": { - "type": "boolean" + "type": "boolean", + "description": "Whether the audience is currently distilling users." }, "distillingCampaignId": { - "type": "string" + "type": "string", + "description": "The id of the distilling campaign associated with the audience." }, "minGraduatedForDistillingBoost": { "type": "integer", + "description": "Minimum graduated users before disabling distilling boost.", "format": "int32" }, "minDistillingForGlobalBoost": { "type": "integer", + "description": "Minimum distilling users before disabling global boost.", "format": "int32" }, "graduationScore": { "type": "number", + "description": "The score used to determine whether a user graduates from the distilling campaign.", "format": "double" }, "demotionScore": { "type": "number", + "description": "Score below which a graduated user is demoted back to distilling.", "format": "double" }, "maxDistillingResponses": { "type": "integer", + "description": "Maximum responses before user exits the distilling campaign.", "format": "uint32" }, "dropMinResponses": { "type": "integer", + "description": "Minimum responses before the drop score check applies.", "format": "uint32" }, "dropScore": { "type": "number", + "description": "Score floor - users below this score exit the distilling campaign.", "format": "double" }, "maxDistillingSessions": { "type": "integer", + "description": "Maximum sessions before user exits the distilling campaign.", "format": "uint32" }, "inactivityDropDays": { "type": "integer", + "description": "Number of days of inactivity before a distilling user is dropped.", "format": "uint32" }, "minSubmissionRate": { "type": "number", + "description": "Minimum submission rate before a user is dropped.", "format": "double" }, "minSessionsForSubmissionRate": { "type": "integer", + "description": "Minimum number of sessions before the submission rate check applies.", "format": "uint32" }, "minSubmissionRateGraduated": { "type": "number", - "format": "double" - }, - "distillingRetrievalMode": { - "$ref": "#/components/schemas/DistillingRetrievalMode" - }, - "minimumUserScore": { - "type": "number", - "format": "double", - "deprecated": true - }, - "minDistillingScoreFloor": { - "type": "number", - "format": "double", - "deprecated": true - }, - "minDistillingResponses": { - "type": "integer", - "format": "uint32", - "deprecated": true - }, - "boostLevel": { - "$ref": "#/components/schemas/BoostLevel" - }, - "randomAdmissionProbability": { - "type": "number", - "format": "double" - }, - "health": { - "type": "number", - "format": "double" - }, - "graduated": { - "type": "integer", - "format": "int64" - }, - "dropped": { - "type": "integer", - "format": "int64" - } - } - }, - "GetAudienceUserStateMetricsResult": { - "required": [ - "usersPerState" - ], - "type": "object", - "properties": { - "usersPerState": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "int32" - } - } - } - }, - "IAssetInput": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IAssetInputExistingAssetInput" - }, - { - "$ref": "#/components/schemas/IAssetInputMultiAssetInput" - }, - { - "$ref": "#/components/schemas/IAssetInputTextAssetInput" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "ExistingAssetInput": "#/components/schemas/IAssetInputExistingAssetInput", - "MultiAssetInput": "#/components/schemas/IAssetInputMultiAssetInput", - "TextAssetInput": "#/components/schemas/IAssetInputTextAssetInput" - } - } - }, - "IAssetInputExistingAssetInput": { - "required": [ - "name", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "ExistingAssetInput" - ], - "type": "string" - }, - "name": { - "type": "string" - }, - "metadata": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/MetadataInputCollection" - } - ] - }, - "identifier": { - "type": "string", - "nullable": true - } - } - }, - "IAssetInputMultiAssetInput": { - "required": [ - "assets", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "MultiAssetInput" - ], - "type": "string" - }, - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAssetInput" - } - }, - "metadata": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/MetadataInputCollection" - } - ] - }, - "identifier": { - "type": "string", - "nullable": true - } - } - }, - "IAssetInputTextAssetInput": { - "required": [ - "text", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "TextAssetInput" - ], - "type": "string" - }, - "text": { - "type": "string" - }, - "metadata": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/MetadataInputCollection" - } - ] - }, - "identifier": { - "type": "string", - "nullable": true - } - } - }, - "IAssetModel": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IAssetModelFileAssetModel" - }, - { - "$ref": "#/components/schemas/IAssetModelMultiAssetModel" - }, - { - "$ref": "#/components/schemas/IAssetModelNullAssetModel" - }, - { - "$ref": "#/components/schemas/IAssetModelTextAssetModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "FileAsset": "#/components/schemas/IAssetModelFileAssetModel", - "MultiAsset": "#/components/schemas/IAssetModelMultiAssetModel", - "NullAsset": "#/components/schemas/IAssetModelNullAssetModel", - "TextAsset": "#/components/schemas/IAssetModelTextAssetModel" - } - } - }, - "IAssetModelFileAssetModel": { - "required": [ - "fileName", - "metadata", - "identifier", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "FileAsset" - ], - "type": "string" - }, - "fileName": { - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataModelCollection" - }, - "identifier": { - "type": "string" - } - } - }, - "IAssetModelMultiAssetModel": { - "required": [ - "assets", - "metadata", - "identifier", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "MultiAsset" - ], - "type": "string" - }, - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAssetModel" - } - }, - "metadata": { - "$ref": "#/components/schemas/MetadataModelCollection" - }, - "identifier": { - "type": "string" - } - } - }, - "IAssetModelNullAssetModel": { - "required": [ - "metadata", - "identifier", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "NullAsset" - ], - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataModelCollection" - }, - "identifier": { - "type": "string" - } - } - }, - "IAssetModelTextAssetModel": { - "required": [ - "text", - "metadata", - "identifier", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "TextAsset" - ], - "type": "string" - }, - "text": { - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataModelCollection" - }, - "identifier": { - "type": "string" - } - } - }, - "IAudienceFilter": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IAudienceFilterAndAudienceFilter" - }, - { - "$ref": "#/components/schemas/IAudienceFilterCountryAudienceFilter" - }, - { - "$ref": "#/components/schemas/IAudienceFilterLanguageAudienceFilter" - }, - { - "$ref": "#/components/schemas/IAudienceFilterNotAudienceFilter" - }, - { - "$ref": "#/components/schemas/IAudienceFilterOrAudienceFilter" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "AndFilter": "#/components/schemas/IAudienceFilterAndAudienceFilter", - "CountryFilter": "#/components/schemas/IAudienceFilterCountryAudienceFilter", - "LanguageFilter": "#/components/schemas/IAudienceFilterLanguageAudienceFilter", - "NotFilter": "#/components/schemas/IAudienceFilterNotAudienceFilter", - "OrFilter": "#/components/schemas/IAudienceFilterOrAudienceFilter" - } - } - }, - "IAudienceFilterAndAudienceFilter": { - "required": [ - "filters", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "AndFilter" - ], - "type": "string" - }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAudienceFilter" - } - } - } - }, - "IAudienceFilterCountryAudienceFilter": { - "required": [ - "countries", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "CountryFilter" - ], - "type": "string" - }, - "countries": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "IAudienceFilterLanguageAudienceFilter": { - "required": [ - "languages", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "LanguageFilter" - ], - "type": "string" - }, - "languages": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "IAudienceFilterNotAudienceFilter": { - "required": [ - "filter", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "NotFilter" - ], - "type": "string" - }, - "filter": { - "$ref": "#/components/schemas/IAudienceFilter" - } - } - }, - "IAudienceFilterOrAudienceFilter": { - "required": [ - "filters", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "OrFilter" - ], - "type": "string" - }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAudienceFilter" - } - } - } - }, - "IExamplePayload": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IExamplePayloadClassifyExamplePayload" - }, - { - "$ref": "#/components/schemas/IExamplePayloadCompareExamplePayload" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "ClassifyExamplePayload": "#/components/schemas/IExamplePayloadClassifyExamplePayload", - "CompareExamplePayload": "#/components/schemas/IExamplePayloadCompareExamplePayload" - } - } - }, - "IExamplePayloadClassifyExamplePayload": { - "required": [ - "categories", - "title", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "ClassifyExamplePayload" - ], - "type": "string" - }, - "categories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExampleCategory" - } - }, - "title": { - "type": "string" - } - } - }, - "IExamplePayloadCompareExamplePayload": { - "required": [ - "criteria", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "CompareExamplePayload" - ], - "type": "string" - }, - "criteria": { - "type": "string" - } - } - }, - "IExampleTruth": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IExampleTruthClassifyExampleTruth" - }, - { - "$ref": "#/components/schemas/IExampleTruthCompareExampleTruth" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "ClassifyExampleTruth": "#/components/schemas/IExampleTruthClassifyExampleTruth", - "CompareExampleTruth": "#/components/schemas/IExampleTruthCompareExampleTruth" - } - } - }, - "IExampleTruthClassifyExampleTruth": { - "required": [ - "correctCategories", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "ClassifyExampleTruth" - ], - "type": "string" - }, - "correctCategories": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "IExampleTruthCompareExampleTruth": { - "required": [ - "winnerId", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "CompareExampleTruth" - ], - "type": "string" - }, - "winnerId": { - "type": "string" - } - } - }, - "IMetadataInput": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IMetadataInputTextMetadataInput" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "TextMetadataInput": "#/components/schemas/IMetadataInputTextMetadataInput" - } - } - }, - "IMetadataInputTextMetadataInput": { - "required": [ - "text", - "visibilities", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "TextMetadataInput" - ], - "type": "string" - }, - "text": { - "type": "string", - "nullable": true - }, - "visibilities": { - "$ref": "#/components/schemas/MetadataVisibilities" - } - } - }, - "IMetadataModel": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IMetadataModelClassificationMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelCountMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelFileTypeMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelImageDimensionMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelLocationMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelOriginalFilenameMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelSourceUrlMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelStreamsMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelTextMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelVideoDurationMetadataModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "ClassificationMetadata": "#/components/schemas/IMetadataModelClassificationMetadataModel", - "CountMetadata": "#/components/schemas/IMetadataModelCountMetadataModel", - "FileTypeMetadata": "#/components/schemas/IMetadataModelFileTypeMetadataModel", - "ImageDimensionMetadata": "#/components/schemas/IMetadataModelImageDimensionMetadataModel", - "LocationMetadata": "#/components/schemas/IMetadataModelLocationMetadataModel", - "OriginalFilenameMetadata": "#/components/schemas/IMetadataModelOriginalFilenameMetadataModel", - "SourceUrlMetadataModel": "#/components/schemas/IMetadataModelSourceUrlMetadataModel", - "StreamsMetadata": "#/components/schemas/IMetadataModelStreamsMetadataModel", - "TextMetadata": "#/components/schemas/IMetadataModelTextMetadataModel", - "VideoDurationMetadata": "#/components/schemas/IMetadataModelVideoDurationMetadataModel" - } - } - }, - "IMetadataModelClassificationMetadataModel": { - "required": [ - "classification", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "ClassificationMetadata" - ], - "type": "string" - }, - "classification": { - "type": "string" - } - } - }, - "IMetadataModelCountMetadataModel": { - "required": [ - "count", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "CountMetadata" - ], - "type": "string" - }, - "count": { - "type": "integer", - "format": "int32" - } - } - }, - "IMetadataModelFileTypeMetadataModel": { - "required": [ - "fileType", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "FileTypeMetadata" - ], - "type": "string" - }, - "fileType": { - "$ref": "#/components/schemas/FileType" - } - } - }, - "IMetadataModelImageDimensionMetadataModel": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "ImageDimensionMetadata" - ], - "type": "string" - }, - "height": { - "type": "integer", - "format": "int32" - }, - "width": { - "type": "integer", - "format": "int32" - } - } - }, - "IMetadataModelLocationMetadataModel": { - "required": [ - "x", - "y", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "LocationMetadata" - ], - "type": "string" - }, - "x": { - "type": "number", - "format": "float" - }, - "y": { - "type": "number", - "format": "float" - } - } - }, - "IMetadataModelOriginalFilenameMetadataModel": { - "required": [ - "originalFilename", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "OriginalFilenameMetadata" - ], - "type": "string" + "description": "Minimum submission rate for graduated users.", + "format": "double" }, - "originalFilename": { - "type": "string" - } - } - }, - "IMetadataModelSourceUrlMetadataModel": { - "required": [ - "url", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "SourceUrlMetadataModel" - ], - "type": "string" + "distillingRetrievalMode": { + "$ref": "#/components/schemas/DistillingRetrievalMode" }, - "url": { - "type": "string" - } - } - }, - "IMetadataModelStreamsMetadataModel": { - "required": [ - "hasVideo", - "hasAudio", - "hasSubtitles", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "StreamsMetadata" - ], - "type": "string" + "boostLevel": { + "$ref": "#/components/schemas/BoostLevel" }, - "hasVideo": { - "type": "boolean" + "randomAdmissionProbability": { + "type": "number", + "description": "The probability of admitting a random user to the audience.", + "format": "double" }, - "hasAudio": { - "type": "boolean" + "health": { + "type": "number", + "description": "The health score of the audience.", + "format": "double" }, - "hasSubtitles": { - "type": "boolean" - } - } - }, - "IMetadataModelTextMetadataModel": { - "required": [ - "text", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "TextMetadata" - ], - "type": "string" + "graduated": { + "type": "integer", + "description": "The number of graduated users.", + "format": "int64" }, - "text": { - "type": "string", - "nullable": true + "dropped": { + "type": "integer", + "description": "The number of dropped users.", + "format": "int64" } } }, - "IMetadataModelVideoDurationMetadataModel": { + "GetAudienceUserStateMetricsResult": { "required": [ - "duration", - "_t" + "usersPerState" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "VideoDurationMetadata" - ], - "type": "string" - }, - "duration": { - "type": "string", - "format": "date-time" + "usersPerState": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int32" + } } } }, - "IRapidPayload": { + "IAssetInput": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IRapidPayloadTranscriptionPayload" - }, - { - "$ref": "#/components/schemas/IRapidPayloadScrubPayload" - }, - { - "$ref": "#/components/schemas/IRapidPayloadPolygonPayload" - }, - { - "$ref": "#/components/schemas/IRapidPayloadNamedEntityPayload" - }, - { - "$ref": "#/components/schemas/IRapidPayloadLocatePayload" - }, - { - "$ref": "#/components/schemas/IRapidPayloadLinePayload" - }, - { - "$ref": "#/components/schemas/IRapidPayloadFreeTextPayload" - }, - { - "$ref": "#/components/schemas/IRapidPayloadComparePayload" + "$ref": "#/components/schemas/IAssetInputExistingAssetInput" }, { - "$ref": "#/components/schemas/IRapidPayloadClassifyPayload" + "$ref": "#/components/schemas/IAssetInputMultiAssetInput" }, { - "$ref": "#/components/schemas/IRapidPayloadBoundingBoxPayload" + "$ref": "#/components/schemas/IAssetInputTextAssetInput" } ], "discriminator": { "propertyName": "_t", "mapping": { - "TranscriptionPayload": "#/components/schemas/IRapidPayloadTranscriptionPayload", - "ScrubPayload": "#/components/schemas/IRapidPayloadScrubPayload", - "PolygonPayload": "#/components/schemas/IRapidPayloadPolygonPayload", - "NamedEntityPayload": "#/components/schemas/IRapidPayloadNamedEntityPayload", - "LocatePayload": "#/components/schemas/IRapidPayloadLocatePayload", - "LinePayload": "#/components/schemas/IRapidPayloadLinePayload", - "FreeTextPayload": "#/components/schemas/IRapidPayloadFreeTextPayload", - "ComparePayload": "#/components/schemas/IRapidPayloadComparePayload", - "ClassifyPayload": "#/components/schemas/IRapidPayloadClassifyPayload", - "BoundingBoxPayload": "#/components/schemas/IRapidPayloadBoundingBoxPayload" + "ExistingAssetInput": "#/components/schemas/IAssetInputExistingAssetInput", + "MultiAssetInput": "#/components/schemas/IAssetInputMultiAssetInput", + "TextAssetInput": "#/components/schemas/IAssetInputTextAssetInput" } } }, - "IRapidPayloadBoundingBoxPayload": { + "IAssetInputExistingAssetInput": { "required": [ - "target", + "name", "_t" ], "properties": { "_t": { "enum": [ - "BoundingBoxPayload" + "ExistingAssetInput" ], "type": "string" }, - "target": { + "name": { "type": "string" + }, + "metadata": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/MetadataInputCollection" + } + ] + }, + "identifier": { + "type": "string", + "nullable": true } } }, - "IRapidPayloadClassifyPayload": { + "IAssetInputMultiAssetInput": { "required": [ - "categories", - "title", + "assets", "_t" ], "properties": { "_t": { "enum": [ - "ClassifyPayload" + "MultiAssetInput" ], "type": "string" }, - "categories": { + "assets": { "type": "array", "items": { - "$ref": "#/components/schemas/ClassifyPayload_Category" + "$ref": "#/components/schemas/IAssetInput" } }, - "title": { - "type": "string" - } - } - }, - "IRapidPayloadComparePayload": { - "required": [ - "criteria", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "ComparePayload" - ], - "type": "string" + "metadata": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/MetadataInputCollection" + } + ] }, - "criteria": { - "type": "string" + "identifier": { + "type": "string", + "nullable": true } } }, - "IRapidPayloadFreeTextPayload": { + "IAssetInputTextAssetInput": { "required": [ - "question", + "text", "_t" ], "properties": { "_t": { "enum": [ - "FreeTextPayload" + "TextAssetInput" ], "type": "string" }, - "question": { + "text": { "type": "string" }, - "shouldValidateResponse": { - "type": "boolean" + "metadata": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/MetadataInputCollection" + } + ] }, - "validationSystemPrompt": { + "identifier": { "type": "string", "nullable": true } } }, - "IRapidPayloadLinePayload": { + "IAssetModel": { "required": [ - "target", "_t" ], - "properties": { - "_t": { - "enum": [ - "LinePayload" - ], - "type": "string" + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IAssetModelFileAssetModel" }, - "target": { - "type": "string" + { + "$ref": "#/components/schemas/IAssetModelMultiAssetModel" + }, + { + "$ref": "#/components/schemas/IAssetModelNullAssetModel" + }, + { + "$ref": "#/components/schemas/IAssetModelTextAssetModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "FileAsset": "#/components/schemas/IAssetModelFileAssetModel", + "MultiAsset": "#/components/schemas/IAssetModelMultiAssetModel", + "NullAsset": "#/components/schemas/IAssetModelNullAssetModel", + "TextAsset": "#/components/schemas/IAssetModelTextAssetModel" } } }, - "IRapidPayloadLocatePayload": { + "IAssetModelFileAssetModel": { "required": [ - "target", + "fileName", + "metadata", + "identifier", "_t" ], "properties": { "_t": { "enum": [ - "LocatePayload" + "FileAsset" ], "type": "string" }, - "target": { + "fileName": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataModelCollection" + }, + "identifier": { "type": "string" } } }, - "IRapidPayloadNamedEntityPayload": { + "IAssetModelMultiAssetModel": { "required": [ - "target", - "classes", + "assets", + "metadata", + "identifier", "_t" ], "properties": { "_t": { "enum": [ - "NamedEntityPayload" + "MultiAsset" ], "type": "string" }, - "target": { - "type": "string" - }, - "classes": { + "assets": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/IAssetModel" } - } - } - }, - "IRapidPayloadPolygonPayload": { - "required": [ - "target", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "PolygonPayload" - ], - "type": "string" }, - "target": { + "metadata": { + "$ref": "#/components/schemas/MetadataModelCollection" + }, + "identifier": { "type": "string" } } }, - "IRapidPayloadScrubPayload": { + "IAssetModelNullAssetModel": { "required": [ - "target", + "metadata", + "identifier", "_t" ], "properties": { "_t": { "enum": [ - "ScrubPayload" + "NullAsset" ], "type": "string" }, - "target": { + "metadata": { + "$ref": "#/components/schemas/MetadataModelCollection" + }, + "identifier": { "type": "string" } } }, - "IRapidPayloadTranscriptionPayload": { + "IAssetModelTextAssetModel": { "required": [ - "title", - "transcription", + "text", + "metadata", + "identifier", "_t" ], "properties": { "_t": { "enum": [ - "TranscriptionPayload" + "TextAsset" ], "type": "string" }, - "title": { + "text": { "type": "string" }, - "transcription": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TranscriptionWord" - } + "metadata": { + "$ref": "#/components/schemas/MetadataModelCollection" + }, + "identifier": { + "type": "string" } } }, - "IValidationTruth": { + "IAudienceFilter": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IValidationTruthTranscriptionTruth" - }, - { - "$ref": "#/components/schemas/IValidationTruthScrubTruth" - }, - { - "$ref": "#/components/schemas/IValidationTruthPolygonTruth" - }, - { - "$ref": "#/components/schemas/IValidationTruthNamedEntityTruth" - }, - { - "$ref": "#/components/schemas/IValidationTruthLocateBoxTruth" - }, - { - "$ref": "#/components/schemas/IValidationTruthLineTruth" - }, - { - "$ref": "#/components/schemas/IValidationTruthEmptyValidationTruth" - }, - { - "$ref": "#/components/schemas/IValidationTruthCompareTruth" + "$ref": "#/components/schemas/IAudienceFilterAndAudienceFilter" }, { - "$ref": "#/components/schemas/IValidationTruthMultiCompareTruth" + "$ref": "#/components/schemas/IAudienceFilterCountryAudienceFilter" }, { - "$ref": "#/components/schemas/IValidationTruthSkipTruth" + "$ref": "#/components/schemas/IAudienceFilterLanguageAudienceFilter" }, { - "$ref": "#/components/schemas/IValidationTruthAttachCategoryTruth" + "$ref": "#/components/schemas/IAudienceFilterNotAudienceFilter" }, { - "$ref": "#/components/schemas/IValidationTruthBoundingBoxTruth" + "$ref": "#/components/schemas/IAudienceFilterOrAudienceFilter" } ], "discriminator": { "propertyName": "_t", "mapping": { - "TranscriptionTruth": "#/components/schemas/IValidationTruthTranscriptionTruth", - "ScrubTruth": "#/components/schemas/IValidationTruthScrubTruth", - "PolygonTruth": "#/components/schemas/IValidationTruthPolygonTruth", - "NamedEntityTruth": "#/components/schemas/IValidationTruthNamedEntityTruth", - "LocateBoxTruth": "#/components/schemas/IValidationTruthLocateBoxTruth", - "LineTruth": "#/components/schemas/IValidationTruthLineTruth", - "EmptyValidationTruth": "#/components/schemas/IValidationTruthEmptyValidationTruth", - "CompareTruth": "#/components/schemas/IValidationTruthCompareTruth", - "MultiCompareTruth": "#/components/schemas/IValidationTruthMultiCompareTruth", - "SkipTruth": "#/components/schemas/IValidationTruthSkipTruth", - "AttachCategoryTruth": "#/components/schemas/IValidationTruthAttachCategoryTruth", - "BoundingBoxTruth": "#/components/schemas/IValidationTruthBoundingBoxTruth" + "AndFilter": "#/components/schemas/IAudienceFilterAndAudienceFilter", + "CountryFilter": "#/components/schemas/IAudienceFilterCountryAudienceFilter", + "LanguageFilter": "#/components/schemas/IAudienceFilterLanguageAudienceFilter", + "NotFilter": "#/components/schemas/IAudienceFilterNotAudienceFilter", + "OrFilter": "#/components/schemas/IAudienceFilterOrAudienceFilter" } } }, - "IValidationTruthAttachCategoryTruth": { + "IAudienceFilterAndAudienceFilter": { "required": [ - "correctCategories", + "filters", "_t" ], "properties": { "_t": { "enum": [ - "AttachCategoryTruth" + "AndFilter" ], "type": "string" }, - "correctCategories": { + "filters": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/IAudienceFilter" } } } }, - "IValidationTruthBoundingBoxTruth": { + "IAudienceFilterCountryAudienceFilter": { "required": [ - "xMin", - "yMin", - "xMax", - "yMax", + "countries", "_t" ], "properties": { "_t": { "enum": [ - "BoundingBoxTruth" + "CountryFilter" ], "type": "string" }, - "xMin": { - "type": "number", - "format": "double" - }, - "yMin": { - "type": "number", - "format": "double" - }, - "xMax": { - "type": "number", - "format": "double" - }, - "yMax": { - "type": "number", - "format": "double" + "countries": { + "type": "array", + "items": { + "type": "string" + } } } }, - "IValidationTruthCompareTruth": { + "IAudienceFilterLanguageAudienceFilter": { "required": [ - "winnerId", + "languages", "_t" ], "properties": { "_t": { "enum": [ - "CompareTruth" + "LanguageFilter" ], "type": "string" }, - "winnerId": { - "type": "string" - } - } - }, - "IValidationTruthEmptyValidationTruth": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "EmptyValidationTruth" - ], - "type": "string" + "languages": { + "type": "array", + "items": { + "type": "string" + } } } }, - "IValidationTruthLineTruth": { + "IAudienceFilterNotAudienceFilter": { "required": [ + "filter", "_t" ], "properties": { "_t": { "enum": [ - "LineTruth" + "NotFilter" ], "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/IAudienceFilter" } } }, - "IValidationTruthLocateBoxTruth": { + "IAudienceFilterOrAudienceFilter": { "required": [ - "boundingBoxes", + "filters", "_t" ], "properties": { "_t": { "enum": [ - "LocateBoxTruth" + "OrFilter" ], "type": "string" }, - "boundingBoxes": { + "filters": { "type": "array", "items": { - "$ref": "#/components/schemas/BoxShape" + "$ref": "#/components/schemas/IAudienceFilter" } - }, - "requiredPrecision": { - "type": "number", - "format": "double" - }, - "requiredCompleteness": { - "type": "number", - "format": "double" } } }, - "IValidationTruthModel": { + "IExamplePayload": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IValidationTruthModelAttachCategoryTruthModel" - }, - { - "$ref": "#/components/schemas/IValidationTruthModelBoundingBoxTruthModel" - }, - { - "$ref": "#/components/schemas/IValidationTruthModelClassifyTruthModel" - }, - { - "$ref": "#/components/schemas/IValidationTruthModelCompareTruthModel" - }, - { - "$ref": "#/components/schemas/IValidationTruthModelEmptyValidationTruthModel" - }, - { - "$ref": "#/components/schemas/IValidationTruthModelLineTruthModel" - }, - { - "$ref": "#/components/schemas/IValidationTruthModelLocateBoxTruthModel" - }, - { - "$ref": "#/components/schemas/IValidationTruthModelMultiCompareTruthModel" - }, - { - "$ref": "#/components/schemas/IValidationTruthModelNamedEntityTruthModel" - }, - { - "$ref": "#/components/schemas/IValidationTruthModelPolygonTruthModel" - }, - { - "$ref": "#/components/schemas/IValidationTruthModelScrubTruthModel" - }, - { - "$ref": "#/components/schemas/IValidationTruthModelSkipTruthModel" + "$ref": "#/components/schemas/IExamplePayloadClassifyExamplePayload" }, { - "$ref": "#/components/schemas/IValidationTruthModelTranscriptionTruthModel" + "$ref": "#/components/schemas/IExamplePayloadCompareExamplePayload" } ], "discriminator": { "propertyName": "_t", "mapping": { - "AttachCategoryTruth": "#/components/schemas/IValidationTruthModelAttachCategoryTruthModel", - "BoundingBoxTruth": "#/components/schemas/IValidationTruthModelBoundingBoxTruthModel", - "ClassifyTruth": "#/components/schemas/IValidationTruthModelClassifyTruthModel", - "CompareTruth": "#/components/schemas/IValidationTruthModelCompareTruthModel", - "EmptyValidationTruth": "#/components/schemas/IValidationTruthModelEmptyValidationTruthModel", - "LineTruth": "#/components/schemas/IValidationTruthModelLineTruthModel", - "LocateBoxTruth": "#/components/schemas/IValidationTruthModelLocateBoxTruthModel", - "MultiCompareTruth": "#/components/schemas/IValidationTruthModelMultiCompareTruthModel", - "NamedEntityTruth": "#/components/schemas/IValidationTruthModelNamedEntityTruthModel", - "PolygonTruth": "#/components/schemas/IValidationTruthModelPolygonTruthModel", - "ScrubTruth": "#/components/schemas/IValidationTruthModelScrubTruthModel", - "SkipTruth": "#/components/schemas/IValidationTruthModelSkipTruthModel", - "TranscriptionTruth": "#/components/schemas/IValidationTruthModelTranscriptionTruthModel" + "ClassifyExamplePayload": "#/components/schemas/IExamplePayloadClassifyExamplePayload", + "CompareExamplePayload": "#/components/schemas/IExamplePayloadCompareExamplePayload" } } }, - "IValidationTruthModelAttachCategoryTruthModel": { + "IExamplePayloadClassifyExamplePayload": { "required": [ - "correctCategories", + "categories", + "title", "_t" ], "properties": { "_t": { "enum": [ - "AttachCategoryTruth" + "ClassifyExamplePayload" ], "type": "string" }, - "correctCategories": { + "categories": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/ExampleCategory" } + }, + "title": { + "type": "string" } } }, - "IValidationTruthModelBoundingBoxTruthModel": { + "IExamplePayloadCompareExamplePayload": { "required": [ - "xMin", - "yMin", - "xMax", - "yMax", + "criteria", "_t" ], "properties": { "_t": { "enum": [ - "BoundingBoxTruth" + "CompareExamplePayload" ], "type": "string" }, - "xMin": { - "type": "number", - "format": "double" - }, - "yMin": { - "type": "number", - "format": "double" - }, - "xMax": { - "type": "number", - "format": "double" + "criteria": { + "type": "string" + } + } + }, + "IExampleTruth": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IExampleTruthClassifyExampleTruth" }, - "yMax": { - "type": "number", - "format": "double" + { + "$ref": "#/components/schemas/IExampleTruthCompareExampleTruth" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "ClassifyExampleTruth": "#/components/schemas/IExampleTruthClassifyExampleTruth", + "CompareExampleTruth": "#/components/schemas/IExampleTruthCompareExampleTruth" } } }, - "IValidationTruthModelClassifyTruthModel": { + "IExampleTruthClassifyExampleTruth": { "required": [ "correctCategories", "_t" @@ -2924,7 +2068,7 @@ "properties": { "_t": { "enum": [ - "ClassifyTruth" + "ClassifyExampleTruth" ], "type": "string" }, @@ -2936,7 +2080,7 @@ } } }, - "IValidationTruthModelCompareTruthModel": { + "IExampleTruthCompareExampleTruth": { "required": [ "winnerId", "_t" @@ -2944,7 +2088,7 @@ "properties": { "_t": { "enum": [ - "CompareTruth" + "CompareExampleTruth" ], "type": "string" }, @@ -2953,423 +2097,316 @@ } } }, - "IValidationTruthModelEmptyValidationTruthModel": { + "IMetadataInput": { "required": [ "_t" ], - "properties": { - "_t": { - "enum": [ - "EmptyValidationTruth" - ], - "type": "string" + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IMetadataInputTextMetadataInput" } - } - }, - "IValidationTruthModelLineTruthModel": { - "required": [ - "_t" ], - "properties": { - "_t": { - "enum": [ - "LineTruth" - ], - "type": "string" + "discriminator": { + "propertyName": "_t", + "mapping": { + "TextMetadataInput": "#/components/schemas/IMetadataInputTextMetadataInput" } } }, - "IValidationTruthModelLocateBoxTruthModel": { + "IMetadataInputTextMetadataInput": { "required": [ - "boundingBoxes", + "text", + "visibilities", "_t" ], "properties": { "_t": { "enum": [ - "LocateBoxTruth" + "TextMetadataInput" ], "type": "string" }, - "boundingBoxes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BoxShape" - } - }, - "requiredPrecision": { - "type": "number", - "format": "double" + "text": { + "type": "string", + "nullable": true }, - "requiredCompleteness": { - "type": "number", - "format": "double" + "visibilities": { + "$ref": "#/components/schemas/MetadataVisibilities" } } }, - "IValidationTruthModelMultiCompareTruthModel": { + "IMetadataModel": { "required": [ - "correctCombinations", "_t" ], - "properties": { - "_t": { - "enum": [ - "MultiCompareTruth" - ], - "type": "string" + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IMetadataModelClassificationMetadataModel" + }, + { + "$ref": "#/components/schemas/IMetadataModelCountMetadataModel" + }, + { + "$ref": "#/components/schemas/IMetadataModelFileTypeMetadataModel" + }, + { + "$ref": "#/components/schemas/IMetadataModelImageDimensionMetadataModel" + }, + { + "$ref": "#/components/schemas/IMetadataModelLocationMetadataModel" + }, + { + "$ref": "#/components/schemas/IMetadataModelOriginalFilenameMetadataModel" + }, + { + "$ref": "#/components/schemas/IMetadataModelSourceUrlMetadataModel" + }, + { + "$ref": "#/components/schemas/IMetadataModelStreamsMetadataModel" }, - "correctCombinations": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string" - } - } + { + "$ref": "#/components/schemas/IMetadataModelTextMetadataModel" + }, + { + "$ref": "#/components/schemas/IMetadataModelVideoDurationMetadataModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "ClassificationMetadata": "#/components/schemas/IMetadataModelClassificationMetadataModel", + "CountMetadata": "#/components/schemas/IMetadataModelCountMetadataModel", + "FileTypeMetadata": "#/components/schemas/IMetadataModelFileTypeMetadataModel", + "ImageDimensionMetadata": "#/components/schemas/IMetadataModelImageDimensionMetadataModel", + "LocationMetadata": "#/components/schemas/IMetadataModelLocationMetadataModel", + "OriginalFilenameMetadata": "#/components/schemas/IMetadataModelOriginalFilenameMetadataModel", + "SourceUrlMetadataModel": "#/components/schemas/IMetadataModelSourceUrlMetadataModel", + "StreamsMetadata": "#/components/schemas/IMetadataModelStreamsMetadataModel", + "TextMetadata": "#/components/schemas/IMetadataModelTextMetadataModel", + "VideoDurationMetadata": "#/components/schemas/IMetadataModelVideoDurationMetadataModel" } } }, - "IValidationTruthModelNamedEntityTruthModel": { + "IMetadataModelClassificationMetadataModel": { "required": [ - "classifications", + "classification", "_t" ], "properties": { "_t": { "enum": [ - "NamedEntityTruth" + "ClassificationMetadata" ], "type": "string" }, - "classifications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NamedClassification" - } + "classification": { + "type": "string" } } }, - "IValidationTruthModelPolygonTruthModel": { + "IMetadataModelCountMetadataModel": { "required": [ + "count", "_t" ], "properties": { "_t": { "enum": [ - "PolygonTruth" + "CountMetadata" ], "type": "string" + }, + "count": { + "type": "integer", + "format": "int32" } } }, - "IValidationTruthModelScrubTruthModel": { + "IMetadataModelFileTypeMetadataModel": { "required": [ - "validRanges", + "fileType", "_t" ], "properties": { "_t": { "enum": [ - "ScrubTruth" + "FileTypeMetadata" ], "type": "string" }, - "validRanges": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScrubRange" - } + "fileType": { + "$ref": "#/components/schemas/FileType" } } }, - "IValidationTruthModelSkipTruthModel": { + "IMetadataModelImageDimensionMetadataModel": { "required": [ "_t" ], "properties": { "_t": { "enum": [ - "SkipTruth" + "ImageDimensionMetadata" ], "type": "string" + }, + "height": { + "type": "integer", + "format": "int32" + }, + "width": { + "type": "integer", + "format": "int32" } } }, - "IValidationTruthModelTranscriptionTruthModel": { + "IMetadataModelLocationMetadataModel": { "required": [ - "correctWords", + "x", + "y", "_t" ], "properties": { "_t": { "enum": [ - "TranscriptionTruth" + "LocationMetadata" ], "type": "string" }, - "correctWords": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TranscriptionWord" - } - }, - "strictGrading": { - "type": "boolean", - "nullable": true - }, - "requiredPrecision": { + "x": { "type": "number", - "format": "double" + "format": "float" }, - "requiredCompleteness": { + "y": { "type": "number", - "format": "double" + "format": "float" } } }, - "IValidationTruthMultiCompareTruth": { + "IMetadataModelOriginalFilenameMetadataModel": { "required": [ - "correctCombinations", + "originalFilename", "_t" ], "properties": { "_t": { "enum": [ - "MultiCompareTruth" + "OriginalFilenameMetadata" ], "type": "string" }, - "correctCombinations": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string" - } - } + "originalFilename": { + "type": "string" } } }, - "IValidationTruthNamedEntityTruth": { + "IMetadataModelSourceUrlMetadataModel": { "required": [ - "classifications", + "url", "_t" ], "properties": { "_t": { "enum": [ - "NamedEntityTruth" + "SourceUrlMetadataModel" ], "type": "string" }, - "classifications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NamedClassification" - } - } - } - }, - "IValidationTruthPolygonTruth": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "PolygonTruth" - ], + "url": { "type": "string" } } }, - "IValidationTruthScrubTruth": { + "IMetadataModelStreamsMetadataModel": { "required": [ - "validRanges", + "hasVideo", + "hasAudio", + "hasSubtitles", "_t" ], "properties": { "_t": { "enum": [ - "ScrubTruth" + "StreamsMetadata" ], "type": "string" }, - "validRanges": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScrubRange" - } + "hasVideo": { + "type": "boolean" + }, + "hasAudio": { + "type": "boolean" + }, + "hasSubtitles": { + "type": "boolean" } } }, - "IValidationTruthSkipTruth": { + "IMetadataModelTextMetadataModel": { "required": [ + "text", "_t" ], "properties": { "_t": { "enum": [ - "SkipTruth" + "TextMetadata" ], "type": "string" + }, + "text": { + "type": "string", + "nullable": true } } }, - "IValidationTruthTranscriptionTruth": { + "IMetadataModelVideoDurationMetadataModel": { "required": [ - "correctWords", + "duration", "_t" ], "properties": { "_t": { "enum": [ - "TranscriptionTruth" + "VideoDurationMetadata" ], "type": "string" }, - "correctWords": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TranscriptionWord" - } - }, - "strictGrading": { - "type": "boolean", - "nullable": true - }, - "requiredPrecision": { - "type": "number", - "format": "double" - }, - "requiredCompleteness": { - "type": "number", - "format": "double" - } - } - }, - "LogicOperator": { - "enum": [ - "And", - "Or", - "Not" - ] - }, - "MetadataInputCollection": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IMetadataInput" - } - }, - "MetadataModelCollection": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IMetadataModel" - } - }, - "MetadataVisibilities": { - "type": "array", - "items": { - "enum": [ - "None", - "Users", - "Customers", - "Admins", - "Dashboard", - "All" - ], - "type": "string" - } - }, - "NamedClassification": { - "required": [ - "start", - "end", - "classification" - ], - "type": "object", - "properties": { - "start": { - "type": "integer", - "format": "int32" - }, - "end": { - "type": "integer", - "format": "int32" - }, - "classification": { - "type": "string" - } - } - }, - "PagedResultOfQueryAudiencesResult": { - "required": [ - "total", - "page", - "pageSize", - "items" - ], - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { - "type": "integer", - "format": "int32" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryAudiencesResult" - } - }, - "totalPages": { - "type": "integer", - "format": "int32" - } - } - }, - "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": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryJobsResult" - } - }, - "totalPages": { - "type": "integer", - "format": "int32" + "duration": { + "type": "string", + "format": "date-time" } } }, - "PagedResultOfQueryRapidsOutput": { + "MetadataInputCollection": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IMetadataInput" + } + }, + "MetadataModelCollection": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IMetadataModel" + } + }, + "MetadataVisibilities": { + "type": "array", + "items": { + "enum": [ + "None", + "Users", + "Customers", + "Admins", + "Dashboard", + "All" + ], + "type": "string" + } + }, + "PagedResultOfQueryJobsResult": { "required": [ "total", "page", @@ -3393,7 +2430,7 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryRapidsOutput" + "$ref": "#/components/schemas/QueryJobsResult" } }, "totalPages": { @@ -3402,20 +2439,7 @@ } } }, - "PageInfo": { - "type": "object", - "properties": { - "index": { - "type": "integer", - "format": "int32" - }, - "size": { - "type": "integer", - "format": "int32" - } - } - }, - "QueryAudiencesResult": { + "QueryAudiencesEndpoint_Output": { "required": [ "id", "name", @@ -3430,13 +2454,16 @@ "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "description": "The unique identifier of the audience." }, "name": { - "type": "string" + "type": "string", + "description": "The name of the audience." }, "description": { "type": "string", + "description": "The markdown-supported description of the audience.", "nullable": true }, "status": { @@ -3444,138 +2471,65 @@ }, "qualifiedUserCount": { "type": "integer", + "description": "The number of users that have qualified for this audience.", "format": "int64" }, "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAudienceFilter" - } + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/IAudienceFilter" + } + } + ], + "description": "The filters applied to this audience." }, "logo": { "type": "string", + "description": "The URL of the audience logo, if any.", "nullable": true }, "createdAt": { "type": "string", + "description": "The timestamp when the audience was created.", "format": "date-time" }, "ownerMail": { - "type": "string" + "type": "string", + "description": "The email of the audience owner." }, "isPublic": { - "type": "boolean" + "type": "boolean", + "description": "Whether the audience is publicly visible." }, "isDistilling": { - "type": "boolean" + "type": "boolean", + "description": "Whether the audience is currently distilling users." }, "randomAdmissionProbability": { "type": "number", + "description": "The probability of admitting a random user to the audience.", "format": "double" }, "health": { "type": "number", + "description": "The health score of the audience.", "format": "double" }, "graduated": { "type": "integer", + "description": "The number of graduated users.", "format": "int64" }, "dropped": { "type": "integer", + "description": "The number of dropped users.", "format": "int64" } } }, - "QueryExamplesForAudienceEndpoint_Output": { - "required": [ - "id", - "asset", - "payload", - "correctCount", - "incorrectCount" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the example." - }, - "rapidId": { - "type": "string", - "description": "The ID of the rapid associated with this example.", - "nullable": true - }, - "asset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetModel" - } - ], - "description": "The asset associated with this example." - }, - "payload": { - "allOf": [ - { - "$ref": "#/components/schemas/IExamplePayload" - } - ], - "description": "The payload of the example." - }, - "correctCount": { - "type": "integer", - "description": "The number of correct responses.", - "format": "int32" - }, - "incorrectCount": { - "type": "integer", - "description": "The number of incorrect responses.", - "format": "int32" - }, - "truth": { - "allOf": [ - { - "$ref": "#/components/schemas/IExampleTruth" - } - ], - "description": "The truth value of the example." - }, - "context": { - "type": "string", - "description": "The context text for the example.", - "nullable": true - }, - "contextAsset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetModel" - } - ], - "description": "The context asset for the example." - }, - "explanation": { - "type": "string", - "description": "The explanation for the example.", - "nullable": true - }, - "randomCorrectProbability": { - "type": "number", - "description": "The probability of a random correct answer.", - "format": "double" - }, - "isCommonSense": { - "type": "boolean", - "description": "Whether this example is common sense.", - "nullable": true - }, - "sortIndex": { - "type": "integer", - "description": "The sort index that controls serving order.", - "format": "int32" - } - } - }, - "QueryExamplesForAudienceEndpoint_PagedResultOfOutput": { + "QueryAudiencesEndpoint_PagedResultOfOutput": { "required": [ "total", "page", @@ -3599,7 +2553,7 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryExamplesForAudienceEndpoint_Output" + "$ref": "#/components/schemas/QueryAudiencesEndpoint_Output" } }, "totalPages": { @@ -3608,356 +2562,181 @@ } } }, - "QueryJobsResult": { - "required": [ - "jobId", - "name", - "definitionId", - "audienceId", - "revisionNumber", - "pipelineId", - "status", - "createdAt" - ], - "type": "object", - "properties": { - "jobId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "definitionId": { - "type": "string" - }, - "audienceId": { - "type": "string" - }, - "revisionNumber": { - "type": "integer", - "format": "int32" - }, - "pipelineId": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/AudienceJobState" - }, - "createdAt": { - "type": "string", - "format": "date-time" - } - } - }, - "QueryModel": { - "type": "object", - "properties": { - "page": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/PageInfo" - } - ] - }, - "filter": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/RootFilter" - } - ] - }, - "sortCriteria": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SortCriterion" - }, - "nullable": true - } - } - }, - "QueryRapidsOutput": { + "QueryExamplesForAudienceEndpoint_Output": { "required": [ "id", - "type", "asset", "payload", - "correctValidationCount", - "invalidValidationCount", - "state", - "isCommonSense" + "correctCount", + "incorrectCount" ], "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "description": "The unique identifier of the example." }, - "type": { - "type": "string" + "rapidId": { + "type": "string", + "description": "The ID of the rapid associated with this example.", + "nullable": true }, "asset": { - "oneOf": [ - { - "nullable": true - }, + "allOf": [ { "$ref": "#/components/schemas/IAssetModel" } - ] + ], + "description": "The asset associated with this example." }, "payload": { - "$ref": "#/components/schemas/IRapidPayload" + "allOf": [ + { + "$ref": "#/components/schemas/IExamplePayload" + } + ], + "description": "The payload of the example." }, - "correctValidationCount": { + "correctCount": { "type": "integer", + "description": "The number of correct responses.", "format": "int32" }, - "invalidValidationCount": { + "incorrectCount": { "type": "integer", + "description": "The number of incorrect responses.", "format": "int32" }, - "state": { - "$ref": "#/components/schemas/RapidState" - }, "truth": { - "oneOf": [ - { - "nullable": true - }, + "allOf": [ { - "$ref": "#/components/schemas/IValidationTruth" + "$ref": "#/components/schemas/IExampleTruth" } - ] + ], + "description": "The truth value of the example." }, "context": { "type": "string", + "description": "The context text for the example.", "nullable": true }, "contextAsset": { - "oneOf": [ - { - "nullable": true - }, + "allOf": [ { "$ref": "#/components/schemas/IAssetModel" } - ] + ], + "description": "The context asset for the example." }, "explanation": { "type": "string", + "description": "The explanation for the example.", "nullable": true }, "randomCorrectProbability": { "type": "number", + "description": "The probability of a random correct answer.", "format": "double" }, "isCommonSense": { - "type": "boolean" - } - }, - "description": "Output model for the backwards-compatible rapids query." - }, - "RapidState": { - "enum": [ - "Labeling", - "Paused", - "Incomplete", - "Flagged", - "Done", - "None", - "Rejected" - ] - }, - "RecreateExternalAudiencesEndpoint_Input": { - "required": [ - "recreateAll" - ], - "type": "object", - "properties": { - "recreateAll": { "type": "boolean", - "description": "Whether to recreate all 3 external audiences or only the missing ones." - } - } - }, - "RootFilter": { - "type": "object", - "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Filter" - } + "description": "Whether this example is common sense.", + "nullable": true }, - "logic": { - "$ref": "#/components/schemas/LogicOperator" + "sortIndex": { + "type": "integer", + "description": "The sort index that controls serving order.", + "format": "int32" } } }, - "ScrubRange": { + "QueryExamplesForAudienceEndpoint_PagedResultOfOutput": { "required": [ - "start", - "end" + "total", + "page", + "pageSize", + "items" ], "type": "object", "properties": { - "start": { + "total": { + "type": "integer", + "format": "int64" + }, + "page": { "type": "integer", "format": "int32" }, - "end": { + "pageSize": { "type": "integer", "format": "int32" - } - } - }, - "SortCriterion": { - "required": [ - "propertyName", - "direction" - ], - "type": "object", - "properties": { - "propertyName": { - "type": "string" }, - "direction": { - "$ref": "#/components/schemas/SortDirection" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryExamplesForAudienceEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "SortDirection": { - "enum": [ - "Asc", - "Desc" - ] - }, - "TranscriptionWord": { + "QueryJobsResult": { "required": [ - "word", - "wordIndex" + "jobId", + "name", + "definitionId", + "audienceId", + "revisionNumber", + "pipelineId", + "status", + "createdAt" ], "type": "object", "properties": { - "word": { + "jobId": { "type": "string" }, - "wordIndex": { - "type": "integer", - "format": "int32" - } - } - }, - "UpdateAudienceExampleEndpoint_Input": { - "type": "object", - "properties": { - "truth": { - "oneOf": [ - { - "$ref": "#/components/schemas/IExampleTruth" - }, - { - "nullable": true - } - ], - "description": "The truth for the example." + "name": { + "type": "string" }, - "explanation": { - "type": "string", - "description": "The optional explanation that will be shown to the user when answering wrong.", - "nullable": true + "definitionId": { + "type": "string" }, - "context": { - "type": "string", - "description": "An optional text context that will be shown to the user.", - "nullable": true + "audienceId": { + "type": "string" }, - "contextAsset": { - "oneOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - }, - { - "nullable": true - } - ], - "description": "An optional asset that will be used as context to show to the user." + "revisionNumber": { + "type": "integer", + "format": "int32" }, - "randomCorrectProbability": { - "type": "number", - "description": "The probability that if the user answers at random that they'll be correct.", - "format": "double", - "nullable": true + "pipelineId": { + "type": "string" }, - "isCommonSense": { - "type": "boolean", - "description": "Whether this example should be treated as commonsense validation.", - "nullable": true + "status": { + "$ref": "#/components/schemas/AudienceJobState" }, - "sortIndex": { - "type": "integer", - "description": "The sort index that controls the serving order of this example.", - "format": "int32", - "nullable": true + "createdAt": { + "type": "string", + "format": "date-time" } - }, - "description": "Input model for updating an audience example." + } }, - "UpdateAudienceRapidEndpoint_Input": { + "RecreateExternalAudiencesEndpoint_Input": { + "required": [ + "recreateAll" + ], "type": "object", "properties": { - "truth": { - "oneOf": [ - { - "$ref": "#/components/schemas/IValidationTruthModel" - }, - { - "nullable": true - } - ], - "description": "The truth for the validation rapid." - }, - "explanation": { - "type": "string", - "description": "The optional explanation that will be shown to the user when answering wrong.", - "nullable": true - }, - "context": { - "type": "string", - "description": "An optional text context that will be shown to the user.", - "nullable": true - }, - "contextAsset": { - "oneOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - }, - { - "nullable": true - } - ], - "description": "An optional asset that will be used as context to show to the user." - }, - "randomCorrectProbability": { - "type": "number", - "description": "The probability that if the user answers at random that they'll be correct.", - "format": "double", - "nullable": true - }, - "isCommonSense": { + "recreateAll": { "type": "boolean", - "description": "Whether this rapid should be treated as commonsense validation.", - "nullable": true + "description": "Whether to recreate all 3 external audiences or only the missing ones." } - }, - "description": "Input model for updating an audience rapid." + } }, - "UpdateAudienceRequest": { + "UpdateAudienceEndpoint_Input": { "type": "object", "properties": { "name": { @@ -4074,30 +2853,63 @@ "Sequential" ], "description": "The retrieval mode used by the distilling campaign to select rapids for users." + } + } + }, + "UpdateAudienceExampleEndpoint_Input": { + "type": "object", + "properties": { + "truth": { + "oneOf": [ + { + "$ref": "#/components/schemas/IExampleTruth" + }, + { + "nullable": true + } + ], + "description": "The truth for the example." }, - "minimumUserScore": { - "type": "number", - "description": "Use instead.", - "format": "double", - "nullable": true, - "deprecated": true + "explanation": { + "type": "string", + "description": "The optional explanation that will be shown to the user when answering wrong.", + "nullable": true + }, + "context": { + "type": "string", + "description": "An optional text context that will be shown to the user.", + "nullable": true + }, + "contextAsset": { + "oneOf": [ + { + "$ref": "#/components/schemas/IAssetInput" + }, + { + "nullable": true + } + ], + "description": "An optional asset that will be used as context to show to the user." }, - "minDistillingScoreFloor": { + "randomCorrectProbability": { "type": "number", - "description": "Use instead.", + "description": "The probability that if the user answers at random that they'll be correct.", "format": "double", - "nullable": true, - "deprecated": true + "nullable": true + }, + "isCommonSense": { + "type": "boolean", + "description": "Whether this example should be treated as commonsense validation.", + "nullable": true }, - "minDistillingResponses": { + "sortIndex": { "type": "integer", - "description": "Use instead.", - "format": "uint32", - "nullable": true, - "deprecated": true + "description": "The sort index that controls the serving order of this example.", + "format": "int32", + "nullable": true } }, - "description": "The body request to update an audience." + "description": "Input model for updating an audience example." }, "UpdateBoostConfigEndpoint_Input": { "type": "object", @@ -4193,10 +3005,5 @@ "email" ] } - ], - "tags": [ - { - "name": "Audience" - } ] } \ No newline at end of file diff --git a/openapi/schemas/campaign.openapi.json b/openapi/schemas/campaign.openapi.json index 65ae542a..35fe87c8 100644 --- a/openapi/schemas/campaign.openapi.json +++ b/openapi/schemas/campaign.openapi.json @@ -354,6 +354,34 @@ } } }, + "/campaign/boost/preheat": { + "post": { + "tags": [ + "Campaign" + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, "/campaigns": { "get": { "tags": [ diff --git a/openapi/schemas/dataset.openapi.json b/openapi/schemas/dataset.openapi.json index 5357347b..d0110188 100644 --- a/openapi/schemas/dataset.openapi.json +++ b/openapi/schemas/dataset.openapi.json @@ -607,7 +607,8 @@ "type": "array", "items": { "$ref": "#/components/schemas/Filter" - } + }, + "nullable": true } } }, @@ -1338,7 +1339,7 @@ } } }, - "PageInfo": { + "Pagination": { "type": "object", "properties": { "index": { @@ -1379,7 +1380,7 @@ "nullable": true }, { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ] }, @@ -1403,6 +1404,9 @@ } }, "RootFilter": { + "required": [ + "filters" + ], "type": "object", "properties": { "filters": { @@ -1418,8 +1422,7 @@ }, "SortCriterion": { "required": [ - "propertyName", - "direction" + "propertyName" ], "type": "object", "properties": { diff --git a/openapi/schemas/identity.openapi.json b/openapi/schemas/identity.openapi.json index 628e4f75..6a7833a9 100644 --- a/openapi/schemas/identity.openapi.json +++ b/openapi/schemas/identity.openapi.json @@ -1244,7 +1244,8 @@ "type": "array", "items": { "$ref": "#/components/schemas/Filter" - } + }, + "nullable": true } } }, @@ -1459,7 +1460,7 @@ } } }, - "PageInfo": { + "Pagination": { "type": "object", "properties": { "index": { @@ -1546,7 +1547,7 @@ "nullable": true }, { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ] }, @@ -1663,6 +1664,9 @@ } }, "RootFilter": { + "required": [ + "filters" + ], "type": "object", "properties": { "filters": { @@ -1694,8 +1698,7 @@ }, "SortCriterion": { "required": [ - "propertyName", - "direction" + "propertyName" ], "type": "object", "properties": { diff --git a/openapi/schemas/leaderboard.openapi.json b/openapi/schemas/leaderboard.openapi.json index 150882b0..3b222b27 100644 --- a/openapi/schemas/leaderboard.openapi.json +++ b/openapi/schemas/leaderboard.openapi.json @@ -2950,7 +2950,8 @@ "type": "array", "items": { "$ref": "#/components/schemas/Filter" - } + }, + "nullable": true } } }, @@ -5182,7 +5183,7 @@ } } }, - "PageInfo": { + "Pagination": { "type": "object", "properties": { "index": { @@ -5275,7 +5276,7 @@ "nullable": true }, { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ] }, @@ -5299,6 +5300,9 @@ } }, "RootFilter": { + "required": [ + "filters" + ], "type": "object", "properties": { "filters": { @@ -5422,8 +5426,7 @@ }, "SortCriterion": { "required": [ - "propertyName", - "direction" + "propertyName" ], "type": "object", "properties": { diff --git a/openapi/schemas/order.openapi.json b/openapi/schemas/order.openapi.json index 1758d584..49840ed0 100644 --- a/openapi/schemas/order.openapi.json +++ b/openapi/schemas/order.openapi.json @@ -2858,7 +2858,8 @@ "type": "array", "items": { "$ref": "#/components/schemas/Filter" - } + }, + "nullable": true } } }, @@ -2972,7 +2973,9 @@ "definitionId", "name", "definitionType", - "createdAt" + "createdAt", + "ownerId", + "ownerMail" ], "type": "object", "properties": { @@ -2991,6 +2994,15 @@ "type": "string", "description": "The creation timestamp.", "format": "date-time" + }, + "ownerId": { + "type": "string", + "description": "The id of the job definition's owner.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The email of the job definition's owner." } }, "description": "The result when a job definition has been retrieved." @@ -5092,7 +5104,7 @@ } } }, - "PageInfo": { + "Pagination": { "type": "object", "properties": { "index": { @@ -5194,7 +5206,9 @@ "name", "definitionType", "createdAt", - "revisionCount" + "revisionCount", + "ownerId", + "ownerMail" ], "type": "object", "properties": { @@ -5214,6 +5228,13 @@ "revisionCount": { "type": "integer", "format": "int32" + }, + "ownerId": { + "type": "string", + "format": "uuid" + }, + "ownerMail": { + "type": "string" } } }, @@ -5292,7 +5313,7 @@ "nullable": true }, { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ] }, @@ -5404,6 +5425,9 @@ ] }, "RootFilter": { + "required": [ + "filters" + ], "type": "object", "properties": { "filters": { @@ -5419,8 +5443,7 @@ }, "SortCriterion": { "required": [ - "propertyName", - "direction" + "propertyName" ], "type": "object", "properties": { diff --git a/openapi/schemas/rapid.openapi.json b/openapi/schemas/rapid.openapi.json index 5e9e16f5..d6dfbe99 100644 --- a/openapi/schemas/rapid.openapi.json +++ b/openapi/schemas/rapid.openapi.json @@ -1094,7 +1094,8 @@ "type": "array", "items": { "$ref": "#/components/schemas/Filter" - } + }, + "nullable": true } } }, @@ -3245,7 +3246,7 @@ } } }, - "PageInfo": { + "Pagination": { "type": "object", "properties": { "index": { @@ -3298,7 +3299,7 @@ "nullable": true }, { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ] }, @@ -3393,7 +3394,7 @@ "page": { "allOf": [ { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ], "description": "pagination information" @@ -3608,6 +3609,9 @@ "description": "The model for reporting an issue with a rapid." }, "RootFilter": { + "required": [ + "filters" + ], "type": "object", "properties": { "filters": { @@ -3640,8 +3644,7 @@ }, "SortCriterion": { "required": [ - "propertyName", - "direction" + "propertyName" ], "type": "object", "properties": { diff --git a/openapi/schemas/rapidata.filtered.openapi.json b/openapi/schemas/rapidata.filtered.openapi.json index 96f4d2b0..9126ff00 100644 --- a/openapi/schemas/rapidata.filtered.openapi.json +++ b/openapi/schemas/rapidata.filtered.openapi.json @@ -27,10 +27,6 @@ "name": "Examples", "x-displayName": "Examples" }, - { - "name": "Rapids", - "x-displayName": "Rapids" - }, { "name": "Cache", "x-displayName": "Cache" @@ -728,195 +724,30 @@ ] } }, - "/audience/{audienceId}": { - "delete": { - "tags": [ - "Audience" - ], - "summary": "Deletes the specified audience.", - "parameters": [ - { - "name": "audienceId", - "in": "path", - "description": "The unique identifier of the audience to delete.", - "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" - } - }, - "security": [ - { - "Bearer": [], - "OpenIdConnect": [ - "openid", - "profile", - "email" - ], - "OAuth2": [ - "openid", - "profile", - "email" - ] - } - ] - }, - "get": { - "tags": [ - "Audience" - ], - "summary": "Gets an audience by its Id.", - "parameters": [ - { - "name": "audienceId", - "in": "path", - "description": "The id of the audience to get.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/GetAudienceByIdResult" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetAudienceByIdResult" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/GetAudienceByIdResult" - } - } - } - } - }, - "security": [ - { - "Bearer": [], - "OpenIdConnect": [ - "openid", - "profile", - "email" - ], - "OAuth2": [ - "openid", - "profile", - "email" - ] - } - ] - }, - "patch": { + "/audience": { + "post": { "tags": [ "Audience" ], - "summary": "Patches an existing audience.", - "parameters": [ - { - "name": "audienceId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Creates a new empty audience.", "requestBody": { + "description": "The properties of the audience to create.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateAudienceRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateAudienceRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateAudienceRequest" + "$ref": "#/components/schemas/CreateAudienceEndpoint_Input" } } }, "required": true }, - "responses": { - "204": { - "description": "No Content" - } - }, - "security": [ - { - "Bearer": [], - "OpenIdConnect": [ - "openid", - "profile", - "email" - ], - "OAuth2": [ - "openid", - "profile", - "email" - ] - } - ] - } - }, - "/audience/{audienceId}/user-metrics": { - "get": { - "tags": [ - "Audience" - ], - "summary": "Gets the count of users in each state for the specified audience.", - "parameters": [ - { - "name": "audienceId", - "in": "path", - "description": "The unique identifier of the audience.", - "required": true, - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetAudienceUserStateMetricsResult" + "$ref": "#/components/schemas/CreateAudienceEndpoint_Output" } } } @@ -955,17 +786,17 @@ ] } }, - "/audience/{audienceId}/pause-distillation": { - "post": { + "/audience/{audienceId}": { + "delete": { "tags": [ "Audience" ], - "summary": "Pauses the distillation campaign for the specified audience.", + "summary": "Deletes the specified audience.", "parameters": [ { "name": "audienceId", "in": "path", - "description": "The unique identifier of the audience.", + "description": "The unique identifier of the audience to delete.", "required": true, "schema": { "type": "string" @@ -1008,14 +839,12 @@ ] } ] - } - }, - "/audience/{audienceId}/jobs": { + }, "get": { "tags": [ "Audience" ], - "summary": "Queries jobs for the specified audience.", + "summary": "Returns the audience with the specified id.", "parameters": [ { "name": "audienceId", @@ -1033,7 +862,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryJobsResult" + "$ref": "#/components/schemas/GetAudienceByIdEndpoint_Output" } } } @@ -1070,26 +899,34 @@ ] } ] - } - }, - "/audience/{audienceId}/rebuild-distilling-campaign": { - "post": { + }, + "patch": { "tags": [ "Audience" ], - "summary": "Rebuilds the distilling campaign for the specified audience.", - "description": "Recalculates campaign filters and selections based on the audience's current settings\n (demographic filters, exit conditions, etc.).", + "summary": "Patches an existing audience.", "parameters": [ { "name": "audienceId", "in": "path", - "description": "The unique identifier of the audience.", + "description": "The unique identifier of the audience to update.", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "description": "The audience properties to update.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAudienceEndpoint_Input" + } + } + }, + "required": true + }, "responses": { "204": { "description": "No Content" @@ -1128,12 +965,12 @@ ] } }, - "/audience/{audienceId}/recreate-external-audiences": { - "post": { + "/audience/{audienceId}/user-metrics": { + "get": { "tags": [ "Audience" ], - "summary": "Recreates external audiences for the specified audience.", + "summary": "Gets the count of users in each state for the specified audience.", "parameters": [ { "name": "audienceId", @@ -1145,21 +982,17 @@ } } ], - "requestBody": { - "description": "Configuration for which external audiences to recreate.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecreateExternalAudiencesEndpoint_Input" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAudienceUserStateMetricsResult" + } } } }, - "required": true - }, - "responses": { - "204": { - "description": "No Content" - }, "400": { "description": "Bad Request", "content": { @@ -1194,12 +1027,12 @@ ] } }, - "/audience/{audienceId}/resume-distillation": { + "/audience/{audienceId}/pause-distillation": { "post": { "tags": [ "Audience" ], - "summary": "Resumes the distillation campaign for the specified audience.", + "summary": "Pauses the distillation campaign for the specified audience.", "parameters": [ { "name": "audienceId", @@ -1249,12 +1082,12 @@ ] } }, - "/audience/{audienceId}/recruit": { - "post": { + "/audience/{audienceId}/jobs": { + "get": { "tags": [ "Audience" ], - "summary": "Starts recruiting users for the specified audience.", + "summary": "Queries jobs for the specified audience.", "parameters": [ { "name": "audienceId", @@ -1267,8 +1100,15 @@ } ], "responses": { - "204": { - "description": "No Content" + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedResultOfQueryJobsResult" + } + } + } }, "400": { "description": "Bad Request", @@ -1304,34 +1144,393 @@ ] } }, - "/audience/{audienceId}/boost-config": { - "patch": { + "/audiences": { + "get": { "tags": [ "Audience" ], - "summary": "Updates the boost configuration for the specified audience.", + "summary": "Queries all audiences visible to the caller.", "parameters": [ { - "name": "audienceId", - "in": "path", - "description": "The unique identifier of the audience.", + "name": "page", + "in": "query", + "description": "The 1-based page index.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "page_size", + "in": "query", + "description": "The number of items per page.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "name", + "-name", + "created_at", + "-created_at", + "status", + "-status", + "qualified_user_count", + "-qualified_user_count" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "name": "name", + "in": "query", + "description": "Filter by name.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "status", + "in": "query", + "description": "Filter by status.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "is_public", + "in": "query", + "description": "Filter by is_public.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "is_distilling", + "in": "query", + "description": "Filter by is_distilling.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "owner_mail", + "in": "query", + "description": "Filter by owner_mail.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "created_at", + "in": "query", + "description": "Filter by created_at.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryAudiencesEndpoint_PagedResultOfOutput" + } + } + } + }, + "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" + ] + } + ] + } + }, + "/audience/{audienceId}/rebuild-distilling-campaign": { + "post": { + "tags": [ + "Audience" + ], + "summary": "Rebuilds the distilling campaign for the specified audience.", + "description": "Recalculates campaign filters and selections based on the audience's current settings\n (demographic filters, exit conditions, etc.).", + "parameters": [ + { + "name": "audienceId", + "in": "path", + "description": "The unique identifier of the audience.", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "description": "The boost configuration values to update.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateBoostConfigEndpoint_Input" - } - } - }, - "required": true - }, "responses": { "204": { "description": "No Content" @@ -1370,12 +1569,12 @@ ] } }, - "/audience/{audienceId}/example": { + "/audience/{audienceId}/recreate-external-audiences": { "post": { "tags": [ - "Examples" + "Audience" ], - "summary": "Adds a new example to an audience.", + "summary": "Recreates external audiences for the specified audience.", "parameters": [ { "name": "audienceId", @@ -1388,11 +1587,11 @@ } ], "requestBody": { - "description": "The example data to add.", + "description": "Configuration for which external audiences to recreate.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddExampleToAudienceEndpoint_Input" + "$ref": "#/components/schemas/RecreateExternalAudiencesEndpoint_Input" } } }, @@ -1436,17 +1635,17 @@ ] } }, - "/audience/example/{exampleId}": { - "delete": { + "/audience/{audienceId}/resume-distillation": { + "post": { "tags": [ - "Examples" + "Audience" ], - "summary": "Deletes the specified audience example.", + "summary": "Resumes the distillation campaign for the specified audience.", "parameters": [ { - "name": "exampleId", + "name": "audienceId", "in": "path", - "description": "The unique identifier of the example to delete.", + "description": "The unique identifier of the audience.", "required": true, "schema": { "type": "string" @@ -1491,12 +1690,12 @@ ] } }, - "/audience/{audienceId}/examples": { - "get": { + "/audience/{audienceId}/recruit": { + "post": { "tags": [ - "Examples" + "Audience" ], - "summary": "Queries all examples for the specified audience.", + "summary": "Starts recruiting users for the specified audience.", "parameters": [ { "name": "audienceId", @@ -1506,36 +1705,11 @@ "schema": { "type": "string" } - }, - { - "name": "page", - "in": "query", - "description": "The 1-based page index.", - "schema": { - "type": "integer" - }, - "x-parameter-group": "page" - }, - { - "name": "page_size", - "in": "query", - "description": "The number of items per page.", - "schema": { - "type": "integer" - }, - "x-parameter-group": "page" } ], "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryExamplesForAudienceEndpoint_PagedResultOfOutput" - } - } - } + "204": { + "description": "No Content" }, "400": { "description": "Bad Request", @@ -1571,12 +1745,12 @@ ] } }, - "/audience/{audienceId}/example/{exampleId}": { + "/audience/{audienceId}/boost-config": { "patch": { "tags": [ - "Examples" + "Audience" ], - "summary": "Updates an example's properties within an audience.", + "summary": "Updates the boost configuration for the specified audience.", "parameters": [ { "name": "audienceId", @@ -1586,23 +1760,14 @@ "schema": { "type": "string" } - }, - { - "name": "exampleId", - "in": "path", - "description": "The unique identifier of the example to update.", - "required": true, - "schema": { - "type": "string" - } } ], "requestBody": { - "description": "The example properties to update.", + "description": "The boost configuration values to update.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateAudienceExampleEndpoint_Input" + "$ref": "#/components/schemas/UpdateBoostConfigEndpoint_Input" } } }, @@ -1646,12 +1811,12 @@ ] } }, - "/audience/{audienceId}/rapid/{rapidId}": { - "patch": { + "/audience/{audienceId}/example": { + "post": { "tags": [ - "Rapids" + "Examples" ], - "summary": "Updates a rapid's validation properties within an audience.", + "summary": "Adds a new example to an audience.", "parameters": [ { "name": "audienceId", @@ -1661,23 +1826,14 @@ "schema": { "type": "string" } - }, - { - "name": "rapidId", - "in": "path", - "description": "The unique identifier of the rapid to update.", - "required": true, - "schema": { - "type": "string" - } } ], "requestBody": { - "description": "The rapid validation properties to update.", + "description": "The example data to add.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateAudienceRapidEndpoint_Input" + "$ref": "#/components/schemas/AddExampleToAudienceEndpoint_Input" } } }, @@ -1721,45 +1877,122 @@ ] } }, - "/audiences": { - "get": { + "/audience/example/{exampleId}": { + "delete": { "tags": [ - "Audience" + "Examples" ], - "summary": "Queries all available audiences.", + "summary": "Deletes the specified audience example.", "parameters": [ { - "name": "request", - "in": "query", + "name": "exampleId", + "in": "path", + "description": "The unique identifier of the example to delete.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QueryModel" + "$ref": "#/components/schemas/ValidationProblemDetails" } } } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "Bearer": [], + "OpenIdConnect": [ + "openid", + "profile", + "email" + ], + "OAuth2": [ + "openid", + "profile", + "email" + ] + } + ] + } + }, + "/audience/{audienceId}/examples": { + "get": { + "tags": [ + "Examples" + ], + "summary": "Queries all examples for the specified audience.", + "parameters": [ + { + "name": "audienceId", + "in": "path", + "description": "The unique identifier of the audience.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "The 1-based page index.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "page_size", + "in": "query", + "description": "The number of items per page.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" } ], "responses": { "200": { "description": "OK", "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" - } - }, "application/json": { "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" + "$ref": "#/components/schemas/QueryExamplesForAudienceEndpoint_PagedResultOfOutput" } - }, - "text/json": { + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" + "$ref": "#/components/schemas/ValidationProblemDetails" } } } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" } }, "security": [ @@ -1779,53 +2012,62 @@ ] } }, - "/audience": { - "post": { + "/audience/{audienceId}/example/{exampleId}": { + "patch": { "tags": [ - "Audience" + "Examples" ], - "summary": "Creates a new empty audience.", - "description": "An audience is a group of users that are trained to solve particular tasks.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAudienceRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/CreateAudienceRequest" - } - }, - "application/*+json": { + "summary": "Updates an example's properties within an audience.", + "parameters": [ + { + "name": "audienceId", + "in": "path", + "description": "The unique identifier of the audience.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "exampleId", + "in": "path", + "description": "The unique identifier of the example to update.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The example properties to update.", + "content": { + "application/json": { "schema": { - "$ref": "#/components/schemas/CreateAudienceRequest" + "$ref": "#/components/schemas/UpdateAudienceExampleEndpoint_Input" } } }, "required": true }, "responses": { - "200": { - "description": "OK", + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/CreateAudienceResult" - } - }, "application/json": { "schema": { - "$ref": "#/components/schemas/CreateAudienceResult" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/CreateAudienceResult" + "$ref": "#/components/schemas/ValidationProblemDetails" } } } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" } }, "security": [ @@ -1845,8 +2087,6 @@ ] } }, - "/audience/{audienceId}/rapid": {}, - "/audience/{audienceId}/rapids": {}, "/campaign/cache/campaigns": { "get": { "tags": [ @@ -2270,6 +2510,49 @@ ] } }, + "/campaign/boost/preheat": { + "post": { + "tags": [ + "Campaign" + ], + "responses": { + "204": { + "description": "No Content" + }, + "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" + ] + } + ] + } + }, "/campaigns": { "get": { "tags": [ @@ -14594,81 +14877,6 @@ }, "description": "Input model for adding an example to an audience." }, - "AddRapidToAudienceModel": { - "required": [ - "asset", - "payload", - "randomCorrectProbability" - ], - "type": "object", - "properties": { - "asset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - } - ], - "description": "The asset to use for the rapid." - }, - "payload": { - "allOf": [ - { - "$ref": "#/components/schemas/IRapidPayload" - } - ], - "description": "The payload to use for the rapid." - }, - "truth": { - "allOf": [ - { - "$ref": "#/components/schemas/IValidationTruth" - } - ], - "description": "The ground truth for the rapid." - }, - "randomCorrectProbability": { - "type": "number", - "description": "The probability for an answer to be correct when randomly guessing.", - "format": "double" - }, - "explanation": { - "type": "string", - "description": "An explanation for the users if they answer the rapid incorrectly.", - "nullable": true - }, - "context": { - "type": "string", - "description": "An optional textual context that provides additional information to the user about the rapid.", - "nullable": true - }, - "contextAsset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - } - ], - "description": "An optional asset that provides additional context to the user about the rapid." - }, - "featureFlags": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - }, - "nullable": true - } - ], - "description": "The feature flags to enable for the rapid." - }, - "isCommonSense": { - "type": "boolean", - "description": "Whether this rapid should be treated as commonsense validation.", - "nullable": true - } - }, - "description": "The model for adding a validation rapid with asset in JSON body." - }, "AudienceJobState": { "enum": [ "Running", @@ -14682,7 +14890,8 @@ "Pending", "Recruiting", "Ready" - ] + ], + "description": "The current status of the audience." }, "BoostLevel": { "enum": [ @@ -14690,45 +14899,10 @@ "Stable", "Distilling", "Global" - ] - }, - "BoxShape": { - "type": "object", - "properties": { - "xMin": { - "type": "number", - "format": "double" - }, - "yMin": { - "type": "number", - "format": "double" - }, - "xMax": { - "type": "number", - "format": "double" - }, - "yMax": { - "type": "number", - "format": "double" - } - } - }, - "ClassifyPayload_Category": { - "required": [ - "label", - "value" ], - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "value": { - "type": "string" - } - } + "description": "The current boost level applied to the audience." }, - "CreateAudienceRequest": { + "CreateAudienceEndpoint_Input": { "required": [ "name" ], @@ -14793,24 +14967,6 @@ "description": "Score floor - users below this score exit the distilling campaign\n (only after completing DropMinResponses).\n Defaults to 0.2. Set to null to disable this exit condition.", "format": "double" }, - "minimumUserScore": { - "type": "number", - "description": "Use instead.", - "format": "double", - "deprecated": true - }, - "minDistillingScoreFloor": { - "type": "number", - "description": "Use instead.", - "format": "double", - "deprecated": true - }, - "minDistillingResponses": { - "type": "integer", - "description": "Use instead.", - "format": "uint32", - "deprecated": true - }, "isDistillingCampaignSticky": { "type": "boolean", "description": "Whether the distilling campaign should be sticky (users stay until filters don't match).\n Defaults to true (Temporary sticky)." @@ -14853,17 +15009,17 @@ "description": "Minimum graduated users before disabling distilling boost.\n Defaults to 100. Admin-only override.", "format": "int32" } - }, - "description": "The body request to create an audience." + } }, - "CreateAudienceResult": { + "CreateAudienceEndpoint_Output": { "required": [ "audienceId" ], "type": "object", "properties": { "audienceId": { - "type": "string" + "type": "string", + "description": "The unique identifier of the newly created audience." } } }, @@ -14872,7 +15028,8 @@ "Random", "Shuffled", "Sequential" - ] + ], + "description": "The retrieval mode used by the distilling campaign to select rapids for users.\n Defaults to Shuffled." }, "ExampleCategory": { "required": [ @@ -14929,44 +15086,7 @@ } } }, - "Filter": { - "type": "object", - "properties": { - "field": { - "type": "string", - "nullable": true - }, - "value": {}, - "operator": { - "$ref": "#/components/schemas/FilterOperator" - }, - "logic": { - "$ref": "#/components/schemas/LogicOperator" - }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Filter" - } - } - } - }, - "FilterOperator": { - "enum": [ - "Eq", - "Neq", - "Gt", - "Gte", - "Lt", - "Lte", - "Contains", - "StartsWith", - "EndsWith", - "In", - "NotContains" - ] - }, - "GetAudienceByIdResult": { + "GetAudienceByIdEndpoint_Output": { "required": [ "id", "name", @@ -14985,13 +15105,16 @@ "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "description": "The unique identifier of the audience." }, "name": { - "type": "string" + "type": "string", + "description": "The name of the audience." }, "description": { "type": "string", + "description": "The markdown-supported description of the audience.", "nullable": true }, "status": { @@ -14999,117 +15122,130 @@ }, "qualifiedUserCount": { "type": "integer", + "description": "The number of users that have qualified for this audience.", "format": "int64" }, "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAudienceFilter" - } + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/IAudienceFilter" + } + } + ], + "description": "The filters applied to this audience." }, "logo": { "type": "string", + "description": "The URL of the audience logo, if any.", "nullable": true }, "createdAt": { "type": "string", + "description": "The timestamp when the audience was created.", "format": "date-time" }, "ownerMail": { - "type": "string" + "type": "string", + "description": "The email of the audience owner." }, "isPublic": { - "type": "boolean" + "type": "boolean", + "description": "Whether the audience is publicly visible." }, "isDistilling": { - "type": "boolean" + "type": "boolean", + "description": "Whether the audience is currently distilling users." }, "distillingCampaignId": { - "type": "string" + "type": "string", + "description": "The id of the distilling campaign associated with the audience." }, "minGraduatedForDistillingBoost": { "type": "integer", + "description": "Minimum graduated users before disabling distilling boost.", "format": "int32" }, "minDistillingForGlobalBoost": { "type": "integer", + "description": "Minimum distilling users before disabling global boost.", "format": "int32" }, "graduationScore": { "type": "number", + "description": "The score used to determine whether a user graduates from the distilling campaign.", "format": "double" }, "demotionScore": { "type": "number", + "description": "Score below which a graduated user is demoted back to distilling.", "format": "double" }, "maxDistillingResponses": { "type": "integer", + "description": "Maximum responses before user exits the distilling campaign.", "format": "uint32" }, "dropMinResponses": { "type": "integer", + "description": "Minimum responses before the drop score check applies.", "format": "uint32" }, "dropScore": { "type": "number", + "description": "Score floor - users below this score exit the distilling campaign.", "format": "double" }, "maxDistillingSessions": { "type": "integer", + "description": "Maximum sessions before user exits the distilling campaign.", "format": "uint32" }, "inactivityDropDays": { "type": "integer", + "description": "Number of days of inactivity before a distilling user is dropped.", "format": "uint32" }, "minSubmissionRate": { "type": "number", + "description": "Minimum submission rate before a user is dropped.", "format": "double" }, "minSessionsForSubmissionRate": { "type": "integer", + "description": "Minimum number of sessions before the submission rate check applies.", "format": "uint32" }, "minSubmissionRateGraduated": { "type": "number", + "description": "Minimum submission rate for graduated users.", "format": "double" }, "distillingRetrievalMode": { "$ref": "#/components/schemas/DistillingRetrievalMode" }, - "minimumUserScore": { - "type": "number", - "format": "double", - "deprecated": true - }, - "minDistillingScoreFloor": { - "type": "number", - "format": "double", - "deprecated": true - }, - "minDistillingResponses": { - "type": "integer", - "format": "uint32", - "deprecated": true - }, "boostLevel": { "$ref": "#/components/schemas/BoostLevel" }, "randomAdmissionProbability": { "type": "number", + "description": "The probability of admitting a random user to the audience.", "format": "double" }, "health": { "type": "number", + "description": "The health score of the audience.", "format": "double" }, "graduated": { "type": "integer", + "description": "The number of graduated users.", "format": "int64" }, "dropped": { "type": "integer", + "description": "The number of dropped users.", "format": "int64" } } @@ -15633,3848 +15769,3708 @@ "_t" ], "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IMetadataInputTextMetadataInput" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "TextMetadataInput": "#/components/schemas/IMetadataInputTextMetadataInput" - } - } - }, - "IMetadataInputTextMetadataInput": { - "required": [ - "text", - "visibilities", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "TextMetadataInput" - ], - "type": "string" - }, - "text": { - "type": "string", - "nullable": true - }, - "visibilities": { - "$ref": "#/components/schemas/MetadataVisibilities" - } - } - }, - "IMetadataModel": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IMetadataModelClassificationMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelCountMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelFileTypeMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelImageDimensionMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelLocationMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelOriginalFilenameMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelSourceUrlMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelStreamsMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelTextMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelVideoDurationMetadataModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "ClassificationMetadata": "#/components/schemas/IMetadataModelClassificationMetadataModel", - "CountMetadata": "#/components/schemas/IMetadataModelCountMetadataModel", - "FileTypeMetadata": "#/components/schemas/IMetadataModelFileTypeMetadataModel", - "ImageDimensionMetadata": "#/components/schemas/IMetadataModelImageDimensionMetadataModel", - "LocationMetadata": "#/components/schemas/IMetadataModelLocationMetadataModel", - "OriginalFilenameMetadata": "#/components/schemas/IMetadataModelOriginalFilenameMetadataModel", - "SourceUrlMetadataModel": "#/components/schemas/IMetadataModelSourceUrlMetadataModel", - "StreamsMetadata": "#/components/schemas/IMetadataModelStreamsMetadataModel", - "TextMetadata": "#/components/schemas/IMetadataModelTextMetadataModel", - "VideoDurationMetadata": "#/components/schemas/IMetadataModelVideoDurationMetadataModel" - } - } - }, - "IMetadataModelClassificationMetadataModel": { - "required": [ - "classification", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "ClassificationMetadata" - ], - "type": "string" - }, - "classification": { - "type": "string" - } - } - }, - "IMetadataModelCountMetadataModel": { - "required": [ - "count", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "CountMetadata" - ], - "type": "string" - }, - "count": { - "type": "integer", - "format": "int32" - } - } - }, - "IMetadataModelFileTypeMetadataModel": { - "required": [ - "fileType", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "FileTypeMetadata" - ], - "type": "string" - }, - "fileType": { - "$ref": "#/components/schemas/FileType" - } - } - }, - "IMetadataModelImageDimensionMetadataModel": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "ImageDimensionMetadata" - ], - "type": "string" - }, - "height": { - "type": "integer", - "format": "int32" - }, - "width": { - "type": "integer", - "format": "int32" - } - } - }, - "IMetadataModelLocationMetadataModel": { - "required": [ - "x", - "y", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "LocationMetadata" - ], - "type": "string" - }, - "x": { - "type": "number", - "format": "float" - }, - "y": { - "type": "number", - "format": "float" - } - } - }, - "IMetadataModelOriginalFilenameMetadataModel": { - "required": [ - "originalFilename", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "OriginalFilenameMetadata" - ], - "type": "string" - }, - "originalFilename": { - "type": "string" - } - } - }, - "IMetadataModelSourceUrlMetadataModel": { - "required": [ - "url", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "SourceUrlMetadataModel" - ], - "type": "string" - }, - "url": { - "type": "string" - } - } - }, - "IMetadataModelStreamsMetadataModel": { - "required": [ - "hasVideo", - "hasAudio", - "hasSubtitles", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "StreamsMetadata" - ], - "type": "string" - }, - "hasVideo": { - "type": "boolean" - }, - "hasAudio": { - "type": "boolean" - }, - "hasSubtitles": { - "type": "boolean" + "oneOf": [ + { + "$ref": "#/components/schemas/IMetadataInputTextMetadataInput" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "TextMetadataInput": "#/components/schemas/IMetadataInputTextMetadataInput" } } }, - "IMetadataModelTextMetadataModel": { + "IMetadataInputTextMetadataInput": { "required": [ "text", + "visibilities", "_t" ], "properties": { "_t": { "enum": [ - "TextMetadata" + "TextMetadataInput" ], "type": "string" }, "text": { "type": "string", "nullable": true - } - } - }, - "IMetadataModelVideoDurationMetadataModel": { - "required": [ - "duration", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "VideoDurationMetadata" - ], - "type": "string" }, - "duration": { - "type": "string", - "format": "date-time" + "visibilities": { + "$ref": "#/components/schemas/MetadataVisibilities" } } }, - "IRapidPayload": { + "IMetadataModel": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IRapidPayloadTranscriptionPayload" + "$ref": "#/components/schemas/IMetadataModelClassificationMetadataModel" }, { - "$ref": "#/components/schemas/IRapidPayloadScrubPayload" + "$ref": "#/components/schemas/IMetadataModelCountMetadataModel" }, { - "$ref": "#/components/schemas/IRapidPayloadPolygonPayload" + "$ref": "#/components/schemas/IMetadataModelFileTypeMetadataModel" }, { - "$ref": "#/components/schemas/IRapidPayloadNamedEntityPayload" + "$ref": "#/components/schemas/IMetadataModelImageDimensionMetadataModel" }, { - "$ref": "#/components/schemas/IRapidPayloadLocatePayload" + "$ref": "#/components/schemas/IMetadataModelLocationMetadataModel" }, { - "$ref": "#/components/schemas/IRapidPayloadLinePayload" + "$ref": "#/components/schemas/IMetadataModelOriginalFilenameMetadataModel" }, { - "$ref": "#/components/schemas/IRapidPayloadFreeTextPayload" + "$ref": "#/components/schemas/IMetadataModelSourceUrlMetadataModel" }, { - "$ref": "#/components/schemas/IRapidPayloadComparePayload" + "$ref": "#/components/schemas/IMetadataModelStreamsMetadataModel" }, { - "$ref": "#/components/schemas/IRapidPayloadClassifyPayload" + "$ref": "#/components/schemas/IMetadataModelTextMetadataModel" }, { - "$ref": "#/components/schemas/IRapidPayloadBoundingBoxPayload" + "$ref": "#/components/schemas/IMetadataModelVideoDurationMetadataModel" } ], "discriminator": { "propertyName": "_t", "mapping": { - "TranscriptionPayload": "#/components/schemas/IRapidPayloadTranscriptionPayload", - "ScrubPayload": "#/components/schemas/IRapidPayloadScrubPayload", - "PolygonPayload": "#/components/schemas/IRapidPayloadPolygonPayload", - "NamedEntityPayload": "#/components/schemas/IRapidPayloadNamedEntityPayload", - "LocatePayload": "#/components/schemas/IRapidPayloadLocatePayload", - "LinePayload": "#/components/schemas/IRapidPayloadLinePayload", - "FreeTextPayload": "#/components/schemas/IRapidPayloadFreeTextPayload", - "ComparePayload": "#/components/schemas/IRapidPayloadComparePayload", - "ClassifyPayload": "#/components/schemas/IRapidPayloadClassifyPayload", - "BoundingBoxPayload": "#/components/schemas/IRapidPayloadBoundingBoxPayload" + "ClassificationMetadata": "#/components/schemas/IMetadataModelClassificationMetadataModel", + "CountMetadata": "#/components/schemas/IMetadataModelCountMetadataModel", + "FileTypeMetadata": "#/components/schemas/IMetadataModelFileTypeMetadataModel", + "ImageDimensionMetadata": "#/components/schemas/IMetadataModelImageDimensionMetadataModel", + "LocationMetadata": "#/components/schemas/IMetadataModelLocationMetadataModel", + "OriginalFilenameMetadata": "#/components/schemas/IMetadataModelOriginalFilenameMetadataModel", + "SourceUrlMetadataModel": "#/components/schemas/IMetadataModelSourceUrlMetadataModel", + "StreamsMetadata": "#/components/schemas/IMetadataModelStreamsMetadataModel", + "TextMetadata": "#/components/schemas/IMetadataModelTextMetadataModel", + "VideoDurationMetadata": "#/components/schemas/IMetadataModelVideoDurationMetadataModel" } } }, - "IRapidPayloadBoundingBoxPayload": { + "IMetadataModelClassificationMetadataModel": { "required": [ - "target", + "classification", "_t" ], "properties": { "_t": { "enum": [ - "BoundingBoxPayload" + "ClassificationMetadata" ], "type": "string" }, - "target": { + "classification": { "type": "string" } } }, - "IRapidPayloadClassifyPayload": { + "IMetadataModelCountMetadataModel": { "required": [ - "categories", - "title", + "count", "_t" ], "properties": { "_t": { "enum": [ - "ClassifyPayload" + "CountMetadata" ], "type": "string" }, - "categories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ClassifyPayload_Category" - } - }, - "title": { - "type": "string" + "count": { + "type": "integer", + "format": "int32" } } }, - "IRapidPayloadComparePayload": { + "IMetadataModelFileTypeMetadataModel": { "required": [ - "criteria", + "fileType", "_t" ], "properties": { "_t": { "enum": [ - "ComparePayload" + "FileTypeMetadata" ], "type": "string" }, - "criteria": { - "type": "string" + "fileType": { + "$ref": "#/components/schemas/FileType" } } }, - "IRapidPayloadFreeTextPayload": { + "IMetadataModelImageDimensionMetadataModel": { "required": [ - "question", "_t" ], "properties": { "_t": { "enum": [ - "FreeTextPayload" + "ImageDimensionMetadata" ], "type": "string" }, - "question": { - "type": "string" - }, - "shouldValidateResponse": { - "type": "boolean" + "height": { + "type": "integer", + "format": "int32" }, - "validationSystemPrompt": { - "type": "string", - "nullable": true + "width": { + "type": "integer", + "format": "int32" } } }, - "IRapidPayloadLinePayload": { + "IMetadataModelLocationMetadataModel": { "required": [ - "target", + "x", + "y", "_t" ], "properties": { "_t": { "enum": [ - "LinePayload" + "LocationMetadata" ], "type": "string" }, - "target": { - "type": "string" + "x": { + "type": "number", + "format": "float" + }, + "y": { + "type": "number", + "format": "float" } } }, - "IRapidPayloadLocatePayload": { + "IMetadataModelOriginalFilenameMetadataModel": { "required": [ - "target", + "originalFilename", "_t" ], "properties": { "_t": { "enum": [ - "LocatePayload" + "OriginalFilenameMetadata" ], "type": "string" }, - "target": { + "originalFilename": { "type": "string" } } }, - "IRapidPayloadNamedEntityPayload": { + "IMetadataModelSourceUrlMetadataModel": { "required": [ - "target", - "classes", + "url", "_t" ], "properties": { "_t": { "enum": [ - "NamedEntityPayload" + "SourceUrlMetadataModel" ], "type": "string" }, - "target": { + "url": { "type": "string" - }, - "classes": { - "type": "array", - "items": { - "type": "string" - } } } }, - "IRapidPayloadPolygonPayload": { + "IMetadataModelStreamsMetadataModel": { "required": [ - "target", + "hasVideo", + "hasAudio", + "hasSubtitles", "_t" ], "properties": { "_t": { "enum": [ - "PolygonPayload" + "StreamsMetadata" ], "type": "string" }, - "target": { - "type": "string" + "hasVideo": { + "type": "boolean" + }, + "hasAudio": { + "type": "boolean" + }, + "hasSubtitles": { + "type": "boolean" } } }, - "IRapidPayloadScrubPayload": { + "IMetadataModelTextMetadataModel": { "required": [ - "target", + "text", "_t" ], "properties": { "_t": { "enum": [ - "ScrubPayload" + "TextMetadata" ], "type": "string" }, - "target": { - "type": "string" + "text": { + "type": "string", + "nullable": true } } }, - "IRapidPayloadTranscriptionPayload": { + "IMetadataModelVideoDurationMetadataModel": { "required": [ - "title", - "transcription", + "duration", "_t" ], "properties": { "_t": { "enum": [ - "TranscriptionPayload" + "VideoDurationMetadata" ], "type": "string" }, - "title": { - "type": "string" + "duration": { + "type": "string", + "format": "date-time" + } + } + }, + "MetadataInputCollection": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IMetadataInput" + } + }, + "MetadataModelCollection": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IMetadataModel" + } + }, + "PagedResultOfQueryJobsResult": { + "required": [ + "total", + "page", + "pageSize", + "items" + ], + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64" }, - "transcription": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/TranscriptionWord" + "$ref": "#/components/schemas/QueryJobsResult" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IValidationTruth": { + "QueryAudiencesEndpoint_Output": { "required": [ - "_t" + "id", + "name", + "status", + "qualifiedUserCount", + "filters", + "createdAt", + "ownerMail", + "isPublic", + "isDistilling" ], "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IValidationTruthTranscriptionTruth" + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the audience." }, - { - "$ref": "#/components/schemas/IValidationTruthScrubTruth" + "name": { + "type": "string", + "description": "The name of the audience." }, - { - "$ref": "#/components/schemas/IValidationTruthPolygonTruth" + "description": { + "type": "string", + "description": "The markdown-supported description of the audience.", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthNamedEntityTruth" + "status": { + "$ref": "#/components/schemas/AudienceStatus" }, - { - "$ref": "#/components/schemas/IValidationTruthLocateBoxTruth" + "qualifiedUserCount": { + "type": "integer", + "description": "The number of users that have qualified for this audience.", + "format": "int64" }, - { - "$ref": "#/components/schemas/IValidationTruthLineTruth" + "filters": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/IAudienceFilter" + } + } + ], + "description": "The filters applied to this audience." }, - { - "$ref": "#/components/schemas/IValidationTruthEmptyValidationTruth" + "logo": { + "type": "string", + "description": "The URL of the audience logo, if any.", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthCompareTruth" + "createdAt": { + "type": "string", + "description": "The timestamp when the audience was created.", + "format": "date-time" }, - { - "$ref": "#/components/schemas/IValidationTruthMultiCompareTruth" + "ownerMail": { + "type": "string", + "description": "The email of the audience owner." }, - { - "$ref": "#/components/schemas/IValidationTruthSkipTruth" + "isPublic": { + "type": "boolean", + "description": "Whether the audience is publicly visible." }, - { - "$ref": "#/components/schemas/IValidationTruthAttachCategoryTruth" + "isDistilling": { + "type": "boolean", + "description": "Whether the audience is currently distilling users." }, - { - "$ref": "#/components/schemas/IValidationTruthBoundingBoxTruth" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "TranscriptionTruth": "#/components/schemas/IValidationTruthTranscriptionTruth", - "ScrubTruth": "#/components/schemas/IValidationTruthScrubTruth", - "PolygonTruth": "#/components/schemas/IValidationTruthPolygonTruth", - "NamedEntityTruth": "#/components/schemas/IValidationTruthNamedEntityTruth", - "LocateBoxTruth": "#/components/schemas/IValidationTruthLocateBoxTruth", - "LineTruth": "#/components/schemas/IValidationTruthLineTruth", - "EmptyValidationTruth": "#/components/schemas/IValidationTruthEmptyValidationTruth", - "CompareTruth": "#/components/schemas/IValidationTruthCompareTruth", - "MultiCompareTruth": "#/components/schemas/IValidationTruthMultiCompareTruth", - "SkipTruth": "#/components/schemas/IValidationTruthSkipTruth", - "AttachCategoryTruth": "#/components/schemas/IValidationTruthAttachCategoryTruth", - "BoundingBoxTruth": "#/components/schemas/IValidationTruthBoundingBoxTruth" + "randomAdmissionProbability": { + "type": "number", + "description": "The probability of admitting a random user to the audience.", + "format": "double" + }, + "health": { + "type": "number", + "description": "The health score of the audience.", + "format": "double" + }, + "graduated": { + "type": "integer", + "description": "The number of graduated users.", + "format": "int64" + }, + "dropped": { + "type": "integer", + "description": "The number of dropped users.", + "format": "int64" } } }, - "IValidationTruthAttachCategoryTruth": { + "QueryAudiencesEndpoint_PagedResultOfOutput": { "required": [ - "correctCategories", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "AttachCategoryTruth" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "correctCategories": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/QueryAudiencesEndpoint_Output" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IValidationTruthBoundingBoxTruth": { + "QueryExamplesForAudienceEndpoint_Output": { "required": [ - "xMin", - "yMin", - "xMax", - "yMax", - "_t" + "id", + "asset", + "payload", + "correctCount", + "incorrectCount" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "BoundingBoxTruth" + "id": { + "type": "string", + "description": "The unique identifier of the example." + }, + "rapidId": { + "type": "string", + "description": "The ID of the rapid associated with this example.", + "nullable": true + }, + "asset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetModel" + } ], - "type": "string" + "description": "The asset associated with this example." }, - "xMin": { - "type": "number", - "format": "double" + "payload": { + "allOf": [ + { + "$ref": "#/components/schemas/IExamplePayload" + } + ], + "description": "The payload of the example." }, - "yMin": { - "type": "number", - "format": "double" + "correctCount": { + "type": "integer", + "description": "The number of correct responses.", + "format": "int32" }, - "xMax": { - "type": "number", - "format": "double" + "incorrectCount": { + "type": "integer", + "description": "The number of incorrect responses.", + "format": "int32" }, - "yMax": { + "truth": { + "allOf": [ + { + "$ref": "#/components/schemas/IExampleTruth" + } + ], + "description": "The truth value of the example." + }, + "context": { + "type": "string", + "description": "The context text for the example.", + "nullable": true + }, + "contextAsset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetModel" + } + ], + "description": "The context asset for the example." + }, + "explanation": { + "type": "string", + "description": "The explanation for the example.", + "nullable": true + }, + "randomCorrectProbability": { "type": "number", + "description": "The probability of a random correct answer.", "format": "double" + }, + "isCommonSense": { + "type": "boolean", + "description": "Whether this example is common sense.", + "nullable": true + }, + "sortIndex": { + "type": "integer", + "description": "The sort index that controls serving order.", + "format": "int32" } } }, - "IValidationTruthCompareTruth": { + "QueryExamplesForAudienceEndpoint_PagedResultOfOutput": { "required": [ - "winnerId", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CompareTruth" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" + }, + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryExamplesForAudienceEndpoint_Output" + } }, - "winnerId": { - "type": "string" + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IValidationTruthEmptyValidationTruth": { + "QueryJobsResult": { "required": [ - "_t" + "jobId", + "name", + "definitionId", + "audienceId", + "revisionNumber", + "pipelineId", + "status", + "createdAt" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "EmptyValidationTruth" - ], + "jobId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "definitionId": { + "type": "string" + }, + "audienceId": { + "type": "string" + }, + "revisionNumber": { + "type": "integer", + "format": "int32" + }, + "pipelineId": { "type": "string" + }, + "status": { + "$ref": "#/components/schemas/AudienceJobState" + }, + "createdAt": { + "type": "string", + "format": "date-time" } } }, - "IValidationTruthLineTruth": { + "RecreateExternalAudiencesEndpoint_Input": { "required": [ - "_t" + "recreateAll" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "LineTruth" - ], - "type": "string" + "recreateAll": { + "type": "boolean", + "description": "Whether to recreate all 3 external audiences or only the missing ones." } } }, - "IValidationTruthLocateBoxTruth": { - "required": [ - "boundingBoxes", - "_t" - ], + "UpdateAudienceEndpoint_Input": { + "type": "object", "properties": { - "_t": { - "enum": [ - "LocateBoxTruth" - ], - "type": "string" + "name": { + "type": "string", + "description": "The new name to give to this audience.", + "nullable": true }, - "boundingBoxes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BoxShape" - } + "description": { + "type": "string", + "description": "The new description for the audience. Supports markdown. Set to null to remove.", + "nullable": true }, - "requiredPrecision": { - "type": "number", - "format": "double" + "filters": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/IAudienceFilter" + } + }, + { + "nullable": true + } + ], + "description": "The new filters to apply to any orders created for this audience.\n A filter can be used to restrict the audience to a specific subset of users." }, - "requiredCompleteness": { - "type": "number", - "format": "double" - } - } - }, - "IValidationTruthModel": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IValidationTruthModelAttachCategoryTruthModel" + "logo": { + "oneOf": [ + { + "$ref": "#/components/schemas/ExistingAssetInput" + }, + { + "nullable": true + } + ], + "description": "The new logo image for the audience. Must be an existing image asset.\n Set to null to remove the logo." }, - { - "$ref": "#/components/schemas/IValidationTruthModelBoundingBoxTruthModel" + "minGraduatedForDistillingBoost": { + "type": "integer", + "description": "Minimum graduated users before disabling distilling boost.\n When graduated count is below this, external distilling audience ID is added to campaign boosting.", + "format": "int32", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelClassifyTruthModel" + "minDistillingForGlobalBoost": { + "type": "integer", + "description": "Minimum distilling users before disabling global boost.\n When distilling count is below this, GlobalBoostLevel is set above zero.", + "format": "int32", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelCompareTruthModel" + "graduationScore": { + "type": "number", + "description": "The score used to determine whether a user graduates from the distilling campaign.", + "format": "double", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelEmptyValidationTruthModel" + "demotionScore": { + "type": "number", + "description": "Score below which a graduated user is demoted back to distilling.\n Must be less than or equal to GraduationScore. Set to null to use GraduationScore.", + "format": "double", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelLineTruthModel" + "maxDistillingResponses": { + "type": "integer", + "description": "Maximum responses before user exits the distilling campaign.\n Set to null to disable this exit condition.", + "format": "uint32", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelLocateBoxTruthModel" + "dropMinResponses": { + "type": "integer", + "description": "Minimum responses before the drop score check applies.\n Users need at least this many responses before they can be kicked out for low score.\n Set to null to apply drop score check from the first response.", + "format": "uint32", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelMultiCompareTruthModel" + "dropScore": { + "type": "number", + "description": "Score floor - users below this score exit the distilling campaign\n (only after completing DropMinResponses).\n Set to null to disable this exit condition.", + "format": "double", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelNamedEntityTruthModel" + "maxDistillingSessions": { + "type": "integer", + "description": "Maximum sessions (rapid retrievals) before user exits the distilling campaign.\n Set to a value to enable session-based exit condition.", + "format": "uint32", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelPolygonTruthModel" + "inactivityDropDays": { + "type": "integer", + "description": "Number of days of inactivity before a distilling user is dropped.\n Set to null to disable this exit condition.", + "format": "uint32", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelScrubTruthModel" + "minSubmissionRate": { + "type": "number", + "description": "Minimum submission rate (responses / sessions) before a user is dropped.\n Set to null to disable this exit condition.", + "format": "double", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelSkipTruthModel" + "minSessionsForSubmissionRate": { + "type": "integer", + "description": "Minimum number of sessions before the submission rate check applies.\n Set to null to apply from the first session.", + "format": "uint32", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelTranscriptionTruthModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "AttachCategoryTruth": "#/components/schemas/IValidationTruthModelAttachCategoryTruthModel", - "BoundingBoxTruth": "#/components/schemas/IValidationTruthModelBoundingBoxTruthModel", - "ClassifyTruth": "#/components/schemas/IValidationTruthModelClassifyTruthModel", - "CompareTruth": "#/components/schemas/IValidationTruthModelCompareTruthModel", - "EmptyValidationTruth": "#/components/schemas/IValidationTruthModelEmptyValidationTruthModel", - "LineTruth": "#/components/schemas/IValidationTruthModelLineTruthModel", - "LocateBoxTruth": "#/components/schemas/IValidationTruthModelLocateBoxTruthModel", - "MultiCompareTruth": "#/components/schemas/IValidationTruthModelMultiCompareTruthModel", - "NamedEntityTruth": "#/components/schemas/IValidationTruthModelNamedEntityTruthModel", - "PolygonTruth": "#/components/schemas/IValidationTruthModelPolygonTruthModel", - "ScrubTruth": "#/components/schemas/IValidationTruthModelScrubTruthModel", - "SkipTruth": "#/components/schemas/IValidationTruthModelSkipTruthModel", - "TranscriptionTruth": "#/components/schemas/IValidationTruthModelTranscriptionTruthModel" - } - } - }, - "IValidationTruthModelAttachCategoryTruthModel": { - "required": [ - "correctCategories", - "_t" - ], - "properties": { - "_t": { + "minSubmissionRateGraduated": { + "type": "number", + "description": "Minimum submission rate for graduated users. If null, MinSubmissionRate applies to graduated users.\n Set a lower value to be more lenient with graduated users.", + "format": "double", + "nullable": true + }, + "distillingRetrievalMode": { "enum": [ - "AttachCategoryTruth" + "Random", + "Shuffled", + "Sequential" ], - "type": "string" - }, - "correctCategories": { - "type": "array", - "items": { - "type": "string" - } + "description": "The retrieval mode used by the distilling campaign to select rapids for users." } } }, - "IValidationTruthModelBoundingBoxTruthModel": { - "required": [ - "xMin", - "yMin", - "xMax", - "yMax", - "_t" - ], + "UpdateAudienceExampleEndpoint_Input": { + "type": "object", "properties": { - "_t": { - "enum": [ - "BoundingBoxTruth" + "truth": { + "oneOf": [ + { + "$ref": "#/components/schemas/IExampleTruth" + }, + { + "nullable": true + } ], - "type": "string" + "description": "The truth for the example." }, - "xMin": { - "type": "number", - "format": "double" + "explanation": { + "type": "string", + "description": "The optional explanation that will be shown to the user when answering wrong.", + "nullable": true }, - "yMin": { - "type": "number", - "format": "double" + "context": { + "type": "string", + "description": "An optional text context that will be shown to the user.", + "nullable": true }, - "xMax": { - "type": "number", - "format": "double" + "contextAsset": { + "oneOf": [ + { + "$ref": "#/components/schemas/IAssetInput" + }, + { + "nullable": true + } + ], + "description": "An optional asset that will be used as context to show to the user." }, - "yMax": { + "randomCorrectProbability": { "type": "number", - "format": "double" + "description": "The probability that if the user answers at random that they'll be correct.", + "format": "double", + "nullable": true + }, + "isCommonSense": { + "type": "boolean", + "description": "Whether this example should be treated as commonsense validation.", + "nullable": true + }, + "sortIndex": { + "type": "integer", + "description": "The sort index that controls the serving order of this example.", + "format": "int32", + "nullable": true } - } + }, + "description": "Input model for updating an audience example." }, - "IValidationTruthModelClassifyTruthModel": { - "required": [ - "correctCategories", - "_t" - ], + "UpdateBoostConfigEndpoint_Input": { + "type": "object", "properties": { - "_t": { - "enum": [ - "ClassifyTruth" - ], - "type": "string" + "minDistillingForGlobalBoost": { + "type": "integer", + "description": "Minimum number of distilling users required to activate global boost.", + "format": "int32" }, - "correctCategories": { - "type": "array", - "items": { - "type": "string" - } + "minGraduatedForDistillingBoost": { + "type": "integer", + "description": "Minimum number of graduated users required to activate distilling boost.", + "format": "int32" } } }, - "IValidationTruthModelCompareTruthModel": { + "AudienceBoostModel": { "required": [ - "winnerId", - "_t" + "externalAudienceId", + "level" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CompareTruth" - ], - "type": "string" + "externalAudienceId": { + "type": "integer", + "format": "int32" }, - "winnerId": { - "type": "string" + "level": { + "type": "integer", + "format": "int32" } } }, - "IValidationTruthModelEmptyValidationTruthModel": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "EmptyValidationTruth" - ], - "type": "string" - } - } + "BoostingControlMode": { + "enum": [ + "Manual", + "Automatic" + ] }, - "IValidationTruthModelLineTruthModel": { + "BoostingProfileModel": { "required": [ - "_t" + "globalBoostLevel", + "prospectBlacklist", + "distillingBoosts", + "labelingBoosts" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "LineTruth" + "globalBoostLevel": { + "type": "integer", + "format": "int32" + }, + "languageBoosts": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } ], - "type": "string" - } - } - }, - "IValidationTruthModelLocateBoxTruthModel": { - "required": [ - "boundingBoxes", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "LocateBoxTruth" + "deprecated": true + }, + "kayzenAudienceIds": { + "allOf": [ + { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + } ], - "type": "string" + "deprecated": true }, - "boundingBoxes": { + "prospectBlacklist": { "type": "array", "items": { - "$ref": "#/components/schemas/BoxShape" + "type": "integer", + "format": "int32" } }, - "requiredPrecision": { - "type": "number", - "format": "double" - }, - "requiredCompleteness": { - "type": "number", - "format": "double" - } - } - }, - "IValidationTruthModelMultiCompareTruthModel": { - "required": [ - "correctCombinations", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "MultiCompareTruth" - ], - "type": "string" - }, - "correctCombinations": { + "distillingBoosts": { "type": "array", "items": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/AudienceBoostModel" } - } - } - }, - "IValidationTruthModelNamedEntityTruthModel": { - "required": [ - "classifications", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "NamedEntityTruth" - ], - "type": "string" }, - "classifications": { + "labelingBoosts": { "type": "array", "items": { - "$ref": "#/components/schemas/NamedClassification" + "$ref": "#/components/schemas/AudienceBoostModel" } } } }, - "IValidationTruthModelPolygonTruthModel": { + "BoostMode": { + "enum": [ + "Automatic", + "Manual" + ], + "description": "The current boost mode." + }, + "BoostStatusModel": { + "enum": [ + "Active", + "Inactive", + "Partial", + "Unknown" + ], + "description": "The current boost status." + }, + "CampaignStatusModel": { + "enum": [ + "Created", + "Preview", + "Active", + "Analysis", + "Paused", + "Completed" + ] + }, + "ChangeBoostEndpoint_Input": { "required": [ - "_t" + "isManual" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "PolygonTruth" - ], - "type": "string" + "isManual": { + "type": "boolean", + "description": "Whether the manual overwrite should be applied." + }, + "isActive": { + "type": "boolean", + "description": "Whether the boost is active. Deprecated in favor of Level.", + "deprecated": true + }, + "level": { + "type": "integer", + "description": "The boost level. Takes precedence over IsActive when set.", + "format": "int32" } } }, - "IValidationTruthModelScrubTruthModel": { + "ComparisonOperator": { + "enum": [ + "Equal", + "NotEqual", + "LessThan", + "LessThanOrEqual", + "GreaterThan", + "GreaterThanOrEqual" + ] + }, + "DeviceType": { + "enum": [ + "Unknown", + "Phone", + "Tablet" + ] + }, + "GetBoostInsightsEndpoint_AudienceOutput": { "required": [ - "validRanges", - "_t" + "externalAudienceId", + "contributors" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "ScrubTruth" - ], - "type": "string" + "externalAudienceId": { + "type": "integer", + "format": "int32" }, - "validRanges": { + "contributors": { "type": "array", "items": { - "$ref": "#/components/schemas/ScrubRange" + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_ContributorOutput" } } } }, - "IValidationTruthModelSkipTruthModel": { + "GetBoostInsightsEndpoint_ContributorOutput": { "required": [ - "_t" + "campaignId", + "campaignName" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "SkipTruth" - ], + "campaignId": { + "type": "string" + }, + "campaignName": { "type": "string" } } }, - "IValidationTruthModelTranscriptionTruthModel": { + "GetBoostInsightsEndpoint_GlobalBoostOutput": { "required": [ - "correctWords", - "_t" + "effectiveLevel", + "contributors" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "TranscriptionTruth" - ], - "type": "string" + "effectiveLevel": { + "type": "integer", + "format": "int32" }, - "correctWords": { + "contributors": { "type": "array", "items": { - "$ref": "#/components/schemas/TranscriptionWord" + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LevelContributorOutput" } - }, - "strictGrading": { - "type": "boolean", - "nullable": true - }, - "requiredPrecision": { - "type": "number", - "format": "double" - }, - "requiredCompleteness": { - "type": "number", - "format": "double" } } }, - "IValidationTruthMultiCompareTruth": { + "GetBoostInsightsEndpoint_LanguageBoostOutput": { "required": [ - "correctCombinations", - "_t" + "language", + "contributors" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "MultiCompareTruth" - ], + "language": { "type": "string" }, - "correctCombinations": { + "contributors": { "type": "array", "items": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_ContributorOutput" } } } }, - "IValidationTruthNamedEntityTruth": { + "GetBoostInsightsEndpoint_LevelContributorOutput": { "required": [ - "classifications", - "_t" + "campaignId", + "campaignName", + "level" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "NamedEntityTruth" - ], + "campaignId": { "type": "string" }, - "classifications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NamedClassification" - } - } - } - }, - "IValidationTruthPolygonTruth": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "PolygonTruth" - ], + "campaignName": { "type": "string" + }, + "level": { + "type": "integer", + "format": "int32" } } }, - "IValidationTruthScrubTruth": { + "GetBoostInsightsEndpoint_LeveledAudienceOutput": { "required": [ - "validRanges", - "_t" + "externalAudienceId", + "effectiveLevel", + "contributors" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "ScrubTruth" - ], - "type": "string" + "externalAudienceId": { + "type": "integer", + "format": "int32" }, - "validRanges": { + "effectiveLevel": { + "type": "integer", + "format": "int32" + }, + "contributors": { "type": "array", "items": { - "$ref": "#/components/schemas/ScrubRange" + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LevelContributorOutput" } } } }, - "IValidationTruthSkipTruth": { + "GetBoostInsightsEndpoint_Output": { "required": [ - "_t" + "mode", + "manualOverrideLevel", + "globalBoost", + "prospectBlacklist", + "distillingBoosts", + "labelingBoosts" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "SkipTruth" + "mode": { + "$ref": "#/components/schemas/BoostMode" + }, + "manualOverrideLevel": { + "type": "integer", + "description": "The manual override level, if manual mode is active.", + "format": "int32" + }, + "globalBoost": { + "allOf": [ + { + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_GlobalBoostOutput" + } + ], + "description": "Global boost insight with contributing campaigns." + }, + "languageBoosts": { + "allOf": [ + { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LanguageBoostOutput" + }, + "nullable": true + } + ], + "deprecated": true + } + ], + "description": "Language-specific boost insights." + }, + "audienceBoosts": { + "allOf": [ + { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_AudienceOutput" + }, + "nullable": true + } + ], + "deprecated": true + } + ], + "description": "Audience boost insights." + }, + "prospectBlacklist": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_AudienceOutput" + } + } + ], + "description": "Prospect blacklist insights." + }, + "distillingBoosts": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LeveledAudienceOutput" + } + } ], - "type": "string" + "description": "Distilling boost insights." + }, + "labelingBoosts": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LeveledAudienceOutput" + } + } + ], + "description": "Labeling boost insights." } } }, - "IValidationTruthTranscriptionTruth": { + "GetBoostStatusEndpoint_Output": { "required": [ - "correctWords", - "_t" + "status", + "mode", + "activeCampaigns", + "inactiveCampaigns", + "unknownCampaigns" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "TranscriptionTruth" - ], - "type": "string" + "status": { + "$ref": "#/components/schemas/BoostStatusModel" }, - "correctWords": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TranscriptionWord" - } + "mode": { + "$ref": "#/components/schemas/BoostMode" }, - "strictGrading": { - "type": "boolean", - "nullable": true + "activeCampaigns": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "The list of active campaign identifiers." }, - "requiredPrecision": { - "type": "number", - "format": "double" + "inactiveCampaigns": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "The list of inactive campaign identifiers." }, - "requiredCompleteness": { - "type": "number", - "format": "double" + "unknownCampaigns": { + "allOf": [ + { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + ], + "description": "The list of unknown campaign identifiers." } } }, - "LogicOperator": { - "enum": [ - "And", - "Or", - "Not" - ] - }, - "MetadataInputCollection": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IMetadataInput" - } - }, - "MetadataModelCollection": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IMetadataModel" - } - }, - "NamedClassification": { + "GetCampaignByIdEndpoint_Output": { "required": [ - "start", - "end", - "classification" + "id", + "name", + "status", + "priority", + "boostingProfile", + "boostingControlMode", + "hasBooster", + "stickyConfig", + "filters", + "selections", + "featureFlags", + "ownerMail", + "createdAt" ], "type": "object", "properties": { - "start": { - "type": "integer", - "format": "int32" + "id": { + "type": "string", + "description": "The unique identifier of the campaign." }, - "end": { - "type": "integer", - "format": "int32" + "name": { + "type": "string", + "description": "The name of the campaign." }, - "classification": { - "type": "string" - } - } - }, - "PagedResultOfQueryAudiencesResult": { - "required": [ - "total", - "page", - "pageSize", - "items" - ], - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" + "status": { + "$ref": "#/components/schemas/CampaignStatusModel" }, - "page": { + "priority": { "type": "integer", + "description": "The priority level of the campaign.", "format": "int32" }, - "pageSize": { - "type": "integer", - "format": "int32" + "boostingProfile": { + "allOf": [ + { + "$ref": "#/components/schemas/BoostingProfileModel" + } + ], + "description": "The boosting profile configuration." }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryAudiencesResult" - } + "boostingControlMode": { + "$ref": "#/components/schemas/BoostingControlMode" }, - "totalPages": { - "type": "integer", - "format": "int32" + "hasBooster": { + "type": "boolean", + "description": "Whether the campaign has a booster." + }, + "requiresBooster": { + "type": "boolean", + "description": "Whether the campaign requires a booster.", + "deprecated": true + }, + "stickyConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/StickyConfigModel" + } + ], + "description": "The sticky behavior configuration." + }, + "filters": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignFilterModel" + } + } + ], + "description": "The targeting filters for this campaign." + }, + "selections": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignSelectionModel" + } + } + ], + "description": "The rapid selections for this campaign." + }, + "featureFlags": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } + } + ], + "description": "The feature flags configured for this campaign." + }, + "ownerMail": { + "type": "string", + "description": "The email of the campaign owner." + }, + "createdAt": { + "type": "string", + "description": "The timestamp when the campaign was created.", + "format": "date-time" } } }, - "PagedResultOfQueryJobsResult": { + "GetCampaignCacheEndpoint_CampaignEntry": { "required": [ - "total", - "page", - "pageSize", - "items" + "id", + "name", + "status", + "priority", + "filterCount", + "selectionCount", + "userScoreDimensionCount", + "featureFlagCount", + "rateLimitCount", + "isPreviewEnabled", + "boostingControlMode" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/CampaignStatusModel" }, - "page": { + "priority": { "type": "integer", "format": "int32" }, - "pageSize": { + "filterCount": { "type": "integer", "format": "int32" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryJobsResult" - } - }, - "totalPages": { + "selectionCount": { "type": "integer", "format": "int32" - } - } - }, - "PagedResultOfQueryRapidsOutput": { - "required": [ - "total", - "page", - "pageSize", - "items" - ], - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" }, - "page": { + "userScoreDimensionCount": { "type": "integer", "format": "int32" }, - "pageSize": { + "featureFlagCount": { "type": "integer", "format": "int32" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryRapidsOutput" - } - }, - "totalPages": { + "rateLimitCount": { "type": "integer", "format": "int32" + }, + "isPreviewEnabled": { + "type": "boolean" + }, + "boostingControlMode": { + "$ref": "#/components/schemas/BoostingControlMode" } } }, - "PageInfo": { + "GetCampaignCacheEndpoint_Output": { + "required": [ + "count", + "campaigns" + ], "type": "object", "properties": { - "index": { + "count": { "type": "integer", + "description": "The total number of cached campaigns.", "format": "int32" }, - "size": { - "type": "integer", - "format": "int32" + "campaigns": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetCampaignCacheEndpoint_CampaignEntry" + } + } + ], + "description": "The list of cached campaign summaries." } } }, - "QueryAudiencesResult": { + "GetUserScoreCacheEndpoint_Output": { "required": [ - "id", - "name", - "status", - "qualifiedUserCount", - "filters", - "createdAt", - "ownerMail", - "isPublic", - "isDistilling" + "count", + "scores" ], "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/AudienceStatus" - }, - "qualifiedUserCount": { - "type": "integer", - "format": "int64" - }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAudienceFilter" - } - }, - "logo": { - "type": "string", - "nullable": true - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "ownerMail": { - "type": "string" - }, - "isPublic": { - "type": "boolean" - }, - "isDistilling": { - "type": "boolean" - }, - "randomAdmissionProbability": { - "type": "number", - "format": "double" - }, - "health": { - "type": "number", - "format": "double" - }, - "graduated": { + "count": { "type": "integer", - "format": "int64" + "description": "The total number of cached user scores.", + "format": "int32" }, - "dropped": { - "type": "integer", - "format": "int64" + "scores": { + "type": "object", + "additionalProperties": { + "type": "number", + "format": "double" + }, + "description": "The cached dimension-to-score mappings." } } }, - "QueryExamplesForAudienceEndpoint_Output": { + "ICampaignFilterModel": { "required": [ - "id", - "asset", - "payload", - "correctCount", - "incorrectCount" + "_t" ], "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the example." + "oneOf": [ + { + "$ref": "#/components/schemas/ICampaignFilterModelAndFilterModel" }, - "rapidId": { - "type": "string", - "description": "The ID of the rapid associated with this example.", - "nullable": true + { + "$ref": "#/components/schemas/ICampaignFilterModelAudienceStateFilterModel" }, - "asset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetModel" - } - ], - "description": "The asset associated with this example." + { + "$ref": "#/components/schemas/ICampaignFilterModelCampaignIdFilterModel" }, - "payload": { - "allOf": [ - { - "$ref": "#/components/schemas/IExamplePayload" - } - ], - "description": "The payload of the example." + { + "$ref": "#/components/schemas/ICampaignFilterModelCampaignSessionCountFilterModel" }, - "correctCount": { - "type": "integer", - "description": "The number of correct responses.", - "format": "int32" + { + "$ref": "#/components/schemas/ICampaignFilterModelCountryFilterModel" }, - "incorrectCount": { - "type": "integer", - "description": "The number of incorrect responses.", - "format": "int32" + { + "$ref": "#/components/schemas/ICampaignFilterModelDemographicFilterModel" }, - "truth": { - "allOf": [ - { - "$ref": "#/components/schemas/IExampleTruth" - } - ], - "description": "The truth value of the example." + { + "$ref": "#/components/schemas/ICampaignFilterModelDeviceFilterModel" }, - "context": { - "type": "string", - "description": "The context text for the example.", - "nullable": true + { + "$ref": "#/components/schemas/ICampaignFilterModelLanguageFilterModel" }, - "contextAsset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetModel" - } - ], - "description": "The context asset for the example." + { + "$ref": "#/components/schemas/ICampaignFilterModelNewUserFilterModel" }, - "explanation": { - "type": "string", - "description": "The explanation for the example.", - "nullable": true + { + "$ref": "#/components/schemas/ICampaignFilterModelNotFilterModel" }, - "randomCorrectProbability": { - "type": "number", - "description": "The probability of a random correct answer.", - "format": "double" + { + "$ref": "#/components/schemas/ICampaignFilterModelOrFilterModel" }, - "isCommonSense": { - "type": "boolean", - "description": "Whether this example is common sense.", - "nullable": true + { + "$ref": "#/components/schemas/ICampaignFilterModelResponseCountFilterModel" }, - "sortIndex": { - "type": "integer", - "description": "The sort index that controls serving order.", - "format": "int32" + { + "$ref": "#/components/schemas/ICampaignFilterModelUserActionRestrictionFilterModel" + }, + { + "$ref": "#/components/schemas/ICampaignFilterModelUserScoreFilterModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "AndFilter": "#/components/schemas/ICampaignFilterModelAndFilterModel", + "AudienceStateFilter": "#/components/schemas/ICampaignFilterModelAudienceStateFilterModel", + "CampaignIdFilter": "#/components/schemas/ICampaignFilterModelCampaignIdFilterModel", + "CampaignSessionCountFilter": "#/components/schemas/ICampaignFilterModelCampaignSessionCountFilterModel", + "CountryFilter": "#/components/schemas/ICampaignFilterModelCountryFilterModel", + "DemographicFilter": "#/components/schemas/ICampaignFilterModelDemographicFilterModel", + "DeviceFilter": "#/components/schemas/ICampaignFilterModelDeviceFilterModel", + "LanguageFilter": "#/components/schemas/ICampaignFilterModelLanguageFilterModel", + "NewUserFilter": "#/components/schemas/ICampaignFilterModelNewUserFilterModel", + "NotFilter": "#/components/schemas/ICampaignFilterModelNotFilterModel", + "OrFilter": "#/components/schemas/ICampaignFilterModelOrFilterModel", + "ResponseCountFilter": "#/components/schemas/ICampaignFilterModelResponseCountFilterModel", + "UserActionRestrictionFilter": "#/components/schemas/ICampaignFilterModelUserActionRestrictionFilterModel", + "UserScoreFilter": "#/components/schemas/ICampaignFilterModelUserScoreFilterModel" } } }, - "QueryExamplesForAudienceEndpoint_PagedResultOfOutput": { + "ICampaignFilterModelAndFilterModel": { "required": [ - "total", - "page", - "pageSize", - "items" + "filters", + "_t" ], - "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { - "type": "integer", - "format": "int32" + "_t": { + "enum": [ + "AndFilter" + ], + "type": "string" }, - "items": { + "filters": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryExamplesForAudienceEndpoint_Output" + "$ref": "#/components/schemas/ICampaignFilterModel" } - }, - "totalPages": { - "type": "integer", - "format": "int32" } } }, - "QueryJobsResult": { + "ICampaignFilterModelAudienceStateFilterModel": { "required": [ - "jobId", - "name", - "definitionId", "audienceId", - "revisionNumber", - "pipelineId", - "status", - "createdAt" + "allowedStates", + "includeUnknownState", + "_t" ], - "type": "object", "properties": { - "jobId": { + "_t": { + "enum": [ + "AudienceStateFilter" + ], "type": "string" }, - "name": { + "audienceId": { "type": "string" }, - "definitionId": { - "type": "string" + "allowedStates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SimplifiedAudienceUserState" + } }, - "audienceId": { + "includeUnknownState": { + "type": "boolean" + } + } + }, + "ICampaignFilterModelCampaignIdFilterModel": { + "required": [ + "campaignIds", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "CampaignIdFilter" + ], "type": "string" }, - "revisionNumber": { - "type": "integer", - "format": "int32" - }, - "pipelineId": { + "campaignIds": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ICampaignFilterModelCampaignSessionCountFilterModel": { + "required": [ + "sessionCount", + "operator", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "CampaignSessionCountFilter" + ], "type": "string" }, - "status": { - "$ref": "#/components/schemas/AudienceJobState" + "sessionCount": { + "type": "integer", + "format": "uint32" }, - "createdAt": { - "type": "string", - "format": "date-time" + "operator": { + "$ref": "#/components/schemas/ComparisonOperator" } } }, - "QueryModel": { - "type": "object", + "ICampaignFilterModelCountryFilterModel": { + "required": [ + "countries", + "_t" + ], "properties": { - "page": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/PageInfo" - } - ] - }, - "filter": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/RootFilter" - } - ] + "_t": { + "enum": [ + "CountryFilter" + ], + "type": "string" }, - "sortCriteria": { + "countries": { "type": "array", "items": { - "$ref": "#/components/schemas/SortCriterion" - }, - "nullable": true + "type": "string" + } } } }, - "QueryRapidsOutput": { + "ICampaignFilterModelDemographicFilterModel": { "required": [ - "id", - "type", - "asset", - "payload", - "correctValidationCount", - "invalidValidationCount", - "state", - "isCommonSense" + "identifier", + "values", + "_t" ], - "type": "object", "properties": { - "id": { + "_t": { + "enum": [ + "DemographicFilter" + ], "type": "string" }, - "type": { + "identifier": { "type": "string" }, - "asset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAssetModel" - } - ] - }, - "payload": { - "$ref": "#/components/schemas/IRapidPayload" - }, - "correctValidationCount": { - "type": "integer", - "format": "int32" - }, - "invalidValidationCount": { - "type": "integer", - "format": "int32" - }, - "state": { - "$ref": "#/components/schemas/RapidState" - }, - "truth": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IValidationTruth" - } - ] - }, - "context": { - "type": "string", - "nullable": true - }, - "contextAsset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAssetModel" - } - ] - }, - "explanation": { - "type": "string", - "nullable": true - }, - "randomCorrectProbability": { - "type": "number", - "format": "double" - }, - "isCommonSense": { - "type": "boolean" + "values": { + "type": "array", + "items": { + "type": "string" + } } - }, - "description": "Output model for the backwards-compatible rapids query." - }, - "RapidState": { - "enum": [ - "Labeling", - "Paused", - "Incomplete", - "Flagged", - "Done", - "None", - "Rejected" - ] + } }, - "RecreateExternalAudiencesEndpoint_Input": { + "ICampaignFilterModelDeviceFilterModel": { "required": [ - "recreateAll" + "deviceTypes", + "_t" ], - "type": "object", "properties": { - "recreateAll": { - "type": "boolean", - "description": "Whether to recreate all 3 external audiences or only the missing ones." + "_t": { + "enum": [ + "DeviceFilter" + ], + "type": "string" + }, + "deviceTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceType" + } } } }, - "RootFilter": { - "type": "object", + "ICampaignFilterModelLanguageFilterModel": { + "required": [ + "languages", + "_t" + ], "properties": { - "filters": { + "_t": { + "enum": [ + "LanguageFilter" + ], + "type": "string" + }, + "languages": { "type": "array", "items": { - "$ref": "#/components/schemas/Filter" + "type": "string" } - }, - "logic": { - "$ref": "#/components/schemas/LogicOperator" } } }, - "ScrubRange": { + "ICampaignFilterModelNewUserFilterModel": { "required": [ - "start", - "end" + "_t" ], - "type": "object", "properties": { - "start": { - "type": "integer", - "format": "int32" - }, - "end": { - "type": "integer", - "format": "int32" + "_t": { + "enum": [ + "NewUserFilter" + ], + "type": "string" } } }, - "SortCriterion": { + "ICampaignFilterModelNotFilterModel": { "required": [ - "propertyName", - "direction" + "filter", + "_t" ], - "type": "object", "properties": { - "propertyName": { + "_t": { + "enum": [ + "NotFilter" + ], "type": "string" }, - "direction": { - "$ref": "#/components/schemas/SortDirection" + "filter": { + "$ref": "#/components/schemas/ICampaignFilterModel" } } }, - "SortDirection": { - "enum": [ - "Asc", - "Desc" - ] + "ICampaignFilterModelOrFilterModel": { + "required": [ + "filters", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "OrFilter" + ], + "type": "string" + }, + "filters": {} + } }, - "TranscriptionWord": { + "ICampaignFilterModelResponseCountFilterModel": { "required": [ - "word", - "wordIndex" + "dimension", + "responseCount", + "operator", + "_t" ], - "type": "object", "properties": { - "word": { + "_t": { + "enum": [ + "ResponseCountFilter" + ], "type": "string" }, - "wordIndex": { + "dimension": { + "type": "string" + }, + "responseCount": { "type": "integer", - "format": "int32" + "format": "uint32" + }, + "operator": { + "$ref": "#/components/schemas/ComparisonOperator" } } }, - "UpdateAudienceExampleEndpoint_Input": { - "type": "object", + "ICampaignFilterModelUserActionRestrictionFilterModel": { + "required": [ + "requiredActions", + "_t" + ], "properties": { - "truth": { - "oneOf": [ - { - "$ref": "#/components/schemas/IExampleTruth" - }, - { - "nullable": true - } + "_t": { + "enum": [ + "UserActionRestrictionFilter" ], - "description": "The truth for the example." - }, - "explanation": { - "type": "string", - "description": "The optional explanation that will be shown to the user when answering wrong.", - "nullable": true - }, - "context": { - "type": "string", - "description": "An optional text context that will be shown to the user.", - "nullable": true + "type": "string" }, - "contextAsset": { - "oneOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - }, - { - "nullable": true - } + "requiredActions": {} + } + }, + "ICampaignFilterModelUserScoreFilterModel": { + "required": [ + "dimension", + "lowerbound", + "upperbound", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "UserScoreFilter" ], - "description": "An optional asset that will be used as context to show to the user." + "type": "string" }, - "randomCorrectProbability": { - "type": "number", - "description": "The probability that if the user answers at random that they'll be correct.", - "format": "double", - "nullable": true + "dimension": { + "type": "string" }, - "isCommonSense": { - "type": "boolean", - "description": "Whether this example should be treated as commonsense validation.", - "nullable": true + "lowerbound": { + "type": "number", + "format": "double" }, - "sortIndex": { - "type": "integer", - "description": "The sort index that controls the serving order of this example.", - "format": "int32", - "nullable": true + "upperbound": { + "type": "number", + "format": "double" } - }, - "description": "Input model for updating an audience example." + } }, - "UpdateAudienceRapidEndpoint_Input": { + "ICampaignSelectionModel": { + "required": [ + "_t" + ], "type": "object", - "properties": { - "truth": { - "oneOf": [ - { - "$ref": "#/components/schemas/IValidationTruthModel" - }, - { - "nullable": true - } - ], - "description": "The truth for the validation rapid." + "oneOf": [ + { + "$ref": "#/components/schemas/ICampaignSelectionModelAbTestSelectionModel" }, - "explanation": { - "type": "string", - "description": "The optional explanation that will be shown to the user when answering wrong.", - "nullable": true + { + "$ref": "#/components/schemas/ICampaignSelectionModelAudienceSelectionModel" }, - "context": { - "type": "string", - "description": "An optional text context that will be shown to the user.", - "nullable": true + { + "$ref": "#/components/schemas/ICampaignSelectionModelCappedSelectionModel" }, - "contextAsset": { - "oneOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - }, - { - "nullable": true - } + { + "$ref": "#/components/schemas/ICampaignSelectionModelConditionalValidationSelectionModel" + }, + { + "$ref": "#/components/schemas/ICampaignSelectionModelDemographicSelectionModel" + }, + { + "$ref": "#/components/schemas/ICampaignSelectionModelEnforcingSelectionModel" + }, + { + "$ref": "#/components/schemas/ICampaignSelectionModelLabelingSelectionModel" + }, + { + "$ref": "#/components/schemas/ICampaignSelectionModelShufflingSelectionModel" + }, + { + "$ref": "#/components/schemas/ICampaignSelectionModelStaticSelectionModel" + }, + { + "$ref": "#/components/schemas/ICampaignSelectionModelValidationSelectionModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "AbTestSelection": "#/components/schemas/ICampaignSelectionModelAbTestSelectionModel", + "AudienceSelection": "#/components/schemas/ICampaignSelectionModelAudienceSelectionModel", + "CappedSelection": "#/components/schemas/ICampaignSelectionModelCappedSelectionModel", + "ConditionalValidationSelection": "#/components/schemas/ICampaignSelectionModelConditionalValidationSelectionModel", + "DemographicSelection": "#/components/schemas/ICampaignSelectionModelDemographicSelectionModel", + "EnforcingSelection": "#/components/schemas/ICampaignSelectionModelEnforcingSelectionModel", + "LabelingSelection": "#/components/schemas/ICampaignSelectionModelLabelingSelectionModel", + "ShufflingSelection": "#/components/schemas/ICampaignSelectionModelShufflingSelectionModel", + "StaticSelection": "#/components/schemas/ICampaignSelectionModelStaticSelectionModel", + "ValidationSelection": "#/components/schemas/ICampaignSelectionModelValidationSelectionModel" + } + } + }, + "ICampaignSelectionModelAbTestSelectionModel": { + "required": [ + "a", + "b", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "AbTestSelection" ], - "description": "An optional asset that will be used as context to show to the user." + "type": "string" }, - "randomCorrectProbability": { - "type": "number", - "description": "The probability that if the user answers at random that they'll be correct.", - "format": "double", - "nullable": true + "a": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignSelectionModel" + } }, - "isCommonSense": { - "type": "boolean", - "description": "Whether this rapid should be treated as commonsense validation.", - "nullable": true + "b": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignSelectionModel" + } } - }, - "description": "Input model for updating an audience rapid." + } }, - "UpdateAudienceRequest": { - "type": "object", + "ICampaignSelectionModelAudienceSelectionModel": { + "required": [ + "audienceId", + "effort", + "retrievalMode", + "_t" + ], "properties": { - "name": { - "type": "string", - "description": "The new name to give to this audience.", - "nullable": true - }, - "description": { - "type": "string", - "description": "The new description for the audience. Supports markdown. Set to null to remove.", - "nullable": true - }, - "filters": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAudienceFilter" - } - }, - { - "nullable": true - } - ], - "description": "The new filters to apply to any orders created for this audience.\n A filter can be used to restrict the audience to a specific subset of users." - }, - "logo": { - "oneOf": [ - { - "$ref": "#/components/schemas/ExistingAssetInput" - }, - { - "nullable": true - } + "_t": { + "enum": [ + "AudienceSelection" ], - "description": "The new logo image for the audience. Must be an existing image asset.\n Set to null to remove the logo." - }, - "minGraduatedForDistillingBoost": { - "type": "integer", - "description": "Minimum graduated users before disabling distilling boost.\n When graduated count is below this, external distilling audience ID is added to campaign boosting.", - "format": "int32", - "nullable": true - }, - "minDistillingForGlobalBoost": { - "type": "integer", - "description": "Minimum distilling users before disabling global boost.\n When distilling count is below this, GlobalBoostLevel is set above zero.", - "format": "int32", - "nullable": true - }, - "graduationScore": { - "type": "number", - "description": "The score used to determine whether a user graduates from the distilling campaign.", - "format": "double", - "nullable": true - }, - "demotionScore": { - "type": "number", - "description": "Score below which a graduated user is demoted back to distilling.\n Must be less than or equal to GraduationScore. Set to null to use GraduationScore.", - "format": "double", - "nullable": true + "type": "string" }, - "maxDistillingResponses": { - "type": "integer", - "description": "Maximum responses before user exits the distilling campaign.\n Set to null to disable this exit condition.", - "format": "uint32", - "nullable": true + "audienceId": { + "type": "string" }, - "dropMinResponses": { + "effort": { "type": "integer", - "description": "Minimum responses before the drop score check applies.\n Users need at least this many responses before they can be kicked out for low score.\n Set to null to apply drop score check from the first response.", - "format": "uint32", - "nullable": true - }, - "dropScore": { - "type": "number", - "description": "Score floor - users below this score exit the distilling campaign\n (only after completing DropMinResponses).\n Set to null to disable this exit condition.", - "format": "double", - "nullable": true + "format": "int32" }, - "maxDistillingSessions": { - "type": "integer", - "description": "Maximum sessions (rapid retrievals) before user exits the distilling campaign.\n Set to a value to enable session-based exit condition.", - "format": "uint32", - "nullable": true + "retrievalMode": { + "$ref": "#/components/schemas/RetrievalMode" }, - "inactivityDropDays": { + "maxIterations": { "type": "integer", - "description": "Number of days of inactivity before a distilling user is dropped.\n Set to null to disable this exit condition.", - "format": "uint32", - "nullable": true + "format": "int32" + } + } + }, + "ICampaignSelectionModelCappedSelectionModel": { + "required": [ + "selections", + "maxRapids", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "CappedSelection" + ], + "type": "string" }, - "minSubmissionRate": { - "type": "number", - "description": "Minimum submission rate (responses / sessions) before a user is dropped.\n Set to null to disable this exit condition.", - "format": "double", - "nullable": true + "selections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignSelectionModel" + } }, - "minSessionsForSubmissionRate": { + "maxRapids": { "type": "integer", - "description": "Minimum number of sessions before the submission rate check applies.\n Set to null to apply from the first session.", - "format": "uint32", - "nullable": true + "format": "int32" + } + } + }, + "ICampaignSelectionModelConditionalValidationSelectionModel": { + "required": [ + "validationChances", + "dimensions", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "ConditionalValidationSelection" + ], + "type": "string" }, - "minSubmissionRateGraduated": { - "type": "number", - "description": "Minimum submission rate for graduated users. If null, MinSubmissionRate applies to graduated users.\n Set a lower value to be more lenient with graduated users.", - "format": "double", - "nullable": true + "validationChances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ValidationChanceModel" + } }, - "distillingRetrievalMode": { + "dimensions": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ICampaignSelectionModelDemographicSelectionModel": { + "required": [ + "keys", + "maxRapids", + "_t" + ], + "properties": { + "_t": { "enum": [ - "Random", - "Shuffled", - "Sequential" + "DemographicSelection" ], - "description": "The retrieval mode used by the distilling campaign to select rapids for users." + "type": "string" }, - "minimumUserScore": { - "type": "number", - "description": "Use instead.", - "format": "double", - "nullable": true, - "deprecated": true + "keys": { + "type": "array", + "items": { + "type": "string" + } }, - "minDistillingScoreFloor": { + "probability": { "type": "number", - "description": "Use instead.", - "format": "double", - "nullable": true, - "deprecated": true + "format": "double" }, - "minDistillingResponses": { + "maxRapids": { "type": "integer", - "description": "Use instead.", - "format": "uint32", - "nullable": true, - "deprecated": true + "format": "int32" } - }, - "description": "The body request to update an audience." + } }, - "UpdateBoostConfigEndpoint_Input": { - "type": "object", + "ICampaignSelectionModelEnforcingSelectionModel": { + "required": [ + "selections", + "minSelections", + "minRapids", + "_t" + ], "properties": { - "minDistillingForGlobalBoost": { + "_t": { + "enum": [ + "EnforcingSelection" + ], + "type": "string" + }, + "selections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignSelectionModel" + } + }, + "minSelections": { "type": "integer", - "description": "Minimum number of distilling users required to activate global boost.", "format": "int32" }, - "minGraduatedForDistillingBoost": { + "minRapids": { "type": "integer", - "description": "Minimum number of graduated users required to activate distilling boost.", "format": "int32" } } }, - "AudienceBoostModel": { + "ICampaignSelectionModelLabelingSelectionModel": { "required": [ - "externalAudienceId", - "level" + "effortBudget", + "retrievalMode", + "_t" ], - "type": "object", "properties": { - "externalAudienceId": { + "_t": { + "enum": [ + "LabelingSelection" + ], + "type": "string" + }, + "amount": { "type": "integer", "format": "int32" }, - "level": { + "effortBudget": { + "type": "integer", + "format": "int32" + }, + "retrievalMode": { + "$ref": "#/components/schemas/RetrievalMode" + }, + "maxIterations": { "type": "integer", "format": "int32" } } }, - "BoostingControlMode": { - "enum": [ - "Manual", - "Automatic" - ] - }, - "BoostingProfileModel": { + "ICampaignSelectionModelShufflingSelectionModel": { "required": [ - "globalBoostLevel", - "prospectBlacklist", - "distillingBoosts", - "labelingBoosts" + "selections", + "_t" ], - "type": "object", "properties": { - "globalBoostLevel": { - "type": "integer", - "format": "int32" - }, - "languageBoosts": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - ], - "deprecated": true - }, - "kayzenAudienceIds": { - "allOf": [ - { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - } + "_t": { + "enum": [ + "ShufflingSelection" ], - "deprecated": true - }, - "prospectBlacklist": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - }, - "distillingBoosts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AudienceBoostModel" - } + "type": "string" }, - "labelingBoosts": { + "selections": { "type": "array", "items": { - "$ref": "#/components/schemas/AudienceBoostModel" + "$ref": "#/components/schemas/ICampaignSelectionModel" } } } }, - "BoostMode": { - "enum": [ - "Automatic", - "Manual" - ], - "description": "The current boost mode." - }, - "BoostStatusModel": { - "enum": [ - "Active", - "Inactive", - "Partial", - "Unknown" - ], - "description": "The current boost status." - }, - "CampaignStatusModel": { - "enum": [ - "Created", - "Preview", - "Active", - "Analysis", - "Paused", - "Completed" - ] - }, - "ChangeBoostEndpoint_Input": { - "required": [ - "isManual" - ], - "type": "object", - "properties": { - "isManual": { - "type": "boolean", - "description": "Whether the manual overwrite should be applied." - }, - "isActive": { - "type": "boolean", - "description": "Whether the boost is active. Deprecated in favor of Level.", - "deprecated": true - }, - "level": { - "type": "integer", - "description": "The boost level. Takes precedence over IsActive when set.", - "format": "int32" - } - } - }, - "ComparisonOperator": { - "enum": [ - "Equal", - "NotEqual", - "LessThan", - "LessThanOrEqual", - "GreaterThan", - "GreaterThanOrEqual" - ] - }, - "DeviceType": { - "enum": [ - "Unknown", - "Phone", - "Tablet" - ] - }, - "GetBoostInsightsEndpoint_AudienceOutput": { + "ICampaignSelectionModelStaticSelectionModel": { "required": [ - "externalAudienceId", - "contributors" + "rapidIds", + "_t" ], - "type": "object", "properties": { - "externalAudienceId": { - "type": "integer", - "format": "int32" + "_t": { + "enum": [ + "StaticSelection" + ], + "type": "string" }, - "contributors": { + "rapidIds": { "type": "array", "items": { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_ContributorOutput" + "type": "string" } } } }, - "GetBoostInsightsEndpoint_ContributorOutput": { + "ICampaignSelectionModelValidationSelectionModel": { "required": [ - "campaignId", - "campaignName" + "validationSetId", + "_t" ], - "type": "object", "properties": { - "campaignId": { + "_t": { + "enum": [ + "ValidationSelection" + ], "type": "string" }, - "campaignName": { + "validationSetId": { "type": "string" + }, + "amount": { + "type": "integer", + "format": "int32" + }, + "effortBudget": { + "type": "integer", + "format": "int32" } } }, - "GetBoostInsightsEndpoint_GlobalBoostOutput": { + "QueryCampaignsEndpoint_Output": { "required": [ - "effectiveLevel", - "contributors" + "id", + "name", + "status", + "priority", + "hasBooster", + "ownerMail", + "createdAt" ], "type": "object", "properties": { - "effectiveLevel": { + "id": { + "type": "string", + "description": "The unique identifier of the campaign." + }, + "name": { + "type": "string", + "description": "The name of the campaign." + }, + "status": { + "$ref": "#/components/schemas/CampaignStatusModel" + }, + "priority": { "type": "integer", + "description": "The priority level of the campaign.", "format": "int32" }, - "contributors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LevelContributorOutput" - } + "hasBooster": { + "type": "boolean", + "description": "Whether the campaign has a booster." + }, + "requiresBooster": { + "type": "boolean", + "description": "Whether the campaign requires a booster.", + "deprecated": true + }, + "ownerMail": { + "type": "string", + "description": "The email of the campaign owner." + }, + "createdAt": { + "type": "string", + "description": "The timestamp when the campaign was created.", + "format": "date-time" } } }, - "GetBoostInsightsEndpoint_LanguageBoostOutput": { + "QueryCampaignsEndpoint_PagedResultOfOutput": { "required": [ - "language", - "contributors" + "total", + "page", + "pageSize", + "items" ], "type": "object", "properties": { - "language": { - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "contributors": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_ContributorOutput" + "$ref": "#/components/schemas/QueryCampaignsEndpoint_Output" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "GetBoostInsightsEndpoint_LevelContributorOutput": { + "QueryExternalAudiencesEndpoint_Output": { "required": [ - "campaignId", - "campaignName", - "level" + "id", + "name" ], "type": "object", "properties": { - "campaignId": { - "type": "string" + "id": { + "type": "integer", + "description": "The external audience identifier.", + "format": "int32" }, - "campaignName": { - "type": "string" + "name": { + "type": "string", + "description": "The name of the external audience." }, - "level": { + "count": { "type": "integer", - "format": "int32" + "description": "The number of users in the audience.", + "format": "int64" } } }, - "GetBoostInsightsEndpoint_LeveledAudienceOutput": { + "QueryExternalAudiencesEndpoint_PagedResultOfOutput": { "required": [ - "externalAudienceId", - "effectiveLevel", - "contributors" + "total", + "page", + "pageSize", + "items" ], "type": "object", "properties": { - "externalAudienceId": { + "total": { + "type": "integer", + "format": "int64" + }, + "page": { "type": "integer", "format": "int32" }, - "effectiveLevel": { + "pageSize": { "type": "integer", "format": "int32" }, - "contributors": { + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LevelContributorOutput" + "$ref": "#/components/schemas/QueryExternalAudiencesEndpoint_Output" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "GetBoostInsightsEndpoint_Output": { - "required": [ - "mode", - "manualOverrideLevel", - "globalBoost", - "prospectBlacklist", - "distillingBoosts", - "labelingBoosts" - ], + "RetrievalMode": { + "enum": [ + "Random", + "Shuffled", + "Sequential" + ] + }, + "SetManualGlobalBoostLevelEndpoint_Input": { "type": "object", "properties": { - "mode": { - "$ref": "#/components/schemas/BoostMode" - }, - "manualOverrideLevel": { + "level": { "type": "integer", - "description": "The manual override level, if manual mode is active.", + "description": "The global boost level. Null disables manual mode and returns to automatic.", "format": "int32" - }, - "globalBoost": { - "allOf": [ - { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_GlobalBoostOutput" - } - ], - "description": "Global boost insight with contributing campaigns." - }, - "languageBoosts": { - "allOf": [ - { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LanguageBoostOutput" - }, - "nullable": true - } - ], - "deprecated": true - } - ], - "description": "Language-specific boost insights." - }, - "audienceBoosts": { - "allOf": [ - { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_AudienceOutput" - }, - "nullable": true - } - ], - "deprecated": true - } - ], - "description": "Audience boost insights." - }, - "prospectBlacklist": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_AudienceOutput" - } - } - ], - "description": "Prospect blacklist insights." - }, - "distillingBoosts": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LeveledAudienceOutput" - } - } - ], - "description": "Distilling boost insights." - }, - "labelingBoosts": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LeveledAudienceOutput" - } - } - ], - "description": "Labeling boost insights." } } }, - "GetBoostStatusEndpoint_Output": { + "SimplifiedAudienceUserState": { + "enum": [ + "Distilling", + "Graduated", + "Dropped" + ] + }, + "StickyConfigModel": { "required": [ - "status", - "mode", - "activeCampaigns", - "inactiveCampaigns", - "unknownCampaigns" + "isEnabled", + "bypassFilters", + "bypassPrioritySelection", + "blockOtherStickyCampaigns", + "clearOnPause" ], "type": "object", "properties": { - "status": { - "$ref": "#/components/schemas/BoostStatusModel" + "isEnabled": { + "type": "boolean" }, - "mode": { - "$ref": "#/components/schemas/BoostMode" + "bypassFilters": { + "type": "boolean" }, - "activeCampaigns": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "The list of active campaign identifiers." + "bypassPrioritySelection": { + "type": "boolean" }, - "inactiveCampaigns": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "The list of inactive campaign identifiers." + "blockOtherStickyCampaigns": { + "type": "boolean" }, - "unknownCampaigns": { - "allOf": [ - { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - } - ], - "description": "The list of unknown campaign identifiers." + "clearOnPause": { + "type": "boolean" } } }, - "GetCampaignByIdEndpoint_Output": { - "required": [ - "id", - "name", - "status", - "priority", - "boostingProfile", - "boostingControlMode", - "hasBooster", - "stickyConfig", - "filters", - "selections", - "featureFlags", - "ownerMail", - "createdAt" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the campaign." - }, + "UpdateCampaignEndpoint_Input": { + "type": "object", + "properties": { "name": { "type": "string", - "description": "The name of the campaign." - }, - "status": { - "$ref": "#/components/schemas/CampaignStatusModel" + "description": "The new name for the campaign.", + "nullable": true }, "priority": { "type": "integer", - "description": "The priority level of the campaign.", - "format": "int32" + "description": "The new priority value for the campaign.", + "format": "int32", + "nullable": true }, "boostingProfile": { - "allOf": [ + "oneOf": [ { "$ref": "#/components/schemas/BoostingProfileModel" + }, + { + "nullable": true } ], "description": "The boosting profile configuration." }, - "boostingControlMode": { - "$ref": "#/components/schemas/BoostingControlMode" - }, - "hasBooster": { - "type": "boolean", - "description": "Whether the campaign has a booster." - }, - "requiresBooster": { - "type": "boolean", - "description": "Whether the campaign requires a booster.", - "deprecated": true - }, "stickyConfig": { - "allOf": [ + "oneOf": [ { "$ref": "#/components/schemas/StickyConfigModel" + }, + { + "nullable": true } ], "description": "The sticky behavior configuration." }, "filters": { - "allOf": [ + "oneOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/ICampaignFilterModel" } + }, + { + "nullable": true } ], - "description": "The targeting filters for this campaign." + "description": "The targeting filters for the campaign." }, "selections": { - "allOf": [ + "oneOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/ICampaignSelectionModel" } + }, + { + "nullable": true } ], - "description": "The rapid selections for this campaign." + "description": "The rapid selections for the campaign." }, "featureFlags": { - "allOf": [ + "oneOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/FeatureFlag" } - } - ], - "description": "The feature flags configured for this campaign." - }, - "ownerMail": { - "type": "string", - "description": "The email of the campaign owner." - }, - "createdAt": { - "type": "string", - "description": "The timestamp when the campaign was created.", - "format": "date-time" - } - } - }, - "GetCampaignCacheEndpoint_CampaignEntry": { - "required": [ - "id", - "name", - "status", - "priority", - "filterCount", - "selectionCount", - "userScoreDimensionCount", - "featureFlagCount", - "rateLimitCount", - "isPreviewEnabled", - "boostingControlMode" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/CampaignStatusModel" - }, - "priority": { - "type": "integer", - "format": "int32" - }, - "filterCount": { - "type": "integer", - "format": "int32" - }, - "selectionCount": { - "type": "integer", - "format": "int32" - }, - "userScoreDimensionCount": { - "type": "integer", - "format": "int32" - }, - "featureFlagCount": { - "type": "integer", - "format": "int32" - }, - "rateLimitCount": { - "type": "integer", - "format": "int32" - }, - "isPreviewEnabled": { - "type": "boolean" - }, - "boostingControlMode": { - "$ref": "#/components/schemas/BoostingControlMode" - } - } - }, - "GetCampaignCacheEndpoint_Output": { - "required": [ - "count", - "campaigns" - ], - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "The total number of cached campaigns.", - "format": "int32" - }, - "campaigns": { - "allOf": [ + }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetCampaignCacheEndpoint_CampaignEntry" - } + "nullable": true } ], - "description": "The list of cached campaign summaries." - } - } - }, - "GetUserScoreCacheEndpoint_Output": { - "required": [ - "count", - "scores" - ], - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "The total number of cached user scores.", - "format": "int32" - }, - "scores": { - "type": "object", - "additionalProperties": { - "type": "number", - "format": "double" - }, - "description": "The cached dimension-to-score mappings." - } - } - }, - "ICampaignFilterModel": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/ICampaignFilterModelAndFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelAudienceStateFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelCampaignIdFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelCampaignSessionCountFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelCountryFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelDemographicFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelDeviceFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelLanguageFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelNewUserFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelNotFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelOrFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelResponseCountFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelUserActionRestrictionFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelUserScoreFilterModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "AndFilter": "#/components/schemas/ICampaignFilterModelAndFilterModel", - "AudienceStateFilter": "#/components/schemas/ICampaignFilterModelAudienceStateFilterModel", - "CampaignIdFilter": "#/components/schemas/ICampaignFilterModelCampaignIdFilterModel", - "CampaignSessionCountFilter": "#/components/schemas/ICampaignFilterModelCampaignSessionCountFilterModel", - "CountryFilter": "#/components/schemas/ICampaignFilterModelCountryFilterModel", - "DemographicFilter": "#/components/schemas/ICampaignFilterModelDemographicFilterModel", - "DeviceFilter": "#/components/schemas/ICampaignFilterModelDeviceFilterModel", - "LanguageFilter": "#/components/schemas/ICampaignFilterModelLanguageFilterModel", - "NewUserFilter": "#/components/schemas/ICampaignFilterModelNewUserFilterModel", - "NotFilter": "#/components/schemas/ICampaignFilterModelNotFilterModel", - "OrFilter": "#/components/schemas/ICampaignFilterModelOrFilterModel", - "ResponseCountFilter": "#/components/schemas/ICampaignFilterModelResponseCountFilterModel", - "UserActionRestrictionFilter": "#/components/schemas/ICampaignFilterModelUserActionRestrictionFilterModel", - "UserScoreFilter": "#/components/schemas/ICampaignFilterModelUserScoreFilterModel" - } - } - }, - "ICampaignFilterModelAndFilterModel": { - "required": [ - "filters", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "AndFilter" - ], - "type": "string" - }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignFilterModel" - } + "description": "The feature flags for the campaign." } } }, - "ICampaignFilterModelAudienceStateFilterModel": { + "ValidationChanceModel": { "required": [ - "audienceId", - "allowedStates", - "includeUnknownState", - "_t" + "userScoreThreshold", + "chance", + "rapidCount" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "AudienceStateFilter" - ], - "type": "string" + "userScoreThreshold": { + "type": "number", + "format": "double" }, - "audienceId": { - "type": "string" + "chance": { + "type": "number", + "format": "double" }, - "allowedStates": { + "rapidCount": { + "type": "integer", + "format": "int32" + }, + "selections": { "type": "array", "items": { - "$ref": "#/components/schemas/SimplifiedAudienceUserState" - } - }, - "includeUnknownState": { - "type": "boolean" + "$ref": "#/components/schemas/ICampaignSelectionModel" + }, + "nullable": true } } }, - "ICampaignFilterModelCampaignIdFilterModel": { + "CreateDatapointModel": { "required": [ - "campaignIds", - "_t" + "asset" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CampaignIdFilter" + "asset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetInput" + } ], - "type": "string" + "description": "The asset within the datapoint" }, - "campaignIds": { - "type": "array", - "items": { + "context": { + "type": "string", + "description": "An additional context to show the users when solving the rapid.", + "nullable": true + }, + "contextAsset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetInput" + } + ], + "description": "ContextAsset" + }, + "sortIndex": { + "type": "integer", + "description": "The sort index represents the order of the datapoint in the dataset", + "format": "int64" + }, + "group": { + "type": "string", + "description": "The group a datapoint belongs to.", + "nullable": true + }, + "transcription": { + "type": "string", + "description": "For audio or video assets, an optional transcription of the content.", + "nullable": true + }, + "privateMetadata": { + "type": "object", + "additionalProperties": { "type": "string" - } + }, + "description": "Private metadata for internal tracking. Not displayed to users.", + "nullable": true } - } + }, + "description": "The body request for creating a new datapoint" }, - "ICampaignFilterModelCampaignSessionCountFilterModel": { + "CreateDatapointResult": { "required": [ - "sessionCount", - "operator", - "_t" + "datapointId" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CampaignSessionCountFilter" - ], + "datapointId": { "type": "string" - }, - "sessionCount": { - "type": "integer", - "format": "uint32" - }, - "operator": { - "$ref": "#/components/schemas/ComparisonOperator" } } }, - "ICampaignFilterModelCountryFilterModel": { + "CreateDatasetEndpoint_Input": { "required": [ - "countries", - "_t" + "name" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CountryFilter" - ], - "type": "string" - }, - "countries": { - "type": "array", - "items": { - "type": "string" - } + "name": { + "type": "string", + "description": "The name to give to the new dataset." } - } + }, + "description": "The input for the create dataset endpoint." }, - "ICampaignFilterModelDemographicFilterModel": { + "CreateDatasetEndpoint_Output": { "required": [ - "identifier", - "values", - "_t" + "datasetId" + ], + "type": "object", + "properties": { + "datasetId": { + "type": "string", + "description": "The id of the created dataset." + } + }, + "description": "The result when a dataset has been created." + }, + "CreateDatasetGroupEndpoint_Input": { + "required": [ + "group" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "DemographicFilter" + "group": { + "type": "string", + "description": "The name of the group." + }, + "context": { + "type": "string", + "description": "The optional text context for the group.", + "nullable": true + }, + "contextAsset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetInput" + } ], - "type": "string" + "description": "The optional asset context for the group." + } + } + }, + "DatapointState": { + "enum": [ + "Ready", + "Pending", + "Failed" + ] + }, + "Filter": { + "type": "object", + "properties": { + "field": { + "type": "string", + "nullable": true }, - "identifier": { - "type": "string" + "value": {}, + "operator": { + "$ref": "#/components/schemas/FilterOperator" }, - "values": { + "logic": { + "$ref": "#/components/schemas/LogicOperator" + }, + "filters": { "type": "array", "items": { - "type": "string" - } + "$ref": "#/components/schemas/Filter" + }, + "nullable": true } } }, - "ICampaignFilterModelDeviceFilterModel": { + "FilterOperator": { + "enum": [ + "Eq", + "Neq", + "Gt", + "Gte", + "Lt", + "Lte", + "Contains", + "StartsWith", + "EndsWith", + "In", + "NotContains" + ] + }, + "GetDatapointByIdResult": { "required": [ - "deviceTypes", - "_t" + "id", + "datasetId", + "state", + "sortIndex", + "asset", + "createdAt" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "DeviceFilter" - ], + "id": { "type": "string" }, - "deviceTypes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceType" - } + "datasetId": { + "type": "string" + }, + "state": { + "$ref": "#/components/schemas/DatapointState" + }, + "sortIndex": { + "type": "integer", + "format": "int64" + }, + "asset": { + "$ref": "#/components/schemas/IAssetModel" + }, + "createdAt": { + "type": "string", + "format": "date-time" } } }, - "ICampaignFilterModelLanguageFilterModel": { + "GetDatasetByIdResult": { "required": [ - "languages", - "_t" + "name" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "LanguageFilter" - ], + "name": { "type": "string" - }, - "languages": { - "type": "array", - "items": { - "type": "string" - } } } }, - "ICampaignFilterModelNewUserFilterModel": { + "GetDatasetProgressResult": { "required": [ - "_t" + "total", + "ready", + "pending", + "failed" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "NewUserFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int32" + }, + "ready": { + "type": "integer", + "format": "int32" + }, + "pending": { + "type": "integer", + "format": "int32" + }, + "failed": { + "type": "integer", + "format": "int32" } } }, - "ICampaignFilterModelNotFilterModel": { + "GetFailedDatapointsResult": { "required": [ - "filter", - "_t" + "datapoints" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "NotFilter" - ], - "type": "string" - }, - "filter": { - "$ref": "#/components/schemas/ICampaignFilterModel" + "datapoints": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetFailedDatapointsResult_Datapoint" + } } } }, - "ICampaignFilterModelOrFilterModel": { + "GetFailedDatapointsResult_Datapoint": { "required": [ - "filters", - "_t" + "id", + "datasetId", + "sortIndex", + "asset", + "createdAt" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "OrFilter" - ], + "id": { "type": "string" }, - "filters": {} + "datasetId": { + "type": "string" + }, + "sortIndex": { + "type": "integer", + "format": "int64" + }, + "asset": { + "$ref": "#/components/schemas/IAssetModel" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } } }, - "ICampaignFilterModelResponseCountFilterModel": { + "LogicOperator": { + "enum": [ + "And", + "Or", + "Not" + ] + }, + "PagedResultOfQueryDatapointsByDatasetIdResult": { "required": [ - "dimension", - "responseCount", - "operator", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "ResponseCountFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "dimension": { - "type": "string" + "page": { + "type": "integer", + "format": "int32" }, - "responseCount": { + "pageSize": { "type": "integer", - "format": "uint32" + "format": "int32" }, - "operator": { - "$ref": "#/components/schemas/ComparisonOperator" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryDatapointsByDatasetIdResult" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "ICampaignFilterModelUserActionRestrictionFilterModel": { - "required": [ - "requiredActions", - "_t" - ], + "Pagination": { + "type": "object", "properties": { - "_t": { - "enum": [ - "UserActionRestrictionFilter" - ], - "type": "string" + "index": { + "type": "integer", + "format": "int32" }, - "requiredActions": {} + "size": { + "type": "integer", + "format": "int32" + } } }, - "ICampaignFilterModelUserScoreFilterModel": { + "QueryDatapointsByDatasetIdResult": { "required": [ - "dimension", - "lowerbound", - "upperbound", - "_t" + "id", + "datasetId", + "asset" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "UserScoreFilter" - ], + "id": { "type": "string" }, - "dimension": { + "datasetId": { "type": "string" }, - "lowerbound": { - "type": "number", - "format": "double" - }, - "upperbound": { - "type": "number", - "format": "double" + "asset": { + "$ref": "#/components/schemas/IAssetModel" } } }, - "ICampaignSelectionModel": { - "required": [ - "_t" - ], + "QueryModel": { "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/ICampaignSelectionModelAbTestSelectionModel" - }, - { - "$ref": "#/components/schemas/ICampaignSelectionModelAudienceSelectionModel" - }, - { - "$ref": "#/components/schemas/ICampaignSelectionModelCappedSelectionModel" - }, - { - "$ref": "#/components/schemas/ICampaignSelectionModelConditionalValidationSelectionModel" - }, - { - "$ref": "#/components/schemas/ICampaignSelectionModelDemographicSelectionModel" - }, - { - "$ref": "#/components/schemas/ICampaignSelectionModelEnforcingSelectionModel" - }, - { - "$ref": "#/components/schemas/ICampaignSelectionModelLabelingSelectionModel" - }, - { - "$ref": "#/components/schemas/ICampaignSelectionModelShufflingSelectionModel" + "properties": { + "page": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/Pagination" + } + ] }, - { - "$ref": "#/components/schemas/ICampaignSelectionModelStaticSelectionModel" + "filter": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/RootFilter" + } + ] }, - { - "$ref": "#/components/schemas/ICampaignSelectionModelValidationSelectionModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "AbTestSelection": "#/components/schemas/ICampaignSelectionModelAbTestSelectionModel", - "AudienceSelection": "#/components/schemas/ICampaignSelectionModelAudienceSelectionModel", - "CappedSelection": "#/components/schemas/ICampaignSelectionModelCappedSelectionModel", - "ConditionalValidationSelection": "#/components/schemas/ICampaignSelectionModelConditionalValidationSelectionModel", - "DemographicSelection": "#/components/schemas/ICampaignSelectionModelDemographicSelectionModel", - "EnforcingSelection": "#/components/schemas/ICampaignSelectionModelEnforcingSelectionModel", - "LabelingSelection": "#/components/schemas/ICampaignSelectionModelLabelingSelectionModel", - "ShufflingSelection": "#/components/schemas/ICampaignSelectionModelShufflingSelectionModel", - "StaticSelection": "#/components/schemas/ICampaignSelectionModelStaticSelectionModel", - "ValidationSelection": "#/components/schemas/ICampaignSelectionModelValidationSelectionModel" + "sortCriteria": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SortCriterion" + }, + "nullable": true } } }, - "ICampaignSelectionModelAbTestSelectionModel": { + "RootFilter": { "required": [ - "a", - "b", - "_t" + "filters" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "AbTestSelection" - ], - "type": "string" - }, - "a": { + "filters": { "type": "array", "items": { - "$ref": "#/components/schemas/ICampaignSelectionModel" + "$ref": "#/components/schemas/Filter" } }, - "b": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignSelectionModel" - } + "logic": { + "$ref": "#/components/schemas/LogicOperator" } } }, - "ICampaignSelectionModelAudienceSelectionModel": { + "SortCriterion": { "required": [ - "audienceId", - "effort", - "retrievalMode", - "_t" + "propertyName" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "AudienceSelection" - ], - "type": "string" - }, - "audienceId": { + "propertyName": { "type": "string" }, - "effort": { - "type": "integer", - "format": "int32" - }, - "retrievalMode": { - "$ref": "#/components/schemas/RetrievalMode" - }, - "maxIterations": { - "type": "integer", - "format": "int32" + "direction": { + "$ref": "#/components/schemas/SortDirection" } } }, - "ICampaignSelectionModelCappedSelectionModel": { + "SortDirection": { + "enum": [ + "Asc", + "Desc" + ] + }, + "UpdateDatasetNameModel": { "required": [ - "selections", - "maxRapids", - "_t" + "name" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CappedSelection" - ], - "type": "string" - }, - "selections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignSelectionModel" - } - }, - "maxRapids": { - "type": "integer", - "format": "int32" + "name": { + "type": "string", + "description": "The new name of the dataset." } - } + }, + "description": "The body request for updating the name of a dataset." }, - "ICampaignSelectionModelConditionalValidationSelectionModel": { + "AudienceBoostModel2": { "required": [ - "validationChances", - "dimensions", - "_t" + "audienceId", + "level" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "ConditionalValidationSelection" - ], + "audienceId": { "type": "string" }, - "validationChances": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ValidationChanceModel" - } - }, - "dimensions": { - "type": "array", - "items": { - "type": "string" - } + "level": { + "type": "integer", + "format": "int32" } } }, - "ICampaignSelectionModelDemographicSelectionModel": { + "CreateFlowEndpoint_Input": { "required": [ - "keys", - "maxRapids", - "_t" + "name", + "criteria" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "DemographicSelection" - ], - "type": "string" + "name": { + "type": "string", + "description": "The name of the ranking flow." }, - "keys": { - "type": "array", - "items": { - "type": "string" - } + "criteria": { + "type": "string", + "description": "The ranking criteria used to compare items." }, - "probability": { + "audienceId": { + "type": "string", + "description": "Optional audience ID. When provided, the flow will only be served to users in this audience.", + "nullable": true + }, + "validationSetId": { + "type": "string", + "description": "Optional ID of the validation set to use.", + "nullable": true + }, + "startingElo": { + "type": "integer", + "description": "Initial Elo rating for new items. Defaults to 1200.", + "format": "int32" + }, + "maxResponses": { + "type": "integer", + "description": "Maximum number of responses per comparison.", + "format": "int32" + }, + "serveResponses": { + "type": "integer", + "description": "Number of accepted responses per rapid at which to stop serving. When set, must be less than or equal to MaxResponses. Null defaults to MaxResponses.", + "format": "int32" + }, + "serveToResponseRatio": { "type": "number", + "description": "Ratio of concurrent serves to max responses. When set, limits serving to avoid over-collection.", "format": "double" }, - "maxRapids": { + "serveTimeoutSeconds": { "type": "integer", + "description": "Time in seconds a user has to submit an answer after loading the task. When set, overrides the global default.", "format": "int32" - } - } - }, - "ICampaignSelectionModelEnforcingSelectionModel": { - "required": [ - "selections", - "minSelections", - "minRapids", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "EnforcingSelection" + }, + "minResponses": { + "type": "integer", + "description": "Minimum number of responses per comparison. Defaults to 1.", + "format": "int32" + }, + "responsesRequired": { + "type": "integer", + "description": "Deprecated. Use MaxResponses instead.", + "format": "int32", + "deprecated": true + }, + "featureFlags": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + }, + "nullable": true + } ], - "type": "string" + "description": "Optional feature flags to enable for this flow." }, - "selections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignSelectionModel" - } + "targetResponseCount": { + "type": "integer", + "description": "Target average response count per completed item. Enables PID control when set.", + "format": "int32" }, - "minSelections": { + "pidProportionalGain": { + "type": "number", + "description": "PID proportional gain. Defaults to 1.0.", + "format": "double" + }, + "pidIntegralGain": { + "type": "number", + "description": "PID integral gain. Defaults to 0.1.", + "format": "double" + }, + "pidDerivativeGain": { + "type": "number", + "description": "PID derivative gain. Defaults to 0.05.", + "format": "double" + }, + "pidMinSessionsPerMinute": { "type": "integer", + "description": "Minimum sessions per minute the PID can set. Defaults to 10.", "format": "int32" }, - "minRapids": { + "pidMaxSessionsPerMinute": { + "type": "integer", + "description": "Maximum sessions per minute the PID can set. Defaults to 10000.", + "format": "int32" + }, + "pidBatchMode": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/PidBatchMode" + } + ] + }, + "drainDurationSeconds": { "type": "integer", + "description": "Duration in seconds for draining flow items. Defaults to 40.", "format": "int32" } } }, - "ICampaignSelectionModelLabelingSelectionModel": { + "CreateFlowEndpoint_Output": { + "required": [ + "flowId" + ], + "type": "object", + "properties": { + "flowId": { + "type": "string", + "description": "The ID of the created ranking flow." + } + } + }, + "CreateFlowItemEndpoint_Input": { "required": [ - "effortBudget", - "retrievalMode", - "_t" + "datasetId" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "LabelingSelection" - ], - "type": "string" + "datasetId": { + "type": "string", + "description": "The ID of the dataset to use for this flow item." }, - "amount": { - "type": "integer", - "format": "int32" + "context": { + "type": "string", + "description": "Optional context to provide additional ranking guidance.", + "nullable": true }, - "effortBudget": { + "timeToLiveInSeconds": { "type": "integer", + "description": "Optional time-to-live in seconds before the flow item expires.", "format": "int32" }, - "retrievalMode": { - "$ref": "#/components/schemas/RetrievalMode" - }, - "maxIterations": { + "drainDurationInSeconds": { "type": "integer", + "description": "Optional drain duration in seconds. When set, rapids are paused this many seconds before TTL expiry to allow in-flight responses to complete.", "format": "int32" } } }, - "ICampaignSelectionModelShufflingSelectionModel": { + "CreateFlowItemEndpoint_Output": { "required": [ - "selections", - "_t" + "flowItemId" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "ShufflingSelection" - ], - "type": "string" - }, - "selections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignSelectionModel" - } + "flowItemId": { + "type": "string", + "description": "The ID of the created flow item." } } }, - "ICampaignSelectionModelStaticSelectionModel": { + "FlowItemState": { + "enum": [ + "Pending", + "Running", + "Completed", + "Failed", + "Stopping", + "Stopped", + "Incomplete" + ], + "description": "The current state of the flow item." + }, + "FlowType": { + "enum": [ + "Ranking" + ], + "description": "The type of the flow. Use the _t discriminator instead.", + "deprecated": true + }, + "GetCompletionTimeHistogramEndpoint_Output": { "required": [ - "rapidIds", - "_t" + "buckets" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "StaticSelection" + "buckets": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetCompletionTimeHistogramEndpoint_Output_Bucket" + } + } ], - "type": "string" - }, - "rapidIds": { - "type": "array", - "items": { - "type": "string" - } + "description": "The histogram buckets." } } }, - "ICampaignSelectionModelValidationSelectionModel": { + "GetCompletionTimeHistogramEndpoint_Output_Bucket": { "required": [ - "validationSetId", - "_t" + "lowerBound", + "upperBound", + "count" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "ValidationSelection" - ], - "type": "string" - }, - "validationSetId": { - "type": "string" + "lowerBound": { + "type": "number", + "format": "double" }, - "amount": { - "type": "integer", - "format": "int32" + "upperBound": { + "type": "number", + "format": "double" }, - "effortBudget": { + "count": { "type": "integer", "format": "int32" } } }, - "QueryCampaignsEndpoint_Output": { + "GetFlowItemByIdEndpoint_Output": { "required": [ "id", - "name", - "status", - "priority", - "hasBooster", - "ownerMail", + "flowId", + "datasetId", + "state", "createdAt" ], "type": "object", "properties": { "id": { "type": "string", - "description": "The unique identifier of the campaign." + "description": "The unique identifier of the flow item." }, - "name": { + "flowId": { "type": "string", - "description": "The name of the campaign." + "description": "The ID of the flow this item belongs to." }, - "status": { - "$ref": "#/components/schemas/CampaignStatusModel" + "datasetId": { + "type": "string", + "description": "The ID of the dataset used by this flow item." }, - "priority": { - "type": "integer", - "description": "The priority level of the campaign.", - "format": "int32" + "workflowId": { + "type": "string", + "description": "The ID of the workflow created for this flow item.", + "nullable": true }, - "hasBooster": { - "type": "boolean", - "description": "Whether the campaign has a booster." + "state": { + "$ref": "#/components/schemas/FlowItemState" }, - "requiresBooster": { - "type": "boolean", - "description": "Whether the campaign requires a booster.", - "deprecated": true + "context": { + "type": "string", + "description": "Optional context associated with this flow item.", + "nullable": true }, - "ownerMail": { + "failureMessage": { "type": "string", - "description": "The email of the campaign owner." + "description": "The failure message if the flow item failed.", + "nullable": true + }, + "expiresAt": { + "type": "string", + "description": "The expiration timestamp of the flow item.", + "format": "date-time", + "nullable": true }, "createdAt": { "type": "string", - "description": "The timestamp when the campaign was created.", + "description": "The timestamp when the flow item was created.", "format": "date-time" - } - } - }, - "QueryCampaignsEndpoint_PagedResultOfOutput": { - "required": [ - "total", - "page", - "pageSize", - "items" - ], - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { - "type": "integer", - "format": "int32" + "startedAt": { + "type": "string", + "description": "The timestamp when the flow item started processing.", + "format": "date-time", + "nullable": true }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryCampaignsEndpoint_Output" - } + "completedAt": { + "type": "string", + "description": "The timestamp when the flow item completed.", + "format": "date-time", + "nullable": true }, - "totalPages": { - "type": "integer", - "format": "int32" + "failedAt": { + "type": "string", + "description": "The timestamp when the flow item failed.", + "format": "date-time", + "nullable": true } } }, - "QueryExternalAudiencesEndpoint_Output": { + "GetFlowItemCreationTimeseriesEndpoint_Output": { "required": [ - "id", - "name" + "datapoints" ], "type": "object", "properties": { - "id": { - "type": "integer", - "description": "The external audience identifier.", - "format": "int32" - }, - "name": { - "type": "string", - "description": "The name of the external audience." - }, - "count": { - "type": "integer", - "description": "The number of users in the audience.", - "format": "int64" + "datapoints": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetFlowItemCreationTimeseriesEndpoint_Output_DataPoint" + } + } + ], + "description": "The timeseries data points." } } }, - "QueryExternalAudiencesEndpoint_PagedResultOfOutput": { + "GetFlowItemCreationTimeseriesEndpoint_Output_DataPoint": { "required": [ - "total", - "page", - "pageSize", - "items" + "timestamp", + "count" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { - "type": "integer", - "format": "int32" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryExternalAudiencesEndpoint_Output" - } + "timestamp": { + "type": "string", + "format": "date-time" }, - "totalPages": { + "count": { "type": "integer", - "format": "int32" + "format": "int64" } } }, - "RetrievalMode": { - "enum": [ - "Random", - "Shuffled", - "Sequential" - ] - }, - "SetManualGlobalBoostLevelEndpoint_Input": { + "GetRankingFlowItemResultsEndpoint_Output": { + "required": [ + "datapoints", + "totalVotes" + ], "type": "object", "properties": { - "level": { + "datapoints": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetRankingFlowItemResultsEndpoint_Output_Datapoint" + } + } + ], + "description": "The ranked datapoints with their Elo scores." + }, + "totalVotes": { "type": "integer", - "description": "The global boost level. Null disables manual mode and returns to automatic.", - "format": "int32" + "description": "The total number of votes across all datapoints.", + "format": "int64" } } }, - "SimplifiedAudienceUserState": { - "enum": [ - "Distilling", - "Graduated", - "Dropped" - ] - }, - "StickyConfigModel": { + "GetRankingFlowItemResultsEndpoint_Output_Datapoint": { "required": [ - "isEnabled", - "bypassFilters", - "bypassPrioritySelection", - "blockOtherStickyCampaigns", - "clearOnPause" + "id", + "asset", + "elo" ], "type": "object", "properties": { - "isEnabled": { - "type": "boolean" - }, - "bypassFilters": { - "type": "boolean" - }, - "bypassPrioritySelection": { - "type": "boolean" + "id": { + "type": "string" }, - "blockOtherStickyCampaigns": { - "type": "boolean" + "asset": { + "$ref": "#/components/schemas/IAssetModel" }, - "clearOnPause": { - "type": "boolean" + "elo": { + "type": "integer", + "format": "int32" } } }, - "UpdateCampaignEndpoint_Input": { + "GetRankingFlowItemVoteMatrixEndpoint_Output": { + "required": [ + "index", + "columns", + "data" + ], "type": "object", "properties": { - "name": { - "type": "string", - "description": "The new name for the campaign.", - "nullable": true - }, - "priority": { - "type": "integer", - "description": "The new priority value for the campaign.", - "format": "int32", - "nullable": true - }, - "boostingProfile": { - "oneOf": [ - { - "$ref": "#/components/schemas/BoostingProfileModel" - }, - { - "nullable": true - } - ], - "description": "The boosting profile configuration." - }, - "stickyConfig": { - "oneOf": [ - { - "$ref": "#/components/schemas/StickyConfigModel" - }, - { - "nullable": true - } - ], - "description": "The sticky behavior configuration." - }, - "filters": { - "oneOf": [ + "index": { + "allOf": [ { "type": "array", "items": { - "$ref": "#/components/schemas/ICampaignFilterModel" + "type": "string" } - }, - { - "nullable": true } ], - "description": "The targeting filters for the campaign." + "description": "Row labels of the vote matrix." }, - "selections": { - "oneOf": [ + "columns": { + "allOf": [ { "type": "array", "items": { - "$ref": "#/components/schemas/ICampaignSelectionModel" + "type": "string" } - }, - { - "nullable": true } ], - "description": "The rapid selections for the campaign." + "description": "Column labels of the vote matrix." }, - "featureFlags": { - "oneOf": [ + "data": { + "allOf": [ { "type": "array", "items": { - "$ref": "#/components/schemas/FeatureFlag" + "type": "array", + "items": { + "type": "number", + "format": "double" + } } - }, - { - "nullable": true } ], - "description": "The feature flags for the campaign." - } - } - }, - "ValidationChanceModel": { - "required": [ - "userScoreThreshold", - "chance", - "rapidCount" - ], - "type": "object", - "properties": { - "userScoreThreshold": { - "type": "number", - "format": "double" - }, - "chance": { - "type": "number", - "format": "double" - }, - "rapidCount": { - "type": "integer", - "format": "int32" - }, - "selections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignSelectionModel" - }, - "nullable": true + "description": "The vote counts as a two-dimensional matrix where Data[i][j] is the number of times row i was preferred over column j." } } }, - "CreateDatapointModel": { + "GetResponseCountHistogramEndpoint_Output": { "required": [ - "asset" + "buckets" ], "type": "object", "properties": { - "asset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - } - ], - "description": "The asset within the datapoint" - }, - "context": { - "type": "string", - "description": "An additional context to show the users when solving the rapid.", - "nullable": true - }, - "contextAsset": { + "buckets": { "allOf": [ { - "$ref": "#/components/schemas/IAssetInput" - } - ], - "description": "ContextAsset" - }, - "sortIndex": { - "type": "integer", - "description": "The sort index represents the order of the datapoint in the dataset", - "format": "int64" - }, - "group": { - "type": "string", - "description": "The group a datapoint belongs to.", - "nullable": true - }, - "transcription": { - "type": "string", - "description": "For audio or video assets, an optional transcription of the content.", - "nullable": true - }, - "privateMetadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Private metadata for internal tracking. Not displayed to users.", - "nullable": true + "type": "array", + "items": { + "$ref": "#/components/schemas/GetResponseCountHistogramEndpoint_Output_Bucket" + } + } + ], + "description": "The histogram buckets." } - }, - "description": "The body request for creating a new datapoint" + } }, - "CreateDatapointResult": { + "GetResponseCountHistogramEndpoint_Output_Bucket": { "required": [ - "datapointId" + "lowerBound", + "upperBound", + "count" ], "type": "object", "properties": { - "datapointId": { - "type": "string" + "lowerBound": { + "type": "number", + "format": "double" + }, + "upperBound": { + "type": "number", + "format": "double" + }, + "count": { + "type": "integer", + "format": "int32" } } }, - "CreateDatasetEndpoint_Input": { + "GetResponseCountTimeseriesEndpoint_Output": { "required": [ - "name" + "datapoints" ], "type": "object", "properties": { - "name": { - "type": "string", - "description": "The name to give to the new dataset." + "datapoints": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetResponseCountTimeseriesEndpoint_Output_DataPoint" + } + } + ], + "description": "The timeseries data points." } - }, - "description": "The input for the create dataset endpoint." + } }, - "CreateDatasetEndpoint_Output": { + "GetResponseCountTimeseriesEndpoint_Output_DataPoint": { "required": [ - "datasetId" + "timestamp", + "averageResponseCount" ], "type": "object", "properties": { - "datasetId": { + "timestamp": { "type": "string", - "description": "The id of the created dataset." + "format": "date-time" + }, + "averageResponseCount": { + "type": "number", + "format": "double" } - }, - "description": "The result when a dataset has been created." + } }, - "CreateDatasetGroupEndpoint_Input": { + "IFlowModel": { "required": [ - "group" + "_t" ], "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IFlowModelRankingFlowModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "RankingFlow": "#/components/schemas/IFlowModelRankingFlowModel" + } + } + }, + "IFlowModelRankingFlowModel": { + "required": [ + "id", + "name", + "campaignId", + "flowItemCount", + "targetResponseCount", + "pidProportionalGain", + "pidIntegralGain", + "pidDerivativeGain", + "pidMinSessionsPerMinute", + "pidMaxSessionsPerMinute", + "pidBatchMode", + "serveTimeoutSeconds", + "drainDurationSeconds", + "serveToResponseRatio", + "criteria", + "startingElo", + "minResponses", + "maxResponses", + "serveResponses", + "featureFlags", + "ownerId", + "ownerMail", + "createdAt", + "_t" + ], "properties": { - "group": { + "_t": { + "enum": [ + "RankingFlow" + ], + "type": "string" + }, + "id": { "type": "string", - "description": "The name of the group." + "description": "The unique identifier of the flow." }, - "context": { + "type": { + "$ref": "#/components/schemas/FlowType" + }, + "name": { "type": "string", - "description": "The optional text context for the group.", + "description": "The name of the flow." + }, + "campaignId": { + "type": "string", + "description": "The ID of the campaign associated with this flow." + }, + "flowItemCount": { + "type": "integer", + "description": "The total number of items that have been added to this flow. Incremented atomically on each item creation.", + "format": "int64" + }, + "targetResponseCount": { + "type": "integer", + "description": "Target average response count per completed item. Enables PID-based automatic rate control when set. Null disables PID.", + "format": "int32" + }, + "pidProportionalGain": { + "type": "number", + "description": "PID proportional gain. Controls how strongly the rate reacts to the current error between target and actual response counts.", + "format": "double" + }, + "pidIntegralGain": { + "type": "number", + "description": "PID integral gain. Eliminates steady-state error by accumulating error over time. Includes anti-windup clamping.", + "format": "double" + }, + "pidDerivativeGain": { + "type": "number", + "description": "PID derivative gain. Provides damping by reacting to the rate of change of the error, helping prevent overshoot.", + "format": "double" + }, + "pidMinSessionsPerMinute": { + "type": "integer", + "description": "Minimum sessions per minute the PID controller can set. Prevents the rate from dropping to zero.", + "format": "int32" + }, + "pidMaxSessionsPerMinute": { + "type": "integer", + "description": "Maximum sessions per minute the PID controller can set. Prevents the rate from exceeding infrastructure capacity.", + "format": "int32" + }, + "pidBatchMode": { + "$ref": "#/components/schemas/PidBatchMode" + }, + "serveTimeoutSeconds": { + "type": "integer", + "description": "Maximum time in seconds a user has to submit an answer after loading the task. Null uses the system-wide default.", + "format": "int32" + }, + "drainDurationSeconds": { + "type": "integer", + "description": "Grace period in seconds after an item stops receiving new serves, allowing in-flight responses to complete.", + "format": "int32" + }, + "serveToResponseRatio": { + "type": "number", + "description": "Ratio of serves to responses used to calculate how many tasks to serve per expected response.", + "format": "double" + }, + "globalBoostLevel": { + "type": "integer", + "description": "Priority multiplier for the flow's campaign. Higher values increase annotator compensation to attract more responses.", + "format": "int32", + "deprecated": true + }, + "audienceBoosts": { + "allOf": [ + { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/AudienceBoostModel2" + }, + "nullable": true + } + ], + "deprecated": true + } + ], + "description": "Audience-specific boost levels that override the global boost for targeted demographics." + }, + "audienceId": { + "type": "string", + "description": "Optional audience ID. When provided, the flow will only serve items to users in this audience.", + "nullable": true, + "deprecated": true + }, + "criteria": { + "type": "string", + "description": "The comparison instruction shown to annotators during ranking tasks (e.g. \"Which image is sharper?\").", "nullable": true }, - "contextAsset": { + "startingElo": { + "type": "integer", + "description": "The initial Elo rating assigned to new items entering the ranking. Standard default is 1200.", + "format": "int32" + }, + "kFactor": { + "type": "integer", + "description": "Elo K-factor controlling rating volatility. Higher values cause larger rating changes per comparison. Used as a direct multiplier on the Elo change formula.", + "format": "int32", + "deprecated": true + }, + "scalingFactor": { + "type": "integer", + "description": "Elo scaling factor that determines how rating differences translate to expected win probabilities. A difference equal to the scaling factor gives the higher-rated item approximately 90% expected win rate.", + "format": "int32", + "deprecated": true + }, + "minResponses": { + "type": "integer", + "description": "Minimum number of responses a ranking item must receive before it is considered sufficiently evaluated.", + "format": "int32" + }, + "maxResponses": { + "type": "integer", + "description": "Maximum number of responses a ranking item can receive before being removed from active ranking. Null allows unlimited responses.", + "format": "int32" + }, + "serveResponses": { + "type": "integer", + "description": "Number of accepted responses per rapid at which to stop serving. Null defaults to MaxResponses.", + "format": "int32" + }, + "featureFlags": { "allOf": [ { - "$ref": "#/components/schemas/IAssetInput" + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } } ], - "description": "The optional asset context for the group." + "description": "Key-value feature flags that enable specific behaviors for this flow (e.g. rapid_hints)." + }, + "ownerId": { + "type": "string", + "description": "The ID of the customer who owns the flow.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The email of the customer who owns the flow." + }, + "createdAt": { + "type": "string", + "description": "The timestamp when the flow was created.", + "format": "date-time" } } }, - "DatapointState": { + "PidBatchMode": { "enum": [ - "Ready", - "Pending", - "Failed" - ] + "Total", + "PerBatch", + "PerBatchTimeWeighted" + ], + "description": "How the PID output maps to the campaign rate. Total: used directly. PerBatch: multiplied by active item count. PerBatchTimeWeighted: multiplied by time-weighted active item count based on remaining TTL." }, - "GetDatapointByIdResult": { + "QueryFlowItemsEndpoint_Output": { "required": [ "id", "datasetId", "state", - "sortIndex", - "asset", "createdAt" ], "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "description": "The unique identifier of the flow item." }, "datasetId": { - "type": "string" + "type": "string", + "description": "The ID of the dataset used by this flow item." + }, + "workflowId": { + "type": "string", + "description": "The ID of the workflow created for this flow item.", + "nullable": true }, "state": { - "$ref": "#/components/schemas/DatapointState" + "$ref": "#/components/schemas/FlowItemState" }, - "sortIndex": { - "type": "integer", - "format": "int64" + "context": { + "type": "string", + "description": "Optional context associated with this flow item.", + "nullable": true }, - "asset": { - "$ref": "#/components/schemas/IAssetModel" + "failureMessage": { + "type": "string", + "description": "The failure message if the flow item failed.", + "nullable": true }, "createdAt": { "type": "string", + "description": "The timestamp when the flow item was created.", "format": "date-time" + }, + "startedAt": { + "type": "string", + "description": "The timestamp when the flow item started processing.", + "format": "date-time", + "nullable": true + }, + "completedAt": { + "type": "string", + "description": "The timestamp when the flow item completed.", + "format": "date-time", + "nullable": true + }, + "failedAt": { + "type": "string", + "description": "The timestamp when the flow item failed.", + "format": "date-time", + "nullable": true } } }, - "GetDatasetByIdResult": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - }, - "GetDatasetProgressResult": { + "QueryFlowItemsEndpoint_PagedResultOfOutput": { "required": [ "total", - "ready", - "pending", - "failed" + "page", + "pageSize", + "items" ], "type": "object", "properties": { "total": { "type": "integer", - "format": "int32" + "format": "int64" }, - "ready": { + "page": { "type": "integer", "format": "int32" }, - "pending": { + "pageSize": { "type": "integer", "format": "int32" }, - "failed": { - "type": "integer", - "format": "int32" - } - } - }, - "GetFailedDatapointsResult": { - "required": [ - "datapoints" - ], - "type": "object", - "properties": { - "datapoints": { + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/GetFailedDatapointsResult_Datapoint" + "$ref": "#/components/schemas/QueryFlowItemsEndpoint_Output" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "GetFailedDatapointsResult_Datapoint": { + "QueryFlowsEndpoint_Output": { "required": [ "id", - "datasetId", - "sortIndex", - "asset", + "name", + "type", + "ownerId", + "ownerMail", "createdAt" ], "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "description": "The unique identifier of the flow." }, - "datasetId": { - "type": "string" + "name": { + "type": "string", + "description": "The name of the flow." }, - "sortIndex": { - "type": "integer", - "format": "int64" + "type": { + "$ref": "#/components/schemas/FlowType" }, - "asset": { - "$ref": "#/components/schemas/IAssetModel" + "ownerId": { + "type": "string", + "description": "The ID of the customer who owns the flow.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The email of the customer who owns the flow." }, "createdAt": { "type": "string", + "description": "The timestamp when the flow was created.", "format": "date-time" } } }, - "PagedResultOfQueryDatapointsByDatasetIdResult": { + "QueryFlowsEndpoint_PagedResultOfOutput": { "required": [ "total", "page", @@ -19498,7 +19494,7 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryDatapointsByDatasetIdResult" + "$ref": "#/components/schemas/QueryFlowsEndpoint_Output" } }, "totalPages": { @@ -19507,842 +19503,664 @@ } } }, - "QueryDatapointsByDatasetIdResult": { - "required": [ - "id", - "datasetId", - "asset" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "datasetId": { - "type": "string" - }, - "asset": { - "$ref": "#/components/schemas/IAssetModel" - } - } - }, - "UpdateDatasetNameModel": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The new name of the dataset." - } - }, - "description": "The body request for updating the name of a dataset." - }, - "AudienceBoostModel2": { - "required": [ - "audienceId", - "level" - ], + "UpdateConfigEndpoint_Input": { "type": "object", "properties": { "audienceId": { - "type": "string" - }, - "level": { - "type": "integer", - "format": "int32" - } - } - }, - "CreateFlowEndpoint_Input": { - "required": [ - "name", - "criteria" - ], - "type": "object", - "properties": { - "name": { "type": "string", - "description": "The name of the ranking flow." + "description": "Optional audience ID. When provided, the flow will only serve items to users in this audience. Set to null to remove the audience restriction.", + "nullable": true }, "criteria": { "type": "string", - "description": "The ranking criteria used to compare items." - }, - "audienceId": { - "type": "string", - "description": "Optional audience ID. When provided, the flow will only be served to users in this audience.", + "description": "The ranking criteria used to compare items.", "nullable": true }, - "validationSetId": { - "type": "string", - "description": "Optional ID of the validation set to use.", + "startingElo": { + "type": "integer", + "description": "Initial Elo rating for new items.", + "format": "int32", "nullable": true }, - "startingElo": { + "minResponses": { "type": "integer", - "description": "Initial Elo rating for new items. Defaults to 1200.", - "format": "int32" + "description": "Minimum number of responses per comparison.", + "format": "int32", + "nullable": true }, "maxResponses": { "type": "integer", "description": "Maximum number of responses per comparison.", - "format": "int32" + "format": "int32", + "nullable": true }, "serveResponses": { "type": "integer", - "description": "Number of accepted responses per rapid at which to stop serving. When set, must be less than or equal to MaxResponses. Null defaults to MaxResponses.", - "format": "int32" + "description": "Number of accepted responses per rapid at which to stop serving. Set to null to remove. Must be less than or equal to MaxResponses when both are set.", + "format": "int32", + "nullable": true }, "serveToResponseRatio": { "type": "number", - "description": "Ratio of concurrent serves to max responses. When set, limits serving to avoid over-collection.", - "format": "double" + "description": "Ratio of concurrent serves to max responses. Set to null to remove the limit.", + "format": "double", + "nullable": true }, "serveTimeoutSeconds": { "type": "integer", - "description": "Time in seconds a user has to submit an answer after loading the task. When set, overrides the global default.", - "format": "int32" - }, - "minResponses": { - "type": "integer", - "description": "Minimum number of responses per comparison. Defaults to 1.", - "format": "int32" + "description": "Time in seconds a user has to submit an answer after loading the task. Set to null to use the global default.", + "format": "int32", + "nullable": true }, "responsesRequired": { "type": "integer", "description": "Deprecated. Use MaxResponses instead.", "format": "int32", + "nullable": true, "deprecated": true }, "featureFlags": { - "allOf": [ + "oneOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/FeatureFlag" - }, + } + }, + { "nullable": true } ], - "description": "Optional feature flags to enable for this flow." + "description": "Feature flags to enable for this flow." }, "targetResponseCount": { "type": "integer", - "description": "Target average response count per completed item. Enables PID control when set.", - "format": "int32" + "description": "Target average response count per completed item. Set to null to disable PID control.", + "format": "int32", + "nullable": true }, "pidProportionalGain": { "type": "number", - "description": "PID proportional gain. Defaults to 1.0.", - "format": "double" + "description": "PID proportional gain.", + "format": "double", + "nullable": true }, "pidIntegralGain": { "type": "number", - "description": "PID integral gain. Defaults to 0.1.", - "format": "double" + "description": "PID integral gain.", + "format": "double", + "nullable": true }, "pidDerivativeGain": { "type": "number", - "description": "PID derivative gain. Defaults to 0.05.", - "format": "double" + "description": "PID derivative gain.", + "format": "double", + "nullable": true }, "pidMinSessionsPerMinute": { "type": "integer", - "description": "Minimum sessions per minute the PID can set. Defaults to 10.", - "format": "int32" + "description": "Minimum sessions per minute the PID can set.", + "format": "int32", + "nullable": true }, "pidMaxSessionsPerMinute": { "type": "integer", - "description": "Maximum sessions per minute the PID can set. Defaults to 10000.", - "format": "int32" + "description": "Maximum sessions per minute the PID can set.", + "format": "int32", + "nullable": true }, "pidBatchMode": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/PidBatchMode" - } - ] - }, - "drainDurationSeconds": { - "type": "integer", - "description": "Duration in seconds for draining flow items. Defaults to 40.", - "format": "int32" - } - } - }, - "CreateFlowEndpoint_Output": { - "required": [ - "flowId" - ], - "type": "object", - "properties": { - "flowId": { - "type": "string", - "description": "The ID of the created ranking flow." + "enum": [ + "Total", + "PerBatch", + "PerBatchTimeWeighted" + ], + "description": "How PID output maps to campaign rate. Total: direct rate. PerBatch: multiplied by active batch count. PerBatchTimeWeighted: multiplied by time-weighted batch count." } } }, - "CreateFlowItemEndpoint_Input": { + "ClientModel": { "required": [ - "datasetId" + "client_id", + "client_secret", + "client_id_issued_at", + "client_secret_expires_at", + "redirect_uris", + "grant_types", + "response_types", + "client_name", + "client_uri", + "logo_uri", + "scope", + "contacts", + "tos_uri", + "policy_uri", + "jwks_uri", + "jwks" ], "type": "object", "properties": { - "datasetId": { - "type": "string", - "description": "The ID of the dataset to use for this flow item." + "client_id": { + "type": "string" }, - "context": { + "client_secret": { "type": "string", - "description": "Optional context to provide additional ranking guidance.", "nullable": true }, - "timeToLiveInSeconds": { + "client_id_issued_at": { "type": "integer", - "description": "Optional time-to-live in seconds before the flow item expires.", - "format": "int32" + "format": "int64" }, - "drainDurationInSeconds": { + "client_secret_expires_at": { "type": "integer", - "description": "Optional drain duration in seconds. When set, rapids are paused this many seconds before TTL expiry to allow in-flight responses to complete.", - "format": "int32" - } - } - }, - "CreateFlowItemEndpoint_Output": { - "required": [ - "flowItemId" - ], - "type": "object", - "properties": { - "flowItemId": { - "type": "string", - "description": "The ID of the created flow item." - } - } - }, - "FlowItemState": { - "enum": [ - "Pending", - "Running", - "Completed", - "Failed", - "Stopping", - "Stopped", - "Incomplete" - ], - "description": "The current state of the flow item." - }, - "FlowType": { - "enum": [ - "Ranking" - ], - "description": "The type of the flow. Use the _t discriminator instead.", - "deprecated": true - }, - "GetCompletionTimeHistogramEndpoint_Output": { - "required": [ - "buckets" - ], - "type": "object", - "properties": { - "buckets": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetCompletionTimeHistogramEndpoint_Output_Bucket" - } - } - ], - "description": "The histogram buckets." - } - } - }, - "GetCompletionTimeHistogramEndpoint_Output_Bucket": { - "required": [ - "lowerBound", - "upperBound", - "count" - ], - "type": "object", - "properties": { - "lowerBound": { - "type": "number", - "format": "double" - }, - "upperBound": { - "type": "number", - "format": "double" + "format": "int64" }, - "count": { - "type": "integer", - "format": "int32" - } - } - }, - "GetFlowItemByIdEndpoint_Output": { - "required": [ - "id", - "flowId", - "datasetId", - "state", - "createdAt" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the flow item." + "redirect_uris": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "nullable": true }, - "flowId": { - "type": "string", - "description": "The ID of the flow this item belongs to." + "grant_types": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "nullable": true }, - "datasetId": { - "type": "string", - "description": "The ID of the dataset used by this flow item." + "response_types": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "nullable": true }, - "workflowId": { + "client_name": { "type": "string", - "description": "The ID of the workflow created for this flow item.", "nullable": true }, - "state": { - "$ref": "#/components/schemas/FlowItemState" - }, - "context": { + "client_uri": { "type": "string", - "description": "Optional context associated with this flow item.", "nullable": true }, - "failureMessage": { + "logo_uri": { "type": "string", - "description": "The failure message if the flow item failed.", "nullable": true }, - "expiresAt": { + "scope": { "type": "string", - "description": "The expiration timestamp of the flow item.", - "format": "date-time", + "description": "String containing a space-separated list of scope values\n that the client can use when requesting access tokens.", "nullable": true }, - "createdAt": { - "type": "string", - "description": "The timestamp when the flow item was created.", - "format": "date-time" + "contacts": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Array of strings representing ways to contact people responsible for this client,\n typically email addresses." }, - "startedAt": { + "tos_uri": { "type": "string", - "description": "The timestamp when the flow item started processing.", - "format": "date-time", "nullable": true }, - "completedAt": { + "policy_uri": { "type": "string", - "description": "The timestamp when the flow item completed.", - "format": "date-time", "nullable": true }, - "failedAt": { + "jwks_uri": { "type": "string", - "description": "The timestamp when the flow item failed.", - "format": "date-time", "nullable": true - } - } - }, - "GetFlowItemCreationTimeseriesEndpoint_Output": { - "required": [ - "datapoints" - ], - "type": "object", - "properties": { - "datapoints": { - "allOf": [ + }, + "jwks": { + "oneOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetFlowItemCreationTimeseriesEndpoint_Output_DataPoint" - } + "nullable": true + }, + { + "$ref": "#/components/schemas/JsonWebKeySet" } - ], - "description": "The timeseries data points." + ] } - } + }, + "description": "The response containing the id and secret of a dynamically registered client.\n Additionally, it contains all registered metadata for the client." }, - "GetFlowItemCreationTimeseriesEndpoint_Output_DataPoint": { + "ClientsQueryResult": { "required": [ - "timestamp", - "count" + "clientId", + "displayName", + "createdAt" ], "type": "object", "properties": { - "timestamp": { + "clientId": { "type": "string", - "format": "date-time" + "nullable": true }, - "count": { - "type": "integer", - "format": "int64" + "displayName": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time", + "nullable": true } } }, - "GetRankingFlowItemResultsEndpoint_Output": { + "CreateBridgeTokenResult": { "required": [ - "datapoints", - "totalVotes" + "readKey", + "writeKey" ], "type": "object", "properties": { - "datapoints": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetRankingFlowItemResultsEndpoint_Output_Datapoint" - } - } - ], - "description": "The ranked datapoints with their Elo scores." + "readKey": { + "type": "string" }, - "totalVotes": { - "type": "integer", - "description": "The total number of votes across all datapoints.", - "format": "int64" + "writeKey": { + "type": "string" } } }, - "GetRankingFlowItemResultsEndpoint_Output_Datapoint": { - "required": [ - "id", - "asset", - "elo" - ], + "CreateClientModel": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "asset": { - "$ref": "#/components/schemas/IAssetModel" - }, - "elo": { - "type": "integer", - "format": "int32" + "displayName": { + "type": "string", + "description": "An optional display name for the client.", + "nullable": true } - } + }, + "description": "The model for creating a new client." }, - "GetRankingFlowItemVoteMatrixEndpoint_Output": { + "CreateCustomerClientResult": { "required": [ - "index", - "columns", - "data" + "clientId", + "clientSecret" ], "type": "object", "properties": { - "index": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "Row labels of the vote matrix." - }, - "columns": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "Column labels of the vote matrix." + "clientId": { + "type": "string" }, - "data": { - "allOf": [ - { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } - } - ], - "description": "The vote counts as a two-dimensional matrix where Data[i][j] is the number of times row i was preferred over column j." + "clientSecret": { + "type": "string" } } }, - "GetResponseCountHistogramEndpoint_Output": { - "required": [ - "buckets" - ], + "DynamicClientRegistrationRequest": { "type": "object", "properties": { - "buckets": { + "redirect_uris": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "grant_types": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "response_types": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "client_id": { + "type": "string", + "nullable": true + }, + "client_name": { + "type": "string", + "nullable": true + }, + "client_uri": { + "type": "string", + "nullable": true + }, + "logo_uri": { + "type": "string", + "nullable": true + }, + "scope": { + "type": "string", + "description": "String containing a space-separated list of scope values\n that the client can use when requesting access tokens.", + "nullable": true + }, + "contacts": { "allOf": [ { "type": "array", "items": { - "$ref": "#/components/schemas/GetResponseCountHistogramEndpoint_Output_Bucket" - } + "type": "string" + }, + "nullable": true } ], - "description": "The histogram buckets." - } - } - }, - "GetResponseCountHistogramEndpoint_Output_Bucket": { - "required": [ - "lowerBound", - "upperBound", - "count" - ], - "type": "object", - "properties": { - "lowerBound": { - "type": "number", - "format": "double" + "description": "Array of strings representing ways to contact people responsible for this client,\n typically email addresses." }, - "upperBound": { - "type": "number", - "format": "double" + "tos_uri": { + "type": "string", + "nullable": true }, - "count": { - "type": "integer", - "format": "int32" - } - } - }, - "GetResponseCountTimeseriesEndpoint_Output": { - "required": [ - "datapoints" - ], - "type": "object", - "properties": { - "datapoints": { + "policy_uri": { + "type": "string", + "nullable": true + }, + "jwks_uri": { + "type": "string", + "nullable": true + }, + "jwks": { "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetResponseCountTimeseriesEndpoint_Output_DataPoint" - } + "$ref": "#/components/schemas/JsonWebKeySet" } ], - "description": "The timeseries data points." + "description": "Client's JSON Web Key Set [RFC7517] document value, which contains the client's public keys." } - } + }, + "description": "The request body for dynamic client registration." }, - "GetResponseCountTimeseriesEndpoint_Output_DataPoint": { + "GoogleOneTapLoginModel": { "required": [ - "timestamp", - "averageResponseCount" + "idToken" ], "type": "object", "properties": { - "timestamp": { + "idToken": { "type": "string", - "format": "date-time" - }, - "averageResponseCount": { - "type": "number", - "format": "double" + "description": "The id token received from the Google One Tap login." } - } + }, + "description": "The model for the Google One Tap login." }, - "IFlowModel": { - "required": [ - "_t" - ], + "JsonWebKey": { "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IFlowModelRankingFlowModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "RankingFlow": "#/components/schemas/IFlowModelRankingFlowModel" - } - } - }, - "IFlowModelRankingFlowModel": { - "required": [ - "id", - "name", - "campaignId", - "flowItemCount", - "targetResponseCount", - "pidProportionalGain", - "pidIntegralGain", - "pidDerivativeGain", - "pidMinSessionsPerMinute", - "pidMaxSessionsPerMinute", - "pidBatchMode", - "serveTimeoutSeconds", - "drainDurationSeconds", - "serveToResponseRatio", - "criteria", - "startingElo", - "minResponses", - "maxResponses", - "serveResponses", - "featureFlags", - "ownerId", - "ownerMail", - "createdAt", - "_t" - ], "properties": { - "_t": { - "enum": [ - "RankingFlow" - ], - "type": "string" + "alg": { + "type": "string", + "nullable": true }, - "id": { + "crv": { "type": "string", - "description": "The unique identifier of the flow." + "nullable": true }, - "type": { - "$ref": "#/components/schemas/FlowType" + "d": { + "type": "string", + "nullable": true }, - "name": { + "dp": { "type": "string", - "description": "The name of the flow." + "nullable": true }, - "campaignId": { + "dq": { "type": "string", - "description": "The ID of the campaign associated with this flow." + "nullable": true }, - "flowItemCount": { - "type": "integer", - "description": "The total number of items that have been added to this flow. Incremented atomically on each item creation.", - "format": "int64" + "e": { + "type": "string", + "nullable": true }, - "targetResponseCount": { - "type": "integer", - "description": "Target average response count per completed item. Enables PID-based automatic rate control when set. Null disables PID.", - "format": "int32" + "k": { + "type": "string", + "nullable": true }, - "pidProportionalGain": { - "type": "number", - "description": "PID proportional gain. Controls how strongly the rate reacts to the current error between target and actual response counts.", - "format": "double" + "key_ops": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true }, - "pidIntegralGain": { - "type": "number", - "description": "PID integral gain. Eliminates steady-state error by accumulating error over time. Includes anti-windup clamping.", - "format": "double" + "kid": { + "type": "string", + "nullable": true }, - "pidDerivativeGain": { - "type": "number", - "description": "PID derivative gain. Provides damping by reacting to the rate of change of the error, helping prevent overshoot.", - "format": "double" + "kty": { + "type": "string", + "nullable": true }, - "pidMinSessionsPerMinute": { - "type": "integer", - "description": "Minimum sessions per minute the PID controller can set. Prevents the rate from dropping to zero.", - "format": "int32" + "n": { + "type": "string", + "nullable": true }, - "pidMaxSessionsPerMinute": { - "type": "integer", - "description": "Maximum sessions per minute the PID controller can set. Prevents the rate from exceeding infrastructure capacity.", - "format": "int32" + "oth": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true }, - "pidBatchMode": { - "$ref": "#/components/schemas/PidBatchMode" + "p": { + "type": "string", + "nullable": true }, - "serveTimeoutSeconds": { - "type": "integer", - "description": "Maximum time in seconds a user has to submit an answer after loading the task. Null uses the system-wide default.", - "format": "int32" + "q": { + "type": "string", + "nullable": true }, - "drainDurationSeconds": { - "type": "integer", - "description": "Grace period in seconds after an item stops receiving new serves, allowing in-flight responses to complete.", - "format": "int32" + "qi": { + "type": "string", + "nullable": true }, - "serveToResponseRatio": { - "type": "number", - "description": "Ratio of serves to responses used to calculate how many tasks to serve per expected response.", - "format": "double" + "use": { + "type": "string", + "nullable": true }, - "globalBoostLevel": { - "type": "integer", - "description": "Priority multiplier for the flow's campaign. Higher values increase annotator compensation to attract more responses.", - "format": "int32", - "deprecated": true + "x": { + "type": "string", + "nullable": true }, - "audienceBoosts": { - "allOf": [ - { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/AudienceBoostModel2" - }, - "nullable": true - } - ], - "deprecated": true - } - ], - "description": "Audience-specific boost levels that override the global boost for targeted demographics." + "x5c": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true }, - "audienceId": { + "x5t": { "type": "string", - "description": "Optional audience ID. When provided, the flow will only serve items to users in this audience.", - "nullable": true, - "deprecated": true + "nullable": true }, - "criteria": { + "x5t#S256": { "type": "string", - "description": "The comparison instruction shown to annotators during ranking tasks (e.g. \"Which image is sharper?\").", "nullable": true }, - "startingElo": { - "type": "integer", - "description": "The initial Elo rating assigned to new items entering the ranking. Standard default is 1200.", - "format": "int32" - }, - "kFactor": { - "type": "integer", - "description": "Elo K-factor controlling rating volatility. Higher values cause larger rating changes per comparison. Used as a direct multiplier on the Elo change formula.", - "format": "int32", - "deprecated": true + "x5u": { + "type": "string", + "nullable": true }, - "scalingFactor": { - "type": "integer", - "description": "Elo scaling factor that determines how rating differences translate to expected win probabilities. A difference equal to the scaling factor gives the higher-rated item approximately 90% expected win rate.", - "format": "int32", - "deprecated": true + "y": { + "type": "string", + "nullable": true + } + } + }, + "JsonWebKeySet": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonWebKey" + }, + "nullable": true + } + } + }, + "NewsletterModel": { + "required": [ + "email", + "token" + ], + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "The email of the user to subscribe or unsubscribe." }, - "minResponses": { + "token": { + "type": "string", + "description": "The recaptcha token to verify the user is not a bot." + } + }, + "description": "Model for subscribing and unsubscribing to the newsletter." + }, + "NotAvailableYetResult": { + "required": [ + "message" + ], + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "PagedResultOfClientsQueryResult": { + "required": [ + "total", + "page", + "pageSize", + "items" + ], + "type": "object", + "properties": { + "total": { "type": "integer", - "description": "Minimum number of responses a ranking item must receive before it is considered sufficiently evaluated.", - "format": "int32" + "format": "int64" }, - "maxResponses": { + "page": { "type": "integer", - "description": "Maximum number of responses a ranking item can receive before being removed from active ranking. Null allows unlimited responses.", "format": "int32" }, - "serveResponses": { + "pageSize": { "type": "integer", - "description": "Number of accepted responses per rapid at which to stop serving. Null defaults to MaxResponses.", "format": "int32" }, - "featureFlags": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } - } - ], - "description": "Key-value feature flags that enable specific behaviors for this flow (e.g. rapid_hints)." - }, - "ownerId": { - "type": "string", - "description": "The ID of the customer who owns the flow.", - "format": "uuid" - }, - "ownerMail": { - "type": "string", - "description": "The email of the customer who owns the flow." + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClientsQueryResult" + } }, - "createdAt": { - "type": "string", - "description": "The timestamp when the flow was created.", - "format": "date-time" + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "PidBatchMode": { - "enum": [ - "Total", - "PerBatch", - "PerBatchTimeWeighted" - ], - "description": "How the PID output maps to the campaign rate. Total: used directly. PerBatch: multiplied by active item count. PerBatchTimeWeighted: multiplied by time-weighted active item count based on remaining TTL." - }, - "QueryFlowItemsEndpoint_Output": { + "QueryCustomersEndpoint_Output": { "required": [ "id", - "datasetId", - "state", - "createdAt" + "email", + "organizationName", + "organizationId" ], "type": "object", "properties": { "id": { "type": "string", - "description": "The unique identifier of the flow item." - }, - "datasetId": { - "type": "string", - "description": "The ID of the dataset used by this flow item." + "description": "The unique identifier of the customer.", + "format": "uuid" }, - "workflowId": { + "email": { "type": "string", - "description": "The ID of the workflow created for this flow item.", + "description": "The email address of the customer.", "nullable": true }, - "state": { - "$ref": "#/components/schemas/FlowItemState" - }, - "context": { + "organizationName": { "type": "string", - "description": "Optional context associated with this flow item.", + "description": "The name of the organization this customer belongs to, if any.", "nullable": true }, - "failureMessage": { + "organizationId": { "type": "string", - "description": "The failure message if the flow item failed.", + "description": "The identifier of the organization this customer belongs to, if any.", + "format": "uuid", "nullable": true + } + } + }, + "QueryCustomersEndpoint_PagedResultOfOutput": { + "required": [ + "total", + "page", + "pageSize", + "items" + ], + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64" }, - "createdAt": { - "type": "string", - "description": "The timestamp when the flow item was created.", - "format": "date-time" + "page": { + "type": "integer", + "format": "int32" }, - "startedAt": { + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryCustomersEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, + "QueryOrganizationsEndpoint_Output": { + "required": [ + "owner", + "name", + "domain" + ], + "type": "object", + "properties": { + "owner": { "type": "string", - "description": "The timestamp when the flow item started processing.", - "format": "date-time", - "nullable": true + "description": "The customer ID of the organization owner.", + "format": "uuid" }, - "completedAt": { + "name": { "type": "string", - "description": "The timestamp when the flow item completed.", - "format": "date-time", - "nullable": true + "description": "The name of the organization." }, - "failedAt": { + "domain": { "type": "string", - "description": "The timestamp when the flow item failed.", - "format": "date-time", - "nullable": true + "description": "The domain associated with this organization." } } }, - "QueryFlowItemsEndpoint_PagedResultOfOutput": { + "QueryOrganizationsEndpoint_PagedResultOfOutput": { "required": [ "total", "page", @@ -20366,7 +20184,7 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryFlowItemsEndpoint_Output" + "$ref": "#/components/schemas/QueryOrganizationsEndpoint_Output" } }, "totalPages": { @@ -20375,838 +20193,701 @@ } } }, - "QueryFlowsEndpoint_Output": { + "ReadBridgeTokenKeysResult": { "required": [ - "id", - "name", - "type", - "ownerId", - "ownerMail", - "createdAt" + "accessToken", + "expiresIn", + "refreshToken", + "idToken", + "tokenType", + "scope" ], "type": "object", "properties": { - "id": { + "accessToken": { "type": "string", - "description": "The unique identifier of the flow." + "nullable": true }, - "name": { - "type": "string", - "description": "The name of the flow." + "expiresIn": { + "type": "integer", + "format": "int32" }, - "type": { - "$ref": "#/components/schemas/FlowType" + "refreshToken": { + "type": "string", + "nullable": true }, - "ownerId": { + "idToken": { "type": "string", - "description": "The ID of the customer who owns the flow.", - "format": "uuid" + "nullable": true }, - "ownerMail": { + "tokenType": { "type": "string", - "description": "The email of the customer who owns the flow." + "nullable": true }, - "createdAt": { + "scope": { "type": "string", - "description": "The timestamp when the flow was created.", - "format": "date-time" + "nullable": true } } }, - "QueryFlowsEndpoint_PagedResultOfOutput": { + "SendSurveyModel": { "required": [ - "total", - "page", - "pageSize", - "items" + "fields" + ], + "type": "object", + "properties": { + "fields": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The fields of the survey" + } + }, + "description": "The model user for submitting a survey" + }, + "AgeUserFilterModel_AgeGroup": { + "enum": [ + "0-17", + "18-29", + "30-39", + "40-49", + "50-64", + "65+" + ] + }, + "BenchmarkQueryResult": { + "required": [ + "id", + "name", + "isManaged", + "isPublic", + "createdAt", + "ownerMail" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" + "id": { + "type": "string" }, - "page": { - "type": "integer", - "format": "int32" + "name": { + "type": "string" }, - "pageSize": { - "type": "integer", - "format": "int32" + "isManaged": { + "type": "boolean" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryFlowsEndpoint_Output" - } + "isPublic": { + "type": "boolean" }, - "totalPages": { - "type": "integer", - "format": "int32" + "createdAt": { + "type": "string", + "format": "date-time" + }, + "ownerMail": { + "type": "string" } } }, - "UpdateConfigEndpoint_Input": { + "BoostLeaderboardModel": { + "required": [ + "participants", + "totalResponses" + ], "type": "object", "properties": { - "audienceId": { - "type": "string", - "description": "Optional audience ID. When provided, the flow will only serve items to users in this audience. Set to null to remove the audience restriction.", - "nullable": true - }, - "criteria": { - "type": "string", - "description": "The ranking criteria used to compare items.", - "nullable": true - }, - "startingElo": { - "type": "integer", - "description": "Initial Elo rating for new items.", - "format": "int32", - "nullable": true - }, - "minResponses": { - "type": "integer", - "description": "Minimum number of responses per comparison.", - "format": "int32", - "nullable": true - }, - "maxResponses": { - "type": "integer", - "description": "Maximum number of responses per comparison.", - "format": "int32", - "nullable": true - }, - "serveResponses": { - "type": "integer", - "description": "Number of accepted responses per rapid at which to stop serving. Set to null to remove. Must be less than or equal to MaxResponses when both are set.", - "format": "int32", - "nullable": true - }, - "serveToResponseRatio": { - "type": "number", - "description": "Ratio of concurrent serves to max responses. Set to null to remove the limit.", - "format": "double", - "nullable": true - }, - "serveTimeoutSeconds": { - "type": "integer", - "description": "Time in seconds a user has to submit an answer after loading the task. Set to null to use the global default.", - "format": "int32", - "nullable": true - }, - "responsesRequired": { - "type": "integer", - "description": "Deprecated. Use MaxResponses instead.", - "format": "int32", - "nullable": true, - "deprecated": true - }, - "featureFlags": { - "oneOf": [ + "participants": { + "allOf": [ { "type": "array", "items": { - "$ref": "#/components/schemas/FeatureFlag" + "type": "string" } - }, - { - "nullable": true } ], - "description": "Feature flags to enable for this flow." + "description": "The participants of the given leaderboard that should be boosted." }, - "targetResponseCount": { + "totalResponses": { "type": "integer", - "description": "Target average response count per completed item. Set to null to disable PID control.", - "format": "int32", - "nullable": true - }, - "pidProportionalGain": { - "type": "number", - "description": "PID proportional gain.", - "format": "double", - "nullable": true - }, - "pidIntegralGain": { + "description": "The amount of responses in total that should be added, shared across all participants.", + "format": "int32" + } + }, + "description": "The model for boosting a leaderboard." + }, + "ConfidenceInterval": { + "required": [ + "lowerOffset", + "upperOffset" + ], + "type": "object", + "properties": { + "lowerOffset": { "type": "number", - "description": "PID integral gain.", - "format": "double", - "nullable": true + "format": "double" }, - "pidDerivativeGain": { + "upperOffset": { "type": "number", - "description": "PID derivative gain.", - "format": "double", - "nullable": true - }, - "pidMinSessionsPerMinute": { - "type": "integer", - "description": "Minimum sessions per minute the PID can set.", - "format": "int32", - "nullable": true - }, - "pidMaxSessionsPerMinute": { - "type": "integer", - "description": "Maximum sessions per minute the PID can set.", - "format": "int32", - "nullable": true - }, - "pidBatchMode": { - "enum": [ - "Total", - "PerBatch", - "PerBatchTimeWeighted" - ], - "description": "How PID output maps to campaign rate. Total: direct rate. PerBatch: multiplied by active batch count. PerBatchTimeWeighted: multiplied by time-weighted batch count." + "format": "double" } } }, - "ClientModel": { + "CreateBenchmarkModel": { "required": [ - "client_id", - "client_secret", - "client_id_issued_at", - "client_secret_expires_at", - "redirect_uris", - "grant_types", - "response_types", - "client_name", - "client_uri", - "logo_uri", - "scope", - "contacts", - "tos_uri", - "policy_uri", - "jwks_uri", - "jwks" + "name" ], "type": "object", "properties": { - "client_id": { - "type": "string" - }, - "client_secret": { + "name": { "type": "string", - "nullable": true - }, - "client_id_issued_at": { - "type": "integer", - "format": "int64" - }, - "client_secret_expires_at": { - "type": "integer", - "format": "int64" - }, - "redirect_uris": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string" - } - }, - "nullable": true + "description": "The name of the benchmark" + } + }, + "description": "The model for creating a benchmark." + }, + "CreateBenchmarkParticipantModel": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the participant." + } + }, + "description": "The model to create a participant in a leaderboard" + }, + "CreateBenchmarkParticipantResult": { + "required": [ + "participantId" + ], + "type": "object", + "properties": { + "participantId": { + "type": "string" }, - "grant_types": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string" - } - }, + "datasetId": { + "type": "string" + } + } + }, + "CreateBenchmarkPromptResult": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "CreateBenchmarkResult": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "CreateLeaderboardModel": { + "required": [ + "name", + "instruction", + "showPrompt" + ], + "type": "object", + "properties": { + "benchmarkId": { + "type": "string", + "description": "If a leaderboard should be added to a preexisting benchmark, the benchmark Id can be provided.", "nullable": true }, - "response_types": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string" - } - }, + "benchmarkName": { + "type": "string", + "description": "If no BenchmarkId is provided a new benchmark will be created. if no name is supplied the benchmark\n will be called the same as the leaderboard.", "nullable": true }, - "client_name": { + "name": { "type": "string", - "nullable": true + "description": "The name of the leaderboard." }, - "client_uri": { + "instruction": { "type": "string", - "nullable": true + "description": "The instruction datapoints will be matched up against." }, - "logo_uri": { + "showPrompt": { + "type": "boolean", + "description": "Indicates if the prompt is shown on the rapids." + }, + "showPromptAsset": { + "type": "boolean", + "description": "Whether the prompt asset should be shown on the rapids." + }, + "responseBudget": { + "type": "integer", + "description": "Total amount of responses that get collected per run", + "format": "int32" + }, + "minResponses": { + "type": "integer", + "description": "The minimum amount of responses that need to be collected per comparison.", + "format": "int32" + }, + "isInversed": { + "type": "boolean", + "description": "If the results should be inversed, meaning people should select the worse model." + }, + "validationSetId": { "type": "string", + "description": "The Validation set that should be attached to every run.", "nullable": true }, - "scope": { + "audienceId": { "type": "string", - "description": "String containing a space-separated list of scope values\n that the client can use when requesting access tokens.", + "description": "Optional audience ID. When provided, the leaderboard will target users who have\n graduated from the audience (i.e., users with a score at or above the audience's minimum threshold).\n Cannot be specified together with Filters.", "nullable": true }, - "contacts": { + "filters": { "allOf": [ { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/IUserFilterModel" }, "nullable": true } ], - "description": "Array of strings representing ways to contact people responsible for this client,\n typically email addresses." - }, - "tos_uri": { - "type": "string", - "nullable": true - }, - "policy_uri": { - "type": "string", - "nullable": true - }, - "jwks_uri": { - "type": "string", - "nullable": true + "description": "The filters will be applied on every order that is created by this leaderboard.\n Cannot be specified together with AudienceId." }, - "jwks": { - "oneOf": [ + "featureFlags": { + "allOf": [ { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + }, "nullable": true - }, - { - "$ref": "#/components/schemas/JsonWebKeySet" } - ] + ], + "description": "Feature flags that will be applied to every order that is created by this leaderboard." } }, - "description": "The response containing the id and secret of a dynamically registered client.\n Additionally, it contains all registered metadata for the client." + "description": "The CreateLeaderboardModel class represents the model for creating a leaderboard." }, - "ClientsQueryResult": { + "CreateLeaderboardResult": { "required": [ - "clientId", - "displayName", - "createdAt" + "id", + "benchmarkId", + "showPrompt", + "showPromptAsset", + "responseBudget", + "minResponses", + "isInversed" ], "type": "object", "properties": { - "clientId": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "displayName": { - "type": "string", - "nullable": true + "benchmarkId": { + "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time", - "nullable": true + "showPrompt": { + "type": "boolean" + }, + "showPromptAsset": { + "type": "boolean" + }, + "responseBudget": { + "type": "integer", + "format": "int32" + }, + "minResponses": { + "type": "integer", + "format": "int32" + }, + "isInversed": { + "type": "boolean" } } }, - "CreateBridgeTokenResult": { + "CreateSampleModel": { "required": [ - "readKey", - "writeKey" + "identifier", + "asset" ], "type": "object", "properties": { - "readKey": { - "type": "string" - }, - "writeKey": { - "type": "string" - } - } - }, - "CreateClientModel": { - "type": "object", - "properties": { - "displayName": { + "identifier": { "type": "string", - "description": "An optional display name for the client.", - "nullable": true + "description": "The identifier used to correlate samples of different participants." + }, + "asset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetInput" + } + ], + "description": "The asset input for the sample." } }, - "description": "The model for creating a new client." + "description": "The model used to create a sample to a participant." }, - "CreateCustomerClientResult": { + "ForkBenchmarkResult": { "required": [ - "clientId", - "clientSecret" + "id" ], "type": "object", "properties": { - "clientId": { - "type": "string" - }, - "clientSecret": { + "id": { "type": "string" } } }, - "DynamicClientRegistrationRequest": { + "GenderUserFilterModel_Gender": { + "enum": [ + "Male", + "Female", + "Other" + ] + }, + "GetBenchmarkByIdResult": { + "required": [ + "id", + "name", + "isPublic", + "createdAt", + "ownerId", + "ownerMail" + ], "type": "object", "properties": { - "redirect_uris": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "grant_types": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "response_types": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "client_id": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "client_name": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "client_uri": { - "type": "string", - "nullable": true + "isPublic": { + "type": "boolean" }, - "logo_uri": { + "createdAt": { "type": "string", - "nullable": true + "format": "date-time" }, - "scope": { + "ownerId": { "type": "string", - "description": "String containing a space-separated list of scope values\n that the client can use when requesting access tokens.", - "nullable": true + "format": "uuid" }, - "contacts": { + "ownerMail": { + "type": "string" + } + } + }, + "GetCombinedBenchmarkMatrixEndpoint_Output": { + "required": [ + "index", + "columns", + "data" + ], + "type": "object", + "properties": { + "index": { "allOf": [ { "type": "array", "items": { "type": "string" - }, - "nullable": true + } } ], - "description": "Array of strings representing ways to contact people responsible for this client,\n typically email addresses." - }, - "tos_uri": { - "type": "string", - "nullable": true - }, - "policy_uri": { - "type": "string", - "nullable": true + "description": "Row participant names." }, - "jwks_uri": { - "type": "string", - "nullable": true + "columns": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Column participant names." }, - "jwks": { + "data": { "allOf": [ { - "$ref": "#/components/schemas/JsonWebKeySet" + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } } ], - "description": "Client's JSON Web Key Set [RFC7517] document value, which contains the client's public keys." + "description": "NxN matrix where Data[i][j] = wins of Index[i] over Columns[j]." } }, - "description": "The request body for dynamic client registration." + "description": "Combined benchmark matrix output in pandas split format." }, - "GoogleOneTapLoginModel": { + "GetCombinedBenchmarkStandingsEndpoint_Output": { "required": [ - "idToken" + "items" ], "type": "object", "properties": { - "idToken": { - "type": "string", - "description": "The id token received from the Google One Tap login." + "items": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetCombinedBenchmarkStandingsEndpoint_OutputItem" + } + } + ], + "description": "The standings items." } }, - "description": "The model for the Google One Tap login." + "description": "Combined benchmark standings output." }, - "JsonWebKey": { + "GetCombinedBenchmarkStandingsEndpoint_OutputItem": { + "required": [ + "id", + "name", + "status", + "score", + "wins", + "totalMatches", + "isDisabled" + ], "type": "object", "properties": { - "alg": { - "type": "string", - "nullable": true - }, - "crv": { - "type": "string", - "nullable": true - }, - "d": { - "type": "string", - "nullable": true - }, - "dp": { - "type": "string", - "nullable": true - }, - "dq": { - "type": "string", - "nullable": true - }, - "e": { - "type": "string", - "nullable": true - }, - "k": { - "type": "string", - "nullable": true - }, - "key_ops": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "kid": { - "type": "string", - "nullable": true - }, - "kty": { - "type": "string", - "nullable": true - }, - "n": { - "type": "string", - "nullable": true - }, - "oth": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "p": { - "type": "string", - "nullable": true - }, - "q": { - "type": "string", - "nullable": true - }, - "qi": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "use": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "x": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/StandingStatus" }, - "x5c": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true + "score": { + "type": "number", + "format": "double" }, - "x5t": { - "type": "string", - "nullable": true + "wins": { + "type": "number", + "format": "double" }, - "x5t#S256": { - "type": "string", - "nullable": true + "totalMatches": { + "type": "number", + "format": "double" }, - "x5u": { - "type": "string", - "nullable": true + "isDisabled": { + "type": "boolean" }, - "y": { - "type": "string", - "nullable": true - } - } - }, - "JsonWebKeySet": { - "type": "object", - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/components/schemas/JsonWebKey" - }, - "nullable": true + "confidenceInterval": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/ConfidenceInterval" + } + ] } } }, - "NewsletterModel": { + "GetCombinedLeaderboardMatrixEndpoint_Output": { "required": [ - "email", - "token" + "index", + "columns", + "data" ], "type": "object", "properties": { - "email": { - "type": "string", - "description": "The email of the user to subscribe or unsubscribe." + "index": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Row participant names." }, - "token": { - "type": "string", - "description": "The recaptcha token to verify the user is not a bot." - } - }, - "description": "Model for subscribing and unsubscribing to the newsletter." - }, - "NotAvailableYetResult": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "message": { - "type": "string" + "columns": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Column participant names." + }, + "data": { + "allOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } + } + ], + "description": "NxN matrix where Data[i][j] = wins of Index[i] over Columns[j]." } - } + }, + "description": "Combined leaderboard matrix output in pandas split format." }, - "PagedResultOfClientsQueryResult": { + "GetCombinedLeaderboardStandingsEndpoint_Output": { "required": [ - "total", - "page", - "pageSize", "items" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { - "type": "integer", - "format": "int32" - }, "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ClientsQueryResult" - } - }, - "totalPages": { - "type": "integer", - "format": "int32" + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetCombinedLeaderboardStandingsEndpoint_OutputItem" + } + } + ], + "description": "The standings items." } - } + }, + "description": "Combined leaderboard standings output." }, - "QueryCustomersEndpoint_Output": { + "GetCombinedLeaderboardStandingsEndpoint_OutputItem": { "required": [ "id", - "email", - "organizationName", - "organizationId" + "name", + "status", + "score", + "wins", + "totalMatches", + "isDisabled" ], "type": "object", "properties": { "id": { - "type": "string", - "description": "The unique identifier of the customer.", - "format": "uuid" + "type": "string" }, - "email": { - "type": "string", - "description": "The email address of the customer.", - "nullable": true + "name": { + "type": "string" }, - "organizationName": { - "type": "string", - "description": "The name of the organization this customer belongs to, if any.", - "nullable": true + "status": { + "$ref": "#/components/schemas/StandingStatus" }, - "organizationId": { - "type": "string", - "description": "The identifier of the organization this customer belongs to, if any.", - "format": "uuid", - "nullable": true - } - } - }, - "QueryCustomersEndpoint_PagedResultOfOutput": { - "required": [ - "total", - "page", - "pageSize", - "items" - ], - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" + "score": { + "type": "number", + "format": "double" }, - "page": { - "type": "integer", - "format": "int32" + "wins": { + "type": "number", + "format": "double" }, - "pageSize": { - "type": "integer", - "format": "int32" + "totalMatches": { + "type": "number", + "format": "double" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryCustomersEndpoint_Output" - } + "isDisabled": { + "type": "boolean" }, - "totalPages": { - "type": "integer", - "format": "int32" + "confidenceInterval": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/ConfidenceInterval" + } + ] } } }, - "QueryOrganizationsEndpoint_Output": { + "GetLeaderboardByIdResult": { "required": [ - "owner", + "id", "name", - "domain" + "instruction", + "showPrompt", + "showPromptAsset", + "isInversed", + "responseBudget", + "minResponses", + "filters", + "featureFlags" ], "type": "object", "properties": { - "owner": { + "id": { + "type": "string" + }, + "orderId": { "type": "string", - "description": "The customer ID of the organization owner.", - "format": "uuid" + "nullable": true }, "name": { - "type": "string", - "description": "The name of the organization." + "type": "string" }, - "domain": { - "type": "string", - "description": "The domain associated with this organization." - } - } - }, - "QueryOrganizationsEndpoint_PagedResultOfOutput": { - "required": [ - "total", - "page", - "pageSize", - "items" - ], - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" + "instruction": { + "type": "string" }, - "page": { - "type": "integer", - "format": "int32" + "showPrompt": { + "type": "boolean" }, - "pageSize": { - "type": "integer", - "format": "int32" + "showPromptAsset": { + "type": "boolean" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryOrganizationsEndpoint_Output" - } + "isInversed": { + "type": "boolean" }, - "totalPages": { + "responseBudget": { "type": "integer", "format": "int32" - } - } - }, - "ReadBridgeTokenKeysResult": { - "required": [ - "accessToken", - "expiresIn", - "refreshToken", - "idToken", - "tokenType", - "scope" - ], - "type": "object", - "properties": { - "accessToken": { - "type": "string", - "nullable": true }, - "expiresIn": { + "minResponses": { "type": "integer", "format": "int32" }, - "refreshToken": { - "type": "string", - "nullable": true - }, - "idToken": { - "type": "string", - "nullable": true - }, - "tokenType": { + "validationSetId": { "type": "string", "nullable": true }, - "scope": { - "type": "string", - "nullable": true - } - } - }, - "SendSurveyModel": { - "required": [ - "fields" - ], - "type": "object", - "properties": { - "fields": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "The fields of the survey" - } - }, - "description": "The model user for submitting a survey" - }, - "AgeUserFilterModel_AgeGroup": { - "enum": [ - "0-17", - "18-29", - "30-39", - "40-49", - "50-64", - "65+" - ] + "filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignFilter" + } + }, + "featureFlags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } + } + } }, - "BenchmarkQueryResult": { + "GetParticipantByIdResult": { "required": [ "id", "name", - "isManaged", - "isPublic", - "createdAt", - "ownerMail" + "benchmarkId" ], "type": "object", "properties": { @@ -21216,657 +20897,599 @@ "name": { "type": "string" }, - "isManaged": { - "type": "boolean" - }, - "isPublic": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "ownerMail": { + "benchmarkId": { "type": "string" } } }, - "BoostLeaderboardModel": { + "GetSampleByIdResult": { "required": [ - "participants", - "totalResponses" + "id", + "identifier", + "participantId", + "participantName", + "asset", + "tags", + "ownerMail" ], "type": "object", "properties": { - "participants": { - "allOf": [ + "id": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "participantId": { + "type": "string" + }, + "participantName": { + "type": "string" + }, + "asset": { + "$ref": "#/components/schemas/IAssetModel" + }, + "prompt": { + "type": "string", + "nullable": true + }, + "promptAsset": { + "oneOf": [ { - "type": "array", - "items": { - "type": "string" - } + "nullable": true + }, + { + "$ref": "#/components/schemas/IAssetModel" } - ], - "description": "The participants of the given leaderboard that should be boosted." + ] }, - "totalResponses": { - "type": "integer", - "description": "The amount of responses in total that should be added, shared across all participants.", - "format": "int32" + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "ownerId": { + "type": "string", + "format": "uuid" + }, + "ownerMail": { + "type": "string" } - }, - "description": "The model for boosting a leaderboard." + } }, - "ConfidenceInterval": { + "GetStandingByIdResult": { "required": [ - "lowerOffset", - "upperOffset" + "id", + "name", + "benchmarkId", + "status", + "isDisabled" ], "type": "object", "properties": { - "lowerOffset": { - "type": "number", - "format": "double" + "id": { + "type": "string" }, - "upperOffset": { - "type": "number", - "format": "double" + "name": { + "type": "string" + }, + "benchmarkId": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/StandingStatus" + }, + "isDisabled": { + "type": "boolean" } } }, - "CreateBenchmarkModel": { + "ICampaignFilter": { "required": [ - "name" + "_t" ], "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the benchmark" + "oneOf": [ + { + "$ref": "#/components/schemas/ICampaignFilterAndFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterAudienceStateFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterCampaignFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterCampaignSessionCountFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterCountryFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterDemographicFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterDeviceFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterLanguageFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterNewUserFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterNotFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterOrFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterResponseCountFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterUserActionRestrictionFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterUserScoreFilter" } - }, - "description": "The model for creating a benchmark." - }, - "CreateBenchmarkParticipantModel": { - "required": [ - "name" ], - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the participant." + "discriminator": { + "propertyName": "_t", + "mapping": { + "AndFilter": "#/components/schemas/ICampaignFilterAndFilter", + "AudienceStateFilter": "#/components/schemas/ICampaignFilterAudienceStateFilter", + "CampaignFilter": "#/components/schemas/ICampaignFilterCampaignFilter", + "CampaignSessionCountFilter": "#/components/schemas/ICampaignFilterCampaignSessionCountFilter", + "CountryFilter": "#/components/schemas/ICampaignFilterCountryFilter", + "DemographicFilter": "#/components/schemas/ICampaignFilterDemographicFilter", + "DeviceFilter": "#/components/schemas/ICampaignFilterDeviceFilter", + "LanguageFilter": "#/components/schemas/ICampaignFilterLanguageFilter", + "NewUserFilter": "#/components/schemas/ICampaignFilterNewUserFilter", + "NotFilter": "#/components/schemas/ICampaignFilterNotFilter", + "OrFilter": "#/components/schemas/ICampaignFilterOrFilter", + "ResponseCountFilter": "#/components/schemas/ICampaignFilterResponseCountFilter", + "UserActionRestrictionFilter": "#/components/schemas/ICampaignFilterUserActionRestrictionFilter", + "UserScoreFilter": "#/components/schemas/ICampaignFilterUserScoreFilter" } - }, - "description": "The model to create a participant in a leaderboard" + } }, - "CreateBenchmarkParticipantResult": { + "ICampaignFilterAndFilter": { "required": [ - "participantId" + "filters", + "_t" ], - "type": "object", "properties": { - "participantId": { + "_t": { + "enum": [ + "AndFilter" + ], "type": "string" }, - "datasetId": { - "type": "string" + "filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignFilter" + } + }, + "innerFilters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignFilter" + }, + "nullable": true } } }, - "CreateBenchmarkPromptResult": { + "ICampaignFilterAudienceStateFilter": { "required": [ - "id" + "audienceId", + "_t" ], - "type": "object", "properties": { - "id": { + "_t": { + "enum": [ + "AudienceStateFilter" + ], + "type": "string" + }, + "audienceId": { "type": "string" + }, + "allowedStates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SimplifiedAudienceUserState" + } + }, + "includeUnknownState": { + "type": "boolean" + }, + "executionOrder": { + "type": "integer", + "format": "uint32" } } }, - "CreateBenchmarkResult": { + "ICampaignFilterCampaignFilter": { "required": [ - "id" + "campaignIds", + "_t" ], - "type": "object", "properties": { - "id": { + "_t": { + "enum": [ + "CampaignFilter" + ], "type": "string" + }, + "campaignIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "executionOrder": { + "type": "integer", + "format": "uint32" } } }, - "CreateLeaderboardModel": { + "ICampaignFilterCampaignSessionCountFilter": { "required": [ - "name", - "instruction", - "showPrompt" + "sessionCount", + "operator", + "_t" ], - "type": "object", "properties": { - "benchmarkId": { - "type": "string", - "description": "If a leaderboard should be added to a preexisting benchmark, the benchmark Id can be provided.", - "nullable": true - }, - "benchmarkName": { - "type": "string", - "description": "If no BenchmarkId is provided a new benchmark will be created. if no name is supplied the benchmark\n will be called the same as the leaderboard.", - "nullable": true - }, - "name": { - "type": "string", - "description": "The name of the leaderboard." - }, - "instruction": { - "type": "string", - "description": "The instruction datapoints will be matched up against." - }, - "showPrompt": { - "type": "boolean", - "description": "Indicates if the prompt is shown on the rapids." - }, - "showPromptAsset": { - "type": "boolean", - "description": "Whether the prompt asset should be shown on the rapids." - }, - "responseBudget": { - "type": "integer", - "description": "Total amount of responses that get collected per run", - "format": "int32" + "_t": { + "enum": [ + "CampaignSessionCountFilter" + ], + "type": "string" }, - "minResponses": { + "sessionCount": { "type": "integer", - "description": "The minimum amount of responses that need to be collected per comparison.", - "format": "int32" - }, - "isInversed": { - "type": "boolean", - "description": "If the results should be inversed, meaning people should select the worse model." - }, - "validationSetId": { - "type": "string", - "description": "The Validation set that should be attached to every run.", - "nullable": true - }, - "audienceId": { - "type": "string", - "description": "Optional audience ID. When provided, the leaderboard will target users who have\n graduated from the audience (i.e., users with a score at or above the audience's minimum threshold).\n Cannot be specified together with Filters.", - "nullable": true + "format": "uint32" }, - "filters": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/IUserFilterModel" - }, - "nullable": true - } - ], - "description": "The filters will be applied on every order that is created by this leaderboard.\n Cannot be specified together with AudienceId." + "operator": { + "$ref": "#/components/schemas/ComparisonOperator" }, - "featureFlags": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - }, - "nullable": true - } - ], - "description": "Feature flags that will be applied to every order that is created by this leaderboard." + "executionOrder": { + "type": "integer", + "format": "uint32" } - }, - "description": "The CreateLeaderboardModel class represents the model for creating a leaderboard." + } }, - "CreateLeaderboardResult": { + "ICampaignFilterCountryFilter": { "required": [ - "id", - "benchmarkId", - "showPrompt", - "showPromptAsset", - "responseBudget", - "minResponses", - "isInversed" + "countries", + "_t" ], - "type": "object", "properties": { - "id": { - "type": "string" - }, - "benchmarkId": { + "_t": { + "enum": [ + "CountryFilter" + ], "type": "string" }, - "showPrompt": { - "type": "boolean" - }, - "showPromptAsset": { - "type": "boolean" - }, - "responseBudget": { - "type": "integer", - "format": "int32" + "countries": { + "type": "array", + "items": { + "type": "string" + } }, - "minResponses": { + "executionOrder": { "type": "integer", - "format": "int32" - }, - "isInversed": { - "type": "boolean" + "format": "uint32" } } }, - "CreateSampleModel": { + "ICampaignFilterDemographicFilter": { "required": [ "identifier", - "asset" + "values", + "_t" ], - "type": "object", "properties": { + "_t": { + "enum": [ + "DemographicFilter" + ], + "type": "string" + }, "identifier": { - "type": "string", - "description": "The identifier used to correlate samples of different participants." + "type": "string" }, - "asset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - } - ], - "description": "The asset input for the sample." + "values": { + "type": "array", + "items": { + "type": "string" + } + }, + "executionOrder": { + "type": "integer", + "format": "uint32" } - }, - "description": "The model used to create a sample to a participant." + } }, - "ForkBenchmarkResult": { + "ICampaignFilterDeviceFilter": { "required": [ - "id" + "deviceTypes", + "_t" ], - "type": "object", "properties": { - "id": { + "_t": { + "enum": [ + "DeviceFilter" + ], "type": "string" + }, + "deviceTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceType" + } + }, + "executionOrder": { + "type": "integer", + "format": "uint32" } } }, - "GenderUserFilterModel_Gender": { - "enum": [ - "Male", - "Female", - "Other" - ] - }, - "GetBenchmarkByIdResult": { + "ICampaignFilterLanguageFilter": { "required": [ - "id", - "name", - "isPublic", - "createdAt", - "ownerId", - "ownerMail" + "languages", + "_t" ], - "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { + "_t": { + "enum": [ + "LanguageFilter" + ], "type": "string" }, - "isPublic": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "ownerId": { - "type": "string", - "format": "uuid" + "languages": { + "type": "array", + "items": { + "type": "string" + } }, - "ownerMail": { - "type": "string" + "executionOrder": { + "type": "integer", + "format": "uint32" } } }, - "GetCombinedBenchmarkMatrixEndpoint_Output": { + "ICampaignFilterNewUserFilter": { "required": [ - "index", - "columns", - "data" + "_t" ], - "type": "object", "properties": { - "index": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "Row participant names." - }, - "columns": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } + "_t": { + "enum": [ + "NewUserFilter" ], - "description": "Column participant names." + "type": "string" }, - "data": { - "allOf": [ - { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } - } - ], - "description": "NxN matrix where Data[i][j] = wins of Index[i] over Columns[j]." + "executionOrder": { + "type": "integer", + "format": "uint32" } - }, - "description": "Combined benchmark matrix output in pandas split format." + } }, - "GetCombinedBenchmarkStandingsEndpoint_Output": { + "ICampaignFilterNotFilter": { "required": [ - "items" + "filter", + "_t" ], - "type": "object", "properties": { - "items": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetCombinedBenchmarkStandingsEndpoint_OutputItem" - } - } + "_t": { + "enum": [ + "NotFilter" ], - "description": "The standings items." + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/ICampaignFilter" + }, + "innerFilters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignFilter" + } } - }, - "description": "Combined benchmark standings output." + } }, - "GetCombinedBenchmarkStandingsEndpoint_OutputItem": { + "ICampaignFilterOrFilter": { "required": [ - "id", - "name", - "status", - "score", - "wins", - "totalMatches", - "isDisabled" + "filters", + "_t" ], - "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { + "_t": { + "enum": [ + "OrFilter" + ], "type": "string" }, - "status": { - "$ref": "#/components/schemas/StandingStatus" - }, - "score": { - "type": "number", - "format": "double" - }, - "wins": { - "type": "number", - "format": "double" - }, - "totalMatches": { - "type": "number", - "format": "double" - }, - "isDisabled": { - "type": "boolean" + "filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignFilter" + } }, - "confidenceInterval": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/ConfidenceInterval" - } - ] + "innerFilters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignFilter" + } } } }, - "GetCombinedLeaderboardMatrixEndpoint_Output": { + "ICampaignFilterResponseCountFilter": { "required": [ - "index", - "columns", - "data" + "responseCount", + "dimension", + "operator", + "_t" ], - "type": "object", "properties": { - "index": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } + "_t": { + "enum": [ + "ResponseCountFilter" ], - "description": "Row participant names." + "type": "string" }, - "columns": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "Column participant names." + "responseCount": { + "type": "integer", + "format": "uint32" }, - "data": { - "allOf": [ - { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } - } - ], - "description": "NxN matrix where Data[i][j] = wins of Index[i] over Columns[j]." + "dimension": { + "type": "string" + }, + "operator": { + "$ref": "#/components/schemas/ComparisonOperator" + }, + "executionOrder": { + "type": "integer", + "format": "uint32" } - }, - "description": "Combined leaderboard matrix output in pandas split format." + } }, - "GetCombinedLeaderboardStandingsEndpoint_Output": { + "ICampaignFilterUserActionRestrictionFilter": { "required": [ - "items" + "requiredActions", + "_t" ], - "type": "object", "properties": { - "items": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetCombinedLeaderboardStandingsEndpoint_OutputItem" - } - } + "_t": { + "enum": [ + "UserActionRestrictionFilter" ], - "description": "The standings items." + "type": "string" + }, + "requiredActions": {}, + "executionOrder": { + "type": "integer", + "format": "uint32" } - }, - "description": "Combined leaderboard standings output." + } }, - "GetCombinedLeaderboardStandingsEndpoint_OutputItem": { + "ICampaignFilterUserScoreFilter": { "required": [ - "id", - "name", - "status", - "score", - "wins", - "totalMatches", - "isDisabled" + "lowerbound", + "upperbound", + "dimension", + "_t" ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/StandingStatus" - }, - "score": { - "type": "number", - "format": "double" + "properties": { + "_t": { + "enum": [ + "UserScoreFilter" + ], + "type": "string" }, - "wins": { + "lowerbound": { "type": "number", "format": "double" }, - "totalMatches": { + "upperbound": { "type": "number", "format": "double" }, - "isDisabled": { - "type": "boolean" + "dimension": { + "type": "string" }, - "confidenceInterval": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/ConfidenceInterval" - } - ] + "executionOrder": { + "type": "integer", + "format": "uint32" } } }, - "GetLeaderboardByIdResult": { + "ISampleByParticipant": { "required": [ - "id", - "name", - "instruction", - "showPrompt", - "showPromptAsset", - "isInversed", - "responseBudget", - "minResponses", - "filters", - "featureFlags" + "_t" ], "type": "object", - "properties": { - "id": { - "type": "string" - }, - "orderId": { - "type": "string", - "nullable": true + "oneOf": [ + { + "$ref": "#/components/schemas/ISampleByParticipantPlaceholderSampleByParticipant" }, - "name": { + { + "$ref": "#/components/schemas/ISampleByParticipantSampleByParticipant" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "PlaceholderSampleByParticipant": "#/components/schemas/ISampleByParticipantPlaceholderSampleByParticipant", + "SampleByParticipant": "#/components/schemas/ISampleByParticipantSampleByParticipant" + } + } + }, + "ISampleByParticipantPlaceholderSampleByParticipant": { + "required": [ + "identifier", + "tags", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "PlaceholderSampleByParticipant" + ], "type": "string" }, - "instruction": { + "identifier": { "type": "string" }, - "showPrompt": { - "type": "boolean" - }, - "showPromptAsset": { - "type": "boolean" - }, - "isInversed": { - "type": "boolean" - }, - "responseBudget": { - "type": "integer", - "format": "int32" - }, - "minResponses": { - "type": "integer", - "format": "int32" - }, - "validationSetId": { + "prompt": { "type": "string", "nullable": true }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignFilter" - } + "promptAsset": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/IAssetModel" + } + ] }, - "featureFlags": { + "tags": { "type": "array", "items": { - "$ref": "#/components/schemas/FeatureFlag" + "type": "string" } } } }, - "GetParticipantByIdResult": { - "required": [ - "id", - "name", - "benchmarkId" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "benchmarkId": { - "type": "string" - } - } - }, - "GetSampleByIdResult": { + "ISampleByParticipantSampleByParticipant": { "required": [ "id", "identifier", - "participantId", - "participantName", "asset", "tags", - "ownerMail" + "ownerMail", + "_t" ], - "type": "object", "properties": { - "id": { - "type": "string" - }, - "identifier": { + "_t": { + "enum": [ + "SampleByParticipant" + ], "type": "string" }, - "participantId": { + "id": { "type": "string" }, - "participantName": { + "identifier": { "type": "string" }, "asset": { @@ -21905,210 +21528,132 @@ } } }, - "GetStandingByIdResult": { - "required": [ - "id", - "name", - "benchmarkId", - "status", - "isDisabled" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "benchmarkId": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/StandingStatus" - }, - "isDisabled": { - "type": "boolean" - } - } - }, - "ICampaignFilter": { + "IUserFilterModel": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/ICampaignFilterAndFilter" - }, - { - "$ref": "#/components/schemas/ICampaignFilterAudienceStateFilter" + "$ref": "#/components/schemas/IUserFilterModelAgeUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterCampaignFilter" + "$ref": "#/components/schemas/IUserFilterModelAndUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterCampaignSessionCountFilter" + "$ref": "#/components/schemas/IUserFilterModelCampaignUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterCountryFilter" + "$ref": "#/components/schemas/IUserFilterModelCountryUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterDemographicFilter" + "$ref": "#/components/schemas/IUserFilterModelCustomUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterDeviceFilter" + "$ref": "#/components/schemas/IUserFilterModelDeviceUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterLanguageFilter" + "$ref": "#/components/schemas/IUserFilterModelGenderUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterNewUserFilter" + "$ref": "#/components/schemas/IUserFilterModelLanguageUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterNotFilter" + "$ref": "#/components/schemas/IUserFilterModelNewUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterOrFilter" + "$ref": "#/components/schemas/IUserFilterModelNotUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterResponseCountFilter" + "$ref": "#/components/schemas/IUserFilterModelOrUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterUserActionRestrictionFilter" + "$ref": "#/components/schemas/IUserFilterModelResponseCountUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterUserScoreFilter" + "$ref": "#/components/schemas/IUserFilterModelUserScoreUserFilterModel" } ], "discriminator": { "propertyName": "_t", "mapping": { - "AndFilter": "#/components/schemas/ICampaignFilterAndFilter", - "AudienceStateFilter": "#/components/schemas/ICampaignFilterAudienceStateFilter", - "CampaignFilter": "#/components/schemas/ICampaignFilterCampaignFilter", - "CampaignSessionCountFilter": "#/components/schemas/ICampaignFilterCampaignSessionCountFilter", - "CountryFilter": "#/components/schemas/ICampaignFilterCountryFilter", - "DemographicFilter": "#/components/schemas/ICampaignFilterDemographicFilter", - "DeviceFilter": "#/components/schemas/ICampaignFilterDeviceFilter", - "LanguageFilter": "#/components/schemas/ICampaignFilterLanguageFilter", - "NewUserFilter": "#/components/schemas/ICampaignFilterNewUserFilter", - "NotFilter": "#/components/schemas/ICampaignFilterNotFilter", - "OrFilter": "#/components/schemas/ICampaignFilterOrFilter", - "ResponseCountFilter": "#/components/schemas/ICampaignFilterResponseCountFilter", - "UserActionRestrictionFilter": "#/components/schemas/ICampaignFilterUserActionRestrictionFilter", - "UserScoreFilter": "#/components/schemas/ICampaignFilterUserScoreFilter" - } - } - }, - "ICampaignFilterAndFilter": { - "required": [ - "filters", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "AndFilter" - ], - "type": "string" - }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignFilter" - } - }, - "innerFilters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignFilter" - }, - "nullable": true + "AgeFilter": "#/components/schemas/IUserFilterModelAgeUserFilterModel", + "AndFilter": "#/components/schemas/IUserFilterModelAndUserFilterModel", + "CampaignFilter": "#/components/schemas/IUserFilterModelCampaignUserFilterModel", + "CountryFilter": "#/components/schemas/IUserFilterModelCountryUserFilterModel", + "CustomFilter": "#/components/schemas/IUserFilterModelCustomUserFilterModel", + "DeviceFilter": "#/components/schemas/IUserFilterModelDeviceUserFilterModel", + "GenderFilter": "#/components/schemas/IUserFilterModelGenderUserFilterModel", + "LanguageFilter": "#/components/schemas/IUserFilterModelLanguageUserFilterModel", + "NewUserFilter": "#/components/schemas/IUserFilterModelNewUserFilterModel", + "NotFilter": "#/components/schemas/IUserFilterModelNotUserFilterModel", + "OrFilter": "#/components/schemas/IUserFilterModelOrUserFilterModel", + "ResponseCountFilter": "#/components/schemas/IUserFilterModelResponseCountUserFilterModel", + "UserScoreFilter": "#/components/schemas/IUserFilterModelUserScoreUserFilterModel" } } }, - "ICampaignFilterAudienceStateFilter": { + "IUserFilterModelAgeUserFilterModel": { "required": [ - "audienceId", + "ageGroups", "_t" ], "properties": { "_t": { "enum": [ - "AudienceStateFilter" + "AgeFilter" ], "type": "string" }, - "audienceId": { - "type": "string" - }, - "allowedStates": { + "ageGroups": { "type": "array", "items": { - "$ref": "#/components/schemas/SimplifiedAudienceUserState" + "$ref": "#/components/schemas/AgeUserFilterModel_AgeGroup" } - }, - "includeUnknownState": { - "type": "boolean" - }, - "executionOrder": { - "type": "integer", - "format": "uint32" } } }, - "ICampaignFilterCampaignFilter": { + "IUserFilterModelAndUserFilterModel": { "required": [ - "campaignIds", + "filters", "_t" ], "properties": { "_t": { "enum": [ - "CampaignFilter" + "AndFilter" ], "type": "string" }, - "campaignIds": { + "filters": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/IUserFilterModel" } - }, - "executionOrder": { - "type": "integer", - "format": "uint32" } } }, - "ICampaignFilterCampaignSessionCountFilter": { + "IUserFilterModelCampaignUserFilterModel": { "required": [ - "sessionCount", - "operator", + "campaignIds", "_t" ], "properties": { "_t": { "enum": [ - "CampaignSessionCountFilter" + "CampaignFilter" ], "type": "string" }, - "sessionCount": { - "type": "integer", - "format": "uint32" - }, - "operator": { - "$ref": "#/components/schemas/ComparisonOperator" - }, - "executionOrder": { - "type": "integer", - "format": "uint32" + "campaignIds": { + "type": "array", + "items": { + "type": "string" + } } } }, - "ICampaignFilterCountryFilter": { + "IUserFilterModelCountryUserFilterModel": { "required": [ "countries", "_t" @@ -22125,14 +21670,10 @@ "items": { "type": "string" } - }, - "executionOrder": { - "type": "integer", - "format": "uint32" } } }, - "ICampaignFilterDemographicFilter": { + "IUserFilterModelCustomUserFilterModel": { "required": [ "identifier", "values", @@ -22141,7 +21682,7 @@ "properties": { "_t": { "enum": [ - "DemographicFilter" + "CustomFilter" ], "type": "string" }, @@ -22153,14 +21694,10 @@ "items": { "type": "string" } - }, - "executionOrder": { - "type": "integer", - "format": "uint32" } } }, - "ICampaignFilterDeviceFilter": { + "IUserFilterModelDeviceUserFilterModel": { "required": [ "deviceTypes", "_t" @@ -22177,14 +21714,30 @@ "items": { "$ref": "#/components/schemas/DeviceType" } + } + } + }, + "IUserFilterModelGenderUserFilterModel": { + "required": [ + "genders", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "GenderFilter" + ], + "type": "string" }, - "executionOrder": { - "type": "integer", - "format": "uint32" + "genders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GenderUserFilterModel_Gender" + } } } }, - "ICampaignFilterLanguageFilter": { + "IUserFilterModelLanguageUserFilterModel": { "required": [ "languages", "_t" @@ -22201,14 +21754,10 @@ "items": { "type": "string" } - }, - "executionOrder": { - "type": "integer", - "format": "uint32" } } }, - "ICampaignFilterNewUserFilter": { + "IUserFilterModelNewUserFilterModel": { "required": [ "_t" ], @@ -22218,14 +21767,10 @@ "NewUserFilter" ], "type": "string" - }, - "executionOrder": { - "type": "integer", - "format": "uint32" } } }, - "ICampaignFilterNotFilter": { + "IUserFilterModelNotUserFilterModel": { "required": [ "filter", "_t" @@ -22238,17 +21783,11 @@ "type": "string" }, "filter": { - "$ref": "#/components/schemas/ICampaignFilter" - }, - "innerFilters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignFilter" - } + "$ref": "#/components/schemas/IUserFilterModel" } } }, - "ICampaignFilterOrFilter": { + "IUserFilterModelOrUserFilterModel": { "required": [ "filters", "_t" @@ -22263,18 +21802,12 @@ "filters": { "type": "array", "items": { - "$ref": "#/components/schemas/ICampaignFilter" - } - }, - "innerFilters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignFilter" + "$ref": "#/components/schemas/IUserFilterModel" } } } }, - "ICampaignFilterResponseCountFilter": { + "IUserFilterModelResponseCountUserFilterModel": { "required": [ "responseCount", "dimension", @@ -22297,1189 +21830,1365 @@ }, "operator": { "$ref": "#/components/schemas/ComparisonOperator" - }, - "executionOrder": { - "type": "integer", - "format": "uint32" - } - } - }, - "ICampaignFilterUserActionRestrictionFilter": { - "required": [ - "requiredActions", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "UserActionRestrictionFilter" - ], - "type": "string" - }, - "requiredActions": {}, - "executionOrder": { - "type": "integer", - "format": "uint32" - } - } - }, - "ICampaignFilterUserScoreFilter": { - "required": [ - "lowerbound", - "upperbound", - "dimension", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "UserScoreFilter" - ], - "type": "string" - }, - "lowerbound": { - "type": "number", - "format": "double" - }, - "upperbound": { - "type": "number", - "format": "double" - }, - "dimension": { - "type": "string" - }, - "executionOrder": { - "type": "integer", - "format": "uint32" - } - } - }, - "ISampleByParticipant": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/ISampleByParticipantPlaceholderSampleByParticipant" - }, - { - "$ref": "#/components/schemas/ISampleByParticipantSampleByParticipant" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "PlaceholderSampleByParticipant": "#/components/schemas/ISampleByParticipantPlaceholderSampleByParticipant", - "SampleByParticipant": "#/components/schemas/ISampleByParticipantSampleByParticipant" - } - } - }, - "ISampleByParticipantPlaceholderSampleByParticipant": { - "required": [ - "identifier", - "tags", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "PlaceholderSampleByParticipant" - ], - "type": "string" - }, - "identifier": { - "type": "string" - }, - "prompt": { - "type": "string", - "nullable": true - }, - "promptAsset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAssetModel" - } - ] - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } } } }, - "ISampleByParticipantSampleByParticipant": { - "required": [ - "id", - "identifier", - "asset", - "tags", - "ownerMail", + "IUserFilterModelUserScoreUserFilterModel": { + "required": [ "_t" ], "properties": { "_t": { "enum": [ - "SampleByParticipant" + "UserScoreFilter" ], "type": "string" }, - "id": { - "type": "string" - }, - "identifier": { - "type": "string" + "lowerbound": { + "type": "number", + "format": "double" }, - "asset": { - "$ref": "#/components/schemas/IAssetModel" + "upperbound": { + "type": "number", + "format": "double" }, - "prompt": { + "dimension": { "type": "string", "nullable": true - }, - "promptAsset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAssetModel" - } - ] - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "ownerId": { - "type": "string", - "format": "uuid" - }, - "ownerMail": { - "type": "string" } } }, - "IUserFilterModel": { + "LeaderboardsQueryResult": { "required": [ - "_t" + "id", + "name", + "instruction", + "showPrompt", + "showPromptAsset", + "isInversed", + "responseBudget", + "minResponses", + "filters", + "featureFlags" ], "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IUserFilterModelAgeUserFilterModel" - }, - { - "$ref": "#/components/schemas/IUserFilterModelAndUserFilterModel" + "properties": { + "id": { + "type": "string" }, - { - "$ref": "#/components/schemas/IUserFilterModelCampaignUserFilterModel" + "orderId": { + "type": "string", + "nullable": true }, - { - "$ref": "#/components/schemas/IUserFilterModelCountryUserFilterModel" + "name": { + "type": "string" }, - { - "$ref": "#/components/schemas/IUserFilterModelCustomUserFilterModel" + "instruction": { + "type": "string" }, - { - "$ref": "#/components/schemas/IUserFilterModelDeviceUserFilterModel" + "showPrompt": { + "type": "boolean" }, - { - "$ref": "#/components/schemas/IUserFilterModelGenderUserFilterModel" + "showPromptAsset": { + "type": "boolean" }, - { - "$ref": "#/components/schemas/IUserFilterModelLanguageUserFilterModel" + "isInversed": { + "type": "boolean" }, - { - "$ref": "#/components/schemas/IUserFilterModelNewUserFilterModel" + "responseBudget": { + "type": "integer", + "format": "int32" }, - { - "$ref": "#/components/schemas/IUserFilterModelNotUserFilterModel" + "minResponses": { + "type": "integer", + "format": "int32" }, - { - "$ref": "#/components/schemas/IUserFilterModelOrUserFilterModel" + "validationSetId": { + "type": "string", + "nullable": true }, - { - "$ref": "#/components/schemas/IUserFilterModelResponseCountUserFilterModel" + "filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignFilter" + } }, - { - "$ref": "#/components/schemas/IUserFilterModelUserScoreUserFilterModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "AgeFilter": "#/components/schemas/IUserFilterModelAgeUserFilterModel", - "AndFilter": "#/components/schemas/IUserFilterModelAndUserFilterModel", - "CampaignFilter": "#/components/schemas/IUserFilterModelCampaignUserFilterModel", - "CountryFilter": "#/components/schemas/IUserFilterModelCountryUserFilterModel", - "CustomFilter": "#/components/schemas/IUserFilterModelCustomUserFilterModel", - "DeviceFilter": "#/components/schemas/IUserFilterModelDeviceUserFilterModel", - "GenderFilter": "#/components/schemas/IUserFilterModelGenderUserFilterModel", - "LanguageFilter": "#/components/schemas/IUserFilterModelLanguageUserFilterModel", - "NewUserFilter": "#/components/schemas/IUserFilterModelNewUserFilterModel", - "NotFilter": "#/components/schemas/IUserFilterModelNotUserFilterModel", - "OrFilter": "#/components/schemas/IUserFilterModelOrUserFilterModel", - "ResponseCountFilter": "#/components/schemas/IUserFilterModelResponseCountUserFilterModel", - "UserScoreFilter": "#/components/schemas/IUserFilterModelUserScoreUserFilterModel" + "featureFlags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } } } }, - "IUserFilterModelAgeUserFilterModel": { + "PagedResultOfBenchmarkQueryResult": { "required": [ - "ageGroups", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "AgeFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "ageGroups": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/AgeUserFilterModel_AgeGroup" + "$ref": "#/components/schemas/BenchmarkQueryResult" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IUserFilterModelAndUserFilterModel": { + "PagedResultOfISampleByParticipant": { "required": [ - "filters", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "AndFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "filters": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/IUserFilterModel" + "$ref": "#/components/schemas/ISampleByParticipant" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IUserFilterModelCampaignUserFilterModel": { + "PagedResultOfLeaderboardsQueryResult": { "required": [ - "campaignIds", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CampaignFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "campaignIds": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/LeaderboardsQueryResult" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IUserFilterModelCountryUserFilterModel": { + "PagedResultOfParticipantByBenchmark": { "required": [ - "countries", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CountryFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" + }, + "page": { + "type": "integer", + "format": "int32" }, - "countries": { + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/ParticipantByBenchmark" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IUserFilterModelCustomUserFilterModel": { + "PagedResultOfPromptByBenchmarkResult": { "required": [ - "identifier", - "values", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CustomFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "identifier": { - "type": "string" + "page": { + "type": "integer", + "format": "int32" }, - "values": { + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/PromptByBenchmarkResult" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IUserFilterModelDeviceUserFilterModel": { + "PagedResultOfRunsByLeaderboardResult": { "required": [ - "deviceTypes", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "DeviceFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "deviceTypes": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/DeviceType" + "$ref": "#/components/schemas/RunsByLeaderboardResult" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IUserFilterModelGenderUserFilterModel": { + "PagedResultOfSampleByIdentifier": { "required": [ - "genders", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "GenderFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "genders": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/GenderUserFilterModel_Gender" + "$ref": "#/components/schemas/SampleByIdentifier" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IUserFilterModelLanguageUserFilterModel": { + "PagedResultOfStandingByLeaderboard": { "required": [ - "languages", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "LanguageFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "languages": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/StandingByLeaderboard" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IUserFilterModelNewUserFilterModel": { + "ParticipantByBenchmark": { "required": [ - "_t" + "id", + "name", + "benchmarkId", + "status" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "NewUserFilter" - ], + "id": { "type": "string" - } - } - }, - "IUserFilterModelNotUserFilterModel": { - "required": [ - "filter", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "NotFilter" - ], + }, + "name": { "type": "string" }, - "filter": { - "$ref": "#/components/schemas/IUserFilterModel" - } - } - }, - "IUserFilterModelOrUserFilterModel": { - "required": [ - "filters", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "OrFilter" - ], + "benchmarkId": { "type": "string" }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IUserFilterModel" - } + "status": { + "$ref": "#/components/schemas/ParticipantStatus" } } }, - "IUserFilterModelResponseCountUserFilterModel": { + "ParticipantStatus": { + "enum": [ + "Created", + "Submitted", + "Disabled" + ] + }, + "PromptByBenchmarkResult": { "required": [ - "responseCount", - "dimension", - "operator", - "_t" + "id", + "identifier", + "createdAt", + "tags" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "ResponseCountFilter" - ], + "id": { "type": "string" }, - "responseCount": { - "type": "integer", - "format": "uint32" + "prompt": { + "type": "string", + "nullable": true }, - "dimension": { + "promptAsset": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/IAssetModel" + } + ] + }, + "identifier": { "type": "string" }, - "operator": { - "$ref": "#/components/schemas/ComparisonOperator" + "createdAt": { + "type": "string", + "format": "date-time" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } } } }, - "IUserFilterModelUserScoreUserFilterModel": { + "RunsByLeaderboardResult": { "required": [ - "_t" + "id", + "name", + "status", + "createdAt", + "ownerMail", + "orderId" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "UserScoreFilter" - ], + "id": { "type": "string" }, - "lowerbound": { - "type": "number", - "format": "double" + "name": { + "type": "string" }, - "upperbound": { - "type": "number", - "format": "double" + "status": { + "$ref": "#/components/schemas/RunStatus" }, - "dimension": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "ownerMail": { + "type": "string" + }, + "orderId": { "type": "string", "nullable": true } } }, - "LeaderboardsQueryResult": { + "RunStatus": { + "enum": [ + "Queued", + "Running", + "Completed", + "Failed" + ] + }, + "SampleByIdentifier": { "required": [ "id", - "name", - "instruction", - "showPrompt", - "showPromptAsset", - "isInversed", - "responseBudget", - "minResponses", - "filters", - "featureFlags" + "identifier", + "participantId", + "participantName", + "asset", + "tags", + "ownerMail" ], "type": "object", "properties": { "id": { "type": "string" }, - "orderId": { - "type": "string", - "nullable": true - }, - "name": { + "identifier": { "type": "string" }, - "instruction": { + "participantId": { "type": "string" }, - "showPrompt": { - "type": "boolean" - }, - "showPromptAsset": { - "type": "boolean" - }, - "isInversed": { - "type": "boolean" - }, - "responseBudget": { - "type": "integer", - "format": "int32" + "participantName": { + "type": "string" }, - "minResponses": { - "type": "integer", - "format": "int32" + "asset": { + "$ref": "#/components/schemas/IAssetModel" }, - "validationSetId": { + "prompt": { "type": "string", "nullable": true }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignFilter" - } + "promptAsset": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/IAssetModel" + } + ] }, - "featureFlags": { + "tags": { "type": "array", "items": { - "$ref": "#/components/schemas/FeatureFlag" + "type": "string" } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "ownerId": { + "type": "string", + "format": "uuid" + }, + "ownerMail": { + "type": "string" } } }, - "PagedResultOfBenchmarkQueryResult": { + "StandingByBenchmark": { "required": [ - "total", - "page", - "pageSize", - "items" + "id", + "name", + "benchmarkId", + "status", + "score", + "wins", + "totalMatches", + "isDisabled" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" + "id": { + "type": "string" }, - "page": { - "type": "integer", - "format": "int32" + "name": { + "type": "string" }, - "pageSize": { - "type": "integer", - "format": "int32" + "benchmarkId": { + "type": "string" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BenchmarkQueryResult" - } + "status": { + "$ref": "#/components/schemas/StandingStatus" }, - "totalPages": { - "type": "integer", - "format": "int32" + "score": { + "type": "number", + "format": "double" + }, + "wins": { + "type": "number", + "format": "double" + }, + "totalMatches": { + "type": "number", + "format": "double" + }, + "isDisabled": { + "type": "boolean" + }, + "confidenceInterval": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/ConfidenceInterval" + } + ] } } }, - "PagedResultOfISampleByParticipant": { + "StandingByLeaderboard": { "required": [ - "total", - "page", - "pageSize", - "items" + "id", + "name", + "leaderboardId", + "status", + "score", + "wins", + "totalMatches", + "isDisabled" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" + "id": { + "type": "string" }, - "page": { - "type": "integer", - "format": "int32" + "name": { + "type": "string" }, - "pageSize": { - "type": "integer", - "format": "int32" + "leaderboardId": { + "type": "string" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ISampleByParticipant" - } + "status": { + "$ref": "#/components/schemas/StandingStatus" }, - "totalPages": { - "type": "integer", - "format": "int32" + "score": { + "type": "number", + "format": "double" + }, + "wins": { + "type": "number", + "format": "double" + }, + "totalMatches": { + "type": "number", + "format": "double" + }, + "isDisabled": { + "type": "boolean" + }, + "confidenceInterval": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/ConfidenceInterval" + } + ] } } }, - "PagedResultOfLeaderboardsQueryResult": { + "StandingsByBenchmarkResult": { "required": [ - "total", - "page", - "pageSize", "items" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { - "type": "integer", - "format": "int32" - }, "items": { "type": "array", "items": { - "$ref": "#/components/schemas/LeaderboardsQueryResult" + "$ref": "#/components/schemas/StandingByBenchmark" } - }, - "totalPages": { - "type": "integer", - "format": "int32" } } }, - "PagedResultOfParticipantByBenchmark": { + "StandingsByLeaderboardResult": { "required": [ - "total", - "page", - "pageSize", "items" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { - "type": "integer", - "format": "int32" - }, "items": { "type": "array", "items": { - "$ref": "#/components/schemas/ParticipantByBenchmark" + "$ref": "#/components/schemas/StandingByLeaderboard" } - }, - "totalPages": { - "type": "integer", - "format": "int32" } } }, - "PagedResultOfPromptByBenchmarkResult": { + "StandingStatus": { + "enum": [ + "Created", + "Active", + "Idle" + ] + }, + "SubmitParticipantResult": { "required": [ - "total", - "page", - "pageSize", - "items" + "validDatapoints", + "invalidDatapoints" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { + "validDatapoints": { "type": "integer", "format": "int32" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PromptByBenchmarkResult" - } - }, - "totalPages": { + "invalidDatapoints": { "type": "integer", "format": "int32" } } }, - "PagedResultOfRunsByLeaderboardResult": { + "SubmitPromptModel": { "required": [ - "total", - "page", - "pageSize", - "items" + "identifier" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" + "identifier": { + "type": "string", + "description": "An identifier associated to the prompt" }, - "page": { - "type": "integer", - "format": "int32" + "prompt": { + "type": "string", + "description": "The prompt", + "nullable": true }, - "pageSize": { - "type": "integer", - "format": "int32" + "promptAsset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetInput" + } + ], + "description": "PromptAsset" }, - "items": { + "tags": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "The tags of a given prompt" + } + }, + "description": "The model user for submitting a prompt to a benchmark." + }, + "TagsByBenchmarkResult": { + "required": [ + "tags" + ], + "type": "object", + "properties": { + "tags": { "type": "array", "items": { - "$ref": "#/components/schemas/RunsByLeaderboardResult" + "type": "string" } - }, - "totalPages": { - "type": "integer", - "format": "int32" } } }, - "PagedResultOfSampleByIdentifier": { + "UpdateBenchmarkModel": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name of the benchmark.", + "nullable": true + }, + "isPublic": { + "type": "boolean", + "description": "Whether the benchmark should be public (only admins can change this).", + "nullable": true + } + }, + "description": "The model used to update a benchmark." + }, + "UpdateBenchmarkNameModel": { "required": [ - "total", - "page", - "pageSize", - "items" + "name" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" + "name": { + "type": "string", + "description": "The new name of the benchmark." + } + }, + "description": "The model used to update the name of a benchmark." + }, + "UpdateLeaderboardModel": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name of the leaderboard.", + "nullable": true }, - "page": { + "responseBudget": { "type": "integer", - "format": "int32" + "description": "The amount of responses that will be collected when onboarding a new participant.", + "format": "int32", + "nullable": true }, - "pageSize": { + "minResponses": { + "type": "integer", + "description": "The amount of responses that will be collected as a minimum on each matchup.", + "format": "int32", + "nullable": true + } + }, + "description": "The model used to update a leaderboard." + }, + "UpdateLeaderboardNameModel": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name of the leaderboard." + } + }, + "description": "The model used to update the name of a leaderboard." + }, + "UpdateLeaderboardResponseConfigModel": { + "required": [ + "responseBudget", + "minResponses" + ], + "type": "object", + "properties": { + "responseBudget": { "type": "integer", + "description": "The amount of responses that will be collected when onboarding a new participant.", "format": "int32" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SampleByIdentifier" - } - }, - "totalPages": { + "minResponses": { "type": "integer", + "description": "The amount of responses that will be collected as a minimum on each matchup.", "format": "int32" } - } + }, + "description": "The model used to update the name of a leaderboard." }, - "PagedResultOfStandingByLeaderboard": { + "UpdateParticipantModel": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name of the participant.", + "nullable": true + } + }, + "description": "The model used to update a participant." + }, + "UpdateParticipantNameModel": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name of the participant." + } + }, + "description": "The model used to update the name of a participant." + }, + "UpdatePromptTagsModel": { + "required": [ + "tags" + ], + "type": "object", + "properties": { + "tags": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "The list of tags to be associated with the prompt." + } + }, + "description": "The model for updating prompt tags." + }, + "VoteMatrixResult": { "required": [ - "total", - "page", - "pageSize", - "items" + "index", + "columns", + "data" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { - "type": "integer", - "format": "int32" + "index": { + "type": "array", + "items": { + "type": "string" + } }, - "items": { + "columns": { "type": "array", "items": { - "$ref": "#/components/schemas/StandingByLeaderboard" + "type": "string" } }, - "totalPages": { - "type": "integer", - "format": "int32" + "data": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } } } }, - "ParticipantByBenchmark": { + "AggregatorType": { + "enum": [ + "NonCommittal", + "MajorityVote", + "SimpleMatchup", + "LocateCluster", + "Classification", + "Locate", + "BoundingBox", + "Line", + "Transcription", + "SinglePointLocate", + "FreeText", + "Scrub", + "Ranking", + "MultiRanking", + null + ], + "description": "The aggregator type." + }, + "AttachCategoryRapidBlueprint_Category": { "required": [ - "id", - "name", - "benchmarkId", - "status" + "label", + "value" ], "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { + "label": { "type": "string" }, - "benchmarkId": { + "value": { "type": "string" - }, - "status": { - "$ref": "#/components/schemas/ParticipantStatus" } } }, - "ParticipantStatus": { - "enum": [ - "Created", - "Submitted", - "Disabled" - ] + "CloneOrderEndpoint_Input": { + "required": [ + "orderName" + ], + "type": "object", + "properties": { + "orderName": { + "type": "string", + "description": "The name of the new cloned order." + } + } }, - "PromptByBenchmarkResult": { + "CloneOrderEndpoint_Output": { "required": [ - "id", - "identifier", - "createdAt", - "tags" + "orderId" ], "type": "object", "properties": { - "id": { - "type": "string" - }, - "prompt": { + "datasetId": { "type": "string", + "description": "The dataset ID of the cloned order.", "nullable": true }, - "promptAsset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAssetModel" - } - ] + "orderId": { + "type": "string", + "description": "The ID of the newly cloned order." + } + } + }, + "ConditionalValidationSelection_ValidationChance": { + "required": [ + "userScoreThreshold", + "chance", + "rapidCount" + ], + "type": "object", + "properties": { + "userScoreThreshold": { + "type": "number", + "format": "double" }, - "identifier": { - "type": "string" + "chance": { + "type": "number", + "format": "double" }, - "createdAt": { - "type": "string", - "format": "date-time" + "rapidCount": { + "type": "integer", + "format": "int32" }, - "tags": { + "selections": { "type": "array", "items": { - "type": "string" - } + "$ref": "#/components/schemas/ISelection" + }, + "nullable": true } } }, - "RunsByLeaderboardResult": { + "CreateComplexOrderEndpoint_Input": { "required": [ - "id", - "name", - "status", - "createdAt", - "ownerMail", - "orderId" + "orderName", + "pipeline" ], "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/RunStatus" - }, - "createdAt": { + "orderName": { "type": "string", - "format": "date-time" + "description": "The name of the order." }, - "ownerMail": { - "type": "string" + "pipeline": { + "allOf": [ + { + "$ref": "#/components/schemas/IPipelineModel" + } + ], + "description": "The pipeline configuration to use." }, - "orderId": { + "isDemo": { + "type": "boolean", + "description": "Whether the order is a demo." + }, + "precedingOrderId": { "type": "string", + "description": "Optional ID of the order that must complete before this order starts processing.", "nullable": true } } }, - "RunStatus": { - "enum": [ - "Queued", - "Running", - "Completed", - "Failed" - ] - }, - "SampleByIdentifier": { + "CreateComplexOrderEndpoint_Output": { "required": [ - "id", - "identifier", - "participantId", - "participantName", - "asset", - "tags", - "ownerMail" + "orderId", + "pipelineId" ], "type": "object", "properties": { - "id": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "participantId": { - "type": "string" - }, - "participantName": { - "type": "string" - }, - "asset": { - "$ref": "#/components/schemas/IAssetModel" - }, - "prompt": { + "datasetId": { "type": "string", + "description": "The dataset ID of the created order.", "nullable": true }, - "promptAsset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAssetModel" - } - ] - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "createdAt": { + "orderId": { "type": "string", - "format": "date-time" + "description": "The ID of the created order." }, - "ownerId": { + "campaignId": { "type": "string", - "format": "uuid" + "description": "The campaign ID of the created order.", + "nullable": true }, - "ownerMail": { - "type": "string" + "pipelineId": { + "type": "string", + "description": "The pipeline ID of the created order." } } }, - "StandingByBenchmark": { + "CreateJobDefinitionEndpoint_Input": { "required": [ - "id", - "name", - "benchmarkId", - "status", - "score", - "wins", - "totalMatches", - "isDisabled" + "definitionName", + "workflow", + "referee", + "datasetId" ], "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "benchmarkId": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/StandingStatus" + "definitionName": { + "type": "string", + "description": "The name of the definition." }, - "score": { - "type": "number", - "format": "double" + "workflow": { + "allOf": [ + { + "$ref": "#/components/schemas/IOrderWorkflowModel" + } + ], + "description": "The workflow configuration." }, - "wins": { - "type": "number", - "format": "double" + "referee": { + "allOf": [ + { + "$ref": "#/components/schemas/IRefereeModel" + } + ], + "description": "The referee configuration." }, - "totalMatches": { - "type": "number", - "format": "double" + "datasetId": { + "type": "string", + "description": "The dataset id." }, - "isDisabled": { - "type": "boolean" + "featureFlags": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } + } + ], + "description": "The feature flags." }, - "confidenceInterval": { + "aggregatorType": { "oneOf": [ { "nullable": true }, { - "$ref": "#/components/schemas/ConfidenceInterval" + "$ref": "#/components/schemas/AggregatorType" } ] } - } + }, + "description": "The input for the create job definition endpoint." }, - "StandingByLeaderboard": { + "CreateJobDefinitionEndpoint_Output": { "required": [ - "id", - "name", - "leaderboardId", - "status", - "score", - "wins", - "totalMatches", - "isDisabled" + "definitionId", + "pipelineId" ], "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "leaderboardId": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/StandingStatus" + "definitionId": { + "type": "string", + "description": "The id of the created job definition." }, - "score": { - "type": "number", - "format": "double" + "pipelineId": { + "type": "string", + "description": "The id of the created preview pipeline." + } + }, + "description": "The result when a job definition has been created." + }, + "CreateJobEndpoint_Input": { + "required": [ + "jobDefinitionId", + "audienceId" + ], + "type": "object", + "properties": { + "jobDefinitionId": { + "type": "string", + "description": "The id of the job definition to use." }, - "wins": { - "type": "number", - "format": "double" + "audienceId": { + "type": "string", + "description": "The id of the audience to target." }, - "totalMatches": { - "type": "number", - "format": "double" + "revisionNumber": { + "type": "integer", + "description": "The revision number to use. If not specified, the latest revision will be used.", + "format": "int32" }, - "isDisabled": { - "type": "boolean" + "name": { + "type": "string", + "description": "The name of the job. If not specified, defaults to \"{definition name}:{revision number}\".", + "nullable": true }, - "confidenceInterval": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/ConfidenceInterval" - } - ] + "priority": { + "type": "integer", + "description": "The priority of the job. Higher values mean higher priority. Default is 50.", + "format": "int32" } - } + }, + "description": "The input for the create job endpoint." }, - "StandingsByBenchmarkResult": { + "CreateJobEndpoint_Output": { "required": [ - "items" + "jobId", + "recruitingStarted" ], "type": "object", "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StandingByBenchmark" - } + "jobId": { + "type": "string", + "description": "The id of the created job." + }, + "recruitingStarted": { + "type": "boolean", + "description": "Whether recruiting was automatically started for the audience." } - } + }, + "description": "The result when a job has been created." }, - "StandingsByLeaderboardResult": { - "required": [ - "items" - ], + "CreateJobRevisionEndpoint_Input": { "type": "object", "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StandingByLeaderboard" - } + "workflow": { + "oneOf": [ + { + "$ref": "#/components/schemas/IOrderWorkflowModel" + }, + { + "nullable": true + } + ], + "description": "The workflow configuration. If not provided, inherits from the previous revision.\n Must be provided together with Referee if either is specified." + }, + "referee": { + "oneOf": [ + { + "$ref": "#/components/schemas/IRefereeModel" + }, + { + "nullable": true + } + ], + "description": "The referee configuration. If not provided, inherits from the previous revision.\n Must be provided together with Workflow if either is specified." + }, + "datasetId": { + "type": "string", + "description": "The dataset id. If not provided, inherits from the previous revision.", + "nullable": true + }, + "featureFlags": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } + }, + { + "nullable": true + } + ], + "description": "The feature flags. If not provided, inherits from the previous revision." + }, + "aggregatorType": { + "enum": [ + "NonCommittal", + "MajorityVote", + "SimpleMatchup", + "LocateCluster", + "Classification", + "Locate", + "BoundingBox", + "Line", + "Transcription", + "SinglePointLocate", + "FreeText", + "Scrub", + "Ranking", + "MultiRanking", + null + ], + "description": "The aggregator type. If not provided, inherits from the previous revision." } - } - }, - "StandingStatus": { - "enum": [ - "Created", - "Active", - "Idle" - ] + }, + "description": "The input for the create job revision endpoint." }, - "SubmitParticipantResult": { + "CreateJobRevisionEndpoint_Output": { "required": [ - "validDatapoints", - "invalidDatapoints" + "revisionNumber", + "pipelineId" ], "type": "object", "properties": { - "validDatapoints": { + "revisionNumber": { "type": "integer", + "description": "The revision number of the created job revision.", "format": "int32" }, - "invalidDatapoints": { - "type": "integer", - "format": "int32" + "pipelineId": { + "type": "string", + "description": "The id of the created preview pipeline." } - } + }, + "description": "The result when a job revision has been created." }, - "SubmitPromptModel": { + "CreateOrderEndpoint_Output": { "required": [ - "identifier" + "orderId", + "pipelineId" ], "type": "object", "properties": { - "identifier": { + "datasetId": { "type": "string", - "description": "An identifier associated to the prompt" + "description": "The dataset ID of the created order.", + "nullable": true }, - "prompt": { + "orderId": { "type": "string", - "description": "The prompt", + "description": "The ID of the created order." + }, + "campaignId": { + "type": "string", + "description": "The campaign ID of the created order.", "nullable": true }, - "promptAsset": { + "pipelineId": { + "type": "string", + "description": "The pipeline ID of the created order." + } + } + }, + "CreateOrderModel": { + "required": [ + "orderName", + "workflow", + "referee" + ], + "type": "object", + "properties": { + "orderName": { + "type": "string", + "description": "The name is used as an identifier for an order and can be freely chosen." + }, + "workflow": { "allOf": [ { - "$ref": "#/components/schemas/IAssetInput" + "$ref": "#/components/schemas/IOrderWorkflowModel" } ], - "description": "PromptAsset" + "description": "The workflow helps to determine the tasks that need to be completed by the users." }, - "tags": { + "referee": { + "allOf": [ + { + "$ref": "#/components/schemas/IRefereeModel" + } + ], + "description": "The referee is used to determine how many votes will be collected." + }, + "aggregator": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/AggregatorType" + } + ] + }, + "featureFlags": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + }, + "nullable": true + } + ], + "description": "The feature flags are used to enable or disable certain features." + }, + "priority": { + "type": "integer", + "description": "The priority is used to prioritize over other orders.", + "format": "int32" + }, + "stickyState": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/StickyState" + } + ] + }, + "stickyConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/StickyConfig" + } + ], + "description": "Configuration for sticky campaign behavior. Takes precedence over StickyState if both are provided." + }, + "userScoreDimensions": { "allOf": [ { "type": "array", @@ -23489,4055 +23198,4349 @@ "nullable": true } ], - "description": "The tags of a given prompt" - } - }, - "description": "The model user for submitting a prompt to a benchmark." - }, - "TagsByBenchmarkResult": { - "required": [ - "tags" - ], - "type": "object", - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "UpdateBenchmarkModel": { - "type": "object", - "properties": { - "name": { + "description": "The user score dimensions are used to determine the score of the responses from the user." + }, + "demographicKeys": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "The demographic keys are used to determine which demographics to store on the responses from the user." + }, + "userFilters": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/IUserFilterModel" + }, + "nullable": true + } + ], + "description": "The user filters are used to restrict the order to only collect votes from a specific demographic." + }, + "validationSetId": { "type": "string", - "description": "The new name of the benchmark.", + "description": "The validation set id can be changed to point to a specific validation set. if not provided a sane default will be\n used.", "nullable": true }, - "isPublic": { - "type": "boolean", - "description": "Whether the benchmark should be public (only admins can change this).", + "selections": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ISelection" + }, + "nullable": true + } + ], + "description": "The selections are used to determine which tasks are shown to a user." + }, + "retrievalMode": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/RetrievalMode" + } + ] + }, + "maxIterations": { + "type": "integer", + "description": "The maximum number of times a user is allowed to see the same rapid.", + "format": "int32" + }, + "precedingOrderId": { + "type": "string", + "description": "Optional ID of the order that must complete before this order starts processing.", "nullable": true } }, - "description": "The model used to update a benchmark." + "description": "This model is used to create a simple order" }, - "UpdateBenchmarkNameModel": { + "CreateUnsupportedOrderEndpoint_Input": { "required": [ - "name" + "orderName", + "dataType", + "labelType" ], "type": "object", "properties": { - "name": { + "orderName": { "type": "string", - "description": "The new name of the benchmark." + "description": "The name of the order." + }, + "dataType": { + "type": "string", + "description": "The type of data that was attempted to be ordered." + }, + "labelType": { + "type": "string", + "description": "The type of labels that were attempted to be ordered." } - }, - "description": "The model used to update the name of a benchmark." + } }, - "UpdateLeaderboardModel": { + "DefinitionType": { + "enum": [ + "Unknown", + "Classify", + "Compare", + "BoundingBox", + "Line", + "Polygon", + "Locate", + "Transcription", + "NamedEntity", + "FreeText", + "Scrub", + "Ranking", + "GroupedRanking", + "Evaluation" + ], + "description": "The type of the job definition." + }, + "EloConfigModel": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "The new name of the leaderboard.", - "nullable": true - }, - "responseBudget": { + "startingElo": { "type": "integer", - "description": "The amount of responses that will be collected when onboarding a new participant.", - "format": "int32", - "nullable": true + "format": "int32" + }, + "kFactor": { + "type": "integer", + "format": "int32" }, - "minResponses": { + "scalingFactor": { "type": "integer", - "description": "The amount of responses that will be collected as a minimum on each matchup.", - "format": "int32", - "nullable": true + "format": "int32" } - }, - "description": "The model used to update a leaderboard." + } }, - "UpdateLeaderboardNameModel": { + "FeedbackModel": { "required": [ - "name" + "feedback" ], "type": "object", "properties": { - "name": { + "feedback": { "type": "string", - "description": "The new name of the leaderboard." + "description": "The feedback" + }, + "email": { + "type": "string", + "description": "The email of the user submitting the feedback", + "nullable": true + }, + "token": { + "type": "string", + "description": "The recaptcha token of the user submitting the feedback", + "nullable": true } }, - "description": "The model used to update the name of a leaderboard." + "description": "The model for submitting feedback." }, - "UpdateLeaderboardResponseConfigModel": { + "GetJobByIdEndpoint_Output": { "required": [ - "responseBudget", - "minResponses" + "jobId", + "name", + "definitionId", + "audienceId", + "revisionNumber", + "pipelineId", + "status", + "createdAt", + "ownerId", + "ownerMail" ], "type": "object", "properties": { - "responseBudget": { - "type": "integer", - "description": "The amount of responses that will be collected when onboarding a new participant.", - "format": "int32" + "jobId": { + "type": "string", + "description": "The job id." }, - "minResponses": { + "name": { + "type": "string", + "description": "The job name." + }, + "definitionId": { + "type": "string", + "description": "The job definition id." + }, + "audienceId": { + "type": "string", + "description": "The audience id." + }, + "revisionNumber": { "type": "integer", - "description": "The amount of responses that will be collected as a minimum on each matchup.", + "description": "The revision number.", "format": "int32" - } - }, - "description": "The model used to update the name of a leaderboard." - }, - "UpdateParticipantModel": { - "type": "object", - "properties": { - "name": { + }, + "pipelineId": { "type": "string", - "description": "The new name of the participant.", + "description": "The pipeline id." + }, + "status": { + "type": "string", + "description": "The job status." + }, + "completedAt": { + "type": "string", + "description": "The timestamp when the job was completed.", + "format": "date-time", + "nullable": true + }, + "resultFileName": { + "type": "string", + "description": "The file name of the result.", + "nullable": true + }, + "failedAt": { + "type": "string", + "description": "The timestamp when the job failed.", + "format": "date-time", + "nullable": true + }, + "failureMessage": { + "type": "string", + "description": "The failure message.", "nullable": true + }, + "createdAt": { + "type": "string", + "description": "The creation timestamp.", + "format": "date-time" + }, + "ownerId": { + "type": "string", + "description": "The owner id.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The owner email." } }, - "description": "The model used to update a participant." + "description": "The result when a job has been retrieved." }, - "UpdateParticipantNameModel": { + "GetJobDefinitionByIdEndpoint_Output": { "required": [ - "name" + "definitionId", + "name", + "definitionType", + "createdAt", + "ownerId", + "ownerMail" ], "type": "object", "properties": { + "definitionId": { + "type": "string", + "description": "The job definition id." + }, "name": { "type": "string", - "description": "The new name of the participant." + "description": "The name of the job definition." + }, + "definitionType": { + "$ref": "#/components/schemas/DefinitionType" + }, + "createdAt": { + "type": "string", + "description": "The creation timestamp.", + "format": "date-time" + }, + "ownerId": { + "type": "string", + "description": "The id of the job definition's owner.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The email of the job definition's owner." } }, - "description": "The model used to update the name of a participant." + "description": "The result when a job definition has been retrieved." }, - "UpdatePromptTagsModel": { + "GetJobRevisionEndpoint_Output": { "required": [ - "tags" + "definitionId", + "revisionNumber", + "state", + "pipelineId", + "datasetId", + "workflow", + "referee", + "featureFlags", + "createdAt", + "createdById", + "createdByMail" ], "type": "object", "properties": { - "tags": { + "definitionId": { + "type": "string", + "description": "The job definition id." + }, + "revisionNumber": { + "type": "integer", + "description": "The revision number.", + "format": "int32" + }, + "state": { + "$ref": "#/components/schemas/JobDefinitionRevisionState" + }, + "pipelineId": { + "type": "string", + "description": "The pipeline id." + }, + "datasetId": { + "type": "string", + "description": "The dataset id." + }, + "aggregatorType": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/AggregatorType" + } + ] + }, + "workflow": { + "allOf": [ + { + "$ref": "#/components/schemas/IOrderWorkflowModel" + } + ], + "description": "The workflow configuration. Can be used directly to create a new revision." + }, + "referee": { + "allOf": [ + { + "$ref": "#/components/schemas/IRefereeModel" + } + ], + "description": "The referee configuration. Can be used directly to create a new revision." + }, + "featureFlags": { "allOf": [ { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/FeatureFlag" } } ], - "description": "The list of tags to be associated with the prompt." + "description": "The feature flags." + }, + "createdAt": { + "type": "string", + "description": "The creation timestamp.", + "format": "date-time" + }, + "createdById": { + "type": "string", + "description": "The id of the user who created the revision.", + "format": "uuid" + }, + "createdByMail": { + "type": "string", + "description": "The email of the user who created the revision." } }, - "description": "The model for updating prompt tags." + "description": "The result when a job revision has been retrieved." }, - "VoteMatrixResult": { + "GetOrderByIdEndpoint_Output": { "required": [ - "index", - "columns", - "data" + "orderName", + "customerMail", + "orderDate", + "state", + "pipelineId", + "isLocked", + "isPublic" ], "type": "object", "properties": { - "index": { - "type": "array", - "items": { - "type": "string" - } + "orderName": { + "type": "string", + "description": "The name of the order." }, - "columns": { - "type": "array", - "items": { - "type": "string" - } + "customerMail": { + "type": "string", + "description": "The email of the customer who placed the order." }, - "data": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } + "orderDate": { + "type": "string", + "description": "The date the order was placed.", + "format": "date-time" + }, + "state": { + "type": "string", + "description": "The current state of the order." + }, + "pipelineId": { + "type": "string", + "description": "The ID of the pipeline associated with the order." + }, + "isLocked": { + "type": "boolean", + "description": "Whether the order is locked." + }, + "isPublic": { + "type": "boolean", + "description": "Whether the order is publicly visible." + }, + "failureMessage": { + "type": "string", + "description": "The failure message if the order failed.", + "nullable": true } } }, - "AggregatorType": { - "enum": [ - "NonCommittal", - "MajorityVote", - "SimpleMatchup", - "LocateCluster", - "Classification", - "Locate", - "BoundingBox", - "Line", - "Transcription", - "SinglePointLocate", - "FreeText", - "Scrub", - "Ranking", - "MultiRanking", - null - ], - "description": "The aggregator type." - }, - "AttachCategoryRapidBlueprint_Category": { + "GetPublicOrdersEndpoint_OrderOutput": { "required": [ - "label", - "value" + "id", + "name", + "isPublic" ], "type": "object", "properties": { - "label": { + "id": { "type": "string" }, - "value": { + "name": { "type": "string" + }, + "isPublic": { + "type": "boolean" } } }, - "CloneOrderEndpoint_Input": { + "GetPublicOrdersEndpoint_Output": { "required": [ - "orderName" + "orders" ], "type": "object", "properties": { - "orderName": { - "type": "string", - "description": "The name of the new cloned order." + "orders": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetPublicOrdersEndpoint_OrderOutput" + } + } + ], + "description": "The list of publicly available orders." } } }, - "CloneOrderEndpoint_Output": { + "IDatasetModel": { "required": [ - "orderId" + "_t" ], "type": "object", - "properties": { - "datasetId": { - "type": "string", - "description": "The dataset ID of the cloned order.", - "nullable": true - }, - "orderId": { - "type": "string", - "description": "The ID of the newly cloned order." + "oneOf": [ + { + "$ref": "#/components/schemas/IDatasetModelCloneDatasetModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "CloneDatasetModel": "#/components/schemas/IDatasetModelCloneDatasetModel" } } }, - "ConditionalValidationSelection_ValidationChance": { + "IDatasetModelCloneDatasetModel": { "required": [ - "userScoreThreshold", - "chance", - "rapidCount" + "datasetToCloneId", + "datasetName", + "_t" ], - "type": "object", "properties": { - "userScoreThreshold": { - "type": "number", - "format": "double" - }, - "chance": { - "type": "number", - "format": "double" + "_t": { + "enum": [ + "CloneDatasetModel" + ], + "type": "string" }, - "rapidCount": { - "type": "integer", - "format": "int32" + "datasetToCloneId": { + "type": "string" }, - "selections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ISelection" - }, - "nullable": true + "datasetName": { + "type": "string" } } }, - "CreateComplexOrderEndpoint_Input": { + "IOrderWorkflowModel": { "required": [ - "orderName", - "pipeline" + "_t" ], "type": "object", - "properties": { - "orderName": { - "type": "string", - "description": "The name of the order." + "oneOf": [ + { + "$ref": "#/components/schemas/IOrderWorkflowModelEvaluationWorkflowModel" }, - "pipeline": { - "allOf": [ - { - "$ref": "#/components/schemas/IPipelineModel" - } - ], - "description": "The pipeline configuration to use." + { + "$ref": "#/components/schemas/IOrderWorkflowModelGroupedRankingWorkflowModel" }, - "isDemo": { - "type": "boolean", - "description": "Whether the order is a demo." + { + "$ref": "#/components/schemas/IOrderWorkflowModelRankingWorkflowModel" }, - "precedingOrderId": { - "type": "string", - "description": "Optional ID of the order that must complete before this order starts processing.", - "nullable": true + { + "$ref": "#/components/schemas/IOrderWorkflowModelSimpleWorkflowModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "EvaluationWorkflow": "#/components/schemas/IOrderWorkflowModelEvaluationWorkflowModel", + "GroupedRankingWorkflow": "#/components/schemas/IOrderWorkflowModelGroupedRankingWorkflowModel", + "RankingWorkflow": "#/components/schemas/IOrderWorkflowModelRankingWorkflowModel", + "SimpleWorkflow": "#/components/schemas/IOrderWorkflowModelSimpleWorkflowModel" } } }, - "CreateComplexOrderEndpoint_Output": { + "IOrderWorkflowModelEvaluationWorkflowModel": { "required": [ - "orderId", - "pipelineId" + "validationSetId", + "shouldAcceptIncorrect", + "_t" ], - "type": "object", "properties": { - "datasetId": { - "type": "string", - "description": "The dataset ID of the created order.", - "nullable": true + "_t": { + "enum": [ + "EvaluationWorkflow" + ], + "type": "string" }, - "orderId": { - "type": "string", - "description": "The ID of the created order." + "validationSetId": { + "type": "string" }, - "campaignId": { - "type": "string", - "description": "The campaign ID of the created order.", - "nullable": true + "shouldAcceptIncorrect": { + "type": "boolean" }, - "pipelineId": { - "type": "string", - "description": "The pipeline ID of the created order." + "featureFlags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } } } }, - "CreateJobDefinitionEndpoint_Input": { + "IOrderWorkflowModelGroupedRankingWorkflowModel": { "required": [ - "definitionName", - "workflow", - "referee", - "datasetId" + "criteria", + "_t" ], - "type": "object", "properties": { - "definitionName": { - "type": "string", - "description": "The name of the definition." - }, - "workflow": { - "allOf": [ - { - "$ref": "#/components/schemas/IOrderWorkflowModel" - } + "_t": { + "enum": [ + "GroupedRankingWorkflow" ], - "description": "The workflow configuration." + "type": "string" }, - "referee": { - "allOf": [ - { - "$ref": "#/components/schemas/IRefereeModel" - } - ], - "description": "The referee configuration." + "criteria": { + "type": "string" }, - "datasetId": { - "type": "string", - "description": "The dataset id." + "pairMakerConfig": { + "$ref": "#/components/schemas/IPairMakerConfigModel" }, - "featureFlags": { + "eloConfig": { "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } + "$ref": "#/components/schemas/EloConfigModel" } ], - "description": "The feature flags." + "deprecated": true }, - "aggregatorType": { + "rankingConfig": { "oneOf": [ { "nullable": true }, { - "$ref": "#/components/schemas/AggregatorType" + "$ref": "#/components/schemas/IRankingConfigModel" } ] - } - }, - "description": "The input for the create job definition endpoint." - }, - "CreateJobDefinitionEndpoint_Output": { - "required": [ - "definitionId", - "pipelineId" - ], - "type": "object", - "properties": { - "definitionId": { - "type": "string", - "description": "The id of the created job definition." - }, - "pipelineId": { - "type": "string", - "description": "The id of the created preview pipeline." - } - }, - "description": "The result when a job definition has been created." - }, - "CreateJobEndpoint_Input": { - "required": [ - "jobDefinitionId", - "audienceId" - ], - "type": "object", - "properties": { - "jobDefinitionId": { - "type": "string", - "description": "The id of the job definition to use." - }, - "audienceId": { - "type": "string", - "description": "The id of the audience to target." }, - "revisionNumber": { - "type": "integer", - "description": "The revision number to use. If not specified, the latest revision will be used.", - "format": "int32" + "contexts": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true }, - "name": { - "type": "string", - "description": "The name of the job. If not specified, defaults to \"{definition name}:{revision number}\".", + "contextAssets": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IAssetInput" + }, "nullable": true }, - "priority": { + "featureFlags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } + }, + "maxParallelism": { "type": "integer", - "description": "The priority of the job. Higher values mean higher priority. Default is 50.", "format": "int32" } - }, - "description": "The input for the create job endpoint." + } }, - "CreateJobEndpoint_Output": { + "IOrderWorkflowModelRankingWorkflowModel": { "required": [ - "jobId", - "recruitingStarted" + "criteria", + "_t" ], - "type": "object", "properties": { - "jobId": { - "type": "string", - "description": "The id of the created job." + "_t": { + "enum": [ + "RankingWorkflow" + ], + "type": "string" }, - "recruitingStarted": { - "type": "boolean", - "description": "Whether recruiting was automatically started for the audience." - } - }, - "description": "The result when a job has been created." - }, - "CreateJobRevisionEndpoint_Input": { - "type": "object", - "properties": { - "workflow": { - "oneOf": [ - { - "$ref": "#/components/schemas/IOrderWorkflowModel" - }, + "criteria": { + "type": "string" + }, + "pairMakerConfig": { + "$ref": "#/components/schemas/IPairMakerConfigModel" + }, + "eloConfig": { + "allOf": [ { - "nullable": true + "$ref": "#/components/schemas/EloConfigModel" } ], - "description": "The workflow configuration. If not provided, inherits from the previous revision.\n Must be provided together with Referee if either is specified." + "deprecated": true }, - "referee": { + "rankingConfig": { "oneOf": [ { - "$ref": "#/components/schemas/IRefereeModel" + "nullable": true }, { - "nullable": true + "$ref": "#/components/schemas/IRankingConfigModel" } - ], - "description": "The referee configuration. If not provided, inherits from the previous revision.\n Must be provided together with Workflow if either is specified." + ] }, - "datasetId": { + "context": { "type": "string", - "description": "The dataset id. If not provided, inherits from the previous revision.", "nullable": true }, - "featureFlags": { + "contextAsset": { "oneOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } + "nullable": true }, { + "$ref": "#/components/schemas/IAssetInput" + } + ] + }, + "metadata": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Metadata_IOrderMetadataInput" + }, "nullable": true } ], - "description": "The feature flags. If not provided, inherits from the previous revision." + "deprecated": true }, - "aggregatorType": { + "featureFlags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } + } + } + }, + "IOrderWorkflowModelSimpleWorkflowModel": { + "required": [ + "blueprint", + "_t" + ], + "properties": { + "_t": { "enum": [ - "NonCommittal", - "MajorityVote", - "SimpleMatchup", - "LocateCluster", - "Classification", - "Locate", - "BoundingBox", - "Line", - "Transcription", - "SinglePointLocate", - "FreeText", - "Scrub", - "Ranking", - "MultiRanking", - null + "SimpleWorkflow" ], - "description": "The aggregator type. If not provided, inherits from the previous revision." + "type": "string" + }, + "blueprint": { + "$ref": "#/components/schemas/IRapidBlueprint" + }, + "batchSize": { + "type": "integer", + "format": "int32" + }, + "featureFlags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } + } + } + }, + "IPairMakerConfigModel": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IPairMakerConfigModelOnlinePairMakerConfigModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "OnlinePairMaker": "#/components/schemas/IPairMakerConfigModelOnlinePairMakerConfigModel" + } + } + }, + "IPairMakerConfigModelOnlinePairMakerConfigModel": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "OnlinePairMaker" + ], + "type": "string" + }, + "randomMatchesRatio": { + "type": "number", + "format": "float" + }, + "totalComparisonBudget": { + "type": "integer", + "format": "int32" + } + } + }, + "IPipelineArtifactModel": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IPipelineArtifactModelCreateDatasetArtifactModel" } - }, - "description": "The input for the create job revision endpoint." + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "CreateDatasetArtifactModel": "#/components/schemas/IPipelineArtifactModelCreateDatasetArtifactModel" + } + } }, - "CreateJobRevisionEndpoint_Output": { + "IPipelineArtifactModelCreateDatasetArtifactModel": { "required": [ - "revisionNumber", - "pipelineId" + "identifier", + "dataset", + "_t" ], - "type": "object", "properties": { - "revisionNumber": { - "type": "integer", - "description": "The revision number of the created job revision.", - "format": "int32" + "_t": { + "enum": [ + "CreateDatasetArtifactModel" + ], + "type": "string" }, - "pipelineId": { - "type": "string", - "description": "The id of the created preview pipeline." + "identifier": { + "type": "string" + }, + "dataset": { + "$ref": "#/components/schemas/IDatasetModel" } - }, - "description": "The result when a job revision has been created." + } }, - "CreateOrderEndpoint_Output": { + "IPipelineModel": { "required": [ - "orderId", - "pipelineId" + "_t" ], "type": "object", - "properties": { - "datasetId": { - "type": "string", - "description": "The dataset ID of the created order.", - "nullable": true - }, - "orderId": { - "type": "string", - "description": "The ID of the created order." - }, - "campaignId": { - "type": "string", - "description": "The campaign ID of the created order.", - "nullable": true - }, - "pipelineId": { - "type": "string", - "description": "The pipeline ID of the created order." + "oneOf": [ + { + "$ref": "#/components/schemas/IPipelineModelCreateSimplePipelineModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "CreateSimplePipelineModel": "#/components/schemas/IPipelineModelCreateSimplePipelineModel" } } }, - "CreateOrderModel": { + "IPipelineModelCreateSimplePipelineModel": { "required": [ - "orderName", - "workflow", - "referee" + "artifacts", + "pipelineSteps", + "namePrefix", + "_t" ], - "type": "object", "properties": { - "orderName": { - "type": "string", - "description": "The name is used as an identifier for an order and can be freely chosen." - }, - "workflow": { - "allOf": [ - { - "$ref": "#/components/schemas/IOrderWorkflowModel" - } - ], - "description": "The workflow helps to determine the tasks that need to be completed by the users." - }, - "referee": { - "allOf": [ - { - "$ref": "#/components/schemas/IRefereeModel" - } - ], - "description": "The referee is used to determine how many votes will be collected." - }, - "aggregator": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/AggregatorType" - } - ] - }, - "featureFlags": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - }, - "nullable": true - } + "_t": { + "enum": [ + "CreateSimplePipelineModel" ], - "description": "The feature flags are used to enable or disable certain features." + "type": "string" }, - "priority": { - "type": "integer", - "description": "The priority is used to prioritize over other orders.", - "format": "int32" + "artifacts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IPipelineArtifactModel" + } }, - "stickyState": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/StickyState" - } - ] + "pipelineSteps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IPipelineStepModel" + } }, - "stickyConfig": { - "allOf": [ - { - "$ref": "#/components/schemas/StickyConfig" - } - ], - "description": "Configuration for sticky campaign behavior. Takes precedence over StickyState if both are provided." + "namePrefix": { + "type": "string" + } + } + }, + "IPipelineStepModel": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IPipelineStepModelDatasetEvaluationStepModel" }, - "userScoreDimensions": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - ], - "description": "The user score dimensions are used to determine the score of the responses from the user." + { + "$ref": "#/components/schemas/IPipelineStepModelSendCompletionMailStepModel" }, - "demographicKeys": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - ], - "description": "The demographic keys are used to determine which demographics to store on the responses from the user." + { + "$ref": "#/components/schemas/IPipelineStepModelWorkflowAggregationStepModel" }, - "userFilters": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/IUserFilterModel" - }, - "nullable": true - } + { + "$ref": "#/components/schemas/IPipelineStepModelWorkflowLabelingStepModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "DatasetEvaluationStepModel": "#/components/schemas/IPipelineStepModelDatasetEvaluationStepModel", + "SendCompletionMailStepModel": "#/components/schemas/IPipelineStepModelSendCompletionMailStepModel", + "WorkflowAggregationStepModel": "#/components/schemas/IPipelineStepModelWorkflowAggregationStepModel", + "WorkflowLabelingStepModel": "#/components/schemas/IPipelineStepModelWorkflowLabelingStepModel" + } + } + }, + "IPipelineStepModelDatasetEvaluationStepModel": { + "required": [ + "datasetArtifactId", + "aggregationResultFileArtifactId", + "evaluationResultFileArtifactId", + "receiver", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "DatasetEvaluationStepModel" ], - "description": "The user filters are used to restrict the order to only collect votes from a specific demographic." - }, - "validationSetId": { - "type": "string", - "description": "The validation set id can be changed to point to a specific validation set. if not provided a sane default will be\n used.", - "nullable": true + "type": "string" }, - "selections": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ISelection" - }, - "nullable": true - } - ], - "description": "The selections are used to determine which tasks are shown to a user." + "datasetArtifactId": { + "type": "string" }, - "retrievalMode": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/RetrievalMode" - } - ] + "aggregationResultFileArtifactId": { + "type": "string" }, - "maxIterations": { - "type": "integer", - "description": "The maximum number of times a user is allowed to see the same rapid.", - "format": "int32" + "evaluationResultFileArtifactId": { + "type": "string" }, - "precedingOrderId": { - "type": "string", - "description": "Optional ID of the order that must complete before this order starts processing.", - "nullable": true + "receiver": { + "type": "string" } - }, - "description": "This model is used to create a simple order" + } }, - "CreateUnsupportedOrderEndpoint_Input": { + "IPipelineStepModelSendCompletionMailStepModel": { "required": [ - "orderName", - "dataType", - "labelType" + "receiver", + "resultsFileArtifactIdentifier", + "_t" ], - "type": "object", "properties": { - "orderName": { - "type": "string", - "description": "The name of the order." + "_t": { + "enum": [ + "SendCompletionMailStepModel" + ], + "type": "string" }, - "dataType": { - "type": "string", - "description": "The type of data that was attempted to be ordered." + "receiver": { + "type": "string" }, - "labelType": { - "type": "string", - "description": "The type of labels that were attempted to be ordered." + "resultsFileArtifactIdentifier": { + "type": "string" } } }, - "DefinitionType": { - "enum": [ - "Unknown", - "Classify", - "Compare", - "BoundingBox", - "Line", - "Polygon", - "Locate", - "Transcription", - "NamedEntity", - "FreeText", - "Scrub", - "Ranking", - "GroupedRanking", - "Evaluation" + "IPipelineStepModelWorkflowAggregationStepModel": { + "required": [ + "campaignArtifactId", + "workflowArtifactId", + "fileArtifactId", + "_t" ], - "description": "The type of the job definition." - }, - "EloConfigModel": { - "type": "object", "properties": { - "startingElo": { - "type": "integer", - "format": "int32" + "_t": { + "enum": [ + "WorkflowAggregationStepModel" + ], + "type": "string" }, - "kFactor": { - "type": "integer", - "format": "int32" + "campaignArtifactId": { + "type": "string" }, - "scalingFactor": { - "type": "integer", - "format": "int32" + "workflowArtifactId": { + "type": "string" + }, + "fileArtifactId": { + "type": "string" + }, + "aggregatorType": { + "$ref": "#/components/schemas/AggregatorType" } } }, - "FeedbackModel": { + "IPipelineStepModelWorkflowLabelingStepModel": { "required": [ - "feedback" + "workflowArtifactId", + "_t" ], - "type": "object", "properties": { - "feedback": { - "type": "string", - "description": "The feedback" - }, - "email": { - "type": "string", - "description": "The email of the user submitting the feedback", - "nullable": true + "_t": { + "enum": [ + "WorkflowLabelingStepModel" + ], + "type": "string" }, - "token": { - "type": "string", - "description": "The recaptcha token of the user submitting the feedback", - "nullable": true + "workflowArtifactId": { + "type": "string" } - }, - "description": "The model for submitting feedback." + } }, - "GetJobByIdEndpoint_Output": { + "IRankingConfigModel": { "required": [ - "jobId", - "name", - "definitionId", - "audienceId", - "revisionNumber", - "pipelineId", - "status", - "createdAt", - "ownerId", - "ownerMail" + "_t" ], "type": "object", - "properties": { - "jobId": { - "type": "string", - "description": "The job id." - }, - "name": { - "type": "string", - "description": "The job name." - }, - "definitionId": { - "type": "string", - "description": "The job definition id." + "oneOf": [ + { + "$ref": "#/components/schemas/IRankingConfigModelBradleyTerryRankingConfigModel" }, - "audienceId": { - "type": "string", - "description": "The audience id." + { + "$ref": "#/components/schemas/IRankingConfigModelEloConfigModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "BradleyTerryRankingConfig": "#/components/schemas/IRankingConfigModelBradleyTerryRankingConfigModel", + "EloConfig": "#/components/schemas/IRankingConfigModelEloConfigModel" + } + } + }, + "IRankingConfigModelBradleyTerryRankingConfigModel": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "BradleyTerryRankingConfig" + ], + "type": "string" }, - "revisionNumber": { + "startingScore": { "type": "integer", - "description": "The revision number.", "format": "int32" - }, - "pipelineId": { - "type": "string", - "description": "The pipeline id." - }, - "status": { - "type": "string", - "description": "The job status." - }, - "completedAt": { - "type": "string", - "description": "The timestamp when the job was completed.", - "format": "date-time", - "nullable": true - }, - "resultFileName": { - "type": "string", - "description": "The file name of the result.", - "nullable": true - }, - "failedAt": { - "type": "string", - "description": "The timestamp when the job failed.", - "format": "date-time", - "nullable": true - }, - "failureMessage": { - "type": "string", - "description": "The failure message.", - "nullable": true - }, - "createdAt": { - "type": "string", - "description": "The creation timestamp.", - "format": "date-time" - }, - "ownerId": { - "type": "string", - "description": "The owner id.", - "format": "uuid" - }, - "ownerMail": { - "type": "string", - "description": "The owner email." } - }, - "description": "The result when a job has been retrieved." + } }, - "GetJobDefinitionByIdEndpoint_Output": { + "IRankingConfigModelEloConfigModel": { "required": [ - "definitionId", - "name", - "definitionType", - "createdAt" + "_t" ], - "type": "object", "properties": { - "definitionId": { - "type": "string", - "description": "The job definition id." - }, - "name": { - "type": "string", - "description": "The name of the job definition." + "_t": { + "enum": [ + "EloConfig" + ], + "type": "string" }, - "definitionType": { - "$ref": "#/components/schemas/DefinitionType" + "startingElo": { + "type": "integer", + "format": "int32" }, - "createdAt": { - "type": "string", - "description": "The creation timestamp.", - "format": "date-time" + "kFactor": { + "type": "integer", + "format": "int32" + }, + "scalingFactor": { + "type": "integer", + "format": "int32" } - }, - "description": "The result when a job definition has been retrieved." + } }, - "GetJobRevisionEndpoint_Output": { + "IRapidBlueprint": { "required": [ - "definitionId", - "revisionNumber", - "state", - "pipelineId", - "datasetId", - "workflow", - "referee", - "featureFlags", - "createdAt", - "createdById", - "createdByMail" + "_t" ], "type": "object", - "properties": { - "definitionId": { - "type": "string", - "description": "The job definition id." + "oneOf": [ + { + "$ref": "#/components/schemas/IRapidBlueprintTranscriptionRapidBlueprint" }, - "revisionNumber": { - "type": "integer", - "description": "The revision number.", - "format": "int32" + { + "$ref": "#/components/schemas/IRapidBlueprintScrubRapidBlueprint" }, - "state": { - "$ref": "#/components/schemas/JobDefinitionRevisionState" + { + "$ref": "#/components/schemas/IRapidBlueprintPolygonRapidBlueprint" }, - "pipelineId": { - "type": "string", - "description": "The pipeline id." + { + "$ref": "#/components/schemas/IRapidBlueprintNamedEntityRapidBlueprint" }, - "datasetId": { - "type": "string", - "description": "The dataset id." + { + "$ref": "#/components/schemas/IRapidBlueprintLocateRapidBlueprint" }, - "aggregatorType": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/AggregatorType" - } - ] + { + "$ref": "#/components/schemas/IRapidBlueprintLineRapidBlueprint" }, - "workflow": { - "allOf": [ - { - "$ref": "#/components/schemas/IOrderWorkflowModel" - } - ], - "description": "The workflow configuration. Can be used directly to create a new revision." + { + "$ref": "#/components/schemas/IRapidBlueprintFreeTextRapidBlueprint" }, - "referee": { - "allOf": [ - { - "$ref": "#/components/schemas/IRefereeModel" - } + { + "$ref": "#/components/schemas/IRapidBlueprintCompareRapidBlueprint" + }, + { + "$ref": "#/components/schemas/IRapidBlueprintAttachCategoryRapidBlueprint" + }, + { + "$ref": "#/components/schemas/IRapidBlueprintBoundingBoxRapidBlueprint" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "TranscriptionBlueprint": "#/components/schemas/IRapidBlueprintTranscriptionRapidBlueprint", + "ScrubBlueprint": "#/components/schemas/IRapidBlueprintScrubRapidBlueprint", + "PolygonBlueprint": "#/components/schemas/IRapidBlueprintPolygonRapidBlueprint", + "NamedEntityBlueprint": "#/components/schemas/IRapidBlueprintNamedEntityRapidBlueprint", + "LocateBlueprint": "#/components/schemas/IRapidBlueprintLocateRapidBlueprint", + "LineBlueprint": "#/components/schemas/IRapidBlueprintLineRapidBlueprint", + "FreeTextBlueprint": "#/components/schemas/IRapidBlueprintFreeTextRapidBlueprint", + "CompareBlueprint": "#/components/schemas/IRapidBlueprintCompareRapidBlueprint", + "ClassifyBlueprint": "#/components/schemas/IRapidBlueprintAttachCategoryRapidBlueprint", + "BoundingBoxBlueprint": "#/components/schemas/IRapidBlueprintBoundingBoxRapidBlueprint" + } + } + }, + "IRapidBlueprintAttachCategoryRapidBlueprint": { + "required": [ + "title", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "ClassifyBlueprint" ], - "description": "The referee configuration. Can be used directly to create a new revision." + "type": "string" }, - "featureFlags": { + "possibleCategories": { "allOf": [ { "type": "array", "items": { - "$ref": "#/components/schemas/FeatureFlag" + "type": "string" } } ], - "description": "The feature flags." + "deprecated": true }, - "createdAt": { - "type": "string", - "description": "The creation timestamp.", - "format": "date-time" + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AttachCategoryRapidBlueprint_Category" + } }, - "createdById": { - "type": "string", - "description": "The id of the user who created the revision.", - "format": "uuid" + "title": { + "type": "string" + } + } + }, + "IRapidBlueprintBoundingBoxRapidBlueprint": { + "required": [ + "target", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "BoundingBoxBlueprint" + ], + "type": "string" }, - "createdByMail": { - "type": "string", - "description": "The email of the user who created the revision." + "target": { + "type": "string" } - }, - "description": "The result when a job revision has been retrieved." + } }, - "GetOrderByIdEndpoint_Output": { + "IRapidBlueprintCompareRapidBlueprint": { "required": [ - "orderName", - "customerMail", - "orderDate", - "state", - "pipelineId", - "isLocked", - "isPublic" + "criteria", + "_t" ], - "type": "object", "properties": { - "orderName": { - "type": "string", - "description": "The name of the order." + "_t": { + "enum": [ + "CompareBlueprint" + ], + "type": "string" }, - "customerMail": { - "type": "string", - "description": "The email of the customer who placed the order." + "criteria": { + "type": "string" }, - "orderDate": { - "type": "string", - "description": "The date the order was placed.", - "format": "date-time" + "indexIdentifiers": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "IRapidBlueprintFreeTextRapidBlueprint": { + "required": [ + "question", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "FreeTextBlueprint" + ], + "type": "string" }, - "state": { - "type": "string", - "description": "The current state of the order." + "question": { + "type": "string" }, - "pipelineId": { + "shouldValidateResponse": { + "type": "boolean" + }, + "validationSystemPrompt": { "type": "string", - "description": "The ID of the pipeline associated with the order." + "nullable": true + } + } + }, + "IRapidBlueprintLineRapidBlueprint": { + "required": [ + "target", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "LineBlueprint" + ], + "type": "string" }, - "isLocked": { - "type": "boolean", - "description": "Whether the order is locked." + "target": { + "type": "string" + } + } + }, + "IRapidBlueprintLocateRapidBlueprint": { + "required": [ + "target", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "LocateBlueprint" + ], + "type": "string" + }, + "target": { + "type": "string" + } + } + }, + "IRapidBlueprintNamedEntityRapidBlueprint": { + "required": [ + "target", + "classes", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "NamedEntityBlueprint" + ], + "type": "string" }, - "isPublic": { - "type": "boolean", - "description": "Whether the order is publicly visible." + "target": { + "type": "string" }, - "failureMessage": { - "type": "string", - "description": "The failure message if the order failed.", - "nullable": true + "classes": { + "type": "array", + "items": { + "type": "string" + } } } }, - "GetPublicOrdersEndpoint_OrderOutput": { + "IRapidBlueprintPolygonRapidBlueprint": { "required": [ - "id", - "name", - "isPublic" + "target", + "_t" ], - "type": "object", "properties": { - "id": { + "_t": { + "enum": [ + "PolygonBlueprint" + ], "type": "string" }, - "name": { + "target": { + "type": "string" + } + } + }, + "IRapidBlueprintScrubRapidBlueprint": { + "required": [ + "target", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "ScrubBlueprint" + ], "type": "string" }, - "isPublic": { - "type": "boolean" + "target": { + "type": "string" } } }, - "GetPublicOrdersEndpoint_Output": { + "IRapidBlueprintTranscriptionRapidBlueprint": { "required": [ - "orders" + "title", + "_t" ], - "type": "object", "properties": { - "orders": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetPublicOrdersEndpoint_OrderOutput" - } - } + "_t": { + "enum": [ + "TranscriptionBlueprint" ], - "description": "The list of publicly available orders." + "type": "string" + }, + "title": { + "type": "string" } } }, - "IDatasetModel": { + "IRefereeModel": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IDatasetModelCloneDatasetModel" + "$ref": "#/components/schemas/IRefereeModelBudgetRefereeModel" + }, + { + "$ref": "#/components/schemas/IRefereeModelEarlyStoppingRefereeModel" + }, + { + "$ref": "#/components/schemas/IRefereeModelNaiveRefereeModel" + }, + { + "$ref": "#/components/schemas/IRefereeModelQuorumRefereeModel" } ], "discriminator": { "propertyName": "_t", "mapping": { - "CloneDatasetModel": "#/components/schemas/IDatasetModelCloneDatasetModel" + "BudgetReferee": "#/components/schemas/IRefereeModelBudgetRefereeModel", + "EarlyStoppingReferee": "#/components/schemas/IRefereeModelEarlyStoppingRefereeModel", + "NaiveReferee": "#/components/schemas/IRefereeModelNaiveRefereeModel", + "QuorumReferee": "#/components/schemas/IRefereeModelQuorumRefereeModel" } } }, - "IDatasetModelCloneDatasetModel": { + "IRefereeModelBudgetRefereeModel": { "required": [ - "datasetToCloneId", - "datasetName", + "totalBudget", "_t" ], "properties": { "_t": { "enum": [ - "CloneDatasetModel" + "BudgetReferee" ], "type": "string" }, - "datasetToCloneId": { + "totalBudget": { + "type": "integer", + "format": "int32" + } + } + }, + "IRefereeModelEarlyStoppingRefereeModel": { + "required": [ + "maxVotes", + "threshold", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "EarlyStoppingReferee" + ], "type": "string" }, - "datasetName": { + "maxVotes": { + "type": "integer", + "format": "int32" + }, + "threshold": { + "type": "number", + "format": "double" + } + } + }, + "IRefereeModelNaiveRefereeModel": { + "required": [ + "totalVotes", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "NaiveReferee" + ], "type": "string" + }, + "totalVotes": { + "type": "integer", + "format": "int32" } } }, - "IOrderWorkflowModel": { + "IRefereeModelQuorumRefereeModel": { + "required": [ + "maxVotes", + "threshold", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "QuorumReferee" + ], + "type": "string" + }, + "maxVotes": { + "type": "integer", + "format": "int32" + }, + "threshold": { + "type": "integer", + "format": "int32" + } + } + }, + "ISelection": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IOrderWorkflowModelEvaluationWorkflowModel" + "$ref": "#/components/schemas/ISelectionAbTestSelection" }, { - "$ref": "#/components/schemas/IOrderWorkflowModelGroupedRankingWorkflowModel" + "$ref": "#/components/schemas/ISelectionCappedSelection" }, { - "$ref": "#/components/schemas/IOrderWorkflowModelRankingWorkflowModel" + "$ref": "#/components/schemas/ISelectionConditionalValidationSelection" }, { - "$ref": "#/components/schemas/IOrderWorkflowModelSimpleWorkflowModel" + "$ref": "#/components/schemas/ISelectionDemographicSelection" + }, + { + "$ref": "#/components/schemas/ISelectionEffortCappedSelection" + }, + { + "$ref": "#/components/schemas/ISelectionLabelingSelection" + }, + { + "$ref": "#/components/schemas/ISelectionShufflingSelection" + }, + { + "$ref": "#/components/schemas/ISelectionStaticSelection" + }, + { + "$ref": "#/components/schemas/ISelectionValidationSelection" } ], "discriminator": { "propertyName": "_t", "mapping": { - "EvaluationWorkflow": "#/components/schemas/IOrderWorkflowModelEvaluationWorkflowModel", - "GroupedRankingWorkflow": "#/components/schemas/IOrderWorkflowModelGroupedRankingWorkflowModel", - "RankingWorkflow": "#/components/schemas/IOrderWorkflowModelRankingWorkflowModel", - "SimpleWorkflow": "#/components/schemas/IOrderWorkflowModelSimpleWorkflowModel" + "AbTestSelection": "#/components/schemas/ISelectionAbTestSelection", + "CappedSelection": "#/components/schemas/ISelectionCappedSelection", + "ConditionalValidationSelection": "#/components/schemas/ISelectionConditionalValidationSelection", + "DemographicSelection": "#/components/schemas/ISelectionDemographicSelection", + "EffortCappedSelection": "#/components/schemas/ISelectionEffortCappedSelection", + "LabelingSelection": "#/components/schemas/ISelectionLabelingSelection", + "ShufflingSelection": "#/components/schemas/ISelectionShufflingSelection", + "StaticSelection": "#/components/schemas/ISelectionStaticSelection", + "ValidationSelection": "#/components/schemas/ISelectionValidationSelection" + } + } + }, + "ISelectionAbTestSelection": { + "required": [ + "a", + "b", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "AbTestSelection" + ], + "type": "string" + }, + "a": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ISelection" + } + }, + "b": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ISelection" + } + } + } + }, + "ISelectionCappedSelection": { + "required": [ + "selections", + "maxRapids", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "CappedSelection" + ], + "type": "string" + }, + "selections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ISelection" + } + }, + "maxRapids": { + "type": "integer", + "format": "int32" } } }, - "IOrderWorkflowModelEvaluationWorkflowModel": { + "ISelectionConditionalValidationSelection": { "required": [ "validationSetId", - "shouldAcceptIncorrect", + "validationChances", "_t" ], "properties": { "_t": { "enum": [ - "EvaluationWorkflow" + "ConditionalValidationSelection" ], "type": "string" }, "validationSetId": { "type": "string" }, - "shouldAcceptIncorrect": { - "type": "boolean" + "validationChances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionalValidationSelection_ValidationChance" + } }, - "featureFlags": { + "dimensions": { "type": "array", "items": { - "$ref": "#/components/schemas/FeatureFlag" + "type": "string" } } } }, - "IOrderWorkflowModelGroupedRankingWorkflowModel": { + "ISelectionDemographicSelection": { "required": [ - "criteria", + "keys", "_t" ], "properties": { "_t": { "enum": [ - "GroupedRankingWorkflow" + "DemographicSelection" ], "type": "string" }, - "criteria": { - "type": "string" - }, - "pairMakerConfig": { - "$ref": "#/components/schemas/IPairMakerConfigModel" - }, - "eloConfig": { - "allOf": [ - { - "$ref": "#/components/schemas/EloConfigModel" - } - ], - "deprecated": true - }, - "rankingConfig": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IRankingConfigModel" - } - ] - }, - "contexts": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "nullable": true - }, - "contextAssets": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IAssetInput" - }, - "nullable": true - }, - "featureFlags": { + "keys": { "type": "array", "items": { - "$ref": "#/components/schemas/FeatureFlag" + "type": "string" } }, - "maxParallelism": { + "maxRapids": { "type": "integer", "format": "int32" } } }, - "IOrderWorkflowModelRankingWorkflowModel": { + "ISelectionEffortCappedSelection": { "required": [ - "criteria", + "effortBudget", "_t" ], "properties": { "_t": { "enum": [ - "RankingWorkflow" + "EffortCappedSelection" ], "type": "string" }, - "criteria": { - "type": "string" + "effortBudget": { + "type": "integer", + "format": "int32" }, - "pairMakerConfig": { - "$ref": "#/components/schemas/IPairMakerConfigModel" + "retrievalMode": { + "$ref": "#/components/schemas/RetrievalMode" }, - "eloConfig": { - "allOf": [ - { - "$ref": "#/components/schemas/EloConfigModel" - } + "maxIterations": { + "type": "integer", + "format": "int32" + } + } + }, + "ISelectionLabelingSelection": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "LabelingSelection" ], - "deprecated": true - }, - "rankingConfig": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IRankingConfigModel" - } - ] + "type": "string" }, - "context": { - "type": "string", - "nullable": true + "amount": { + "type": "integer", + "format": "int32" }, - "contextAsset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAssetInput" - } - ] + "effortBudget": { + "type": "integer", + "format": "int32" }, - "metadata": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/Metadata_IOrderMetadataInput" - }, - "nullable": true - } - ], - "deprecated": true + "retrievalMode": { + "$ref": "#/components/schemas/RetrievalMode" }, - "featureFlags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } + "maxIterations": { + "type": "integer", + "format": "int32" } } }, - "IOrderWorkflowModelSimpleWorkflowModel": { + "ISelectionShufflingSelection": { "required": [ - "blueprint", + "selections", "_t" ], "properties": { "_t": { "enum": [ - "SimpleWorkflow" + "ShufflingSelection" ], "type": "string" }, - "blueprint": { - "$ref": "#/components/schemas/IRapidBlueprint" - }, - "batchSize": { - "type": "integer", - "format": "int32" - }, - "featureFlags": { + "selections": { "type": "array", "items": { - "$ref": "#/components/schemas/FeatureFlag" + "$ref": "#/components/schemas/ISelection" } } } }, - "IPairMakerConfigModel": { + "ISelectionStaticSelection": { "required": [ + "rapidIds", "_t" ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IPairMakerConfigModelOnlinePairMakerConfigModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "OnlinePairMaker": "#/components/schemas/IPairMakerConfigModelOnlinePairMakerConfigModel" + "properties": { + "_t": { + "enum": [ + "StaticSelection" + ], + "type": "string" + }, + "rapidIds": { + "type": "array", + "items": { + "type": "string" + } } } }, - "IPairMakerConfigModelOnlinePairMakerConfigModel": { + "ISelectionValidationSelection": { "required": [ + "amount", + "validationSetId", "_t" ], "properties": { "_t": { "enum": [ - "OnlinePairMaker" + "ValidationSelection" ], "type": "string" }, - "randomMatchesRatio": { - "type": "number", - "format": "float" - }, - "totalComparisonBudget": { + "amount": { "type": "integer", "format": "int32" + }, + "validationSetId": { + "type": "string" } } }, - "IPipelineArtifactModel": { + "JobDefinitionRevisionState": { + "enum": [ + "Pending", + "Completed", + "Failed" + ], + "description": "The state of the revision." + }, + "Metadata_IOrderMetadataInput": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IPipelineArtifactModelCreateDatasetArtifactModel" + "$ref": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_PromptMetadataInput" + }, + { + "$ref": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_PromptAssetMetadataInput" + }, + { + "$ref": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_TranscriptionMetadataInput" } ], "discriminator": { "propertyName": "_t", "mapping": { - "CreateDatasetArtifactModel": "#/components/schemas/IPipelineArtifactModelCreateDatasetArtifactModel" + "PromptMetadataInput": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_PromptMetadataInput", + "PromptAssetMetadataInput": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_PromptAssetMetadataInput", + "TranscriptionMetadataInput": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_TranscriptionMetadataInput" } } }, - "IPipelineArtifactModelCreateDatasetArtifactModel": { + "Metadata_IOrderMetadataInputMetadata_PromptAssetMetadataInput": { "required": [ - "identifier", - "dataset", + "asset", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "PromptAssetMetadataInput" + ], + "type": "string" + }, + "asset": { + "$ref": "#/components/schemas/IAssetInput" + } + } + }, + "Metadata_IOrderMetadataInputMetadata_PromptMetadataInput": { + "required": [ + "prompt", "_t" ], "properties": { "_t": { "enum": [ - "CreateDatasetArtifactModel" + "PromptMetadataInput" ], "type": "string" }, - "identifier": { + "prompt": { "type": "string" - }, - "dataset": { - "$ref": "#/components/schemas/IDatasetModel" } } }, - "IPipelineModel": { + "Metadata_IOrderMetadataInputMetadata_TranscriptionMetadataInput": { "required": [ + "transcription", "_t" ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IPipelineModelCreateSimplePipelineModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "CreateSimplePipelineModel": "#/components/schemas/IPipelineModelCreateSimplePipelineModel" + "properties": { + "_t": { + "enum": [ + "TranscriptionMetadataInput" + ], + "type": "string" + }, + "transcription": { + "type": "string" } } }, - "IPipelineModelCreateSimplePipelineModel": { + "OrderState": { + "enum": [ + "Created", + "Preview", + "Submitted", + "ManualReview", + "Queued", + "Processing", + "Paused", + "Completed", + "Cancelled", + "Failed", + "StaleResults" + ], + "description": "The current state of the order." + }, + "PagedResultOfQueryJobDefinitionsResult": { "required": [ - "artifacts", - "pipelineSteps", - "namePrefix", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CreateSimplePipelineModel" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "artifacts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IPipelineArtifactModel" - } + "page": { + "type": "integer", + "format": "int32" }, - "pipelineSteps": { + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/IPipelineStepModel" + "$ref": "#/components/schemas/QueryJobDefinitionsResult" } }, - "namePrefix": { - "type": "string" + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IPipelineStepModel": { + "PagedResultOfQueryJobRevisionsResult": { "required": [ - "_t" + "total", + "page", + "pageSize", + "items" ], "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IPipelineStepModelDatasetEvaluationStepModel" + "properties": { + "total": { + "type": "integer", + "format": "int64" }, - { - "$ref": "#/components/schemas/IPipelineStepModelSendCompletionMailStepModel" + "page": { + "type": "integer", + "format": "int32" }, - { - "$ref": "#/components/schemas/IPipelineStepModelWorkflowAggregationStepModel" + "pageSize": { + "type": "integer", + "format": "int32" }, - { - "$ref": "#/components/schemas/IPipelineStepModelWorkflowLabelingStepModel" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryJobRevisionsResult" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "DatasetEvaluationStepModel": "#/components/schemas/IPipelineStepModelDatasetEvaluationStepModel", - "SendCompletionMailStepModel": "#/components/schemas/IPipelineStepModelSendCompletionMailStepModel", - "WorkflowAggregationStepModel": "#/components/schemas/IPipelineStepModelWorkflowAggregationStepModel", - "WorkflowLabelingStepModel": "#/components/schemas/IPipelineStepModelWorkflowLabelingStepModel" + } + }, + "PreviewOrderEndpoint_Input": { + "type": "object", + "properties": { + "ignoreFailedDatapoints": { + "type": "boolean", + "description": "Whether the order should proceed even if certain datapoints failed.", + "nullable": true } } }, - "IPipelineStepModelDatasetEvaluationStepModel": { + "QueryAggregatedOrdersEndpoint_Output": { "required": [ - "datasetArtifactId", - "aggregationResultFileArtifactId", - "evaluationResultFileArtifactId", - "receiver", - "_t" + "amount", + "last7Days", + "lastOrderDate", + "lastOrderName", + "lastOrderId", + "customerMail" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "DatasetEvaluationStepModel" - ], - "type": "string" + "amount": { + "type": "integer", + "description": "The total number of orders for this customer.", + "format": "int32" }, - "datasetArtifactId": { - "type": "string" + "last7Days": { + "type": "integer", + "description": "The number of orders placed in the last 7 days.", + "format": "int32" }, - "aggregationResultFileArtifactId": { - "type": "string" + "lastOrderDate": { + "type": "string", + "description": "The date of the most recent order.", + "format": "date-time" }, - "evaluationResultFileArtifactId": { - "type": "string" + "lastOrderName": { + "type": "string", + "description": "The name of the most recent order." }, - "receiver": { - "type": "string" + "lastOrderId": { + "type": "string", + "description": "The ID of the most recent order." + }, + "customerMail": { + "type": "string", + "description": "The customer's email address." } } }, - "IPipelineStepModelSendCompletionMailStepModel": { + "QueryAggregatedOrdersEndpoint_PagedResultOfOutput": { "required": [ - "receiver", - "resultsFileArtifactIdentifier", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "SendCompletionMailStepModel" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "receiver": { - "type": "string" + "page": { + "type": "integer", + "format": "int32" }, - "resultsFileArtifactIdentifier": { - "type": "string" + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryAggregatedOrdersEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IPipelineStepModelWorkflowAggregationStepModel": { + "QueryJobDefinitionsResult": { "required": [ - "campaignArtifactId", - "workflowArtifactId", - "fileArtifactId", - "_t" + "definitionId", + "name", + "definitionType", + "createdAt", + "revisionCount", + "ownerId", + "ownerMail" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "WorkflowAggregationStepModel" - ], + "definitionId": { "type": "string" }, - "campaignArtifactId": { + "name": { "type": "string" }, - "workflowArtifactId": { - "type": "string" + "definitionType": { + "$ref": "#/components/schemas/DefinitionType" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "revisionCount": { + "type": "integer", + "format": "int32" }, - "fileArtifactId": { - "type": "string" + "ownerId": { + "type": "string", + "format": "uuid" }, - "aggregatorType": { - "$ref": "#/components/schemas/AggregatorType" + "ownerMail": { + "type": "string" } } }, - "IPipelineStepModelWorkflowLabelingStepModel": { + "QueryJobRevisionsResult": { "required": [ - "workflowArtifactId", - "_t" + "definitionId", + "revisionNumber", + "createdAt", + "state" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "WorkflowLabelingStepModel" - ], + "definitionId": { "type": "string" }, - "workflowArtifactId": { - "type": "string" - } - } - }, - "IRankingConfigModel": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IRankingConfigModelBradleyTerryRankingConfigModel" + "revisionNumber": { + "type": "integer", + "format": "int32" }, - { - "$ref": "#/components/schemas/IRankingConfigModelEloConfigModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "BradleyTerryRankingConfig": "#/components/schemas/IRankingConfigModelBradleyTerryRankingConfigModel", - "EloConfig": "#/components/schemas/IRankingConfigModelEloConfigModel" + "createdAt": { + "type": "string", + "format": "date-time" + }, + "state": { + "$ref": "#/components/schemas/JobDefinitionRevisionState" } } }, - "IRankingConfigModelBradleyTerryRankingConfigModel": { + "QueryOrdersEndpoint_Output": { "required": [ - "_t" + "id", + "pipelineId", + "orderDate", + "customerMail", + "state", + "orderName", + "isPublic" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "BradleyTerryRankingConfig" - ], - "type": "string" + "id": { + "type": "string", + "description": "The unique identifier of the order." }, - "startingScore": { - "type": "integer", - "format": "int32" + "pipelineId": { + "type": "string", + "description": "The ID of the pipeline associated with the order." + }, + "orderDate": { + "type": "string", + "description": "The date the order was placed.", + "format": "date-time", + "nullable": true + }, + "customerMail": { + "type": "string", + "description": "The email of the customer who placed the order." + }, + "state": { + "$ref": "#/components/schemas/OrderState" + }, + "orderName": { + "type": "string", + "description": "The name of the order." + }, + "isPublic": { + "type": "boolean", + "description": "Whether the order is publicly visible." + }, + "failureMessage": { + "type": "string", + "description": "The failure message if the order failed.", + "nullable": true } } }, - "IRankingConfigModelEloConfigModel": { + "QueryOrdersEndpoint_PagedResultOfOutput": { "required": [ - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "EloConfig" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "startingElo": { + "page": { "type": "integer", "format": "int32" }, - "kFactor": { + "pageSize": { "type": "integer", "format": "int32" }, - "scalingFactor": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryOrdersEndpoint_Output" + } + }, + "totalPages": { "type": "integer", "format": "int32" } } }, - "IRapidBlueprint": { - "required": [ - "_t" - ], + "StickyConfig": { "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IRapidBlueprintTranscriptionRapidBlueprint" - }, - { - "$ref": "#/components/schemas/IRapidBlueprintScrubRapidBlueprint" - }, - { - "$ref": "#/components/schemas/IRapidBlueprintPolygonRapidBlueprint" - }, - { - "$ref": "#/components/schemas/IRapidBlueprintNamedEntityRapidBlueprint" - }, - { - "$ref": "#/components/schemas/IRapidBlueprintLocateRapidBlueprint" - }, - { - "$ref": "#/components/schemas/IRapidBlueprintLineRapidBlueprint" + "properties": { + "isEnabled": { + "type": "boolean" }, - { - "$ref": "#/components/schemas/IRapidBlueprintFreeTextRapidBlueprint" + "bypassFilters": { + "type": "boolean" }, - { - "$ref": "#/components/schemas/IRapidBlueprintCompareRapidBlueprint" + "bypassPrioritySelection": { + "type": "boolean" }, - { - "$ref": "#/components/schemas/IRapidBlueprintAttachCategoryRapidBlueprint" + "blockOtherStickyCampaigns": { + "type": "boolean" }, - { - "$ref": "#/components/schemas/IRapidBlueprintBoundingBoxRapidBlueprint" + "clearOnPause": { + "type": "boolean" } + } + }, + "StickyState": { + "enum": [ + "None", + "Temporary", + "Permanent", + "Passive", + null ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "TranscriptionBlueprint": "#/components/schemas/IRapidBlueprintTranscriptionRapidBlueprint", - "ScrubBlueprint": "#/components/schemas/IRapidBlueprintScrubRapidBlueprint", - "PolygonBlueprint": "#/components/schemas/IRapidBlueprintPolygonRapidBlueprint", - "NamedEntityBlueprint": "#/components/schemas/IRapidBlueprintNamedEntityRapidBlueprint", - "LocateBlueprint": "#/components/schemas/IRapidBlueprintLocateRapidBlueprint", - "LineBlueprint": "#/components/schemas/IRapidBlueprintLineRapidBlueprint", - "FreeTextBlueprint": "#/components/schemas/IRapidBlueprintFreeTextRapidBlueprint", - "CompareBlueprint": "#/components/schemas/IRapidBlueprintCompareRapidBlueprint", - "ClassifyBlueprint": "#/components/schemas/IRapidBlueprintAttachCategoryRapidBlueprint", - "BoundingBoxBlueprint": "#/components/schemas/IRapidBlueprintBoundingBoxRapidBlueprint" + "description": "Indicates if the underlying campaign should be sticky.", + "deprecated": true + }, + "SubmitOrderEndpoint_Input": { + "type": "object", + "properties": { + "ignoreFailedDatapoints": { + "type": "boolean", + "description": "Whether the order should proceed even if certain datapoints failed.", + "nullable": true + } + } + }, + "UnlockOrderEndpoint_Output": { + "required": [ + "datasetIds" + ], + "type": "object", + "properties": { + "datasetIds": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The dataset IDs created by unlocking the order." + } + } + }, + "UpdateJobDefinitionEndpoint_Input": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name for the job definition.", + "nullable": true + } + }, + "description": "The input for the update job definition endpoint." + }, + "UpdateJobEndpoint_Input": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name for the job.", + "nullable": true + } + }, + "description": "The input for the update job endpoint." + }, + "UpdateOrderEndpoint_Input": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name of the order, if specified.", + "nullable": true + }, + "precedingOrderId": { + "type": "string", + "description": "The ID of the order that must complete before this order starts processing.\n Set to null to clear an existing preceding order.", + "nullable": true } } }, - "IRapidBlueprintAttachCategoryRapidBlueprint": { - "required": [ - "title", - "_t" - ], + "EloConfig": { + "type": "object", "properties": { - "_t": { - "enum": [ - "ClassifyBlueprint" - ], - "type": "string" + "startingElo": { + "type": "integer", + "format": "int32" }, - "possibleCategories": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "deprecated": true + "startingScore": { + "type": "integer", + "format": "int32" }, - "categories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttachCategoryRapidBlueprint_Category" - } + "kFactor": { + "type": "integer", + "format": "int32" }, - "title": { - "type": "string" + "scalingFactor": { + "type": "integer", + "format": "int32" } } }, - "IRapidBlueprintBoundingBoxRapidBlueprint": { - "required": [ - "target", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "BoundingBoxBlueprint" - ], - "type": "string" - }, - "target": { - "type": "string" - } - } + "FileStreamResult": { + "type": "string", + "format": "binary" }, - "IRapidBlueprintCompareRapidBlueprint": { + "GetPipelineByIdResult": { "required": [ - "criteria", - "_t" + "artifacts", + "featureFlags" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CompareBlueprint" - ], - "type": "string" - }, - "criteria": { - "type": "string" + "artifacts": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IArtifactModel" + } }, - "indexIdentifiers": { + "featureFlags": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/FeatureFlag" } } } }, - "IRapidBlueprintFreeTextRapidBlueprint": { + "IArtifactModel": { "required": [ - "question", "_t" ], - "properties": { - "_t": { - "enum": [ - "FreeTextBlueprint" - ], - "type": "string" + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IArtifactModelCampaignArtifactModel" }, - "question": { - "type": "string" + { + "$ref": "#/components/schemas/IArtifactModelDatasetArtifactModel" }, - "shouldValidateResponse": { - "type": "boolean" + { + "$ref": "#/components/schemas/IArtifactModelFileArtifactModel" }, - "validationSystemPrompt": { - "type": "string", - "nullable": true + { + "$ref": "#/components/schemas/IArtifactModelWorkflowArtifactModel" + }, + { + "$ref": "#/components/schemas/IArtifactModelWorkflowConfigArtifactModel" } - } - }, - "IRapidBlueprintLineRapidBlueprint": { - "required": [ - "target", - "_t" ], - "properties": { - "_t": { - "enum": [ - "LineBlueprint" - ], - "type": "string" - }, - "target": { - "type": "string" + "discriminator": { + "propertyName": "_t", + "mapping": { + "CampaignArtifactModel": "#/components/schemas/IArtifactModelCampaignArtifactModel", + "DatasetArtifactModel": "#/components/schemas/IArtifactModelDatasetArtifactModel", + "FileArtifactModel": "#/components/schemas/IArtifactModelFileArtifactModel", + "WorkflowArtifactModel": "#/components/schemas/IArtifactModelWorkflowArtifactModel", + "WorkflowConfigArtifactModel": "#/components/schemas/IArtifactModelWorkflowConfigArtifactModel" } } }, - "IRapidBlueprintLocateRapidBlueprint": { + "IArtifactModelCampaignArtifactModel": { "required": [ - "target", + "campaignId", + "identifier", "_t" ], "properties": { "_t": { "enum": [ - "LocateBlueprint" + "CampaignArtifactModel" ], "type": "string" }, - "target": { + "campaignId": { + "type": "string" + }, + "identifier": { "type": "string" } } }, - "IRapidBlueprintNamedEntityRapidBlueprint": { + "IArtifactModelDatasetArtifactModel": { "required": [ - "target", - "classes", + "datasetId", + "identifier", "_t" ], "properties": { "_t": { "enum": [ - "NamedEntityBlueprint" + "DatasetArtifactModel" ], "type": "string" }, - "target": { + "datasetId": { "type": "string" }, - "classes": { - "type": "array", - "items": { - "type": "string" - } + "identifier": { + "type": "string" } } }, - "IRapidBlueprintPolygonRapidBlueprint": { + "IArtifactModelFileArtifactModel": { "required": [ - "target", + "fileName", + "identifier", "_t" ], "properties": { "_t": { "enum": [ - "PolygonBlueprint" + "FileArtifactModel" ], "type": "string" }, - "target": { + "fileName": { + "type": "string" + }, + "identifier": { "type": "string" } } }, - "IRapidBlueprintScrubRapidBlueprint": { + "IArtifactModelWorkflowArtifactModel": { "required": [ - "target", + "workflowId", + "identifier", "_t" ], "properties": { "_t": { "enum": [ - "ScrubBlueprint" + "WorkflowArtifactModel" ], "type": "string" }, - "target": { + "workflowId": { + "type": "string" + }, + "identifier": { "type": "string" } } }, - "IRapidBlueprintTranscriptionRapidBlueprint": { + "IArtifactModelWorkflowConfigArtifactModel": { "required": [ - "title", + "workflowConfig", + "identifier", "_t" ], "properties": { "_t": { "enum": [ - "TranscriptionBlueprint" + "WorkflowConfigArtifactModel" ], "type": "string" }, - "title": { + "workflowConfig": { + "$ref": "#/components/schemas/IWorkflowConfig" + }, + "identifier": { "type": "string" } } }, - "IRefereeModel": { + "IAsset": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IRefereeModelBudgetRefereeModel" + "$ref": "#/components/schemas/IAssetFileAsset" }, { - "$ref": "#/components/schemas/IRefereeModelEarlyStoppingRefereeModel" + "$ref": "#/components/schemas/IAssetMultiAsset" }, { - "$ref": "#/components/schemas/IRefereeModelNaiveRefereeModel" + "$ref": "#/components/schemas/IAssetNullAsset" }, { - "$ref": "#/components/schemas/IRefereeModelQuorumRefereeModel" + "$ref": "#/components/schemas/IAssetTextAsset" } ], "discriminator": { "propertyName": "_t", "mapping": { - "BudgetReferee": "#/components/schemas/IRefereeModelBudgetRefereeModel", - "EarlyStoppingReferee": "#/components/schemas/IRefereeModelEarlyStoppingRefereeModel", - "NaiveReferee": "#/components/schemas/IRefereeModelNaiveRefereeModel", - "QuorumReferee": "#/components/schemas/IRefereeModelQuorumRefereeModel" + "FileAsset": "#/components/schemas/IAssetFileAsset", + "MultiAsset": "#/components/schemas/IAssetMultiAsset", + "NullAsset": "#/components/schemas/IAssetNullAsset", + "TextAsset": "#/components/schemas/IAssetTextAsset" } } }, - "IRefereeModelBudgetRefereeModel": { + "IAssetFileAsset": { "required": [ - "totalBudget", + "fileName", + "metadata", "_t" ], "properties": { "_t": { "enum": [ - "BudgetReferee" + "FileAsset" ], "type": "string" }, - "totalBudget": { - "type": "integer", - "format": "int32" + "fileName": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IMetadata" + } } } }, - "IRefereeModelEarlyStoppingRefereeModel": { + "IAssetMultiAsset": { "required": [ - "maxVotes", - "threshold", + "assets", + "metadata", "_t" ], "properties": { "_t": { "enum": [ - "EarlyStoppingReferee" + "MultiAsset" ], "type": "string" }, - "maxVotes": { - "type": "integer", - "format": "int32" + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IAsset" + } }, - "threshold": { - "type": "number", - "format": "double" + "metadata": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IMetadata" + } } } }, - "IRefereeModelNaiveRefereeModel": { + "IAssetNullAsset": { "required": [ - "totalVotes", + "metadata", "_t" ], "properties": { "_t": { "enum": [ - "NaiveReferee" + "NullAsset" ], "type": "string" }, - "totalVotes": { - "type": "integer", - "format": "int32" + "metadata": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IMetadata" + } } } }, - "IRefereeModelQuorumRefereeModel": { + "IAssetTextAsset": { "required": [ - "maxVotes", - "threshold", + "text", + "metadata", "_t" ], "properties": { "_t": { "enum": [ - "QuorumReferee" + "TextAsset" ], "type": "string" }, - "maxVotes": { - "type": "integer", - "format": "int32" + "text": { + "type": "string" }, - "threshold": { - "type": "integer", - "format": "int32" + "metadata": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IMetadata" + } } } }, - "ISelection": { + "IPairMakerConfig": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/ISelectionAbTestSelection" - }, - { - "$ref": "#/components/schemas/ISelectionCappedSelection" - }, - { - "$ref": "#/components/schemas/ISelectionConditionalValidationSelection" - }, - { - "$ref": "#/components/schemas/ISelectionDemographicSelection" - }, - { - "$ref": "#/components/schemas/ISelectionEffortCappedSelection" - }, - { - "$ref": "#/components/schemas/ISelectionLabelingSelection" - }, - { - "$ref": "#/components/schemas/ISelectionShufflingSelection" - }, - { - "$ref": "#/components/schemas/ISelectionStaticSelection" + "$ref": "#/components/schemas/IPairMakerConfigFullPermutationPairMakerConfig" }, { - "$ref": "#/components/schemas/ISelectionValidationSelection" + "$ref": "#/components/schemas/IPairMakerConfigOnlinePairMakerConfig" } ], "discriminator": { "propertyName": "_t", "mapping": { - "AbTestSelection": "#/components/schemas/ISelectionAbTestSelection", - "CappedSelection": "#/components/schemas/ISelectionCappedSelection", - "ConditionalValidationSelection": "#/components/schemas/ISelectionConditionalValidationSelection", - "DemographicSelection": "#/components/schemas/ISelectionDemographicSelection", - "EffortCappedSelection": "#/components/schemas/ISelectionEffortCappedSelection", - "LabelingSelection": "#/components/schemas/ISelectionLabelingSelection", - "ShufflingSelection": "#/components/schemas/ISelectionShufflingSelection", - "StaticSelection": "#/components/schemas/ISelectionStaticSelection", - "ValidationSelection": "#/components/schemas/ISelectionValidationSelection" + "FullPermutationPairMakerConfig": "#/components/schemas/IPairMakerConfigFullPermutationPairMakerConfig", + "OnlinePairMakerConfig": "#/components/schemas/IPairMakerConfigOnlinePairMakerConfig" } } }, - "ISelectionAbTestSelection": { + "IPairMakerConfigFullPermutationPairMakerConfig": { "required": [ - "a", - "b", "_t" ], "properties": { "_t": { "enum": [ - "AbTestSelection" + "FullPermutationPairMakerConfig" ], "type": "string" - }, - "a": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ISelection" - } - }, - "b": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ISelection" - } } } }, - "ISelectionCappedSelection": { + "IPairMakerConfigOnlinePairMakerConfig": { "required": [ - "selections", - "maxRapids", "_t" ], "properties": { "_t": { "enum": [ - "CappedSelection" + "OnlinePairMakerConfig" ], "type": "string" }, - "selections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ISelection" - } + "randomMatchesRatio": { + "type": "number", + "format": "float" }, - "maxRapids": { + "totalComparisonBudget": { "type": "integer", "format": "int32" } } }, - "ISelectionConditionalValidationSelection": { + "IRankingConfig": { "required": [ - "validationSetId", - "validationChances", "_t" ], - "properties": { - "_t": { - "enum": [ - "ConditionalValidationSelection" - ], - "type": "string" - }, - "validationSetId": { - "type": "string" - }, - "validationChances": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConditionalValidationSelection_ValidationChance" - } + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IRankingConfigBradleyTerryRankingConfig" }, - "dimensions": { - "type": "array", - "items": { - "type": "string" - } + { + "$ref": "#/components/schemas/IRankingConfigEloConfig" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "BradleyTerryRankingConfig": "#/components/schemas/IRankingConfigBradleyTerryRankingConfig", + "EloConfig": "#/components/schemas/IRankingConfigEloConfig" } } }, - "ISelectionDemographicSelection": { + "IRankingConfigBradleyTerryRankingConfig": { "required": [ - "keys", "_t" ], "properties": { "_t": { "enum": [ - "DemographicSelection" + "BradleyTerryRankingConfig" ], "type": "string" }, - "keys": { - "type": "array", - "items": { - "type": "string" - } - }, - "maxRapids": { + "startingScore": { "type": "integer", "format": "int32" } } }, - "ISelectionEffortCappedSelection": { + "IRankingConfigEloConfig": { "required": [ - "effortBudget", "_t" ], "properties": { "_t": { "enum": [ - "EffortCappedSelection" + "EloConfig" ], "type": "string" }, - "effortBudget": { + "startingElo": { "type": "integer", "format": "int32" }, - "retrievalMode": { - "$ref": "#/components/schemas/RetrievalMode" + "startingScore": { + "type": "integer", + "format": "int32" }, - "maxIterations": { + "kFactor": { + "type": "integer", + "format": "int32" + }, + "scalingFactor": { "type": "integer", "format": "int32" } } }, - "ISelectionLabelingSelection": { + "IRefereeConfig": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IRefereeConfigBudgetRefereeConfig" + }, + { + "$ref": "#/components/schemas/IRefereeConfigNaiveRefereeConfig" + }, + { + "$ref": "#/components/schemas/IRefereeConfigNeverEndingRefereeConfig" + }, + { + "$ref": "#/components/schemas/IRefereeConfigProbabilisticAttachCategoryRefereeConfig" + }, + { + "$ref": "#/components/schemas/IRefereeConfigQuorumRefereeConfig" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "BudgetRefereeConfig": "#/components/schemas/IRefereeConfigBudgetRefereeConfig", + "NaiveRefereeConfig": "#/components/schemas/IRefereeConfigNaiveRefereeConfig", + "NeverEndingRefereeConfig": "#/components/schemas/IRefereeConfigNeverEndingRefereeConfig", + "ProbabilisticAttachCategoryRefereeConfig": "#/components/schemas/IRefereeConfigProbabilisticAttachCategoryRefereeConfig", + "QuorumRefereeConfig": "#/components/schemas/IRefereeConfigQuorumRefereeConfig" + } + } + }, + "IRefereeConfigBudgetRefereeConfig": { "required": [ + "totalBudget", "_t" ], "properties": { "_t": { "enum": [ - "LabelingSelection" + "BudgetRefereeConfig" ], "type": "string" }, - "amount": { - "type": "integer", - "format": "int32" - }, - "effortBudget": { + "totalBudget": { "type": "integer", "format": "int32" }, - "retrievalMode": { - "$ref": "#/components/schemas/RetrievalMode" - }, - "maxIterations": { + "totalServeBudget": { "type": "integer", "format": "int32" } } }, - "ISelectionShufflingSelection": { + "IRefereeConfigNaiveRefereeConfig": { "required": [ - "selections", "_t" ], "properties": { "_t": { "enum": [ - "ShufflingSelection" + "NaiveRefereeConfig" ], "type": "string" }, - "selections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ISelection" - } + "guessesRequired": { + "type": "integer", + "format": "int32" + } + } + }, + "IRefereeConfigNeverEndingRefereeConfig": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "NeverEndingRefereeConfig" + ], + "type": "string" } } }, - "ISelectionStaticSelection": { + "IRefereeConfigProbabilisticAttachCategoryRefereeConfig": { "required": [ - "rapidIds", + "threshold", + "maxVotes", "_t" ], "properties": { "_t": { "enum": [ - "StaticSelection" + "ProbabilisticAttachCategoryRefereeConfig" ], "type": "string" }, - "rapidIds": { - "type": "array", - "items": { - "type": "string" - } + "threshold": { + "type": "number", + "format": "double" + }, + "maxVotes": { + "type": "integer", + "format": "int32" } } }, - "ISelectionValidationSelection": { + "IRefereeConfigQuorumRefereeConfig": { "required": [ - "amount", - "validationSetId", + "maxVotes", + "threshold", "_t" ], "properties": { "_t": { "enum": [ - "ValidationSelection" + "QuorumRefereeConfig" ], "type": "string" }, - "amount": { + "maxVotes": { "type": "integer", "format": "int32" }, - "validationSetId": { - "type": "string" + "threshold": { + "type": "integer", + "format": "int32" } } }, - "JobDefinitionRevisionState": { - "enum": [ - "Pending", - "Completed", - "Failed" - ], - "description": "The state of the revision." - }, - "Metadata_IOrderMetadataInput": { + "IWorkflowConfig": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_PromptMetadataInput" + "$ref": "#/components/schemas/IWorkflowConfigEvaluationWorkflowConfig" }, { - "$ref": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_PromptAssetMetadataInput" + "$ref": "#/components/schemas/IWorkflowConfigGroupedRankingWorkflowConfig" }, { - "$ref": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_TranscriptionMetadataInput" + "$ref": "#/components/schemas/IWorkflowConfigRankingWorkflowConfig" + }, + { + "$ref": "#/components/schemas/IWorkflowConfigSimpleWorkflowConfig" } ], "discriminator": { "propertyName": "_t", "mapping": { - "PromptMetadataInput": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_PromptMetadataInput", - "PromptAssetMetadataInput": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_PromptAssetMetadataInput", - "TranscriptionMetadataInput": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_TranscriptionMetadataInput" + "EvaluationWorkflowConfig": "#/components/schemas/IWorkflowConfigEvaluationWorkflowConfig", + "GroupedRankingWorkflowConfig": "#/components/schemas/IWorkflowConfigGroupedRankingWorkflowConfig", + "RankingWorkflowConfig": "#/components/schemas/IWorkflowConfigRankingWorkflowConfig", + "SimpleWorkflowConfig": "#/components/schemas/IWorkflowConfigSimpleWorkflowConfig" } } }, - "Metadata_IOrderMetadataInputMetadata_PromptAssetMetadataInput": { + "IWorkflowConfigEvaluationWorkflowConfig": { "required": [ - "asset", + "validationSetId", + "referee", + "shouldAcceptIncorrect", "_t" ], "properties": { "_t": { "enum": [ - "PromptAssetMetadataInput" + "EvaluationWorkflowConfig" ], "type": "string" }, - "asset": { - "$ref": "#/components/schemas/IAssetInput" - } - } - }, - "Metadata_IOrderMetadataInputMetadata_PromptMetadataInput": { - "required": [ - "prompt", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "PromptMetadataInput" - ], + "validationSetId": { "type": "string" }, - "prompt": { - "type": "string" + "referee": { + "$ref": "#/components/schemas/IRefereeConfig" + }, + "shouldAcceptIncorrect": { + "type": "boolean" + }, + "featureFlags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } } } }, - "Metadata_IOrderMetadataInputMetadata_TranscriptionMetadataInput": { + "IWorkflowConfigGroupedRankingWorkflowConfig": { "required": [ - "transcription", + "criteria", + "referee", + "targetCountryCodes", + "maxParallelism", "_t" ], "properties": { "_t": { "enum": [ - "TranscriptionMetadataInput" + "GroupedRankingWorkflowConfig" ], "type": "string" }, - "transcription": { + "criteria": { "type": "string" - } - } - }, - "OrderState": { - "enum": [ - "Created", - "Preview", - "Submitted", - "ManualReview", - "Queued", - "Processing", - "Paused", - "Completed", - "Cancelled", - "Failed", - "StaleResults" - ], - "description": "The current state of the order." - }, - "PagedResultOfQueryJobDefinitionsResult": { - "required": [ - "total", - "page", - "pageSize", - "items" - ], - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" }, - "pageSize": { - "type": "integer", - "format": "int32" + "referee": { + "$ref": "#/components/schemas/IRefereeConfig" }, - "items": { + "targetCountryCodes": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryJobDefinitionsResult" + "type": "string" } }, - "totalPages": { - "type": "integer", - "format": "int32" - } - } - }, - "PagedResultOfQueryJobRevisionsResult": { - "required": [ - "total", - "page", - "pageSize", - "items" - ], - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { + "maxParallelism": { "type": "integer", "format": "int32" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryJobRevisionsResult" - } - }, - "totalPages": { - "type": "integer", - "format": "int32" - } - } - }, - "PreviewOrderEndpoint_Input": { - "type": "object", - "properties": { - "ignoreFailedDatapoints": { - "type": "boolean", - "description": "Whether the order should proceed even if certain datapoints failed.", - "nullable": true - } - } - }, - "QueryAggregatedOrdersEndpoint_Output": { - "required": [ - "amount", - "last7Days", - "lastOrderDate", - "lastOrderName", - "lastOrderId", - "customerMail" - ], - "type": "object", - "properties": { - "amount": { - "type": "integer", - "description": "The total number of orders for this customer.", - "format": "int32" + "contexts": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true, + "deprecated": true }, - "last7Days": { - "type": "integer", - "description": "The number of orders placed in the last 7 days.", - "format": "int32" + "contextAssets": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IAsset" + }, + "nullable": true, + "deprecated": true }, - "lastOrderDate": { - "type": "string", - "description": "The date of the most recent order.", - "format": "date-time" + "eloConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/EloConfig" + } + ], + "deprecated": true }, - "lastOrderName": { - "type": "string", - "description": "The name of the most recent order." + "rankingConfig": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/IRankingConfig" + } + ] }, - "lastOrderId": { - "type": "string", - "description": "The ID of the most recent order." + "pairMakerConfig": { + "$ref": "#/components/schemas/IPairMakerConfig" }, - "customerMail": { - "type": "string", - "description": "The customer's email address." + "featureFlags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } } } }, - "QueryAggregatedOrdersEndpoint_PagedResultOfOutput": { + "IWorkflowConfigRankingWorkflowConfig": { "required": [ - "total", - "page", - "pageSize", - "items" + "criteria", + "referee", + "_t" ], - "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" + "_t": { + "enum": [ + "RankingWorkflowConfig" + ], + "type": "string" }, - "page": { - "type": "integer", - "format": "int32" + "criteria": { + "type": "string" }, - "pageSize": { - "type": "integer", - "format": "int32" + "referee": { + "$ref": "#/components/schemas/IRefereeConfig" }, - "items": { + "context": { + "type": "string", + "nullable": true + }, + "contextAsset": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/IAsset" + } + ] + }, + "eloConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/EloConfig" + } + ], + "deprecated": true + }, + "rankingConfig": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/IRankingConfig" + } + ] + }, + "pairMakerConfig": { + "$ref": "#/components/schemas/IPairMakerConfig" + }, + "featureFlags": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryAggregatedOrdersEndpoint_Output" + "$ref": "#/components/schemas/FeatureFlag" } - }, - "totalPages": { - "type": "integer", - "format": "int32" } } }, - "QueryJobDefinitionsResult": { + "IWorkflowConfigSimpleWorkflowConfig": { "required": [ - "definitionId", - "name", - "definitionType", - "createdAt", - "revisionCount" + "referee", + "blueprint", + "_t" ], - "type": "object", "properties": { - "definitionId": { - "type": "string" - }, - "name": { + "_t": { + "enum": [ + "SimpleWorkflowConfig" + ], "type": "string" }, - "definitionType": { - "$ref": "#/components/schemas/DefinitionType" + "referee": { + "$ref": "#/components/schemas/IRefereeConfig" }, - "createdAt": { - "type": "string", - "format": "date-time" + "blueprint": { + "$ref": "#/components/schemas/IRapidBlueprint" }, - "revisionCount": { + "batchSize": { "type": "integer", "format": "int32" + }, + "featureFlags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } } } }, - "QueryJobRevisionsResult": { + "PreliminaryDownloadModel": { + "type": "object", + "properties": { + "sendEmail": { + "type": "boolean", + "description": "Whether to email the user when the download is ready." + } + }, + "description": "The model for creating a preliminary download." + }, + "StartPreliminaryDownloadResult": { "required": [ - "definitionId", - "revisionNumber", - "createdAt", - "state" + "downloadId" ], "type": "object", "properties": { - "definitionId": { + "downloadId": { "type": "string" - }, - "revisionNumber": { - "type": "integer", - "format": "int32" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "state": { - "$ref": "#/components/schemas/JobDefinitionRevisionState" } } }, - "QueryOrdersEndpoint_Output": { + "AddUserResponseResult": { "required": [ - "id", - "pipelineId", - "orderDate", - "customerMail", - "state", - "orderName", - "isPublic" + "isAccepted", + "userScore" ], "type": "object", "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the order." - }, - "pipelineId": { - "type": "string", - "description": "The ID of the pipeline associated with the order." - }, - "orderDate": { - "type": "string", - "description": "The date the order was placed.", - "format": "date-time", - "nullable": true - }, - "customerMail": { - "type": "string", - "description": "The email of the customer who placed the order." - }, - "state": { - "$ref": "#/components/schemas/OrderState" + "isAccepted": { + "type": "boolean" }, - "orderName": { - "type": "string", - "description": "The name of the order." + "validationTruth": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/IValidationTruth" + } + ] }, - "isPublic": { - "type": "boolean", - "description": "Whether the order is publicly visible." + "explanation": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/TranslatedString" + } + ] }, - "failureMessage": { - "type": "string", - "description": "The failure message if the order failed.", - "nullable": true + "userScore": { + "type": "number", + "format": "double" } } }, - "QueryOrdersEndpoint_PagedResultOfOutput": { + "AreRapidsActiveResult": { "required": [ - "total", - "page", - "pageSize", - "items" + "isValid" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" + "isValid": { + "type": "boolean" + } + } + }, + "BoxShape": { + "type": "object", + "properties": { + "xMin": { + "type": "number", + "format": "double" }, - "page": { - "type": "integer", - "format": "int32" + "yMin": { + "type": "number", + "format": "double" }, - "pageSize": { - "type": "integer", - "format": "int32" + "xMax": { + "type": "number", + "format": "double" }, - "items": { + "yMax": { + "type": "number", + "format": "double" + } + } + }, + "ClassifyPayload": { + "required": [ + "categories", + "title" + ], + "type": "object", + "properties": { + "categories": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryOrdersEndpoint_Output" + "$ref": "#/components/schemas/ClassifyPayload_Category" } }, - "totalPages": { - "type": "integer", - "format": "int32" + "title": { + "type": "string" } } }, - "StickyConfig": { + "ClassifyPayload_Category": { + "required": [ + "label", + "value" + ], "type": "object", "properties": { - "isEnabled": { - "type": "boolean" - }, - "bypassFilters": { - "type": "boolean" - }, - "bypassPrioritySelection": { - "type": "boolean" - }, - "blockOtherStickyCampaigns": { - "type": "boolean" + "label": { + "type": "string" }, - "clearOnPause": { - "type": "boolean" + "value": { + "type": "string" } } }, - "StickyState": { - "enum": [ - "None", - "Temporary", - "Permanent", - "Passive", - null + "CreateDemographicRapidModel": { + "required": [ + "key", + "payload" ], - "description": "Indicates if the underlying campaign should be sticky.", - "deprecated": true - }, - "SubmitOrderEndpoint_Input": { "type": "object", "properties": { - "ignoreFailedDatapoints": { - "type": "boolean", - "description": "Whether the order should proceed even if certain datapoints failed.", + "key": { + "type": "string", + "description": "The identifier of the demographic classification." + }, + "payload": { + "allOf": [ + { + "$ref": "#/components/schemas/ClassifyPayload" + } + ], + "description": "The payload for the classification." + }, + "featureFlags": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + }, + "nullable": true + } + ], + "description": "Optional feature flags to apply to the rapid." + }, + "asset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetInput" + } + ], + "description": "An optional asset to associate with the rapid." + }, + "context": { + "type": "string", + "description": "An optional text context to show to the user.", "nullable": true + }, + "contextAsset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetInput" + } + ], + "description": "An optional asset to use as context to show to the user." } - } + }, + "description": "The model for creating a demographic rapid." }, - "UnlockOrderEndpoint_Output": { + "CreateRapidResult": { "required": [ - "datasetIds" + "rapidId" ], "type": "object", "properties": { - "datasetIds": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "The dataset IDs created by unlocking the order." + "rapidId": { + "type": "string" } } }, - "UpdateJobDefinitionEndpoint_Input": { + "CreateValidationFeedbackEndpoint_Input": { + "required": [ + "feedback" + ], "type": "object", "properties": { - "name": { + "feedback": { "type": "string", - "description": "The new name for the job definition.", - "nullable": true + "description": "The feedback text." } - }, - "description": "The input for the update job definition endpoint." + } }, - "UpdateJobEndpoint_Input": { + "GetPublicResponsesResult": { + "required": [ + "responses" + ], "type": "object", "properties": { - "name": { - "type": "string", - "description": "The new name for the job.", - "nullable": true + "responses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetPublicResponsesResult_Response" + } } - }, - "description": "The input for the update job endpoint." + } }, - "UpdateOrderEndpoint_Input": { + "GetPublicResponsesResult_Response": { + "required": [ + "id", + "userId", + "country" + ], "type": "object", "properties": { - "name": { + "id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "country": { + "type": "string" + }, + "age": { "type": "string", - "description": "The new name of the order, if specified.", "nullable": true }, - "precedingOrderId": { + "occupation": { + "type": "string", + "nullable": true + }, + "gender": { "type": "string", - "description": "The ID of the order that must complete before this order starts processing.\n Set to null to clear an existing preceding order.", "nullable": true } } }, - "EloConfig": { + "GetResponsesForRapidResult": { + "required": [ + "rapidId", + "asset", + "responses", + "state" + ], "type": "object", "properties": { - "startingElo": { - "type": "integer", - "format": "int32" + "rapidId": { + "type": "string" }, - "startingScore": { - "type": "integer", - "format": "int32" + "asset": { + "$ref": "#/components/schemas/IAssetModel" }, - "kFactor": { - "type": "integer", - "format": "int32" + "responses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetResponsesForRapidResult_Response" + } }, - "scalingFactor": { - "type": "integer", - "format": "int32" + "state": { + "$ref": "#/components/schemas/RapidState" } } }, - "FileStreamResult": { - "type": "string", - "format": "binary" - }, - "GetPipelineByIdResult": { + "GetResponsesForRapidResult_Response": { "required": [ - "artifacts", - "featureFlags" + "id", + "userId", + "country", + "result", + "userScore", + "userScores", + "demographicInformation" ], "type": "object", "properties": { - "artifacts": { + "id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "country": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/IRapidResult" + }, + "userScore": { + "type": "number", + "format": "double" + }, + "userScores": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/IArtifactModel" + "type": "number", + "format": "double" } }, - "featureFlags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" + "demographicInformation": { + "type": "object", + "additionalProperties": { + "type": "string" } } } }, - "IArtifactModel": { + "InspectReportResult": { + "type": "object", + "properties": { + "dump": { + "type": "string", + "nullable": true + } + } + }, + "IRapidPayload": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IArtifactModelCampaignArtifactModel" + "$ref": "#/components/schemas/IRapidPayloadTranscriptionPayload" + }, + { + "$ref": "#/components/schemas/IRapidPayloadScrubPayload" }, { - "$ref": "#/components/schemas/IArtifactModelDatasetArtifactModel" + "$ref": "#/components/schemas/IRapidPayloadPolygonPayload" }, { - "$ref": "#/components/schemas/IArtifactModelFileArtifactModel" + "$ref": "#/components/schemas/IRapidPayloadNamedEntityPayload" }, { - "$ref": "#/components/schemas/IArtifactModelWorkflowArtifactModel" + "$ref": "#/components/schemas/IRapidPayloadLocatePayload" }, { - "$ref": "#/components/schemas/IArtifactModelWorkflowConfigArtifactModel" + "$ref": "#/components/schemas/IRapidPayloadLinePayload" + }, + { + "$ref": "#/components/schemas/IRapidPayloadFreeTextPayload" + }, + { + "$ref": "#/components/schemas/IRapidPayloadComparePayload" + }, + { + "$ref": "#/components/schemas/IRapidPayloadClassifyPayload" + }, + { + "$ref": "#/components/schemas/IRapidPayloadBoundingBoxPayload" } ], "discriminator": { "propertyName": "_t", "mapping": { - "CampaignArtifactModel": "#/components/schemas/IArtifactModelCampaignArtifactModel", - "DatasetArtifactModel": "#/components/schemas/IArtifactModelDatasetArtifactModel", - "FileArtifactModel": "#/components/schemas/IArtifactModelFileArtifactModel", - "WorkflowArtifactModel": "#/components/schemas/IArtifactModelWorkflowArtifactModel", - "WorkflowConfigArtifactModel": "#/components/schemas/IArtifactModelWorkflowConfigArtifactModel" + "TranscriptionPayload": "#/components/schemas/IRapidPayloadTranscriptionPayload", + "ScrubPayload": "#/components/schemas/IRapidPayloadScrubPayload", + "PolygonPayload": "#/components/schemas/IRapidPayloadPolygonPayload", + "NamedEntityPayload": "#/components/schemas/IRapidPayloadNamedEntityPayload", + "LocatePayload": "#/components/schemas/IRapidPayloadLocatePayload", + "LinePayload": "#/components/schemas/IRapidPayloadLinePayload", + "FreeTextPayload": "#/components/schemas/IRapidPayloadFreeTextPayload", + "ComparePayload": "#/components/schemas/IRapidPayloadComparePayload", + "ClassifyPayload": "#/components/schemas/IRapidPayloadClassifyPayload", + "BoundingBoxPayload": "#/components/schemas/IRapidPayloadBoundingBoxPayload" } } }, - "IArtifactModelCampaignArtifactModel": { + "IRapidPayloadBoundingBoxPayload": { "required": [ - "campaignId", - "identifier", + "target", "_t" ], "properties": { "_t": { "enum": [ - "CampaignArtifactModel" + "BoundingBoxPayload" ], "type": "string" }, - "campaignId": { - "type": "string" - }, - "identifier": { + "target": { "type": "string" } } }, - "IArtifactModelDatasetArtifactModel": { + "IRapidPayloadClassifyPayload": { "required": [ - "datasetId", - "identifier", + "categories", + "title", "_t" ], "properties": { "_t": { "enum": [ - "DatasetArtifactModel" + "ClassifyPayload" ], "type": "string" }, - "datasetId": { - "type": "string" + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClassifyPayload_Category" + } }, - "identifier": { + "title": { "type": "string" } } }, - "IArtifactModelFileArtifactModel": { + "IRapidPayloadComparePayload": { "required": [ - "fileName", - "identifier", + "criteria", "_t" ], "properties": { "_t": { "enum": [ - "FileArtifactModel" + "ComparePayload" ], "type": "string" }, - "fileName": { - "type": "string" - }, - "identifier": { + "criteria": { "type": "string" } } }, - "IArtifactModelWorkflowArtifactModel": { + "IRapidPayloadFreeTextPayload": { "required": [ - "workflowId", - "identifier", + "question", "_t" ], "properties": { "_t": { "enum": [ - "WorkflowArtifactModel" + "FreeTextPayload" ], "type": "string" }, - "workflowId": { + "question": { "type": "string" }, - "identifier": { - "type": "string" + "shouldValidateResponse": { + "type": "boolean" + }, + "validationSystemPrompt": { + "type": "string", + "nullable": true } } }, - "IArtifactModelWorkflowConfigArtifactModel": { + "IRapidPayloadLinePayload": { "required": [ - "workflowConfig", - "identifier", + "target", "_t" ], "properties": { "_t": { "enum": [ - "WorkflowConfigArtifactModel" + "LinePayload" ], "type": "string" }, - "workflowConfig": { - "$ref": "#/components/schemas/IWorkflowConfig" - }, - "identifier": { + "target": { "type": "string" } } }, - "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": { + "IRapidPayloadLocatePayload": { "required": [ - "fileName", - "metadata", + "target", "_t" ], "properties": { "_t": { "enum": [ - "FileAsset" + "LocatePayload" ], "type": "string" }, - "fileName": { + "target": { "type": "string" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IMetadata" - } } } }, - "IAssetMultiAsset": { + "IRapidPayloadNamedEntityPayload": { "required": [ - "assets", - "metadata", + "target", + "classes", "_t" ], "properties": { "_t": { "enum": [ - "MultiAsset" + "NamedEntityPayload" ], "type": "string" }, - "assets": { + "target": { + "type": "string" + }, + "classes": { "type": "array", "items": { - "$ref": "#/components/schemas/IAsset" - } - }, - "metadata": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IMetadata" + "type": "string" } } } }, - "IAssetNullAsset": { + "IRapidPayloadPolygonPayload": { "required": [ - "metadata", + "target", "_t" ], "properties": { "_t": { "enum": [ - "NullAsset" + "PolygonPayload" ], "type": "string" }, - "metadata": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IMetadata" - } + "target": { + "type": "string" } } }, - "IAssetTextAsset": { + "IRapidPayloadScrubPayload": { "required": [ - "text", - "metadata", + "target", "_t" ], "properties": { "_t": { "enum": [ - "TextAsset" + "ScrubPayload" ], "type": "string" }, - "text": { - "type": "string" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IMetadata" - } - } - } - }, - "IPairMakerConfig": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IPairMakerConfigFullPermutationPairMakerConfig" - }, - { - "$ref": "#/components/schemas/IPairMakerConfigOnlinePairMakerConfig" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "FullPermutationPairMakerConfig": "#/components/schemas/IPairMakerConfigFullPermutationPairMakerConfig", - "OnlinePairMakerConfig": "#/components/schemas/IPairMakerConfigOnlinePairMakerConfig" - } - } - }, - "IPairMakerConfigFullPermutationPairMakerConfig": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "FullPermutationPairMakerConfig" - ], + "target": { "type": "string" } } }, - "IPairMakerConfigOnlinePairMakerConfig": { + "IRapidPayloadTranscriptionPayload": { "required": [ + "title", + "transcription", "_t" ], "properties": { "_t": { "enum": [ - "OnlinePairMakerConfig" + "TranscriptionPayload" ], "type": "string" }, - "randomMatchesRatio": { - "type": "number", - "format": "float" + "title": { + "type": "string" }, - "totalComparisonBudget": { - "type": "integer", - "format": "int32" + "transcription": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TranscriptionWord" + } } } }, - "IRankingConfig": { + "IRapidResult": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IRankingConfigBradleyTerryRankingConfig" + "$ref": "#/components/schemas/IRapidResultTranscriptionResult" }, { - "$ref": "#/components/schemas/IRankingConfigEloConfig" + "$ref": "#/components/schemas/IRapidResultScrubResult" + }, + { + "$ref": "#/components/schemas/IRapidResultPolygonResult" + }, + { + "$ref": "#/components/schemas/IRapidResultNamedEntityResult" + }, + { + "$ref": "#/components/schemas/IRapidResultLocateResult" + }, + { + "$ref": "#/components/schemas/IRapidResultLineResult" + }, + { + "$ref": "#/components/schemas/IRapidResultFreeTextResult" + }, + { + "$ref": "#/components/schemas/IRapidResultCompareResult" + }, + { + "$ref": "#/components/schemas/IRapidResultSkipResult" + }, + { + "$ref": "#/components/schemas/IRapidResultAttachCategoryResult" + }, + { + "$ref": "#/components/schemas/IRapidResultBoundingBoxResult" } ], "discriminator": { "propertyName": "_t", "mapping": { - "BradleyTerryRankingConfig": "#/components/schemas/IRankingConfigBradleyTerryRankingConfig", - "EloConfig": "#/components/schemas/IRankingConfigEloConfig" + "TranscriptionResult": "#/components/schemas/IRapidResultTranscriptionResult", + "ScrubResult": "#/components/schemas/IRapidResultScrubResult", + "PolygonResult": "#/components/schemas/IRapidResultPolygonResult", + "NamedEntityResult": "#/components/schemas/IRapidResultNamedEntityResult", + "LocateResult": "#/components/schemas/IRapidResultLocateResult", + "LineResult": "#/components/schemas/IRapidResultLineResult", + "FreeTextResult": "#/components/schemas/IRapidResultFreeTextResult", + "CompareResult": "#/components/schemas/IRapidResultCompareResult", + "SkipResult": "#/components/schemas/IRapidResultSkipResult", + "AttachCategoryResult": "#/components/schemas/IRapidResultAttachCategoryResult", + "BoundingBoxResult": "#/components/schemas/IRapidResultBoundingBoxResult" } } }, - "IRankingConfigBradleyTerryRankingConfig": { + "IRapidResultAttachCategoryResult": { "required": [ + "category", + "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "BradleyTerryRankingConfig" + "AttachCategoryResult" ], "type": "string" }, - "startingScore": { - "type": "integer", - "format": "int32" + "category": { + "type": "string" + }, + "rapidId": { + "type": "string" } } }, - "IRankingConfigEloConfig": { + "IRapidResultBoundingBoxResult": { "required": [ + "boundingBoxes", + "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "EloConfig" + "BoundingBoxResult" ], "type": "string" }, - "startingElo": { - "type": "integer", - "format": "int32" - }, - "startingScore": { - "type": "integer", - "format": "int32" - }, - "kFactor": { - "type": "integer", - "format": "int32" + "boundingBoxes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BoxShape" + } }, - "scalingFactor": { - "type": "integer", - "format": "int32" + "rapidId": { + "type": "string" } } }, - "IRefereeConfig": { + "IRapidResultCompareResult": { "required": [ + "rapidId", "_t" ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IRefereeConfigBudgetRefereeConfig" - }, - { - "$ref": "#/components/schemas/IRefereeConfigNaiveRefereeConfig" - }, - { - "$ref": "#/components/schemas/IRefereeConfigNeverEndingRefereeConfig" + "properties": { + "_t": { + "enum": [ + "CompareResult" + ], + "type": "string" }, - { - "$ref": "#/components/schemas/IRefereeConfigProbabilisticAttachCategoryRefereeConfig" + "winners": { + "type": "array", + "items": { + "type": "string" + } }, - { - "$ref": "#/components/schemas/IRefereeConfigQuorumRefereeConfig" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "BudgetRefereeConfig": "#/components/schemas/IRefereeConfigBudgetRefereeConfig", - "NaiveRefereeConfig": "#/components/schemas/IRefereeConfigNaiveRefereeConfig", - "NeverEndingRefereeConfig": "#/components/schemas/IRefereeConfigNeverEndingRefereeConfig", - "ProbabilisticAttachCategoryRefereeConfig": "#/components/schemas/IRefereeConfigProbabilisticAttachCategoryRefereeConfig", - "QuorumRefereeConfig": "#/components/schemas/IRefereeConfigQuorumRefereeConfig" + "rapidId": { + "type": "string" } } }, - "IRefereeConfigBudgetRefereeConfig": { + "IRapidResultFreeTextResult": { "required": [ - "totalBudget", + "answer", + "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "BudgetRefereeConfig" + "FreeTextResult" ], "type": "string" }, - "totalBudget": { - "type": "integer", - "format": "int32" + "answer": { + "type": "string" }, - "totalServeBudget": { - "type": "integer", - "format": "int32" + "rapidId": { + "type": "string" } } }, - "IRefereeConfigNaiveRefereeConfig": { + "IRapidResultLineResult": { "required": [ + "lines", + "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "NaiveRefereeConfig" + "LineResult" ], "type": "string" }, - "guessesRequired": { - "type": "integer", - "format": "int32" + "lines": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LineResult_Line" + } + }, + "rapidId": { + "type": "string" } } }, - "IRefereeConfigNeverEndingRefereeConfig": { + "IRapidResultLocateResult": { "required": [ + "coordinates", + "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "NeverEndingRefereeConfig" + "LocateResult" ], "type": "string" + }, + "coordinates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocateCoordinate" + } + }, + "rapidId": { + "type": "string" } } }, - "IRefereeConfigProbabilisticAttachCategoryRefereeConfig": { + "IRapidResultNamedEntityResult": { "required": [ - "threshold", - "maxVotes", + "classifications", + "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "ProbabilisticAttachCategoryRefereeConfig" + "NamedEntityResult" ], "type": "string" }, - "threshold": { - "type": "number", - "format": "double" + "classifications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NamedClassification" + } }, - "maxVotes": { - "type": "integer", - "format": "int32" + "rapidId": { + "type": "string" } } }, - "IRefereeConfigQuorumRefereeConfig": { + "IRapidResultPolygonResult": { "required": [ - "maxVotes", - "threshold", + "shapes", + "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "QuorumRefereeConfig" + "PolygonResult" ], "type": "string" }, - "maxVotes": { - "type": "integer", - "format": "int32" + "shapes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PolygonResult_Shape" + } }, - "threshold": { - "type": "integer", - "format": "int32" + "rapidId": { + "type": "string" } } }, - "IWorkflowConfig": { + "IRapidResultScrubResult": { "required": [ + "timestamps", + "rapidId", "_t" ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IWorkflowConfigEvaluationWorkflowConfig" - }, - { - "$ref": "#/components/schemas/IWorkflowConfigGroupedRankingWorkflowConfig" + "properties": { + "_t": { + "enum": [ + "ScrubResult" + ], + "type": "string" }, - { - "$ref": "#/components/schemas/IWorkflowConfigRankingWorkflowConfig" + "timestamps": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } }, - { - "$ref": "#/components/schemas/IWorkflowConfigSimpleWorkflowConfig" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "EvaluationWorkflowConfig": "#/components/schemas/IWorkflowConfigEvaluationWorkflowConfig", - "GroupedRankingWorkflowConfig": "#/components/schemas/IWorkflowConfigGroupedRankingWorkflowConfig", - "RankingWorkflowConfig": "#/components/schemas/IWorkflowConfigRankingWorkflowConfig", - "SimpleWorkflowConfig": "#/components/schemas/IWorkflowConfigSimpleWorkflowConfig" + "rapidId": { + "type": "string" } } }, - "IWorkflowConfigEvaluationWorkflowConfig": { + "IRapidResultSkipResult": { "required": [ - "validationSetId", - "referee", - "shouldAcceptIncorrect", + "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "EvaluationWorkflowConfig" + "SkipResult" ], "type": "string" }, - "validationSetId": { + "rapidId": { "type": "string" - }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "shouldAcceptIncorrect": { - "type": "boolean" - }, - "featureFlags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } } } }, - "IWorkflowConfigGroupedRankingWorkflowConfig": { + "IRapidResultTranscriptionResult": { "required": [ - "criteria", - "referee", - "targetCountryCodes", - "maxParallelism", + "selectedWords", + "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "GroupedRankingWorkflowConfig" + "TranscriptionResult" ], "type": "string" }, - "criteria": { - "type": "string" - }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "targetCountryCodes": { + "selectedWords": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/TranscriptionWord" } }, - "maxParallelism": { - "type": "integer", - "format": "int32" - }, - "contexts": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "nullable": true, - "deprecated": true - }, - "contextAssets": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IAsset" - }, - "nullable": true, - "deprecated": true - }, - "eloConfig": { - "allOf": [ - { - "$ref": "#/components/schemas/EloConfig" - } - ], - "deprecated": true - }, - "rankingConfig": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IRankingConfig" - } - ] - }, - "pairMakerConfig": { - "$ref": "#/components/schemas/IPairMakerConfig" - }, - "featureFlags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } + "rapidId": { + "type": "string" } } }, - "IWorkflowConfigRankingWorkflowConfig": { + "IRefereeInfo": { "required": [ - "criteria", - "referee", "_t" ], - "properties": { - "_t": { - "enum": [ - "RankingWorkflowConfig" - ], - "type": "string" - }, - "criteria": { - "type": "string" - }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "context": { - "type": "string", - "nullable": true - }, - "contextAsset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAsset" - } - ] - }, - "eloConfig": { - "allOf": [ - { - "$ref": "#/components/schemas/EloConfig" - } - ], - "deprecated": true + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IRefereeInfoQuorumRefereeInfo" }, - "rankingConfig": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IRankingConfig" - } - ] + { + "$ref": "#/components/schemas/IRefereeInfoProbabilisticAttachCategoryRefereeInfo" }, - "pairMakerConfig": { - "$ref": "#/components/schemas/IPairMakerConfig" + { + "$ref": "#/components/schemas/IRefereeInfoNeverEndingRefereeInfo" }, - "featureFlags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } + { + "$ref": "#/components/schemas/IRefereeInfoNaiveRefereeInfo" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "QuorumRefereeInfo": "#/components/schemas/IRefereeInfoQuorumRefereeInfo", + "ProbabilisticAttachCategoryRefereeInfo": "#/components/schemas/IRefereeInfoProbabilisticAttachCategoryRefereeInfo", + "NeverEndingRefereeInfo": "#/components/schemas/IRefereeInfoNeverEndingRefereeInfo", + "NaiveRefereeInfo": "#/components/schemas/IRefereeInfoNaiveRefereeInfo" } } }, - "IWorkflowConfigSimpleWorkflowConfig": { + "IRefereeInfoNaiveRefereeInfo": { "required": [ - "referee", - "blueprint", "_t" ], "properties": { "_t": { "enum": [ - "SimpleWorkflowConfig" + "NaiveRefereeInfo" ], "type": "string" }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "blueprint": { - "$ref": "#/components/schemas/IRapidBlueprint" - }, - "batchSize": { + "guessAmountThreshold": { "type": "integer", "format": "int32" }, - "featureFlags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } + "serveThreshold": { + "type": "integer", + "format": "int32" } } }, - "PreliminaryDownloadModel": { - "type": "object", - "properties": { - "sendEmail": { - "type": "boolean", - "description": "Whether to email the user when the download is ready." - } - }, - "description": "The model for creating a preliminary download." - }, - "StartPreliminaryDownloadResult": { + "IRefereeInfoNeverEndingRefereeInfo": { "required": [ - "downloadId" + "_t" ], - "type": "object", "properties": { - "downloadId": { + "_t": { + "enum": [ + "NeverEndingRefereeInfo" + ], "type": "string" } } }, - "AddUserResponseResult": { + "IRefereeInfoProbabilisticAttachCategoryRefereeInfo": { "required": [ - "isAccepted", - "userScore" + "threshold", + "maxVotes", + "_t" ], - "type": "object", "properties": { - "isAccepted": { - "type": "boolean" - }, - "validationTruth": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IValidationTruth" - } - ] - }, - "explanation": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/TranslatedString" - } - ] + "_t": { + "enum": [ + "ProbabilisticAttachCategoryRefereeInfo" + ], + "type": "string" }, - "userScore": { + "threshold": { "type": "number", "format": "double" + }, + "maxVotes": { + "type": "integer", + "format": "int32" } } }, - "AreRapidsActiveResult": { - "required": [ - "isValid" - ], - "type": "object", - "properties": { - "isValid": { - "type": "boolean" - } - } - }, - "ClassifyPayload": { + "IRefereeInfoQuorumRefereeInfo": { "required": [ - "categories", - "title" + "maxVotes", + "threshold", + "_t" ], - "type": "object", "properties": { - "categories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ClassifyPayload_Category" - } - }, - "title": { + "_t": { + "enum": [ + "QuorumRefereeInfo" + ], "type": "string" + }, + "maxVotes": { + "type": "integer", + "format": "int32" + }, + "threshold": { + "type": "integer", + "format": "int32" } } }, - "CreateDemographicRapidModel": { + "IValidationTruth": { "required": [ - "key", - "payload" + "_t" ], "type": "object", - "properties": { - "key": { - "type": "string", - "description": "The identifier of the demographic classification." + "oneOf": [ + { + "$ref": "#/components/schemas/IValidationTruthTranscriptionTruth" }, - "payload": { - "allOf": [ - { - "$ref": "#/components/schemas/ClassifyPayload" - } - ], - "description": "The payload for the classification." + { + "$ref": "#/components/schemas/IValidationTruthScrubTruth" }, - "featureFlags": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - }, - "nullable": true - } - ], - "description": "Optional feature flags to apply to the rapid." + { + "$ref": "#/components/schemas/IValidationTruthPolygonTruth" }, - "asset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - } - ], - "description": "An optional asset to associate with the rapid." + { + "$ref": "#/components/schemas/IValidationTruthNamedEntityTruth" }, - "context": { - "type": "string", - "description": "An optional text context to show to the user.", - "nullable": true + { + "$ref": "#/components/schemas/IValidationTruthLocateBoxTruth" }, - "contextAsset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - } - ], - "description": "An optional asset to use as context to show to the user." + { + "$ref": "#/components/schemas/IValidationTruthLineTruth" + }, + { + "$ref": "#/components/schemas/IValidationTruthEmptyValidationTruth" + }, + { + "$ref": "#/components/schemas/IValidationTruthCompareTruth" + }, + { + "$ref": "#/components/schemas/IValidationTruthMultiCompareTruth" + }, + { + "$ref": "#/components/schemas/IValidationTruthSkipTruth" + }, + { + "$ref": "#/components/schemas/IValidationTruthAttachCategoryTruth" + }, + { + "$ref": "#/components/schemas/IValidationTruthBoundingBoxTruth" } - }, - "description": "The model for creating a demographic rapid." + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "TranscriptionTruth": "#/components/schemas/IValidationTruthTranscriptionTruth", + "ScrubTruth": "#/components/schemas/IValidationTruthScrubTruth", + "PolygonTruth": "#/components/schemas/IValidationTruthPolygonTruth", + "NamedEntityTruth": "#/components/schemas/IValidationTruthNamedEntityTruth", + "LocateBoxTruth": "#/components/schemas/IValidationTruthLocateBoxTruth", + "LineTruth": "#/components/schemas/IValidationTruthLineTruth", + "EmptyValidationTruth": "#/components/schemas/IValidationTruthEmptyValidationTruth", + "CompareTruth": "#/components/schemas/IValidationTruthCompareTruth", + "MultiCompareTruth": "#/components/schemas/IValidationTruthMultiCompareTruth", + "SkipTruth": "#/components/schemas/IValidationTruthSkipTruth", + "AttachCategoryTruth": "#/components/schemas/IValidationTruthAttachCategoryTruth", + "BoundingBoxTruth": "#/components/schemas/IValidationTruthBoundingBoxTruth" + } + } }, - "CreateRapidResult": { + "IValidationTruthAttachCategoryTruth": { "required": [ - "rapidId" + "correctCategories", + "_t" ], - "type": "object", "properties": { - "rapidId": { + "_t": { + "enum": [ + "AttachCategoryTruth" + ], "type": "string" + }, + "correctCategories": { + "type": "array", + "items": { + "type": "string" + } } } }, - "CreateValidationFeedbackEndpoint_Input": { + "IValidationTruthBoundingBoxTruth": { "required": [ - "feedback" + "xMin", + "yMin", + "xMax", + "yMax", + "_t" ], - "type": "object", "properties": { - "feedback": { - "type": "string", - "description": "The feedback text." + "_t": { + "enum": [ + "BoundingBoxTruth" + ], + "type": "string" + }, + "xMin": { + "type": "number", + "format": "double" + }, + "yMin": { + "type": "number", + "format": "double" + }, + "xMax": { + "type": "number", + "format": "double" + }, + "yMax": { + "type": "number", + "format": "double" } } }, - "GetPublicResponsesResult": { + "IValidationTruthCompareTruth": { "required": [ - "responses" + "winnerId", + "_t" ], - "type": "object", "properties": { - "responses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetPublicResponsesResult_Response" - } + "_t": { + "enum": [ + "CompareTruth" + ], + "type": "string" + }, + "winnerId": { + "type": "string" } } }, - "GetPublicResponsesResult_Response": { + "IValidationTruthEmptyValidationTruth": { "required": [ - "id", - "userId", - "country" + "_t" ], - "type": "object", "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "country": { + "_t": { + "enum": [ + "EmptyValidationTruth" + ], "type": "string" - }, - "age": { - "type": "string", - "nullable": true - }, - "occupation": { - "type": "string", - "nullable": true - }, - "gender": { - "type": "string", - "nullable": true } } }, - "GetResponsesForRapidResult": { + "IValidationTruthLineTruth": { "required": [ - "rapidId", - "asset", - "responses", - "state" + "_t" ], - "type": "object", "properties": { - "rapidId": { + "_t": { + "enum": [ + "LineTruth" + ], "type": "string" - }, - "asset": { - "$ref": "#/components/schemas/IAssetModel" - }, - "responses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetResponsesForRapidResult_Response" - } - }, - "state": { - "$ref": "#/components/schemas/RapidState" } } }, - "GetResponsesForRapidResult_Response": { + "IValidationTruthLocateBoxTruth": { "required": [ - "id", - "userId", - "country", - "result", - "userScore", - "userScores", - "demographicInformation" + "boundingBoxes", + "_t" ], - "type": "object", "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "country": { + "_t": { + "enum": [ + "LocateBoxTruth" + ], "type": "string" }, - "result": { - "$ref": "#/components/schemas/IRapidResult" + "boundingBoxes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BoxShape" + } }, - "userScore": { + "requiredPrecision": { "type": "number", "format": "double" }, - "userScores": { - "type": "object", - "additionalProperties": { - "type": "number", - "format": "double" - } - }, - "demographicInformation": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "InspectReportResult": { - "type": "object", - "properties": { - "dump": { - "type": "string", - "nullable": true + "requiredCompleteness": { + "type": "number", + "format": "double" } } }, - "IRapidResult": { + "IValidationTruthModel": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IRapidResultTranscriptionResult" + "$ref": "#/components/schemas/IValidationTruthModelAttachCategoryTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultScrubResult" + "$ref": "#/components/schemas/IValidationTruthModelBoundingBoxTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultPolygonResult" + "$ref": "#/components/schemas/IValidationTruthModelClassifyTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultNamedEntityResult" + "$ref": "#/components/schemas/IValidationTruthModelCompareTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultLocateResult" + "$ref": "#/components/schemas/IValidationTruthModelEmptyValidationTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultLineResult" + "$ref": "#/components/schemas/IValidationTruthModelLineTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultFreeTextResult" + "$ref": "#/components/schemas/IValidationTruthModelLocateBoxTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultCompareResult" + "$ref": "#/components/schemas/IValidationTruthModelMultiCompareTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultSkipResult" + "$ref": "#/components/schemas/IValidationTruthModelNamedEntityTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultAttachCategoryResult" + "$ref": "#/components/schemas/IValidationTruthModelPolygonTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultBoundingBoxResult" + "$ref": "#/components/schemas/IValidationTruthModelScrubTruthModel" + }, + { + "$ref": "#/components/schemas/IValidationTruthModelSkipTruthModel" + }, + { + "$ref": "#/components/schemas/IValidationTruthModelTranscriptionTruthModel" } ], "discriminator": { "propertyName": "_t", "mapping": { - "TranscriptionResult": "#/components/schemas/IRapidResultTranscriptionResult", - "ScrubResult": "#/components/schemas/IRapidResultScrubResult", - "PolygonResult": "#/components/schemas/IRapidResultPolygonResult", - "NamedEntityResult": "#/components/schemas/IRapidResultNamedEntityResult", - "LocateResult": "#/components/schemas/IRapidResultLocateResult", - "LineResult": "#/components/schemas/IRapidResultLineResult", - "FreeTextResult": "#/components/schemas/IRapidResultFreeTextResult", - "CompareResult": "#/components/schemas/IRapidResultCompareResult", - "SkipResult": "#/components/schemas/IRapidResultSkipResult", - "AttachCategoryResult": "#/components/schemas/IRapidResultAttachCategoryResult", - "BoundingBoxResult": "#/components/schemas/IRapidResultBoundingBoxResult" + "AttachCategoryTruth": "#/components/schemas/IValidationTruthModelAttachCategoryTruthModel", + "BoundingBoxTruth": "#/components/schemas/IValidationTruthModelBoundingBoxTruthModel", + "ClassifyTruth": "#/components/schemas/IValidationTruthModelClassifyTruthModel", + "CompareTruth": "#/components/schemas/IValidationTruthModelCompareTruthModel", + "EmptyValidationTruth": "#/components/schemas/IValidationTruthModelEmptyValidationTruthModel", + "LineTruth": "#/components/schemas/IValidationTruthModelLineTruthModel", + "LocateBoxTruth": "#/components/schemas/IValidationTruthModelLocateBoxTruthModel", + "MultiCompareTruth": "#/components/schemas/IValidationTruthModelMultiCompareTruthModel", + "NamedEntityTruth": "#/components/schemas/IValidationTruthModelNamedEntityTruthModel", + "PolygonTruth": "#/components/schemas/IValidationTruthModelPolygonTruthModel", + "ScrubTruth": "#/components/schemas/IValidationTruthModelScrubTruthModel", + "SkipTruth": "#/components/schemas/IValidationTruthModelSkipTruthModel", + "TranscriptionTruth": "#/components/schemas/IValidationTruthModelTranscriptionTruthModel" } } }, - "IRapidResultAttachCategoryResult": { + "IValidationTruthModelAttachCategoryTruthModel": { "required": [ - "category", - "rapidId", + "correctCategories", "_t" ], "properties": { "_t": { "enum": [ - "AttachCategoryResult" + "AttachCategoryTruth" ], "type": "string" }, - "category": { - "type": "string" - }, - "rapidId": { - "type": "string" + "correctCategories": { + "type": "array", + "items": { + "type": "string" + } } } }, - "IRapidResultBoundingBoxResult": { + "IValidationTruthModelBoundingBoxTruthModel": { "required": [ - "boundingBoxes", - "rapidId", + "xMin", + "yMin", + "xMax", + "yMax", "_t" ], "properties": { "_t": { "enum": [ - "BoundingBoxResult" + "BoundingBoxTruth" ], "type": "string" }, - "boundingBoxes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BoxShape" - } + "xMin": { + "type": "number", + "format": "double" }, - "rapidId": { - "type": "string" + "yMin": { + "type": "number", + "format": "double" + }, + "xMax": { + "type": "number", + "format": "double" + }, + "yMax": { + "type": "number", + "format": "double" } } }, - "IRapidResultCompareResult": { + "IValidationTruthModelClassifyTruthModel": { "required": [ - "rapidId", + "correctCategories", "_t" ], "properties": { "_t": { "enum": [ - "CompareResult" + "ClassifyTruth" ], "type": "string" }, - "winners": { + "correctCategories": { "type": "array", "items": { "type": "string" } - }, - "rapidId": { - "type": "string" } } }, - "IRapidResultFreeTextResult": { + "IValidationTruthModelCompareTruthModel": { "required": [ - "answer", - "rapidId", + "winnerId", "_t" ], "properties": { "_t": { "enum": [ - "FreeTextResult" + "CompareTruth" ], "type": "string" }, - "answer": { + "winnerId": { "type": "string" - }, - "rapidId": { + } + } + }, + "IValidationTruthModelEmptyValidationTruthModel": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "EmptyValidationTruth" + ], "type": "string" } } }, - "IRapidResultLineResult": { + "IValidationTruthModelLineTruthModel": { "required": [ - "lines", - "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "LineResult" + "LineTruth" + ], + "type": "string" + } + } + }, + "IValidationTruthModelLocateBoxTruthModel": { + "required": [ + "boundingBoxes", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "LocateBoxTruth" ], "type": "string" }, - "lines": { + "boundingBoxes": { "type": "array", "items": { - "$ref": "#/components/schemas/LineResult_Line" + "$ref": "#/components/schemas/BoxShape" } }, - "rapidId": { - "type": "string" + "requiredPrecision": { + "type": "number", + "format": "double" + }, + "requiredCompleteness": { + "type": "number", + "format": "double" } } }, - "IRapidResultLocateResult": { + "IValidationTruthModelMultiCompareTruthModel": { "required": [ - "coordinates", - "rapidId", + "correctCombinations", "_t" ], "properties": { "_t": { "enum": [ - "LocateResult" + "MultiCompareTruth" ], "type": "string" }, - "coordinates": { + "correctCombinations": { "type": "array", "items": { - "$ref": "#/components/schemas/LocateCoordinate" + "type": "array", + "items": { + "type": "string" + } } - }, - "rapidId": { - "type": "string" } } }, - "IRapidResultNamedEntityResult": { + "IValidationTruthModelNamedEntityTruthModel": { "required": [ "classifications", - "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "NamedEntityResult" + "NamedEntityTruth" ], "type": "string" }, @@ -27546,208 +27549,205 @@ "items": { "$ref": "#/components/schemas/NamedClassification" } - }, - "rapidId": { + } + } + }, + "IValidationTruthModelPolygonTruthModel": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "PolygonTruth" + ], "type": "string" } } }, - "IRapidResultPolygonResult": { + "IValidationTruthModelScrubTruthModel": { "required": [ - "shapes", - "rapidId", + "validRanges", "_t" ], "properties": { "_t": { "enum": [ - "PolygonResult" + "ScrubTruth" ], "type": "string" }, - "shapes": { + "validRanges": { "type": "array", "items": { - "$ref": "#/components/schemas/PolygonResult_Shape" + "$ref": "#/components/schemas/ScrubRange" } - }, - "rapidId": { - "type": "string" } } }, - "IRapidResultScrubResult": { + "IValidationTruthModelSkipTruthModel": { "required": [ - "timestamps", - "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "ScrubResult" + "SkipTruth" ], "type": "string" - }, - "timestamps": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - }, - "rapidId": { - "type": "string" } } }, - "IRapidResultSkipResult": { + "IValidationTruthModelTranscriptionTruthModel": { "required": [ - "rapidId", + "correctWords", "_t" ], "properties": { "_t": { "enum": [ - "SkipResult" + "TranscriptionTruth" ], "type": "string" }, - "rapidId": { - "type": "string" + "correctWords": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TranscriptionWord" + } + }, + "strictGrading": { + "type": "boolean", + "nullable": true + }, + "requiredPrecision": { + "type": "number", + "format": "double" + }, + "requiredCompleteness": { + "type": "number", + "format": "double" } } }, - "IRapidResultTranscriptionResult": { + "IValidationTruthMultiCompareTruth": { "required": [ - "selectedWords", - "rapidId", + "correctCombinations", "_t" ], "properties": { "_t": { "enum": [ - "TranscriptionResult" + "MultiCompareTruth" ], "type": "string" }, - "selectedWords": { + "correctCombinations": { "type": "array", "items": { - "$ref": "#/components/schemas/TranscriptionWord" + "type": "array", + "items": { + "type": "string" + } } - }, - "rapidId": { - "type": "string" } } }, - "IRefereeInfo": { + "IValidationTruthNamedEntityTruth": { "required": [ + "classifications", "_t" ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IRefereeInfoQuorumRefereeInfo" - }, - { - "$ref": "#/components/schemas/IRefereeInfoProbabilisticAttachCategoryRefereeInfo" - }, - { - "$ref": "#/components/schemas/IRefereeInfoNeverEndingRefereeInfo" + "properties": { + "_t": { + "enum": [ + "NamedEntityTruth" + ], + "type": "string" }, - { - "$ref": "#/components/schemas/IRefereeInfoNaiveRefereeInfo" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "QuorumRefereeInfo": "#/components/schemas/IRefereeInfoQuorumRefereeInfo", - "ProbabilisticAttachCategoryRefereeInfo": "#/components/schemas/IRefereeInfoProbabilisticAttachCategoryRefereeInfo", - "NeverEndingRefereeInfo": "#/components/schemas/IRefereeInfoNeverEndingRefereeInfo", - "NaiveRefereeInfo": "#/components/schemas/IRefereeInfoNaiveRefereeInfo" + "classifications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NamedClassification" + } } } }, - "IRefereeInfoNaiveRefereeInfo": { + "IValidationTruthPolygonTruth": { "required": [ "_t" ], "properties": { "_t": { "enum": [ - "NaiveRefereeInfo" + "PolygonTruth" ], "type": "string" - }, - "guessAmountThreshold": { - "type": "integer", - "format": "int32" - }, - "serveThreshold": { - "type": "integer", - "format": "int32" } } }, - "IRefereeInfoNeverEndingRefereeInfo": { + "IValidationTruthScrubTruth": { "required": [ + "validRanges", "_t" ], "properties": { "_t": { "enum": [ - "NeverEndingRefereeInfo" + "ScrubTruth" ], "type": "string" + }, + "validRanges": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScrubRange" + } } } }, - "IRefereeInfoProbabilisticAttachCategoryRefereeInfo": { + "IValidationTruthSkipTruth": { "required": [ - "threshold", - "maxVotes", "_t" ], "properties": { "_t": { "enum": [ - "ProbabilisticAttachCategoryRefereeInfo" + "SkipTruth" ], "type": "string" - }, - "threshold": { - "type": "number", - "format": "double" - }, - "maxVotes": { - "type": "integer", - "format": "int32" } } }, - "IRefereeInfoQuorumRefereeInfo": { + "IValidationTruthTranscriptionTruth": { "required": [ - "maxVotes", - "threshold", + "correctWords", "_t" ], "properties": { "_t": { "enum": [ - "QuorumRefereeInfo" + "TranscriptionTruth" ], "type": "string" }, - "maxVotes": { - "type": "integer", - "format": "int32" + "correctWords": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TranscriptionWord" + } }, - "threshold": { - "type": "integer", - "format": "int32" + "strictGrading": { + "type": "boolean", + "nullable": true + }, + "requiredPrecision": { + "type": "number", + "format": "double" + }, + "requiredCompleteness": { + "type": "number", + "format": "double" } } }, @@ -27804,6 +27804,27 @@ } } }, + "NamedClassification": { + "required": [ + "start", + "end", + "classification" + ], + "type": "object", + "properties": { + "start": { + "type": "integer", + "format": "int32" + }, + "end": { + "type": "integer", + "format": "int32" + }, + "classification": { + "type": "string" + } + } + }, "PagedResultOfQueryValidationRapidEligibilityResult": { "required": [ "total", @@ -27973,7 +27994,7 @@ "page": { "allOf": [ { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ], "description": "pagination information" @@ -28149,6 +28170,17 @@ }, "description": "The model for a Rapid skipped." }, + "RapidState": { + "enum": [ + "Labeling", + "Paused", + "Incomplete", + "Flagged", + "Done", + "None", + "Rejected" + ] + }, "ReportModel": { "required": [ "issue" @@ -28176,6 +28208,39 @@ }, "description": "The model for reporting an issue with a rapid." }, + "ScrubRange": { + "required": [ + "start", + "end" + ], + "type": "object", + "properties": { + "start": { + "type": "integer", + "format": "int32" + }, + "end": { + "type": "integer", + "format": "int32" + } + } + }, + "TranscriptionWord": { + "required": [ + "word", + "wordIndex" + ], + "type": "object", + "properties": { + "word": { + "type": "string" + }, + "wordIndex": { + "type": "integer", + "format": "int32" + } + } + }, "TranslatedString": { "required": [ "wasTranslated", @@ -28765,7 +28830,7 @@ "page": { "allOf": [ { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ], "description": "The size of the page and the page number to display." @@ -28785,11 +28850,7 @@ "sortCriteria": { "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/SortCriterion" - }, - "nullable": true + "$ref": "#/components/schemas/SortCriteria" } ], "description": "A list of criteria to sort the results by." @@ -28826,7 +28887,7 @@ "page": { "allOf": [ { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ], "description": "The size of the page and the page number to display." @@ -28834,11 +28895,7 @@ "sortCriteria": { "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/SortCriterion" - }, - "nullable": true + "$ref": "#/components/schemas/SortCriteria" } ], "description": "A list of criteria to sort the results by." @@ -28967,7 +29024,7 @@ "page": { "allOf": [ { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ], "description": "The size of the page and the page number to display." @@ -28987,11 +29044,7 @@ "sortCriteria": { "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/SortCriterion" - }, - "nullable": true + "$ref": "#/components/schemas/SortCriteria" } ], "description": "A list of criteria to sort the results by." @@ -29522,6 +29575,18 @@ } } }, + "SortCriteria": { + "type": "object", + "properties": { + "criteria": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SortCriterion" + }, + "nullable": true + } + } + }, "WorkflowState": { "enum": [ "Created", @@ -29575,8 +29640,7 @@ "name": "Rapidata Audience API", "tags": [ "Audience", - "Examples", - "Rapids" + "Examples" ] }, { diff --git a/openapi/schemas/rapidata.openapi.json b/openapi/schemas/rapidata.openapi.json index 914a36cc..8f008fc4 100644 --- a/openapi/schemas/rapidata.openapi.json +++ b/openapi/schemas/rapidata.openapi.json @@ -27,10 +27,6 @@ "name": "Examples", "x-displayName": "Examples" }, - { - "name": "Rapids", - "x-displayName": "Rapids" - }, { "name": "Cache", "x-displayName": "Cache" @@ -728,195 +724,30 @@ ] } }, - "/audience/{audienceId}": { - "delete": { - "tags": [ - "Audience" - ], - "summary": "Deletes the specified audience.", - "parameters": [ - { - "name": "audienceId", - "in": "path", - "description": "The unique identifier of the audience to delete.", - "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" - } - }, - "security": [ - { - "Bearer": [], - "OpenIdConnect": [ - "openid", - "profile", - "email" - ], - "OAuth2": [ - "openid", - "profile", - "email" - ] - } - ] - }, - "get": { - "tags": [ - "Audience" - ], - "summary": "Gets an audience by its Id.", - "parameters": [ - { - "name": "audienceId", - "in": "path", - "description": "The id of the audience to get.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/GetAudienceByIdResult" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetAudienceByIdResult" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/GetAudienceByIdResult" - } - } - } - } - }, - "security": [ - { - "Bearer": [], - "OpenIdConnect": [ - "openid", - "profile", - "email" - ], - "OAuth2": [ - "openid", - "profile", - "email" - ] - } - ] - }, - "patch": { + "/audience": { + "post": { "tags": [ "Audience" ], - "summary": "Patches an existing audience.", - "parameters": [ - { - "name": "audienceId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Creates a new empty audience.", "requestBody": { + "description": "The properties of the audience to create.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateAudienceRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateAudienceRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateAudienceRequest" + "$ref": "#/components/schemas/CreateAudienceEndpoint_Input" } } }, "required": true }, - "responses": { - "204": { - "description": "No Content" - } - }, - "security": [ - { - "Bearer": [], - "OpenIdConnect": [ - "openid", - "profile", - "email" - ], - "OAuth2": [ - "openid", - "profile", - "email" - ] - } - ] - } - }, - "/audience/{audienceId}/user-metrics": { - "get": { - "tags": [ - "Audience" - ], - "summary": "Gets the count of users in each state for the specified audience.", - "parameters": [ - { - "name": "audienceId", - "in": "path", - "description": "The unique identifier of the audience.", - "required": true, - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetAudienceUserStateMetricsResult" + "$ref": "#/components/schemas/CreateAudienceEndpoint_Output" } } } @@ -955,17 +786,17 @@ ] } }, - "/audience/{audienceId}/pause-distillation": { - "post": { + "/audience/{audienceId}": { + "delete": { "tags": [ "Audience" ], - "summary": "Pauses the distillation campaign for the specified audience.", + "summary": "Deletes the specified audience.", "parameters": [ { "name": "audienceId", "in": "path", - "description": "The unique identifier of the audience.", + "description": "The unique identifier of the audience to delete.", "required": true, "schema": { "type": "string" @@ -1008,14 +839,12 @@ ] } ] - } - }, - "/audience/{audienceId}/jobs": { + }, "get": { "tags": [ "Audience" ], - "summary": "Queries jobs for the specified audience.", + "summary": "Returns the audience with the specified id.", "parameters": [ { "name": "audienceId", @@ -1033,7 +862,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryJobsResult" + "$ref": "#/components/schemas/GetAudienceByIdEndpoint_Output" } } } @@ -1070,26 +899,34 @@ ] } ] - } - }, - "/audience/{audienceId}/rebuild-distilling-campaign": { - "post": { + }, + "patch": { "tags": [ "Audience" ], - "summary": "Rebuilds the distilling campaign for the specified audience.", - "description": "Recalculates campaign filters and selections based on the audience's current settings\n (demographic filters, exit conditions, etc.).", + "summary": "Patches an existing audience.", "parameters": [ { "name": "audienceId", "in": "path", - "description": "The unique identifier of the audience.", + "description": "The unique identifier of the audience to update.", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "description": "The audience properties to update.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAudienceEndpoint_Input" + } + } + }, + "required": true + }, "responses": { "204": { "description": "No Content" @@ -1128,12 +965,12 @@ ] } }, - "/audience/{audienceId}/recreate-external-audiences": { - "post": { + "/audience/{audienceId}/user-metrics": { + "get": { "tags": [ "Audience" ], - "summary": "Recreates external audiences for the specified audience.", + "summary": "Gets the count of users in each state for the specified audience.", "parameters": [ { "name": "audienceId", @@ -1145,21 +982,17 @@ } } ], - "requestBody": { - "description": "Configuration for which external audiences to recreate.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecreateExternalAudiencesEndpoint_Input" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAudienceUserStateMetricsResult" + } } } }, - "required": true - }, - "responses": { - "204": { - "description": "No Content" - }, "400": { "description": "Bad Request", "content": { @@ -1194,12 +1027,12 @@ ] } }, - "/audience/{audienceId}/resume-distillation": { + "/audience/{audienceId}/pause-distillation": { "post": { "tags": [ "Audience" ], - "summary": "Resumes the distillation campaign for the specified audience.", + "summary": "Pauses the distillation campaign for the specified audience.", "parameters": [ { "name": "audienceId", @@ -1249,12 +1082,12 @@ ] } }, - "/audience/{audienceId}/recruit": { - "post": { + "/audience/{audienceId}/jobs": { + "get": { "tags": [ "Audience" ], - "summary": "Starts recruiting users for the specified audience.", + "summary": "Queries jobs for the specified audience.", "parameters": [ { "name": "audienceId", @@ -1267,8 +1100,15 @@ } ], "responses": { - "204": { - "description": "No Content" + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedResultOfQueryJobsResult" + } + } + } }, "400": { "description": "Bad Request", @@ -1304,38 +1144,341 @@ ] } }, - "/audience/{audienceId}/boost-config": { - "patch": { + "/audiences": { + "get": { "tags": [ "Audience" ], - "summary": "Updates the boost configuration for the specified audience.", + "summary": "Queries all audiences visible to the caller.", "parameters": [ { - "name": "audienceId", - "in": "path", - "description": "The unique identifier of the audience.", - "required": true, + "name": "page", + "in": "query", + "description": "The 1-based page index.", "schema": { - "type": "string" - } + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "page_size", + "in": "query", + "description": "The number of items per page.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "name", + "-name", + "created_at", + "-created_at", + "status", + "-status", + "qualified_user_count", + "-qualified_user_count" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "name": "name", + "in": "query", + "description": "Filter by name.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "status", + "in": "query", + "description": "Filter by status.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "is_public", + "in": "query", + "description": "Filter by is_public.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "is_distilling", + "in": "query", + "description": "Filter by is_distilling.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "owner_mail", + "in": "query", + "description": "Filter by owner_mail.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "created_at", + "in": "query", + "description": "Filter by created_at.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" } ], - "requestBody": { - "description": "The boost configuration values to update.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateBoostConfigEndpoint_Input" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryAudiencesEndpoint_PagedResultOfOutput" + } } } }, - "required": true - }, - "responses": { - "204": { - "description": "No Content" - }, "400": { "description": "Bad Request", "content": { @@ -1370,12 +1513,13 @@ ] } }, - "/audience/{audienceId}/example": { + "/audience/{audienceId}/rebuild-distilling-campaign": { "post": { "tags": [ - "Examples" + "Audience" ], - "summary": "Adds a new example to an audience.", + "summary": "Rebuilds the distilling campaign for the specified audience.", + "description": "Recalculates campaign filters and selections based on the audience's current settings\n (demographic filters, exit conditions, etc.).", "parameters": [ { "name": "audienceId", @@ -1387,17 +1531,6 @@ } } ], - "requestBody": { - "description": "The example data to add.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddExampleToAudienceEndpoint_Input" - } - } - }, - "required": true - }, "responses": { "204": { "description": "No Content" @@ -1436,23 +1569,34 @@ ] } }, - "/audience/example/{exampleId}": { - "delete": { + "/audience/{audienceId}/recreate-external-audiences": { + "post": { "tags": [ - "Examples" + "Audience" ], - "summary": "Deletes the specified audience example.", + "summary": "Recreates external audiences for the specified audience.", "parameters": [ { - "name": "exampleId", + "name": "audienceId", "in": "path", - "description": "The unique identifier of the example to delete.", + "description": "The unique identifier of the audience.", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "description": "Configuration for which external audiences to recreate.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecreateExternalAudiencesEndpoint_Input" + } + } + }, + "required": true + }, "responses": { "204": { "description": "No Content" @@ -1491,12 +1635,12 @@ ] } }, - "/audience/{audienceId}/examples": { - "get": { + "/audience/{audienceId}/resume-distillation": { + "post": { "tags": [ - "Examples" + "Audience" ], - "summary": "Queries all examples for the specified audience.", + "summary": "Resumes the distillation campaign for the specified audience.", "parameters": [ { "name": "audienceId", @@ -1505,37 +1649,12 @@ "required": true, "schema": { "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "The 1-based page index.", - "schema": { - "type": "integer" - }, - "x-parameter-group": "page" - }, - { - "name": "page_size", - "in": "query", - "description": "The number of items per page.", - "schema": { - "type": "integer" - }, - "x-parameter-group": "page" + } } ], "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryExamplesForAudienceEndpoint_PagedResultOfOutput" - } - } - } + "204": { + "description": "No Content" }, "400": { "description": "Bad Request", @@ -1571,12 +1690,12 @@ ] } }, - "/audience/{audienceId}/example/{exampleId}": { - "patch": { + "/audience/{audienceId}/recruit": { + "post": { "tags": [ - "Examples" + "Audience" ], - "summary": "Updates an example's properties within an audience.", + "summary": "Starts recruiting users for the specified audience.", "parameters": [ { "name": "audienceId", @@ -1586,28 +1705,8 @@ "schema": { "type": "string" } - }, - { - "name": "exampleId", - "in": "path", - "description": "The unique identifier of the example to update.", - "required": true, - "schema": { - "type": "string" - } } ], - "requestBody": { - "description": "The example properties to update.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateAudienceExampleEndpoint_Input" - } - } - }, - "required": true - }, "responses": { "204": { "description": "No Content" @@ -1646,12 +1745,12 @@ ] } }, - "/audience/{audienceId}/rapid/{rapidId}": { + "/audience/{audienceId}/boost-config": { "patch": { "tags": [ - "Rapids" + "Audience" ], - "summary": "Updates a rapid's validation properties within an audience.", + "summary": "Updates the boost configuration for the specified audience.", "parameters": [ { "name": "audienceId", @@ -1661,23 +1760,14 @@ "schema": { "type": "string" } - }, - { - "name": "rapidId", - "in": "path", - "description": "The unique identifier of the rapid to update.", - "required": true, - "schema": { - "type": "string" - } } ], "requestBody": { - "description": "The rapid validation properties to update.", + "description": "The boost configuration values to update.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateAudienceRapidEndpoint_Input" + "$ref": "#/components/schemas/UpdateBoostConfigEndpoint_Input" } } }, @@ -1721,45 +1811,53 @@ ] } }, - "/audiences": { - "get": { + "/audience/{audienceId}/example": { + "post": { "tags": [ - "Audience" + "Examples" ], - "summary": "Queries all available audiences.", + "summary": "Adds a new example to an audience.", "parameters": [ { - "name": "request", - "in": "query", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryModel" - } - } + "name": "audienceId", + "in": "path", + "description": "The unique identifier of the audience.", + "required": true, + "schema": { + "type": "string" } } ], + "requestBody": { + "description": "The example data to add.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddExampleToAudienceEndpoint_Input" + } + } + }, + "required": true + }, "responses": { - "200": { - "description": "OK", + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" - } - }, "application/json": { "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryAudiencesResult" + "$ref": "#/components/schemas/ValidationProblemDetails" } } } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" } }, "security": [ @@ -1779,53 +1877,42 @@ ] } }, - "/audience": { - "post": { + "/audience/example/{exampleId}": { + "delete": { "tags": [ - "Audience" + "Examples" ], - "summary": "Creates a new empty audience.", - "description": "An audience is a group of users that are trained to solve particular tasks.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAudienceRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/CreateAudienceRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/CreateAudienceRequest" - } + "summary": "Deletes the specified audience example.", + "parameters": [ + { + "name": "exampleId", + "in": "path", + "description": "The unique identifier of the example to delete.", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { - "200": { - "description": "OK", + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/CreateAudienceResult" - } - }, "application/json": { "schema": { - "$ref": "#/components/schemas/CreateAudienceResult" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/CreateAudienceResult" + "$ref": "#/components/schemas/ValidationProblemDetails" } } } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" } }, "security": [ @@ -1845,48 +1932,69 @@ ] } }, - "/audience/{audienceId}/rapid": { - "post": { + "/audience/{audienceId}/examples": { + "get": { "tags": [ - "Audience" + "Examples" ], - "summary": "Adds a new rapid to be used to train users for the specified audience.", + "summary": "Queries all examples for the specified audience.", "parameters": [ { "name": "audienceId", "in": "path", + "description": "The unique identifier of the audience.", "required": true, "schema": { "type": "string" } + }, + { + "name": "page", + "in": "query", + "description": "The 1-based page index.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "page_size", + "in": "query", + "description": "The number of items per page.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddRapidToAudienceModel" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AddRapidToAudienceModel" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryExamplesForAudienceEndpoint_PagedResultOfOutput" + } } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AddRapidToAudienceModel" + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } } } }, - "required": true - }, - "responses": { - "204": { - "description": "No Content" + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" } }, - "deprecated": true, "security": [ { "Bearer": [], @@ -1904,56 +2012,64 @@ ] } }, - "/audience/{audienceId}/rapids": { - "get": { + "/audience/{audienceId}/example/{exampleId}": { + "patch": { "tags": [ - "Audience" + "Examples" ], - "summary": "Queries all rapids for the specified audience.", + "summary": "Updates an example's properties within an audience.", "parameters": [ { "name": "audienceId", "in": "path", + "description": "The unique identifier of the audience.", "required": true, "schema": { "type": "string" } }, { - "name": "request", - "in": "query", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryModel" - } + "name": "exampleId", + "in": "path", + "description": "The unique identifier of the example to update.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The example properties to update.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAudienceExampleEndpoint_Input" } } - } - ], + }, + "required": true + }, "responses": { - "200": { - "description": "OK", + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryRapidsOutput" - } - }, "application/json": { "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryRapidsOutput" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryRapidsOutput" + "$ref": "#/components/schemas/ValidationProblemDetails" } } } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" } }, - "deprecated": true, "security": [ { "Bearer": [], @@ -2449,6 +2565,49 @@ ] } }, + "/campaign/boost/preheat": { + "post": { + "tags": [ + "Campaign" + ], + "responses": { + "204": { + "description": "No Content" + }, + "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" + ] + } + ] + } + }, "/campaigns": { "get": { "tags": [ @@ -15738,81 +15897,6 @@ }, "description": "Input model for adding an example to an audience." }, - "AddRapidToAudienceModel": { - "required": [ - "asset", - "payload", - "randomCorrectProbability" - ], - "type": "object", - "properties": { - "asset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - } - ], - "description": "The asset to use for the rapid." - }, - "payload": { - "allOf": [ - { - "$ref": "#/components/schemas/IRapidPayload" - } - ], - "description": "The payload to use for the rapid." - }, - "truth": { - "allOf": [ - { - "$ref": "#/components/schemas/IValidationTruth" - } - ], - "description": "The ground truth for the rapid." - }, - "randomCorrectProbability": { - "type": "number", - "description": "The probability for an answer to be correct when randomly guessing.", - "format": "double" - }, - "explanation": { - "type": "string", - "description": "An explanation for the users if they answer the rapid incorrectly.", - "nullable": true - }, - "context": { - "type": "string", - "description": "An optional textual context that provides additional information to the user about the rapid.", - "nullable": true - }, - "contextAsset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - } - ], - "description": "An optional asset that provides additional context to the user about the rapid." - }, - "featureFlags": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - }, - "nullable": true - } - ], - "description": "The feature flags to enable for the rapid." - }, - "isCommonSense": { - "type": "boolean", - "description": "Whether this rapid should be treated as commonsense validation.", - "nullable": true - } - }, - "description": "The model for adding a validation rapid with asset in JSON body." - }, "AudienceJobState": { "enum": [ "Running", @@ -15826,7 +15910,8 @@ "Pending", "Recruiting", "Ready" - ] + ], + "description": "The current status of the audience." }, "BoostLevel": { "enum": [ @@ -15834,45 +15919,10 @@ "Stable", "Distilling", "Global" - ] - }, - "BoxShape": { - "type": "object", - "properties": { - "xMin": { - "type": "number", - "format": "double" - }, - "yMin": { - "type": "number", - "format": "double" - }, - "xMax": { - "type": "number", - "format": "double" - }, - "yMax": { - "type": "number", - "format": "double" - } - } - }, - "ClassifyPayload_Category": { - "required": [ - "label", - "value" ], - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "value": { - "type": "string" - } - } + "description": "The current boost level applied to the audience." }, - "CreateAudienceRequest": { + "CreateAudienceEndpoint_Input": { "required": [ "name" ], @@ -15937,24 +15987,6 @@ "description": "Score floor - users below this score exit the distilling campaign\n (only after completing DropMinResponses).\n Defaults to 0.2. Set to null to disable this exit condition.", "format": "double" }, - "minimumUserScore": { - "type": "number", - "description": "Use instead.", - "format": "double", - "deprecated": true - }, - "minDistillingScoreFloor": { - "type": "number", - "description": "Use instead.", - "format": "double", - "deprecated": true - }, - "minDistillingResponses": { - "type": "integer", - "description": "Use instead.", - "format": "uint32", - "deprecated": true - }, "isDistillingCampaignSticky": { "type": "boolean", "description": "Whether the distilling campaign should be sticky (users stay until filters don't match).\n Defaults to true (Temporary sticky)." @@ -15997,17 +16029,17 @@ "description": "Minimum graduated users before disabling distilling boost.\n Defaults to 100. Admin-only override.", "format": "int32" } - }, - "description": "The body request to create an audience." + } }, - "CreateAudienceResult": { + "CreateAudienceEndpoint_Output": { "required": [ "audienceId" ], "type": "object", "properties": { "audienceId": { - "type": "string" + "type": "string", + "description": "The unique identifier of the newly created audience." } } }, @@ -16016,7 +16048,8 @@ "Random", "Shuffled", "Sequential" - ] + ], + "description": "The retrieval mode used by the distilling campaign to select rapids for users.\n Defaults to Shuffled." }, "ExampleCategory": { "required": [ @@ -16073,44 +16106,7 @@ } } }, - "Filter": { - "type": "object", - "properties": { - "field": { - "type": "string", - "nullable": true - }, - "value": {}, - "operator": { - "$ref": "#/components/schemas/FilterOperator" - }, - "logic": { - "$ref": "#/components/schemas/LogicOperator" - }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Filter" - } - } - } - }, - "FilterOperator": { - "enum": [ - "Eq", - "Neq", - "Gt", - "Gte", - "Lt", - "Lte", - "Contains", - "StartsWith", - "EndsWith", - "In", - "NotContains" - ] - }, - "GetAudienceByIdResult": { + "GetAudienceByIdEndpoint_Output": { "required": [ "id", "name", @@ -16129,13 +16125,16 @@ "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "description": "The unique identifier of the audience." }, "name": { - "type": "string" + "type": "string", + "description": "The name of the audience." }, "description": { "type": "string", + "description": "The markdown-supported description of the audience.", "nullable": true }, "status": { @@ -16143,117 +16142,130 @@ }, "qualifiedUserCount": { "type": "integer", + "description": "The number of users that have qualified for this audience.", "format": "int64" }, "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAudienceFilter" - } + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/IAudienceFilter" + } + } + ], + "description": "The filters applied to this audience." }, "logo": { "type": "string", + "description": "The URL of the audience logo, if any.", "nullable": true }, "createdAt": { "type": "string", + "description": "The timestamp when the audience was created.", "format": "date-time" }, "ownerMail": { - "type": "string" + "type": "string", + "description": "The email of the audience owner." }, "isPublic": { - "type": "boolean" + "type": "boolean", + "description": "Whether the audience is publicly visible." }, "isDistilling": { - "type": "boolean" + "type": "boolean", + "description": "Whether the audience is currently distilling users." }, "distillingCampaignId": { - "type": "string" + "type": "string", + "description": "The id of the distilling campaign associated with the audience." }, "minGraduatedForDistillingBoost": { "type": "integer", + "description": "Minimum graduated users before disabling distilling boost.", "format": "int32" }, "minDistillingForGlobalBoost": { "type": "integer", + "description": "Minimum distilling users before disabling global boost.", "format": "int32" }, "graduationScore": { "type": "number", + "description": "The score used to determine whether a user graduates from the distilling campaign.", "format": "double" }, "demotionScore": { "type": "number", + "description": "Score below which a graduated user is demoted back to distilling.", "format": "double" }, "maxDistillingResponses": { "type": "integer", + "description": "Maximum responses before user exits the distilling campaign.", "format": "uint32" }, "dropMinResponses": { "type": "integer", + "description": "Minimum responses before the drop score check applies.", "format": "uint32" }, "dropScore": { "type": "number", + "description": "Score floor - users below this score exit the distilling campaign.", "format": "double" }, "maxDistillingSessions": { "type": "integer", + "description": "Maximum sessions before user exits the distilling campaign.", "format": "uint32" }, "inactivityDropDays": { "type": "integer", + "description": "Number of days of inactivity before a distilling user is dropped.", "format": "uint32" }, "minSubmissionRate": { "type": "number", + "description": "Minimum submission rate before a user is dropped.", "format": "double" }, "minSessionsForSubmissionRate": { "type": "integer", + "description": "Minimum number of sessions before the submission rate check applies.", "format": "uint32" }, "minSubmissionRateGraduated": { "type": "number", + "description": "Minimum submission rate for graduated users.", "format": "double" }, "distillingRetrievalMode": { "$ref": "#/components/schemas/DistillingRetrievalMode" }, - "minimumUserScore": { - "type": "number", - "format": "double", - "deprecated": true - }, - "minDistillingScoreFloor": { - "type": "number", - "format": "double", - "deprecated": true - }, - "minDistillingResponses": { - "type": "integer", - "format": "uint32", - "deprecated": true - }, "boostLevel": { "$ref": "#/components/schemas/BoostLevel" }, "randomAdmissionProbability": { "type": "number", + "description": "The probability of admitting a random user to the audience.", "format": "double" }, "health": { "type": "number", + "description": "The health score of the audience.", "format": "double" }, "graduated": { "type": "integer", + "description": "The number of graduated users.", "format": "int64" }, "dropped": { "type": "integer", + "description": "The number of dropped users.", "format": "int64" } } @@ -16777,3848 +16789,3708 @@ "_t" ], "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IMetadataInputTextMetadataInput" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "TextMetadataInput": "#/components/schemas/IMetadataInputTextMetadataInput" - } - } - }, - "IMetadataInputTextMetadataInput": { - "required": [ - "text", - "visibilities", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "TextMetadataInput" - ], - "type": "string" - }, - "text": { - "type": "string", - "nullable": true - }, - "visibilities": { - "$ref": "#/components/schemas/MetadataVisibilities" - } - } - }, - "IMetadataModel": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IMetadataModelClassificationMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelCountMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelFileTypeMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelImageDimensionMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelLocationMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelOriginalFilenameMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelSourceUrlMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelStreamsMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelTextMetadataModel" - }, - { - "$ref": "#/components/schemas/IMetadataModelVideoDurationMetadataModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "ClassificationMetadata": "#/components/schemas/IMetadataModelClassificationMetadataModel", - "CountMetadata": "#/components/schemas/IMetadataModelCountMetadataModel", - "FileTypeMetadata": "#/components/schemas/IMetadataModelFileTypeMetadataModel", - "ImageDimensionMetadata": "#/components/schemas/IMetadataModelImageDimensionMetadataModel", - "LocationMetadata": "#/components/schemas/IMetadataModelLocationMetadataModel", - "OriginalFilenameMetadata": "#/components/schemas/IMetadataModelOriginalFilenameMetadataModel", - "SourceUrlMetadataModel": "#/components/schemas/IMetadataModelSourceUrlMetadataModel", - "StreamsMetadata": "#/components/schemas/IMetadataModelStreamsMetadataModel", - "TextMetadata": "#/components/schemas/IMetadataModelTextMetadataModel", - "VideoDurationMetadata": "#/components/schemas/IMetadataModelVideoDurationMetadataModel" - } - } - }, - "IMetadataModelClassificationMetadataModel": { - "required": [ - "classification", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "ClassificationMetadata" - ], - "type": "string" - }, - "classification": { - "type": "string" - } - } - }, - "IMetadataModelCountMetadataModel": { - "required": [ - "count", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "CountMetadata" - ], - "type": "string" - }, - "count": { - "type": "integer", - "format": "int32" - } - } - }, - "IMetadataModelFileTypeMetadataModel": { - "required": [ - "fileType", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "FileTypeMetadata" - ], - "type": "string" - }, - "fileType": { - "$ref": "#/components/schemas/FileType" - } - } - }, - "IMetadataModelImageDimensionMetadataModel": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "ImageDimensionMetadata" - ], - "type": "string" - }, - "height": { - "type": "integer", - "format": "int32" - }, - "width": { - "type": "integer", - "format": "int32" - } - } - }, - "IMetadataModelLocationMetadataModel": { - "required": [ - "x", - "y", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "LocationMetadata" - ], - "type": "string" - }, - "x": { - "type": "number", - "format": "float" - }, - "y": { - "type": "number", - "format": "float" - } - } - }, - "IMetadataModelOriginalFilenameMetadataModel": { - "required": [ - "originalFilename", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "OriginalFilenameMetadata" - ], - "type": "string" - }, - "originalFilename": { - "type": "string" - } - } - }, - "IMetadataModelSourceUrlMetadataModel": { - "required": [ - "url", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "SourceUrlMetadataModel" - ], - "type": "string" - }, - "url": { - "type": "string" - } - } - }, - "IMetadataModelStreamsMetadataModel": { - "required": [ - "hasVideo", - "hasAudio", - "hasSubtitles", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "StreamsMetadata" - ], - "type": "string" - }, - "hasVideo": { - "type": "boolean" - }, - "hasAudio": { - "type": "boolean" - }, - "hasSubtitles": { - "type": "boolean" + "oneOf": [ + { + "$ref": "#/components/schemas/IMetadataInputTextMetadataInput" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "TextMetadataInput": "#/components/schemas/IMetadataInputTextMetadataInput" } } }, - "IMetadataModelTextMetadataModel": { + "IMetadataInputTextMetadataInput": { "required": [ "text", + "visibilities", "_t" ], "properties": { "_t": { "enum": [ - "TextMetadata" + "TextMetadataInput" ], "type": "string" }, "text": { "type": "string", "nullable": true - } - } - }, - "IMetadataModelVideoDurationMetadataModel": { - "required": [ - "duration", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "VideoDurationMetadata" - ], - "type": "string" }, - "duration": { - "type": "string", - "format": "date-time" + "visibilities": { + "$ref": "#/components/schemas/MetadataVisibilities" } } }, - "IRapidPayload": { + "IMetadataModel": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IRapidPayloadTranscriptionPayload" + "$ref": "#/components/schemas/IMetadataModelClassificationMetadataModel" }, { - "$ref": "#/components/schemas/IRapidPayloadScrubPayload" + "$ref": "#/components/schemas/IMetadataModelCountMetadataModel" }, { - "$ref": "#/components/schemas/IRapidPayloadPolygonPayload" + "$ref": "#/components/schemas/IMetadataModelFileTypeMetadataModel" }, { - "$ref": "#/components/schemas/IRapidPayloadNamedEntityPayload" + "$ref": "#/components/schemas/IMetadataModelImageDimensionMetadataModel" }, { - "$ref": "#/components/schemas/IRapidPayloadLocatePayload" + "$ref": "#/components/schemas/IMetadataModelLocationMetadataModel" }, { - "$ref": "#/components/schemas/IRapidPayloadLinePayload" + "$ref": "#/components/schemas/IMetadataModelOriginalFilenameMetadataModel" }, { - "$ref": "#/components/schemas/IRapidPayloadFreeTextPayload" + "$ref": "#/components/schemas/IMetadataModelSourceUrlMetadataModel" }, { - "$ref": "#/components/schemas/IRapidPayloadComparePayload" + "$ref": "#/components/schemas/IMetadataModelStreamsMetadataModel" }, { - "$ref": "#/components/schemas/IRapidPayloadClassifyPayload" + "$ref": "#/components/schemas/IMetadataModelTextMetadataModel" }, { - "$ref": "#/components/schemas/IRapidPayloadBoundingBoxPayload" + "$ref": "#/components/schemas/IMetadataModelVideoDurationMetadataModel" } ], "discriminator": { "propertyName": "_t", "mapping": { - "TranscriptionPayload": "#/components/schemas/IRapidPayloadTranscriptionPayload", - "ScrubPayload": "#/components/schemas/IRapidPayloadScrubPayload", - "PolygonPayload": "#/components/schemas/IRapidPayloadPolygonPayload", - "NamedEntityPayload": "#/components/schemas/IRapidPayloadNamedEntityPayload", - "LocatePayload": "#/components/schemas/IRapidPayloadLocatePayload", - "LinePayload": "#/components/schemas/IRapidPayloadLinePayload", - "FreeTextPayload": "#/components/schemas/IRapidPayloadFreeTextPayload", - "ComparePayload": "#/components/schemas/IRapidPayloadComparePayload", - "ClassifyPayload": "#/components/schemas/IRapidPayloadClassifyPayload", - "BoundingBoxPayload": "#/components/schemas/IRapidPayloadBoundingBoxPayload" + "ClassificationMetadata": "#/components/schemas/IMetadataModelClassificationMetadataModel", + "CountMetadata": "#/components/schemas/IMetadataModelCountMetadataModel", + "FileTypeMetadata": "#/components/schemas/IMetadataModelFileTypeMetadataModel", + "ImageDimensionMetadata": "#/components/schemas/IMetadataModelImageDimensionMetadataModel", + "LocationMetadata": "#/components/schemas/IMetadataModelLocationMetadataModel", + "OriginalFilenameMetadata": "#/components/schemas/IMetadataModelOriginalFilenameMetadataModel", + "SourceUrlMetadataModel": "#/components/schemas/IMetadataModelSourceUrlMetadataModel", + "StreamsMetadata": "#/components/schemas/IMetadataModelStreamsMetadataModel", + "TextMetadata": "#/components/schemas/IMetadataModelTextMetadataModel", + "VideoDurationMetadata": "#/components/schemas/IMetadataModelVideoDurationMetadataModel" } } }, - "IRapidPayloadBoundingBoxPayload": { + "IMetadataModelClassificationMetadataModel": { "required": [ - "target", + "classification", "_t" ], "properties": { "_t": { "enum": [ - "BoundingBoxPayload" + "ClassificationMetadata" ], "type": "string" }, - "target": { + "classification": { "type": "string" } } }, - "IRapidPayloadClassifyPayload": { + "IMetadataModelCountMetadataModel": { "required": [ - "categories", - "title", + "count", "_t" ], "properties": { "_t": { "enum": [ - "ClassifyPayload" + "CountMetadata" ], "type": "string" }, - "categories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ClassifyPayload_Category" - } - }, - "title": { - "type": "string" + "count": { + "type": "integer", + "format": "int32" } } }, - "IRapidPayloadComparePayload": { + "IMetadataModelFileTypeMetadataModel": { "required": [ - "criteria", + "fileType", "_t" ], "properties": { "_t": { "enum": [ - "ComparePayload" + "FileTypeMetadata" ], "type": "string" }, - "criteria": { - "type": "string" + "fileType": { + "$ref": "#/components/schemas/FileType" } } }, - "IRapidPayloadFreeTextPayload": { + "IMetadataModelImageDimensionMetadataModel": { "required": [ - "question", "_t" ], "properties": { "_t": { "enum": [ - "FreeTextPayload" + "ImageDimensionMetadata" ], "type": "string" }, - "question": { - "type": "string" - }, - "shouldValidateResponse": { - "type": "boolean" + "height": { + "type": "integer", + "format": "int32" }, - "validationSystemPrompt": { - "type": "string", - "nullable": true + "width": { + "type": "integer", + "format": "int32" } } }, - "IRapidPayloadLinePayload": { + "IMetadataModelLocationMetadataModel": { "required": [ - "target", + "x", + "y", "_t" ], "properties": { "_t": { "enum": [ - "LinePayload" + "LocationMetadata" ], "type": "string" }, - "target": { - "type": "string" + "x": { + "type": "number", + "format": "float" + }, + "y": { + "type": "number", + "format": "float" } } }, - "IRapidPayloadLocatePayload": { + "IMetadataModelOriginalFilenameMetadataModel": { "required": [ - "target", + "originalFilename", "_t" ], "properties": { "_t": { "enum": [ - "LocatePayload" + "OriginalFilenameMetadata" ], "type": "string" }, - "target": { + "originalFilename": { "type": "string" } } }, - "IRapidPayloadNamedEntityPayload": { + "IMetadataModelSourceUrlMetadataModel": { "required": [ - "target", - "classes", + "url", "_t" ], "properties": { "_t": { "enum": [ - "NamedEntityPayload" + "SourceUrlMetadataModel" ], "type": "string" }, - "target": { + "url": { "type": "string" - }, - "classes": { - "type": "array", - "items": { - "type": "string" - } } } }, - "IRapidPayloadPolygonPayload": { + "IMetadataModelStreamsMetadataModel": { "required": [ - "target", + "hasVideo", + "hasAudio", + "hasSubtitles", "_t" ], "properties": { "_t": { "enum": [ - "PolygonPayload" + "StreamsMetadata" ], "type": "string" }, - "target": { - "type": "string" + "hasVideo": { + "type": "boolean" + }, + "hasAudio": { + "type": "boolean" + }, + "hasSubtitles": { + "type": "boolean" } } }, - "IRapidPayloadScrubPayload": { + "IMetadataModelTextMetadataModel": { "required": [ - "target", + "text", "_t" ], "properties": { "_t": { "enum": [ - "ScrubPayload" + "TextMetadata" ], "type": "string" }, - "target": { - "type": "string" + "text": { + "type": "string", + "nullable": true } } }, - "IRapidPayloadTranscriptionPayload": { + "IMetadataModelVideoDurationMetadataModel": { "required": [ - "title", - "transcription", + "duration", "_t" ], "properties": { "_t": { "enum": [ - "TranscriptionPayload" + "VideoDurationMetadata" ], "type": "string" }, - "title": { - "type": "string" + "duration": { + "type": "string", + "format": "date-time" + } + } + }, + "MetadataInputCollection": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IMetadataInput" + } + }, + "MetadataModelCollection": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IMetadataModel" + } + }, + "PagedResultOfQueryJobsResult": { + "required": [ + "total", + "page", + "pageSize", + "items" + ], + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64" }, - "transcription": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/TranscriptionWord" + "$ref": "#/components/schemas/QueryJobsResult" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IValidationTruth": { + "QueryAudiencesEndpoint_Output": { "required": [ - "_t" + "id", + "name", + "status", + "qualifiedUserCount", + "filters", + "createdAt", + "ownerMail", + "isPublic", + "isDistilling" ], "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IValidationTruthTranscriptionTruth" + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the audience." }, - { - "$ref": "#/components/schemas/IValidationTruthScrubTruth" + "name": { + "type": "string", + "description": "The name of the audience." }, - { - "$ref": "#/components/schemas/IValidationTruthPolygonTruth" + "description": { + "type": "string", + "description": "The markdown-supported description of the audience.", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthNamedEntityTruth" + "status": { + "$ref": "#/components/schemas/AudienceStatus" }, - { - "$ref": "#/components/schemas/IValidationTruthLocateBoxTruth" + "qualifiedUserCount": { + "type": "integer", + "description": "The number of users that have qualified for this audience.", + "format": "int64" }, - { - "$ref": "#/components/schemas/IValidationTruthLineTruth" + "filters": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/IAudienceFilter" + } + } + ], + "description": "The filters applied to this audience." }, - { - "$ref": "#/components/schemas/IValidationTruthEmptyValidationTruth" + "logo": { + "type": "string", + "description": "The URL of the audience logo, if any.", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthCompareTruth" + "createdAt": { + "type": "string", + "description": "The timestamp when the audience was created.", + "format": "date-time" }, - { - "$ref": "#/components/schemas/IValidationTruthMultiCompareTruth" + "ownerMail": { + "type": "string", + "description": "The email of the audience owner." }, - { - "$ref": "#/components/schemas/IValidationTruthSkipTruth" + "isPublic": { + "type": "boolean", + "description": "Whether the audience is publicly visible." }, - { - "$ref": "#/components/schemas/IValidationTruthAttachCategoryTruth" + "isDistilling": { + "type": "boolean", + "description": "Whether the audience is currently distilling users." }, - { - "$ref": "#/components/schemas/IValidationTruthBoundingBoxTruth" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "TranscriptionTruth": "#/components/schemas/IValidationTruthTranscriptionTruth", - "ScrubTruth": "#/components/schemas/IValidationTruthScrubTruth", - "PolygonTruth": "#/components/schemas/IValidationTruthPolygonTruth", - "NamedEntityTruth": "#/components/schemas/IValidationTruthNamedEntityTruth", - "LocateBoxTruth": "#/components/schemas/IValidationTruthLocateBoxTruth", - "LineTruth": "#/components/schemas/IValidationTruthLineTruth", - "EmptyValidationTruth": "#/components/schemas/IValidationTruthEmptyValidationTruth", - "CompareTruth": "#/components/schemas/IValidationTruthCompareTruth", - "MultiCompareTruth": "#/components/schemas/IValidationTruthMultiCompareTruth", - "SkipTruth": "#/components/schemas/IValidationTruthSkipTruth", - "AttachCategoryTruth": "#/components/schemas/IValidationTruthAttachCategoryTruth", - "BoundingBoxTruth": "#/components/schemas/IValidationTruthBoundingBoxTruth" + "randomAdmissionProbability": { + "type": "number", + "description": "The probability of admitting a random user to the audience.", + "format": "double" + }, + "health": { + "type": "number", + "description": "The health score of the audience.", + "format": "double" + }, + "graduated": { + "type": "integer", + "description": "The number of graduated users.", + "format": "int64" + }, + "dropped": { + "type": "integer", + "description": "The number of dropped users.", + "format": "int64" } } }, - "IValidationTruthAttachCategoryTruth": { + "QueryAudiencesEndpoint_PagedResultOfOutput": { "required": [ - "correctCategories", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "AttachCategoryTruth" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "correctCategories": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/QueryAudiencesEndpoint_Output" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IValidationTruthBoundingBoxTruth": { + "QueryExamplesForAudienceEndpoint_Output": { "required": [ - "xMin", - "yMin", - "xMax", - "yMax", - "_t" + "id", + "asset", + "payload", + "correctCount", + "incorrectCount" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "BoundingBoxTruth" + "id": { + "type": "string", + "description": "The unique identifier of the example." + }, + "rapidId": { + "type": "string", + "description": "The ID of the rapid associated with this example.", + "nullable": true + }, + "asset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetModel" + } ], - "type": "string" + "description": "The asset associated with this example." }, - "xMin": { - "type": "number", - "format": "double" + "payload": { + "allOf": [ + { + "$ref": "#/components/schemas/IExamplePayload" + } + ], + "description": "The payload of the example." }, - "yMin": { - "type": "number", - "format": "double" + "correctCount": { + "type": "integer", + "description": "The number of correct responses.", + "format": "int32" }, - "xMax": { - "type": "number", - "format": "double" + "incorrectCount": { + "type": "integer", + "description": "The number of incorrect responses.", + "format": "int32" }, - "yMax": { + "truth": { + "allOf": [ + { + "$ref": "#/components/schemas/IExampleTruth" + } + ], + "description": "The truth value of the example." + }, + "context": { + "type": "string", + "description": "The context text for the example.", + "nullable": true + }, + "contextAsset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetModel" + } + ], + "description": "The context asset for the example." + }, + "explanation": { + "type": "string", + "description": "The explanation for the example.", + "nullable": true + }, + "randomCorrectProbability": { "type": "number", + "description": "The probability of a random correct answer.", "format": "double" + }, + "isCommonSense": { + "type": "boolean", + "description": "Whether this example is common sense.", + "nullable": true + }, + "sortIndex": { + "type": "integer", + "description": "The sort index that controls serving order.", + "format": "int32" } } }, - "IValidationTruthCompareTruth": { + "QueryExamplesForAudienceEndpoint_PagedResultOfOutput": { "required": [ - "winnerId", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CompareTruth" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" + }, + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryExamplesForAudienceEndpoint_Output" + } }, - "winnerId": { - "type": "string" + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IValidationTruthEmptyValidationTruth": { + "QueryJobsResult": { "required": [ - "_t" + "jobId", + "name", + "definitionId", + "audienceId", + "revisionNumber", + "pipelineId", + "status", + "createdAt" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "EmptyValidationTruth" - ], + "jobId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "definitionId": { + "type": "string" + }, + "audienceId": { + "type": "string" + }, + "revisionNumber": { + "type": "integer", + "format": "int32" + }, + "pipelineId": { "type": "string" + }, + "status": { + "$ref": "#/components/schemas/AudienceJobState" + }, + "createdAt": { + "type": "string", + "format": "date-time" } } }, - "IValidationTruthLineTruth": { + "RecreateExternalAudiencesEndpoint_Input": { "required": [ - "_t" + "recreateAll" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "LineTruth" - ], - "type": "string" + "recreateAll": { + "type": "boolean", + "description": "Whether to recreate all 3 external audiences or only the missing ones." } } }, - "IValidationTruthLocateBoxTruth": { - "required": [ - "boundingBoxes", - "_t" - ], + "UpdateAudienceEndpoint_Input": { + "type": "object", "properties": { - "_t": { - "enum": [ - "LocateBoxTruth" - ], - "type": "string" + "name": { + "type": "string", + "description": "The new name to give to this audience.", + "nullable": true }, - "boundingBoxes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BoxShape" - } + "description": { + "type": "string", + "description": "The new description for the audience. Supports markdown. Set to null to remove.", + "nullable": true }, - "requiredPrecision": { - "type": "number", - "format": "double" + "filters": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/IAudienceFilter" + } + }, + { + "nullable": true + } + ], + "description": "The new filters to apply to any orders created for this audience.\n A filter can be used to restrict the audience to a specific subset of users." }, - "requiredCompleteness": { - "type": "number", - "format": "double" - } - } - }, - "IValidationTruthModel": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IValidationTruthModelAttachCategoryTruthModel" + "logo": { + "oneOf": [ + { + "$ref": "#/components/schemas/ExistingAssetInput" + }, + { + "nullable": true + } + ], + "description": "The new logo image for the audience. Must be an existing image asset.\n Set to null to remove the logo." }, - { - "$ref": "#/components/schemas/IValidationTruthModelBoundingBoxTruthModel" + "minGraduatedForDistillingBoost": { + "type": "integer", + "description": "Minimum graduated users before disabling distilling boost.\n When graduated count is below this, external distilling audience ID is added to campaign boosting.", + "format": "int32", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelClassifyTruthModel" + "minDistillingForGlobalBoost": { + "type": "integer", + "description": "Minimum distilling users before disabling global boost.\n When distilling count is below this, GlobalBoostLevel is set above zero.", + "format": "int32", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelCompareTruthModel" + "graduationScore": { + "type": "number", + "description": "The score used to determine whether a user graduates from the distilling campaign.", + "format": "double", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelEmptyValidationTruthModel" + "demotionScore": { + "type": "number", + "description": "Score below which a graduated user is demoted back to distilling.\n Must be less than or equal to GraduationScore. Set to null to use GraduationScore.", + "format": "double", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelLineTruthModel" + "maxDistillingResponses": { + "type": "integer", + "description": "Maximum responses before user exits the distilling campaign.\n Set to null to disable this exit condition.", + "format": "uint32", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelLocateBoxTruthModel" + "dropMinResponses": { + "type": "integer", + "description": "Minimum responses before the drop score check applies.\n Users need at least this many responses before they can be kicked out for low score.\n Set to null to apply drop score check from the first response.", + "format": "uint32", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelMultiCompareTruthModel" + "dropScore": { + "type": "number", + "description": "Score floor - users below this score exit the distilling campaign\n (only after completing DropMinResponses).\n Set to null to disable this exit condition.", + "format": "double", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelNamedEntityTruthModel" + "maxDistillingSessions": { + "type": "integer", + "description": "Maximum sessions (rapid retrievals) before user exits the distilling campaign.\n Set to a value to enable session-based exit condition.", + "format": "uint32", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelPolygonTruthModel" + "inactivityDropDays": { + "type": "integer", + "description": "Number of days of inactivity before a distilling user is dropped.\n Set to null to disable this exit condition.", + "format": "uint32", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelScrubTruthModel" + "minSubmissionRate": { + "type": "number", + "description": "Minimum submission rate (responses / sessions) before a user is dropped.\n Set to null to disable this exit condition.", + "format": "double", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelSkipTruthModel" + "minSessionsForSubmissionRate": { + "type": "integer", + "description": "Minimum number of sessions before the submission rate check applies.\n Set to null to apply from the first session.", + "format": "uint32", + "nullable": true }, - { - "$ref": "#/components/schemas/IValidationTruthModelTranscriptionTruthModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "AttachCategoryTruth": "#/components/schemas/IValidationTruthModelAttachCategoryTruthModel", - "BoundingBoxTruth": "#/components/schemas/IValidationTruthModelBoundingBoxTruthModel", - "ClassifyTruth": "#/components/schemas/IValidationTruthModelClassifyTruthModel", - "CompareTruth": "#/components/schemas/IValidationTruthModelCompareTruthModel", - "EmptyValidationTruth": "#/components/schemas/IValidationTruthModelEmptyValidationTruthModel", - "LineTruth": "#/components/schemas/IValidationTruthModelLineTruthModel", - "LocateBoxTruth": "#/components/schemas/IValidationTruthModelLocateBoxTruthModel", - "MultiCompareTruth": "#/components/schemas/IValidationTruthModelMultiCompareTruthModel", - "NamedEntityTruth": "#/components/schemas/IValidationTruthModelNamedEntityTruthModel", - "PolygonTruth": "#/components/schemas/IValidationTruthModelPolygonTruthModel", - "ScrubTruth": "#/components/schemas/IValidationTruthModelScrubTruthModel", - "SkipTruth": "#/components/schemas/IValidationTruthModelSkipTruthModel", - "TranscriptionTruth": "#/components/schemas/IValidationTruthModelTranscriptionTruthModel" - } - } - }, - "IValidationTruthModelAttachCategoryTruthModel": { - "required": [ - "correctCategories", - "_t" - ], - "properties": { - "_t": { + "minSubmissionRateGraduated": { + "type": "number", + "description": "Minimum submission rate for graduated users. If null, MinSubmissionRate applies to graduated users.\n Set a lower value to be more lenient with graduated users.", + "format": "double", + "nullable": true + }, + "distillingRetrievalMode": { "enum": [ - "AttachCategoryTruth" + "Random", + "Shuffled", + "Sequential" ], - "type": "string" - }, - "correctCategories": { - "type": "array", - "items": { - "type": "string" - } + "description": "The retrieval mode used by the distilling campaign to select rapids for users." } } }, - "IValidationTruthModelBoundingBoxTruthModel": { - "required": [ - "xMin", - "yMin", - "xMax", - "yMax", - "_t" - ], + "UpdateAudienceExampleEndpoint_Input": { + "type": "object", "properties": { - "_t": { - "enum": [ - "BoundingBoxTruth" + "truth": { + "oneOf": [ + { + "$ref": "#/components/schemas/IExampleTruth" + }, + { + "nullable": true + } ], - "type": "string" + "description": "The truth for the example." }, - "xMin": { - "type": "number", - "format": "double" + "explanation": { + "type": "string", + "description": "The optional explanation that will be shown to the user when answering wrong.", + "nullable": true }, - "yMin": { - "type": "number", - "format": "double" + "context": { + "type": "string", + "description": "An optional text context that will be shown to the user.", + "nullable": true }, - "xMax": { - "type": "number", - "format": "double" + "contextAsset": { + "oneOf": [ + { + "$ref": "#/components/schemas/IAssetInput" + }, + { + "nullable": true + } + ], + "description": "An optional asset that will be used as context to show to the user." }, - "yMax": { + "randomCorrectProbability": { "type": "number", - "format": "double" + "description": "The probability that if the user answers at random that they'll be correct.", + "format": "double", + "nullable": true + }, + "isCommonSense": { + "type": "boolean", + "description": "Whether this example should be treated as commonsense validation.", + "nullable": true + }, + "sortIndex": { + "type": "integer", + "description": "The sort index that controls the serving order of this example.", + "format": "int32", + "nullable": true } - } + }, + "description": "Input model for updating an audience example." }, - "IValidationTruthModelClassifyTruthModel": { - "required": [ - "correctCategories", - "_t" - ], + "UpdateBoostConfigEndpoint_Input": { + "type": "object", "properties": { - "_t": { - "enum": [ - "ClassifyTruth" - ], - "type": "string" + "minDistillingForGlobalBoost": { + "type": "integer", + "description": "Minimum number of distilling users required to activate global boost.", + "format": "int32" }, - "correctCategories": { - "type": "array", - "items": { - "type": "string" - } + "minGraduatedForDistillingBoost": { + "type": "integer", + "description": "Minimum number of graduated users required to activate distilling boost.", + "format": "int32" } } }, - "IValidationTruthModelCompareTruthModel": { + "AudienceBoostModel": { "required": [ - "winnerId", - "_t" + "externalAudienceId", + "level" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CompareTruth" - ], - "type": "string" + "externalAudienceId": { + "type": "integer", + "format": "int32" }, - "winnerId": { - "type": "string" + "level": { + "type": "integer", + "format": "int32" } } }, - "IValidationTruthModelEmptyValidationTruthModel": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "EmptyValidationTruth" - ], - "type": "string" - } - } + "BoostingControlMode": { + "enum": [ + "Manual", + "Automatic" + ] }, - "IValidationTruthModelLineTruthModel": { + "BoostingProfileModel": { "required": [ - "_t" + "globalBoostLevel", + "prospectBlacklist", + "distillingBoosts", + "labelingBoosts" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "LineTruth" + "globalBoostLevel": { + "type": "integer", + "format": "int32" + }, + "languageBoosts": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } ], - "type": "string" - } - } - }, - "IValidationTruthModelLocateBoxTruthModel": { - "required": [ - "boundingBoxes", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "LocateBoxTruth" + "deprecated": true + }, + "kayzenAudienceIds": { + "allOf": [ + { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + } ], - "type": "string" + "deprecated": true }, - "boundingBoxes": { + "prospectBlacklist": { "type": "array", "items": { - "$ref": "#/components/schemas/BoxShape" + "type": "integer", + "format": "int32" } }, - "requiredPrecision": { - "type": "number", - "format": "double" - }, - "requiredCompleteness": { - "type": "number", - "format": "double" - } - } - }, - "IValidationTruthModelMultiCompareTruthModel": { - "required": [ - "correctCombinations", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "MultiCompareTruth" - ], - "type": "string" - }, - "correctCombinations": { + "distillingBoosts": { "type": "array", "items": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/AudienceBoostModel" } - } - } - }, - "IValidationTruthModelNamedEntityTruthModel": { - "required": [ - "classifications", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "NamedEntityTruth" - ], - "type": "string" }, - "classifications": { + "labelingBoosts": { "type": "array", "items": { - "$ref": "#/components/schemas/NamedClassification" + "$ref": "#/components/schemas/AudienceBoostModel" } } } }, - "IValidationTruthModelPolygonTruthModel": { + "BoostMode": { + "enum": [ + "Automatic", + "Manual" + ], + "description": "The current boost mode." + }, + "BoostStatusModel": { + "enum": [ + "Active", + "Inactive", + "Partial", + "Unknown" + ], + "description": "The current boost status." + }, + "CampaignStatusModel": { + "enum": [ + "Created", + "Preview", + "Active", + "Analysis", + "Paused", + "Completed" + ] + }, + "ChangeBoostEndpoint_Input": { "required": [ - "_t" + "isManual" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "PolygonTruth" - ], - "type": "string" + "isManual": { + "type": "boolean", + "description": "Whether the manual overwrite should be applied." + }, + "isActive": { + "type": "boolean", + "description": "Whether the boost is active. Deprecated in favor of Level.", + "deprecated": true + }, + "level": { + "type": "integer", + "description": "The boost level. Takes precedence over IsActive when set.", + "format": "int32" } } }, - "IValidationTruthModelScrubTruthModel": { + "ComparisonOperator": { + "enum": [ + "Equal", + "NotEqual", + "LessThan", + "LessThanOrEqual", + "GreaterThan", + "GreaterThanOrEqual" + ] + }, + "DeviceType": { + "enum": [ + "Unknown", + "Phone", + "Tablet" + ] + }, + "GetBoostInsightsEndpoint_AudienceOutput": { "required": [ - "validRanges", - "_t" + "externalAudienceId", + "contributors" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "ScrubTruth" - ], - "type": "string" + "externalAudienceId": { + "type": "integer", + "format": "int32" }, - "validRanges": { + "contributors": { "type": "array", "items": { - "$ref": "#/components/schemas/ScrubRange" + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_ContributorOutput" } } } }, - "IValidationTruthModelSkipTruthModel": { + "GetBoostInsightsEndpoint_ContributorOutput": { "required": [ - "_t" + "campaignId", + "campaignName" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "SkipTruth" - ], + "campaignId": { + "type": "string" + }, + "campaignName": { "type": "string" } } }, - "IValidationTruthModelTranscriptionTruthModel": { + "GetBoostInsightsEndpoint_GlobalBoostOutput": { "required": [ - "correctWords", - "_t" + "effectiveLevel", + "contributors" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "TranscriptionTruth" - ], - "type": "string" + "effectiveLevel": { + "type": "integer", + "format": "int32" }, - "correctWords": { + "contributors": { "type": "array", "items": { - "$ref": "#/components/schemas/TranscriptionWord" + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LevelContributorOutput" } - }, - "strictGrading": { - "type": "boolean", - "nullable": true - }, - "requiredPrecision": { - "type": "number", - "format": "double" - }, - "requiredCompleteness": { - "type": "number", - "format": "double" } } }, - "IValidationTruthMultiCompareTruth": { + "GetBoostInsightsEndpoint_LanguageBoostOutput": { "required": [ - "correctCombinations", - "_t" + "language", + "contributors" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "MultiCompareTruth" - ], + "language": { "type": "string" }, - "correctCombinations": { + "contributors": { "type": "array", "items": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_ContributorOutput" } } } }, - "IValidationTruthNamedEntityTruth": { + "GetBoostInsightsEndpoint_LevelContributorOutput": { "required": [ - "classifications", - "_t" + "campaignId", + "campaignName", + "level" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "NamedEntityTruth" - ], + "campaignId": { "type": "string" }, - "classifications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NamedClassification" - } - } - } - }, - "IValidationTruthPolygonTruth": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "PolygonTruth" - ], + "campaignName": { "type": "string" + }, + "level": { + "type": "integer", + "format": "int32" } } }, - "IValidationTruthScrubTruth": { + "GetBoostInsightsEndpoint_LeveledAudienceOutput": { "required": [ - "validRanges", - "_t" + "externalAudienceId", + "effectiveLevel", + "contributors" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "ScrubTruth" - ], - "type": "string" + "externalAudienceId": { + "type": "integer", + "format": "int32" }, - "validRanges": { + "effectiveLevel": { + "type": "integer", + "format": "int32" + }, + "contributors": { "type": "array", "items": { - "$ref": "#/components/schemas/ScrubRange" + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LevelContributorOutput" } } } }, - "IValidationTruthSkipTruth": { + "GetBoostInsightsEndpoint_Output": { "required": [ - "_t" + "mode", + "manualOverrideLevel", + "globalBoost", + "prospectBlacklist", + "distillingBoosts", + "labelingBoosts" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "SkipTruth" + "mode": { + "$ref": "#/components/schemas/BoostMode" + }, + "manualOverrideLevel": { + "type": "integer", + "description": "The manual override level, if manual mode is active.", + "format": "int32" + }, + "globalBoost": { + "allOf": [ + { + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_GlobalBoostOutput" + } + ], + "description": "Global boost insight with contributing campaigns." + }, + "languageBoosts": { + "allOf": [ + { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LanguageBoostOutput" + }, + "nullable": true + } + ], + "deprecated": true + } + ], + "description": "Language-specific boost insights." + }, + "audienceBoosts": { + "allOf": [ + { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_AudienceOutput" + }, + "nullable": true + } + ], + "deprecated": true + } + ], + "description": "Audience boost insights." + }, + "prospectBlacklist": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_AudienceOutput" + } + } + ], + "description": "Prospect blacklist insights." + }, + "distillingBoosts": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LeveledAudienceOutput" + } + } ], - "type": "string" + "description": "Distilling boost insights." + }, + "labelingBoosts": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LeveledAudienceOutput" + } + } + ], + "description": "Labeling boost insights." } } }, - "IValidationTruthTranscriptionTruth": { + "GetBoostStatusEndpoint_Output": { "required": [ - "correctWords", - "_t" + "status", + "mode", + "activeCampaigns", + "inactiveCampaigns", + "unknownCampaigns" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "TranscriptionTruth" - ], - "type": "string" + "status": { + "$ref": "#/components/schemas/BoostStatusModel" }, - "correctWords": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TranscriptionWord" - } + "mode": { + "$ref": "#/components/schemas/BoostMode" }, - "strictGrading": { - "type": "boolean", - "nullable": true + "activeCampaigns": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "The list of active campaign identifiers." }, - "requiredPrecision": { - "type": "number", - "format": "double" + "inactiveCampaigns": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "The list of inactive campaign identifiers." }, - "requiredCompleteness": { - "type": "number", - "format": "double" + "unknownCampaigns": { + "allOf": [ + { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + ], + "description": "The list of unknown campaign identifiers." } } }, - "LogicOperator": { - "enum": [ - "And", - "Or", - "Not" - ] - }, - "MetadataInputCollection": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IMetadataInput" - } - }, - "MetadataModelCollection": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IMetadataModel" - } - }, - "NamedClassification": { + "GetCampaignByIdEndpoint_Output": { "required": [ - "start", - "end", - "classification" + "id", + "name", + "status", + "priority", + "boostingProfile", + "boostingControlMode", + "hasBooster", + "stickyConfig", + "filters", + "selections", + "featureFlags", + "ownerMail", + "createdAt" ], "type": "object", "properties": { - "start": { - "type": "integer", - "format": "int32" + "id": { + "type": "string", + "description": "The unique identifier of the campaign." }, - "end": { - "type": "integer", - "format": "int32" + "name": { + "type": "string", + "description": "The name of the campaign." }, - "classification": { - "type": "string" - } - } - }, - "PagedResultOfQueryAudiencesResult": { - "required": [ - "total", - "page", - "pageSize", - "items" - ], - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" + "status": { + "$ref": "#/components/schemas/CampaignStatusModel" }, - "page": { + "priority": { "type": "integer", + "description": "The priority level of the campaign.", "format": "int32" }, - "pageSize": { - "type": "integer", - "format": "int32" + "boostingProfile": { + "allOf": [ + { + "$ref": "#/components/schemas/BoostingProfileModel" + } + ], + "description": "The boosting profile configuration." }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryAudiencesResult" - } + "boostingControlMode": { + "$ref": "#/components/schemas/BoostingControlMode" }, - "totalPages": { - "type": "integer", - "format": "int32" + "hasBooster": { + "type": "boolean", + "description": "Whether the campaign has a booster." + }, + "requiresBooster": { + "type": "boolean", + "description": "Whether the campaign requires a booster.", + "deprecated": true + }, + "stickyConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/StickyConfigModel" + } + ], + "description": "The sticky behavior configuration." + }, + "filters": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignFilterModel" + } + } + ], + "description": "The targeting filters for this campaign." + }, + "selections": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignSelectionModel" + } + } + ], + "description": "The rapid selections for this campaign." + }, + "featureFlags": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } + } + ], + "description": "The feature flags configured for this campaign." + }, + "ownerMail": { + "type": "string", + "description": "The email of the campaign owner." + }, + "createdAt": { + "type": "string", + "description": "The timestamp when the campaign was created.", + "format": "date-time" } } }, - "PagedResultOfQueryJobsResult": { + "GetCampaignCacheEndpoint_CampaignEntry": { "required": [ - "total", - "page", - "pageSize", - "items" + "id", + "name", + "status", + "priority", + "filterCount", + "selectionCount", + "userScoreDimensionCount", + "featureFlagCount", + "rateLimitCount", + "isPreviewEnabled", + "boostingControlMode" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/CampaignStatusModel" }, - "page": { + "priority": { "type": "integer", "format": "int32" }, - "pageSize": { + "filterCount": { "type": "integer", "format": "int32" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryJobsResult" - } - }, - "totalPages": { + "selectionCount": { "type": "integer", "format": "int32" - } - } - }, - "PagedResultOfQueryRapidsOutput": { - "required": [ - "total", - "page", - "pageSize", - "items" - ], - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" }, - "page": { + "userScoreDimensionCount": { "type": "integer", "format": "int32" }, - "pageSize": { + "featureFlagCount": { "type": "integer", "format": "int32" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryRapidsOutput" - } - }, - "totalPages": { + "rateLimitCount": { "type": "integer", "format": "int32" + }, + "isPreviewEnabled": { + "type": "boolean" + }, + "boostingControlMode": { + "$ref": "#/components/schemas/BoostingControlMode" } } }, - "PageInfo": { + "GetCampaignCacheEndpoint_Output": { + "required": [ + "count", + "campaigns" + ], "type": "object", "properties": { - "index": { + "count": { "type": "integer", + "description": "The total number of cached campaigns.", "format": "int32" }, - "size": { - "type": "integer", - "format": "int32" + "campaigns": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetCampaignCacheEndpoint_CampaignEntry" + } + } + ], + "description": "The list of cached campaign summaries." } } }, - "QueryAudiencesResult": { + "GetUserScoreCacheEndpoint_Output": { "required": [ - "id", - "name", - "status", - "qualifiedUserCount", - "filters", - "createdAt", - "ownerMail", - "isPublic", - "isDistilling" + "count", + "scores" ], "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/AudienceStatus" - }, - "qualifiedUserCount": { - "type": "integer", - "format": "int64" - }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAudienceFilter" - } - }, - "logo": { - "type": "string", - "nullable": true - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "ownerMail": { - "type": "string" - }, - "isPublic": { - "type": "boolean" - }, - "isDistilling": { - "type": "boolean" - }, - "randomAdmissionProbability": { - "type": "number", - "format": "double" - }, - "health": { - "type": "number", - "format": "double" - }, - "graduated": { + "count": { "type": "integer", - "format": "int64" + "description": "The total number of cached user scores.", + "format": "int32" }, - "dropped": { - "type": "integer", - "format": "int64" + "scores": { + "type": "object", + "additionalProperties": { + "type": "number", + "format": "double" + }, + "description": "The cached dimension-to-score mappings." } } }, - "QueryExamplesForAudienceEndpoint_Output": { + "ICampaignFilterModel": { "required": [ - "id", - "asset", - "payload", - "correctCount", - "incorrectCount" + "_t" ], "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the example." + "oneOf": [ + { + "$ref": "#/components/schemas/ICampaignFilterModelAndFilterModel" }, - "rapidId": { - "type": "string", - "description": "The ID of the rapid associated with this example.", - "nullable": true + { + "$ref": "#/components/schemas/ICampaignFilterModelAudienceStateFilterModel" }, - "asset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetModel" - } - ], - "description": "The asset associated with this example." + { + "$ref": "#/components/schemas/ICampaignFilterModelCampaignIdFilterModel" }, - "payload": { - "allOf": [ - { - "$ref": "#/components/schemas/IExamplePayload" - } - ], - "description": "The payload of the example." + { + "$ref": "#/components/schemas/ICampaignFilterModelCampaignSessionCountFilterModel" }, - "correctCount": { - "type": "integer", - "description": "The number of correct responses.", - "format": "int32" + { + "$ref": "#/components/schemas/ICampaignFilterModelCountryFilterModel" }, - "incorrectCount": { - "type": "integer", - "description": "The number of incorrect responses.", - "format": "int32" + { + "$ref": "#/components/schemas/ICampaignFilterModelDemographicFilterModel" }, - "truth": { - "allOf": [ - { - "$ref": "#/components/schemas/IExampleTruth" - } - ], - "description": "The truth value of the example." + { + "$ref": "#/components/schemas/ICampaignFilterModelDeviceFilterModel" }, - "context": { - "type": "string", - "description": "The context text for the example.", - "nullable": true + { + "$ref": "#/components/schemas/ICampaignFilterModelLanguageFilterModel" }, - "contextAsset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetModel" - } - ], - "description": "The context asset for the example." + { + "$ref": "#/components/schemas/ICampaignFilterModelNewUserFilterModel" }, - "explanation": { - "type": "string", - "description": "The explanation for the example.", - "nullable": true + { + "$ref": "#/components/schemas/ICampaignFilterModelNotFilterModel" }, - "randomCorrectProbability": { - "type": "number", - "description": "The probability of a random correct answer.", - "format": "double" + { + "$ref": "#/components/schemas/ICampaignFilterModelOrFilterModel" }, - "isCommonSense": { - "type": "boolean", - "description": "Whether this example is common sense.", - "nullable": true + { + "$ref": "#/components/schemas/ICampaignFilterModelResponseCountFilterModel" }, - "sortIndex": { - "type": "integer", - "description": "The sort index that controls serving order.", - "format": "int32" + { + "$ref": "#/components/schemas/ICampaignFilterModelUserActionRestrictionFilterModel" + }, + { + "$ref": "#/components/schemas/ICampaignFilterModelUserScoreFilterModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "AndFilter": "#/components/schemas/ICampaignFilterModelAndFilterModel", + "AudienceStateFilter": "#/components/schemas/ICampaignFilterModelAudienceStateFilterModel", + "CampaignIdFilter": "#/components/schemas/ICampaignFilterModelCampaignIdFilterModel", + "CampaignSessionCountFilter": "#/components/schemas/ICampaignFilterModelCampaignSessionCountFilterModel", + "CountryFilter": "#/components/schemas/ICampaignFilterModelCountryFilterModel", + "DemographicFilter": "#/components/schemas/ICampaignFilterModelDemographicFilterModel", + "DeviceFilter": "#/components/schemas/ICampaignFilterModelDeviceFilterModel", + "LanguageFilter": "#/components/schemas/ICampaignFilterModelLanguageFilterModel", + "NewUserFilter": "#/components/schemas/ICampaignFilterModelNewUserFilterModel", + "NotFilter": "#/components/schemas/ICampaignFilterModelNotFilterModel", + "OrFilter": "#/components/schemas/ICampaignFilterModelOrFilterModel", + "ResponseCountFilter": "#/components/schemas/ICampaignFilterModelResponseCountFilterModel", + "UserActionRestrictionFilter": "#/components/schemas/ICampaignFilterModelUserActionRestrictionFilterModel", + "UserScoreFilter": "#/components/schemas/ICampaignFilterModelUserScoreFilterModel" } } }, - "QueryExamplesForAudienceEndpoint_PagedResultOfOutput": { + "ICampaignFilterModelAndFilterModel": { "required": [ - "total", - "page", - "pageSize", - "items" + "filters", + "_t" ], - "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { - "type": "integer", - "format": "int32" + "_t": { + "enum": [ + "AndFilter" + ], + "type": "string" }, - "items": { + "filters": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryExamplesForAudienceEndpoint_Output" + "$ref": "#/components/schemas/ICampaignFilterModel" } - }, - "totalPages": { - "type": "integer", - "format": "int32" } } }, - "QueryJobsResult": { + "ICampaignFilterModelAudienceStateFilterModel": { "required": [ - "jobId", - "name", - "definitionId", "audienceId", - "revisionNumber", - "pipelineId", - "status", - "createdAt" + "allowedStates", + "includeUnknownState", + "_t" ], - "type": "object", "properties": { - "jobId": { + "_t": { + "enum": [ + "AudienceStateFilter" + ], "type": "string" }, - "name": { + "audienceId": { "type": "string" }, - "definitionId": { - "type": "string" + "allowedStates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SimplifiedAudienceUserState" + } }, - "audienceId": { + "includeUnknownState": { + "type": "boolean" + } + } + }, + "ICampaignFilterModelCampaignIdFilterModel": { + "required": [ + "campaignIds", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "CampaignIdFilter" + ], "type": "string" }, - "revisionNumber": { - "type": "integer", - "format": "int32" - }, - "pipelineId": { + "campaignIds": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ICampaignFilterModelCampaignSessionCountFilterModel": { + "required": [ + "sessionCount", + "operator", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "CampaignSessionCountFilter" + ], "type": "string" }, - "status": { - "$ref": "#/components/schemas/AudienceJobState" + "sessionCount": { + "type": "integer", + "format": "uint32" }, - "createdAt": { - "type": "string", - "format": "date-time" + "operator": { + "$ref": "#/components/schemas/ComparisonOperator" } } }, - "QueryModel": { - "type": "object", + "ICampaignFilterModelCountryFilterModel": { + "required": [ + "countries", + "_t" + ], "properties": { - "page": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/PageInfo" - } - ] - }, - "filter": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/RootFilter" - } - ] + "_t": { + "enum": [ + "CountryFilter" + ], + "type": "string" }, - "sortCriteria": { + "countries": { "type": "array", "items": { - "$ref": "#/components/schemas/SortCriterion" - }, - "nullable": true + "type": "string" + } } } }, - "QueryRapidsOutput": { + "ICampaignFilterModelDemographicFilterModel": { "required": [ - "id", - "type", - "asset", - "payload", - "correctValidationCount", - "invalidValidationCount", - "state", - "isCommonSense" + "identifier", + "values", + "_t" ], - "type": "object", "properties": { - "id": { + "_t": { + "enum": [ + "DemographicFilter" + ], "type": "string" }, - "type": { + "identifier": { "type": "string" }, - "asset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAssetModel" - } - ] - }, - "payload": { - "$ref": "#/components/schemas/IRapidPayload" - }, - "correctValidationCount": { - "type": "integer", - "format": "int32" - }, - "invalidValidationCount": { - "type": "integer", - "format": "int32" - }, - "state": { - "$ref": "#/components/schemas/RapidState" - }, - "truth": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IValidationTruth" - } - ] - }, - "context": { - "type": "string", - "nullable": true - }, - "contextAsset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAssetModel" - } - ] - }, - "explanation": { - "type": "string", - "nullable": true - }, - "randomCorrectProbability": { - "type": "number", - "format": "double" - }, - "isCommonSense": { - "type": "boolean" + "values": { + "type": "array", + "items": { + "type": "string" + } } - }, - "description": "Output model for the backwards-compatible rapids query." - }, - "RapidState": { - "enum": [ - "Labeling", - "Paused", - "Incomplete", - "Flagged", - "Done", - "None", - "Rejected" - ] + } }, - "RecreateExternalAudiencesEndpoint_Input": { + "ICampaignFilterModelDeviceFilterModel": { "required": [ - "recreateAll" + "deviceTypes", + "_t" ], - "type": "object", "properties": { - "recreateAll": { - "type": "boolean", - "description": "Whether to recreate all 3 external audiences or only the missing ones." + "_t": { + "enum": [ + "DeviceFilter" + ], + "type": "string" + }, + "deviceTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceType" + } } } }, - "RootFilter": { - "type": "object", + "ICampaignFilterModelLanguageFilterModel": { + "required": [ + "languages", + "_t" + ], "properties": { - "filters": { + "_t": { + "enum": [ + "LanguageFilter" + ], + "type": "string" + }, + "languages": { "type": "array", "items": { - "$ref": "#/components/schemas/Filter" + "type": "string" } - }, - "logic": { - "$ref": "#/components/schemas/LogicOperator" } } }, - "ScrubRange": { + "ICampaignFilterModelNewUserFilterModel": { "required": [ - "start", - "end" + "_t" ], - "type": "object", "properties": { - "start": { - "type": "integer", - "format": "int32" - }, - "end": { - "type": "integer", - "format": "int32" + "_t": { + "enum": [ + "NewUserFilter" + ], + "type": "string" } } }, - "SortCriterion": { + "ICampaignFilterModelNotFilterModel": { "required": [ - "propertyName", - "direction" + "filter", + "_t" ], - "type": "object", "properties": { - "propertyName": { + "_t": { + "enum": [ + "NotFilter" + ], "type": "string" }, - "direction": { - "$ref": "#/components/schemas/SortDirection" + "filter": { + "$ref": "#/components/schemas/ICampaignFilterModel" } } }, - "SortDirection": { - "enum": [ - "Asc", - "Desc" - ] + "ICampaignFilterModelOrFilterModel": { + "required": [ + "filters", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "OrFilter" + ], + "type": "string" + }, + "filters": {} + } }, - "TranscriptionWord": { + "ICampaignFilterModelResponseCountFilterModel": { "required": [ - "word", - "wordIndex" + "dimension", + "responseCount", + "operator", + "_t" ], - "type": "object", "properties": { - "word": { + "_t": { + "enum": [ + "ResponseCountFilter" + ], "type": "string" }, - "wordIndex": { + "dimension": { + "type": "string" + }, + "responseCount": { "type": "integer", - "format": "int32" + "format": "uint32" + }, + "operator": { + "$ref": "#/components/schemas/ComparisonOperator" } } }, - "UpdateAudienceExampleEndpoint_Input": { - "type": "object", + "ICampaignFilterModelUserActionRestrictionFilterModel": { + "required": [ + "requiredActions", + "_t" + ], "properties": { - "truth": { - "oneOf": [ - { - "$ref": "#/components/schemas/IExampleTruth" - }, - { - "nullable": true - } + "_t": { + "enum": [ + "UserActionRestrictionFilter" ], - "description": "The truth for the example." - }, - "explanation": { - "type": "string", - "description": "The optional explanation that will be shown to the user when answering wrong.", - "nullable": true - }, - "context": { - "type": "string", - "description": "An optional text context that will be shown to the user.", - "nullable": true + "type": "string" }, - "contextAsset": { - "oneOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - }, - { - "nullable": true - } + "requiredActions": {} + } + }, + "ICampaignFilterModelUserScoreFilterModel": { + "required": [ + "dimension", + "lowerbound", + "upperbound", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "UserScoreFilter" ], - "description": "An optional asset that will be used as context to show to the user." + "type": "string" }, - "randomCorrectProbability": { - "type": "number", - "description": "The probability that if the user answers at random that they'll be correct.", - "format": "double", - "nullable": true + "dimension": { + "type": "string" }, - "isCommonSense": { - "type": "boolean", - "description": "Whether this example should be treated as commonsense validation.", - "nullable": true + "lowerbound": { + "type": "number", + "format": "double" }, - "sortIndex": { - "type": "integer", - "description": "The sort index that controls the serving order of this example.", - "format": "int32", - "nullable": true + "upperbound": { + "type": "number", + "format": "double" } - }, - "description": "Input model for updating an audience example." + } }, - "UpdateAudienceRapidEndpoint_Input": { + "ICampaignSelectionModel": { + "required": [ + "_t" + ], "type": "object", - "properties": { - "truth": { - "oneOf": [ - { - "$ref": "#/components/schemas/IValidationTruthModel" - }, - { - "nullable": true - } - ], - "description": "The truth for the validation rapid." + "oneOf": [ + { + "$ref": "#/components/schemas/ICampaignSelectionModelAbTestSelectionModel" }, - "explanation": { - "type": "string", - "description": "The optional explanation that will be shown to the user when answering wrong.", - "nullable": true + { + "$ref": "#/components/schemas/ICampaignSelectionModelAudienceSelectionModel" }, - "context": { - "type": "string", - "description": "An optional text context that will be shown to the user.", - "nullable": true + { + "$ref": "#/components/schemas/ICampaignSelectionModelCappedSelectionModel" }, - "contextAsset": { - "oneOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - }, - { - "nullable": true - } + { + "$ref": "#/components/schemas/ICampaignSelectionModelConditionalValidationSelectionModel" + }, + { + "$ref": "#/components/schemas/ICampaignSelectionModelDemographicSelectionModel" + }, + { + "$ref": "#/components/schemas/ICampaignSelectionModelEnforcingSelectionModel" + }, + { + "$ref": "#/components/schemas/ICampaignSelectionModelLabelingSelectionModel" + }, + { + "$ref": "#/components/schemas/ICampaignSelectionModelShufflingSelectionModel" + }, + { + "$ref": "#/components/schemas/ICampaignSelectionModelStaticSelectionModel" + }, + { + "$ref": "#/components/schemas/ICampaignSelectionModelValidationSelectionModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "AbTestSelection": "#/components/schemas/ICampaignSelectionModelAbTestSelectionModel", + "AudienceSelection": "#/components/schemas/ICampaignSelectionModelAudienceSelectionModel", + "CappedSelection": "#/components/schemas/ICampaignSelectionModelCappedSelectionModel", + "ConditionalValidationSelection": "#/components/schemas/ICampaignSelectionModelConditionalValidationSelectionModel", + "DemographicSelection": "#/components/schemas/ICampaignSelectionModelDemographicSelectionModel", + "EnforcingSelection": "#/components/schemas/ICampaignSelectionModelEnforcingSelectionModel", + "LabelingSelection": "#/components/schemas/ICampaignSelectionModelLabelingSelectionModel", + "ShufflingSelection": "#/components/schemas/ICampaignSelectionModelShufflingSelectionModel", + "StaticSelection": "#/components/schemas/ICampaignSelectionModelStaticSelectionModel", + "ValidationSelection": "#/components/schemas/ICampaignSelectionModelValidationSelectionModel" + } + } + }, + "ICampaignSelectionModelAbTestSelectionModel": { + "required": [ + "a", + "b", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "AbTestSelection" ], - "description": "An optional asset that will be used as context to show to the user." + "type": "string" }, - "randomCorrectProbability": { - "type": "number", - "description": "The probability that if the user answers at random that they'll be correct.", - "format": "double", - "nullable": true + "a": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignSelectionModel" + } }, - "isCommonSense": { - "type": "boolean", - "description": "Whether this rapid should be treated as commonsense validation.", - "nullable": true + "b": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignSelectionModel" + } } - }, - "description": "Input model for updating an audience rapid." + } }, - "UpdateAudienceRequest": { - "type": "object", + "ICampaignSelectionModelAudienceSelectionModel": { + "required": [ + "audienceId", + "effort", + "retrievalMode", + "_t" + ], "properties": { - "name": { - "type": "string", - "description": "The new name to give to this audience.", - "nullable": true - }, - "description": { - "type": "string", - "description": "The new description for the audience. Supports markdown. Set to null to remove.", - "nullable": true - }, - "filters": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAudienceFilter" - } - }, - { - "nullable": true - } - ], - "description": "The new filters to apply to any orders created for this audience.\n A filter can be used to restrict the audience to a specific subset of users." - }, - "logo": { - "oneOf": [ - { - "$ref": "#/components/schemas/ExistingAssetInput" - }, - { - "nullable": true - } + "_t": { + "enum": [ + "AudienceSelection" ], - "description": "The new logo image for the audience. Must be an existing image asset.\n Set to null to remove the logo." - }, - "minGraduatedForDistillingBoost": { - "type": "integer", - "description": "Minimum graduated users before disabling distilling boost.\n When graduated count is below this, external distilling audience ID is added to campaign boosting.", - "format": "int32", - "nullable": true - }, - "minDistillingForGlobalBoost": { - "type": "integer", - "description": "Minimum distilling users before disabling global boost.\n When distilling count is below this, GlobalBoostLevel is set above zero.", - "format": "int32", - "nullable": true - }, - "graduationScore": { - "type": "number", - "description": "The score used to determine whether a user graduates from the distilling campaign.", - "format": "double", - "nullable": true - }, - "demotionScore": { - "type": "number", - "description": "Score below which a graduated user is demoted back to distilling.\n Must be less than or equal to GraduationScore. Set to null to use GraduationScore.", - "format": "double", - "nullable": true + "type": "string" }, - "maxDistillingResponses": { - "type": "integer", - "description": "Maximum responses before user exits the distilling campaign.\n Set to null to disable this exit condition.", - "format": "uint32", - "nullable": true + "audienceId": { + "type": "string" }, - "dropMinResponses": { + "effort": { "type": "integer", - "description": "Minimum responses before the drop score check applies.\n Users need at least this many responses before they can be kicked out for low score.\n Set to null to apply drop score check from the first response.", - "format": "uint32", - "nullable": true - }, - "dropScore": { - "type": "number", - "description": "Score floor - users below this score exit the distilling campaign\n (only after completing DropMinResponses).\n Set to null to disable this exit condition.", - "format": "double", - "nullable": true + "format": "int32" }, - "maxDistillingSessions": { - "type": "integer", - "description": "Maximum sessions (rapid retrievals) before user exits the distilling campaign.\n Set to a value to enable session-based exit condition.", - "format": "uint32", - "nullable": true + "retrievalMode": { + "$ref": "#/components/schemas/RetrievalMode" }, - "inactivityDropDays": { + "maxIterations": { "type": "integer", - "description": "Number of days of inactivity before a distilling user is dropped.\n Set to null to disable this exit condition.", - "format": "uint32", - "nullable": true + "format": "int32" + } + } + }, + "ICampaignSelectionModelCappedSelectionModel": { + "required": [ + "selections", + "maxRapids", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "CappedSelection" + ], + "type": "string" }, - "minSubmissionRate": { - "type": "number", - "description": "Minimum submission rate (responses / sessions) before a user is dropped.\n Set to null to disable this exit condition.", - "format": "double", - "nullable": true + "selections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignSelectionModel" + } }, - "minSessionsForSubmissionRate": { + "maxRapids": { "type": "integer", - "description": "Minimum number of sessions before the submission rate check applies.\n Set to null to apply from the first session.", - "format": "uint32", - "nullable": true + "format": "int32" + } + } + }, + "ICampaignSelectionModelConditionalValidationSelectionModel": { + "required": [ + "validationChances", + "dimensions", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "ConditionalValidationSelection" + ], + "type": "string" }, - "minSubmissionRateGraduated": { - "type": "number", - "description": "Minimum submission rate for graduated users. If null, MinSubmissionRate applies to graduated users.\n Set a lower value to be more lenient with graduated users.", - "format": "double", - "nullable": true + "validationChances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ValidationChanceModel" + } }, - "distillingRetrievalMode": { + "dimensions": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ICampaignSelectionModelDemographicSelectionModel": { + "required": [ + "keys", + "maxRapids", + "_t" + ], + "properties": { + "_t": { "enum": [ - "Random", - "Shuffled", - "Sequential" + "DemographicSelection" ], - "description": "The retrieval mode used by the distilling campaign to select rapids for users." + "type": "string" }, - "minimumUserScore": { - "type": "number", - "description": "Use instead.", - "format": "double", - "nullable": true, - "deprecated": true + "keys": { + "type": "array", + "items": { + "type": "string" + } }, - "minDistillingScoreFloor": { + "probability": { "type": "number", - "description": "Use instead.", - "format": "double", - "nullable": true, - "deprecated": true + "format": "double" }, - "minDistillingResponses": { + "maxRapids": { "type": "integer", - "description": "Use instead.", - "format": "uint32", - "nullable": true, - "deprecated": true + "format": "int32" } - }, - "description": "The body request to update an audience." + } }, - "UpdateBoostConfigEndpoint_Input": { - "type": "object", + "ICampaignSelectionModelEnforcingSelectionModel": { + "required": [ + "selections", + "minSelections", + "minRapids", + "_t" + ], "properties": { - "minDistillingForGlobalBoost": { + "_t": { + "enum": [ + "EnforcingSelection" + ], + "type": "string" + }, + "selections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignSelectionModel" + } + }, + "minSelections": { "type": "integer", - "description": "Minimum number of distilling users required to activate global boost.", "format": "int32" }, - "minGraduatedForDistillingBoost": { + "minRapids": { "type": "integer", - "description": "Minimum number of graduated users required to activate distilling boost.", "format": "int32" } } }, - "AudienceBoostModel": { + "ICampaignSelectionModelLabelingSelectionModel": { "required": [ - "externalAudienceId", - "level" + "effortBudget", + "retrievalMode", + "_t" ], - "type": "object", "properties": { - "externalAudienceId": { + "_t": { + "enum": [ + "LabelingSelection" + ], + "type": "string" + }, + "amount": { "type": "integer", "format": "int32" }, - "level": { + "effortBudget": { + "type": "integer", + "format": "int32" + }, + "retrievalMode": { + "$ref": "#/components/schemas/RetrievalMode" + }, + "maxIterations": { "type": "integer", "format": "int32" } } }, - "BoostingControlMode": { - "enum": [ - "Manual", - "Automatic" - ] - }, - "BoostingProfileModel": { + "ICampaignSelectionModelShufflingSelectionModel": { "required": [ - "globalBoostLevel", - "prospectBlacklist", - "distillingBoosts", - "labelingBoosts" + "selections", + "_t" ], - "type": "object", "properties": { - "globalBoostLevel": { - "type": "integer", - "format": "int32" - }, - "languageBoosts": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - ], - "deprecated": true - }, - "kayzenAudienceIds": { - "allOf": [ - { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - } + "_t": { + "enum": [ + "ShufflingSelection" ], - "deprecated": true - }, - "prospectBlacklist": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - }, - "distillingBoosts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AudienceBoostModel" - } + "type": "string" }, - "labelingBoosts": { + "selections": { "type": "array", "items": { - "$ref": "#/components/schemas/AudienceBoostModel" + "$ref": "#/components/schemas/ICampaignSelectionModel" } } } }, - "BoostMode": { - "enum": [ - "Automatic", - "Manual" - ], - "description": "The current boost mode." - }, - "BoostStatusModel": { - "enum": [ - "Active", - "Inactive", - "Partial", - "Unknown" - ], - "description": "The current boost status." - }, - "CampaignStatusModel": { - "enum": [ - "Created", - "Preview", - "Active", - "Analysis", - "Paused", - "Completed" - ] - }, - "ChangeBoostEndpoint_Input": { - "required": [ - "isManual" - ], - "type": "object", - "properties": { - "isManual": { - "type": "boolean", - "description": "Whether the manual overwrite should be applied." - }, - "isActive": { - "type": "boolean", - "description": "Whether the boost is active. Deprecated in favor of Level.", - "deprecated": true - }, - "level": { - "type": "integer", - "description": "The boost level. Takes precedence over IsActive when set.", - "format": "int32" - } - } - }, - "ComparisonOperator": { - "enum": [ - "Equal", - "NotEqual", - "LessThan", - "LessThanOrEqual", - "GreaterThan", - "GreaterThanOrEqual" - ] - }, - "DeviceType": { - "enum": [ - "Unknown", - "Phone", - "Tablet" - ] - }, - "GetBoostInsightsEndpoint_AudienceOutput": { + "ICampaignSelectionModelStaticSelectionModel": { "required": [ - "externalAudienceId", - "contributors" + "rapidIds", + "_t" ], - "type": "object", "properties": { - "externalAudienceId": { - "type": "integer", - "format": "int32" + "_t": { + "enum": [ + "StaticSelection" + ], + "type": "string" }, - "contributors": { + "rapidIds": { "type": "array", "items": { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_ContributorOutput" + "type": "string" } } } }, - "GetBoostInsightsEndpoint_ContributorOutput": { + "ICampaignSelectionModelValidationSelectionModel": { "required": [ - "campaignId", - "campaignName" + "validationSetId", + "_t" ], - "type": "object", "properties": { - "campaignId": { + "_t": { + "enum": [ + "ValidationSelection" + ], "type": "string" }, - "campaignName": { + "validationSetId": { "type": "string" + }, + "amount": { + "type": "integer", + "format": "int32" + }, + "effortBudget": { + "type": "integer", + "format": "int32" } } }, - "GetBoostInsightsEndpoint_GlobalBoostOutput": { + "QueryCampaignsEndpoint_Output": { "required": [ - "effectiveLevel", - "contributors" + "id", + "name", + "status", + "priority", + "hasBooster", + "ownerMail", + "createdAt" ], "type": "object", "properties": { - "effectiveLevel": { + "id": { + "type": "string", + "description": "The unique identifier of the campaign." + }, + "name": { + "type": "string", + "description": "The name of the campaign." + }, + "status": { + "$ref": "#/components/schemas/CampaignStatusModel" + }, + "priority": { "type": "integer", + "description": "The priority level of the campaign.", "format": "int32" }, - "contributors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LevelContributorOutput" - } + "hasBooster": { + "type": "boolean", + "description": "Whether the campaign has a booster." + }, + "requiresBooster": { + "type": "boolean", + "description": "Whether the campaign requires a booster.", + "deprecated": true + }, + "ownerMail": { + "type": "string", + "description": "The email of the campaign owner." + }, + "createdAt": { + "type": "string", + "description": "The timestamp when the campaign was created.", + "format": "date-time" } } }, - "GetBoostInsightsEndpoint_LanguageBoostOutput": { + "QueryCampaignsEndpoint_PagedResultOfOutput": { "required": [ - "language", - "contributors" + "total", + "page", + "pageSize", + "items" ], "type": "object", "properties": { - "language": { - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "contributors": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_ContributorOutput" + "$ref": "#/components/schemas/QueryCampaignsEndpoint_Output" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "GetBoostInsightsEndpoint_LevelContributorOutput": { + "QueryExternalAudiencesEndpoint_Output": { "required": [ - "campaignId", - "campaignName", - "level" + "id", + "name" ], "type": "object", "properties": { - "campaignId": { - "type": "string" + "id": { + "type": "integer", + "description": "The external audience identifier.", + "format": "int32" }, - "campaignName": { - "type": "string" + "name": { + "type": "string", + "description": "The name of the external audience." }, - "level": { + "count": { "type": "integer", - "format": "int32" + "description": "The number of users in the audience.", + "format": "int64" } } }, - "GetBoostInsightsEndpoint_LeveledAudienceOutput": { + "QueryExternalAudiencesEndpoint_PagedResultOfOutput": { "required": [ - "externalAudienceId", - "effectiveLevel", - "contributors" + "total", + "page", + "pageSize", + "items" ], "type": "object", "properties": { - "externalAudienceId": { + "total": { + "type": "integer", + "format": "int64" + }, + "page": { "type": "integer", "format": "int32" }, - "effectiveLevel": { + "pageSize": { "type": "integer", "format": "int32" }, - "contributors": { + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LevelContributorOutput" + "$ref": "#/components/schemas/QueryExternalAudiencesEndpoint_Output" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "GetBoostInsightsEndpoint_Output": { - "required": [ - "mode", - "manualOverrideLevel", - "globalBoost", - "prospectBlacklist", - "distillingBoosts", - "labelingBoosts" - ], + "RetrievalMode": { + "enum": [ + "Random", + "Shuffled", + "Sequential" + ] + }, + "SetManualGlobalBoostLevelEndpoint_Input": { "type": "object", "properties": { - "mode": { - "$ref": "#/components/schemas/BoostMode" - }, - "manualOverrideLevel": { + "level": { "type": "integer", - "description": "The manual override level, if manual mode is active.", + "description": "The global boost level. Null disables manual mode and returns to automatic.", "format": "int32" - }, - "globalBoost": { - "allOf": [ - { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_GlobalBoostOutput" - } - ], - "description": "Global boost insight with contributing campaigns." - }, - "languageBoosts": { - "allOf": [ - { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LanguageBoostOutput" - }, - "nullable": true - } - ], - "deprecated": true - } - ], - "description": "Language-specific boost insights." - }, - "audienceBoosts": { - "allOf": [ - { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_AudienceOutput" - }, - "nullable": true - } - ], - "deprecated": true - } - ], - "description": "Audience boost insights." - }, - "prospectBlacklist": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_AudienceOutput" - } - } - ], - "description": "Prospect blacklist insights." - }, - "distillingBoosts": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LeveledAudienceOutput" - } - } - ], - "description": "Distilling boost insights." - }, - "labelingBoosts": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetBoostInsightsEndpoint_LeveledAudienceOutput" - } - } - ], - "description": "Labeling boost insights." } } }, - "GetBoostStatusEndpoint_Output": { + "SimplifiedAudienceUserState": { + "enum": [ + "Distilling", + "Graduated", + "Dropped" + ] + }, + "StickyConfigModel": { "required": [ - "status", - "mode", - "activeCampaigns", - "inactiveCampaigns", - "unknownCampaigns" + "isEnabled", + "bypassFilters", + "bypassPrioritySelection", + "blockOtherStickyCampaigns", + "clearOnPause" ], "type": "object", "properties": { - "status": { - "$ref": "#/components/schemas/BoostStatusModel" + "isEnabled": { + "type": "boolean" }, - "mode": { - "$ref": "#/components/schemas/BoostMode" + "bypassFilters": { + "type": "boolean" }, - "activeCampaigns": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "The list of active campaign identifiers." + "bypassPrioritySelection": { + "type": "boolean" }, - "inactiveCampaigns": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "The list of inactive campaign identifiers." + "blockOtherStickyCampaigns": { + "type": "boolean" }, - "unknownCampaigns": { - "allOf": [ - { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - } - ], - "description": "The list of unknown campaign identifiers." + "clearOnPause": { + "type": "boolean" } } }, - "GetCampaignByIdEndpoint_Output": { - "required": [ - "id", - "name", - "status", - "priority", - "boostingProfile", - "boostingControlMode", - "hasBooster", - "stickyConfig", - "filters", - "selections", - "featureFlags", - "ownerMail", - "createdAt" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the campaign." - }, + "UpdateCampaignEndpoint_Input": { + "type": "object", + "properties": { "name": { "type": "string", - "description": "The name of the campaign." - }, - "status": { - "$ref": "#/components/schemas/CampaignStatusModel" + "description": "The new name for the campaign.", + "nullable": true }, "priority": { "type": "integer", - "description": "The priority level of the campaign.", - "format": "int32" + "description": "The new priority value for the campaign.", + "format": "int32", + "nullable": true }, "boostingProfile": { - "allOf": [ + "oneOf": [ { "$ref": "#/components/schemas/BoostingProfileModel" + }, + { + "nullable": true } ], "description": "The boosting profile configuration." }, - "boostingControlMode": { - "$ref": "#/components/schemas/BoostingControlMode" - }, - "hasBooster": { - "type": "boolean", - "description": "Whether the campaign has a booster." - }, - "requiresBooster": { - "type": "boolean", - "description": "Whether the campaign requires a booster.", - "deprecated": true - }, "stickyConfig": { - "allOf": [ + "oneOf": [ { "$ref": "#/components/schemas/StickyConfigModel" + }, + { + "nullable": true } ], "description": "The sticky behavior configuration." }, "filters": { - "allOf": [ + "oneOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/ICampaignFilterModel" } + }, + { + "nullable": true } ], - "description": "The targeting filters for this campaign." + "description": "The targeting filters for the campaign." }, "selections": { - "allOf": [ + "oneOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/ICampaignSelectionModel" } + }, + { + "nullable": true } ], - "description": "The rapid selections for this campaign." + "description": "The rapid selections for the campaign." }, "featureFlags": { - "allOf": [ + "oneOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/FeatureFlag" } - } - ], - "description": "The feature flags configured for this campaign." - }, - "ownerMail": { - "type": "string", - "description": "The email of the campaign owner." - }, - "createdAt": { - "type": "string", - "description": "The timestamp when the campaign was created.", - "format": "date-time" - } - } - }, - "GetCampaignCacheEndpoint_CampaignEntry": { - "required": [ - "id", - "name", - "status", - "priority", - "filterCount", - "selectionCount", - "userScoreDimensionCount", - "featureFlagCount", - "rateLimitCount", - "isPreviewEnabled", - "boostingControlMode" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/CampaignStatusModel" - }, - "priority": { - "type": "integer", - "format": "int32" - }, - "filterCount": { - "type": "integer", - "format": "int32" - }, - "selectionCount": { - "type": "integer", - "format": "int32" - }, - "userScoreDimensionCount": { - "type": "integer", - "format": "int32" - }, - "featureFlagCount": { - "type": "integer", - "format": "int32" - }, - "rateLimitCount": { - "type": "integer", - "format": "int32" - }, - "isPreviewEnabled": { - "type": "boolean" - }, - "boostingControlMode": { - "$ref": "#/components/schemas/BoostingControlMode" - } - } - }, - "GetCampaignCacheEndpoint_Output": { - "required": [ - "count", - "campaigns" - ], - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "The total number of cached campaigns.", - "format": "int32" - }, - "campaigns": { - "allOf": [ + }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetCampaignCacheEndpoint_CampaignEntry" - } + "nullable": true } ], - "description": "The list of cached campaign summaries." - } - } - }, - "GetUserScoreCacheEndpoint_Output": { - "required": [ - "count", - "scores" - ], - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "The total number of cached user scores.", - "format": "int32" - }, - "scores": { - "type": "object", - "additionalProperties": { - "type": "number", - "format": "double" - }, - "description": "The cached dimension-to-score mappings." - } - } - }, - "ICampaignFilterModel": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/ICampaignFilterModelAndFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelAudienceStateFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelCampaignIdFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelCampaignSessionCountFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelCountryFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelDemographicFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelDeviceFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelLanguageFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelNewUserFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelNotFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelOrFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelResponseCountFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelUserActionRestrictionFilterModel" - }, - { - "$ref": "#/components/schemas/ICampaignFilterModelUserScoreFilterModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "AndFilter": "#/components/schemas/ICampaignFilterModelAndFilterModel", - "AudienceStateFilter": "#/components/schemas/ICampaignFilterModelAudienceStateFilterModel", - "CampaignIdFilter": "#/components/schemas/ICampaignFilterModelCampaignIdFilterModel", - "CampaignSessionCountFilter": "#/components/schemas/ICampaignFilterModelCampaignSessionCountFilterModel", - "CountryFilter": "#/components/schemas/ICampaignFilterModelCountryFilterModel", - "DemographicFilter": "#/components/schemas/ICampaignFilterModelDemographicFilterModel", - "DeviceFilter": "#/components/schemas/ICampaignFilterModelDeviceFilterModel", - "LanguageFilter": "#/components/schemas/ICampaignFilterModelLanguageFilterModel", - "NewUserFilter": "#/components/schemas/ICampaignFilterModelNewUserFilterModel", - "NotFilter": "#/components/schemas/ICampaignFilterModelNotFilterModel", - "OrFilter": "#/components/schemas/ICampaignFilterModelOrFilterModel", - "ResponseCountFilter": "#/components/schemas/ICampaignFilterModelResponseCountFilterModel", - "UserActionRestrictionFilter": "#/components/schemas/ICampaignFilterModelUserActionRestrictionFilterModel", - "UserScoreFilter": "#/components/schemas/ICampaignFilterModelUserScoreFilterModel" - } - } - }, - "ICampaignFilterModelAndFilterModel": { - "required": [ - "filters", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "AndFilter" - ], - "type": "string" - }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignFilterModel" - } + "description": "The feature flags for the campaign." } } }, - "ICampaignFilterModelAudienceStateFilterModel": { + "ValidationChanceModel": { "required": [ - "audienceId", - "allowedStates", - "includeUnknownState", - "_t" + "userScoreThreshold", + "chance", + "rapidCount" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "AudienceStateFilter" - ], - "type": "string" + "userScoreThreshold": { + "type": "number", + "format": "double" }, - "audienceId": { - "type": "string" + "chance": { + "type": "number", + "format": "double" }, - "allowedStates": { + "rapidCount": { + "type": "integer", + "format": "int32" + }, + "selections": { "type": "array", "items": { - "$ref": "#/components/schemas/SimplifiedAudienceUserState" - } - }, - "includeUnknownState": { - "type": "boolean" + "$ref": "#/components/schemas/ICampaignSelectionModel" + }, + "nullable": true } } }, - "ICampaignFilterModelCampaignIdFilterModel": { + "CreateDatapointModel": { "required": [ - "campaignIds", - "_t" + "asset" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CampaignIdFilter" + "asset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetInput" + } ], - "type": "string" + "description": "The asset within the datapoint" }, - "campaignIds": { - "type": "array", - "items": { + "context": { + "type": "string", + "description": "An additional context to show the users when solving the rapid.", + "nullable": true + }, + "contextAsset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetInput" + } + ], + "description": "ContextAsset" + }, + "sortIndex": { + "type": "integer", + "description": "The sort index represents the order of the datapoint in the dataset", + "format": "int64" + }, + "group": { + "type": "string", + "description": "The group a datapoint belongs to.", + "nullable": true + }, + "transcription": { + "type": "string", + "description": "For audio or video assets, an optional transcription of the content.", + "nullable": true + }, + "privateMetadata": { + "type": "object", + "additionalProperties": { "type": "string" - } + }, + "description": "Private metadata for internal tracking. Not displayed to users.", + "nullable": true } - } + }, + "description": "The body request for creating a new datapoint" }, - "ICampaignFilterModelCampaignSessionCountFilterModel": { + "CreateDatapointResult": { "required": [ - "sessionCount", - "operator", - "_t" + "datapointId" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CampaignSessionCountFilter" - ], + "datapointId": { "type": "string" - }, - "sessionCount": { - "type": "integer", - "format": "uint32" - }, - "operator": { - "$ref": "#/components/schemas/ComparisonOperator" } } }, - "ICampaignFilterModelCountryFilterModel": { + "CreateDatasetEndpoint_Input": { "required": [ - "countries", - "_t" + "name" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CountryFilter" - ], - "type": "string" - }, - "countries": { - "type": "array", - "items": { - "type": "string" - } + "name": { + "type": "string", + "description": "The name to give to the new dataset." } - } + }, + "description": "The input for the create dataset endpoint." }, - "ICampaignFilterModelDemographicFilterModel": { + "CreateDatasetEndpoint_Output": { "required": [ - "identifier", - "values", - "_t" + "datasetId" + ], + "type": "object", + "properties": { + "datasetId": { + "type": "string", + "description": "The id of the created dataset." + } + }, + "description": "The result when a dataset has been created." + }, + "CreateDatasetGroupEndpoint_Input": { + "required": [ + "group" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "DemographicFilter" + "group": { + "type": "string", + "description": "The name of the group." + }, + "context": { + "type": "string", + "description": "The optional text context for the group.", + "nullable": true + }, + "contextAsset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetInput" + } ], - "type": "string" + "description": "The optional asset context for the group." + } + } + }, + "DatapointState": { + "enum": [ + "Ready", + "Pending", + "Failed" + ] + }, + "Filter": { + "type": "object", + "properties": { + "field": { + "type": "string", + "nullable": true }, - "identifier": { - "type": "string" + "value": {}, + "operator": { + "$ref": "#/components/schemas/FilterOperator" }, - "values": { + "logic": { + "$ref": "#/components/schemas/LogicOperator" + }, + "filters": { "type": "array", "items": { - "type": "string" - } + "$ref": "#/components/schemas/Filter" + }, + "nullable": true } } }, - "ICampaignFilterModelDeviceFilterModel": { + "FilterOperator": { + "enum": [ + "Eq", + "Neq", + "Gt", + "Gte", + "Lt", + "Lte", + "Contains", + "StartsWith", + "EndsWith", + "In", + "NotContains" + ] + }, + "GetDatapointByIdResult": { "required": [ - "deviceTypes", - "_t" + "id", + "datasetId", + "state", + "sortIndex", + "asset", + "createdAt" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "DeviceFilter" - ], + "id": { "type": "string" }, - "deviceTypes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceType" - } + "datasetId": { + "type": "string" + }, + "state": { + "$ref": "#/components/schemas/DatapointState" + }, + "sortIndex": { + "type": "integer", + "format": "int64" + }, + "asset": { + "$ref": "#/components/schemas/IAssetModel" + }, + "createdAt": { + "type": "string", + "format": "date-time" } } }, - "ICampaignFilterModelLanguageFilterModel": { + "GetDatasetByIdResult": { "required": [ - "languages", - "_t" + "name" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "LanguageFilter" - ], + "name": { "type": "string" - }, - "languages": { - "type": "array", - "items": { - "type": "string" - } } } }, - "ICampaignFilterModelNewUserFilterModel": { + "GetDatasetProgressResult": { "required": [ - "_t" + "total", + "ready", + "pending", + "failed" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "NewUserFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int32" + }, + "ready": { + "type": "integer", + "format": "int32" + }, + "pending": { + "type": "integer", + "format": "int32" + }, + "failed": { + "type": "integer", + "format": "int32" } } }, - "ICampaignFilterModelNotFilterModel": { + "GetFailedDatapointsResult": { "required": [ - "filter", - "_t" + "datapoints" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "NotFilter" - ], - "type": "string" - }, - "filter": { - "$ref": "#/components/schemas/ICampaignFilterModel" + "datapoints": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetFailedDatapointsResult_Datapoint" + } } } }, - "ICampaignFilterModelOrFilterModel": { + "GetFailedDatapointsResult_Datapoint": { "required": [ - "filters", - "_t" + "id", + "datasetId", + "sortIndex", + "asset", + "createdAt" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "OrFilter" - ], + "id": { "type": "string" }, - "filters": {} + "datasetId": { + "type": "string" + }, + "sortIndex": { + "type": "integer", + "format": "int64" + }, + "asset": { + "$ref": "#/components/schemas/IAssetModel" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } } }, - "ICampaignFilterModelResponseCountFilterModel": { + "LogicOperator": { + "enum": [ + "And", + "Or", + "Not" + ] + }, + "PagedResultOfQueryDatapointsByDatasetIdResult": { "required": [ - "dimension", - "responseCount", - "operator", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "ResponseCountFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "dimension": { - "type": "string" + "page": { + "type": "integer", + "format": "int32" }, - "responseCount": { + "pageSize": { "type": "integer", - "format": "uint32" + "format": "int32" }, - "operator": { - "$ref": "#/components/schemas/ComparisonOperator" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryDatapointsByDatasetIdResult" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "ICampaignFilterModelUserActionRestrictionFilterModel": { - "required": [ - "requiredActions", - "_t" - ], + "Pagination": { + "type": "object", "properties": { - "_t": { - "enum": [ - "UserActionRestrictionFilter" - ], - "type": "string" + "index": { + "type": "integer", + "format": "int32" }, - "requiredActions": {} + "size": { + "type": "integer", + "format": "int32" + } } }, - "ICampaignFilterModelUserScoreFilterModel": { + "QueryDatapointsByDatasetIdResult": { "required": [ - "dimension", - "lowerbound", - "upperbound", - "_t" + "id", + "datasetId", + "asset" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "UserScoreFilter" - ], + "id": { "type": "string" }, - "dimension": { + "datasetId": { "type": "string" }, - "lowerbound": { - "type": "number", - "format": "double" - }, - "upperbound": { - "type": "number", - "format": "double" + "asset": { + "$ref": "#/components/schemas/IAssetModel" } } }, - "ICampaignSelectionModel": { - "required": [ - "_t" - ], + "QueryModel": { "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/ICampaignSelectionModelAbTestSelectionModel" - }, - { - "$ref": "#/components/schemas/ICampaignSelectionModelAudienceSelectionModel" - }, - { - "$ref": "#/components/schemas/ICampaignSelectionModelCappedSelectionModel" - }, - { - "$ref": "#/components/schemas/ICampaignSelectionModelConditionalValidationSelectionModel" - }, - { - "$ref": "#/components/schemas/ICampaignSelectionModelDemographicSelectionModel" - }, - { - "$ref": "#/components/schemas/ICampaignSelectionModelEnforcingSelectionModel" - }, - { - "$ref": "#/components/schemas/ICampaignSelectionModelLabelingSelectionModel" - }, - { - "$ref": "#/components/schemas/ICampaignSelectionModelShufflingSelectionModel" + "properties": { + "page": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/Pagination" + } + ] }, - { - "$ref": "#/components/schemas/ICampaignSelectionModelStaticSelectionModel" + "filter": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/RootFilter" + } + ] }, - { - "$ref": "#/components/schemas/ICampaignSelectionModelValidationSelectionModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "AbTestSelection": "#/components/schemas/ICampaignSelectionModelAbTestSelectionModel", - "AudienceSelection": "#/components/schemas/ICampaignSelectionModelAudienceSelectionModel", - "CappedSelection": "#/components/schemas/ICampaignSelectionModelCappedSelectionModel", - "ConditionalValidationSelection": "#/components/schemas/ICampaignSelectionModelConditionalValidationSelectionModel", - "DemographicSelection": "#/components/schemas/ICampaignSelectionModelDemographicSelectionModel", - "EnforcingSelection": "#/components/schemas/ICampaignSelectionModelEnforcingSelectionModel", - "LabelingSelection": "#/components/schemas/ICampaignSelectionModelLabelingSelectionModel", - "ShufflingSelection": "#/components/schemas/ICampaignSelectionModelShufflingSelectionModel", - "StaticSelection": "#/components/schemas/ICampaignSelectionModelStaticSelectionModel", - "ValidationSelection": "#/components/schemas/ICampaignSelectionModelValidationSelectionModel" + "sortCriteria": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SortCriterion" + }, + "nullable": true } } }, - "ICampaignSelectionModelAbTestSelectionModel": { + "RootFilter": { "required": [ - "a", - "b", - "_t" + "filters" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "AbTestSelection" - ], - "type": "string" - }, - "a": { + "filters": { "type": "array", "items": { - "$ref": "#/components/schemas/ICampaignSelectionModel" + "$ref": "#/components/schemas/Filter" } }, - "b": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignSelectionModel" - } + "logic": { + "$ref": "#/components/schemas/LogicOperator" } } }, - "ICampaignSelectionModelAudienceSelectionModel": { + "SortCriterion": { "required": [ - "audienceId", - "effort", - "retrievalMode", - "_t" + "propertyName" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "AudienceSelection" - ], - "type": "string" - }, - "audienceId": { + "propertyName": { "type": "string" }, - "effort": { - "type": "integer", - "format": "int32" - }, - "retrievalMode": { - "$ref": "#/components/schemas/RetrievalMode" - }, - "maxIterations": { - "type": "integer", - "format": "int32" + "direction": { + "$ref": "#/components/schemas/SortDirection" } } }, - "ICampaignSelectionModelCappedSelectionModel": { + "SortDirection": { + "enum": [ + "Asc", + "Desc" + ] + }, + "UpdateDatasetNameModel": { "required": [ - "selections", - "maxRapids", - "_t" + "name" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CappedSelection" - ], - "type": "string" - }, - "selections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignSelectionModel" - } - }, - "maxRapids": { - "type": "integer", - "format": "int32" + "name": { + "type": "string", + "description": "The new name of the dataset." } - } + }, + "description": "The body request for updating the name of a dataset." }, - "ICampaignSelectionModelConditionalValidationSelectionModel": { + "AudienceBoostModel2": { "required": [ - "validationChances", - "dimensions", - "_t" + "audienceId", + "level" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "ConditionalValidationSelection" - ], + "audienceId": { "type": "string" }, - "validationChances": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ValidationChanceModel" - } - }, - "dimensions": { - "type": "array", - "items": { - "type": "string" - } + "level": { + "type": "integer", + "format": "int32" } } }, - "ICampaignSelectionModelDemographicSelectionModel": { + "CreateFlowEndpoint_Input": { "required": [ - "keys", - "maxRapids", - "_t" + "name", + "criteria" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "DemographicSelection" - ], - "type": "string" + "name": { + "type": "string", + "description": "The name of the ranking flow." }, - "keys": { - "type": "array", - "items": { - "type": "string" - } + "criteria": { + "type": "string", + "description": "The ranking criteria used to compare items." }, - "probability": { + "audienceId": { + "type": "string", + "description": "Optional audience ID. When provided, the flow will only be served to users in this audience.", + "nullable": true + }, + "validationSetId": { + "type": "string", + "description": "Optional ID of the validation set to use.", + "nullable": true + }, + "startingElo": { + "type": "integer", + "description": "Initial Elo rating for new items. Defaults to 1200.", + "format": "int32" + }, + "maxResponses": { + "type": "integer", + "description": "Maximum number of responses per comparison.", + "format": "int32" + }, + "serveResponses": { + "type": "integer", + "description": "Number of accepted responses per rapid at which to stop serving. When set, must be less than or equal to MaxResponses. Null defaults to MaxResponses.", + "format": "int32" + }, + "serveToResponseRatio": { "type": "number", + "description": "Ratio of concurrent serves to max responses. When set, limits serving to avoid over-collection.", "format": "double" }, - "maxRapids": { + "serveTimeoutSeconds": { "type": "integer", + "description": "Time in seconds a user has to submit an answer after loading the task. When set, overrides the global default.", "format": "int32" - } - } - }, - "ICampaignSelectionModelEnforcingSelectionModel": { - "required": [ - "selections", - "minSelections", - "minRapids", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "EnforcingSelection" + }, + "minResponses": { + "type": "integer", + "description": "Minimum number of responses per comparison. Defaults to 1.", + "format": "int32" + }, + "responsesRequired": { + "type": "integer", + "description": "Deprecated. Use MaxResponses instead.", + "format": "int32", + "deprecated": true + }, + "featureFlags": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + }, + "nullable": true + } ], - "type": "string" + "description": "Optional feature flags to enable for this flow." }, - "selections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignSelectionModel" - } + "targetResponseCount": { + "type": "integer", + "description": "Target average response count per completed item. Enables PID control when set.", + "format": "int32" }, - "minSelections": { + "pidProportionalGain": { + "type": "number", + "description": "PID proportional gain. Defaults to 1.0.", + "format": "double" + }, + "pidIntegralGain": { + "type": "number", + "description": "PID integral gain. Defaults to 0.1.", + "format": "double" + }, + "pidDerivativeGain": { + "type": "number", + "description": "PID derivative gain. Defaults to 0.05.", + "format": "double" + }, + "pidMinSessionsPerMinute": { "type": "integer", + "description": "Minimum sessions per minute the PID can set. Defaults to 10.", "format": "int32" }, - "minRapids": { + "pidMaxSessionsPerMinute": { + "type": "integer", + "description": "Maximum sessions per minute the PID can set. Defaults to 10000.", + "format": "int32" + }, + "pidBatchMode": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/PidBatchMode" + } + ] + }, + "drainDurationSeconds": { "type": "integer", + "description": "Duration in seconds for draining flow items. Defaults to 40.", "format": "int32" } } }, - "ICampaignSelectionModelLabelingSelectionModel": { + "CreateFlowEndpoint_Output": { + "required": [ + "flowId" + ], + "type": "object", + "properties": { + "flowId": { + "type": "string", + "description": "The ID of the created ranking flow." + } + } + }, + "CreateFlowItemEndpoint_Input": { "required": [ - "effortBudget", - "retrievalMode", - "_t" + "datasetId" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "LabelingSelection" - ], - "type": "string" + "datasetId": { + "type": "string", + "description": "The ID of the dataset to use for this flow item." }, - "amount": { - "type": "integer", - "format": "int32" + "context": { + "type": "string", + "description": "Optional context to provide additional ranking guidance.", + "nullable": true }, - "effortBudget": { + "timeToLiveInSeconds": { "type": "integer", + "description": "Optional time-to-live in seconds before the flow item expires.", "format": "int32" }, - "retrievalMode": { - "$ref": "#/components/schemas/RetrievalMode" - }, - "maxIterations": { + "drainDurationInSeconds": { "type": "integer", + "description": "Optional drain duration in seconds. When set, rapids are paused this many seconds before TTL expiry to allow in-flight responses to complete.", "format": "int32" } } }, - "ICampaignSelectionModelShufflingSelectionModel": { + "CreateFlowItemEndpoint_Output": { "required": [ - "selections", - "_t" + "flowItemId" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "ShufflingSelection" - ], - "type": "string" - }, - "selections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignSelectionModel" - } + "flowItemId": { + "type": "string", + "description": "The ID of the created flow item." } } }, - "ICampaignSelectionModelStaticSelectionModel": { + "FlowItemState": { + "enum": [ + "Pending", + "Running", + "Completed", + "Failed", + "Stopping", + "Stopped", + "Incomplete" + ], + "description": "The current state of the flow item." + }, + "FlowType": { + "enum": [ + "Ranking" + ], + "description": "The type of the flow. Use the _t discriminator instead.", + "deprecated": true + }, + "GetCompletionTimeHistogramEndpoint_Output": { "required": [ - "rapidIds", - "_t" + "buckets" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "StaticSelection" + "buckets": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetCompletionTimeHistogramEndpoint_Output_Bucket" + } + } ], - "type": "string" - }, - "rapidIds": { - "type": "array", - "items": { - "type": "string" - } + "description": "The histogram buckets." } } }, - "ICampaignSelectionModelValidationSelectionModel": { + "GetCompletionTimeHistogramEndpoint_Output_Bucket": { "required": [ - "validationSetId", - "_t" + "lowerBound", + "upperBound", + "count" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "ValidationSelection" - ], - "type": "string" - }, - "validationSetId": { - "type": "string" + "lowerBound": { + "type": "number", + "format": "double" }, - "amount": { - "type": "integer", - "format": "int32" + "upperBound": { + "type": "number", + "format": "double" }, - "effortBudget": { + "count": { "type": "integer", "format": "int32" } } }, - "QueryCampaignsEndpoint_Output": { + "GetFlowItemByIdEndpoint_Output": { "required": [ "id", - "name", - "status", - "priority", - "hasBooster", - "ownerMail", + "flowId", + "datasetId", + "state", "createdAt" ], "type": "object", "properties": { "id": { "type": "string", - "description": "The unique identifier of the campaign." + "description": "The unique identifier of the flow item." }, - "name": { + "flowId": { "type": "string", - "description": "The name of the campaign." + "description": "The ID of the flow this item belongs to." }, - "status": { - "$ref": "#/components/schemas/CampaignStatusModel" + "datasetId": { + "type": "string", + "description": "The ID of the dataset used by this flow item." }, - "priority": { - "type": "integer", - "description": "The priority level of the campaign.", - "format": "int32" + "workflowId": { + "type": "string", + "description": "The ID of the workflow created for this flow item.", + "nullable": true }, - "hasBooster": { - "type": "boolean", - "description": "Whether the campaign has a booster." + "state": { + "$ref": "#/components/schemas/FlowItemState" }, - "requiresBooster": { - "type": "boolean", - "description": "Whether the campaign requires a booster.", - "deprecated": true + "context": { + "type": "string", + "description": "Optional context associated with this flow item.", + "nullable": true }, - "ownerMail": { + "failureMessage": { "type": "string", - "description": "The email of the campaign owner." + "description": "The failure message if the flow item failed.", + "nullable": true + }, + "expiresAt": { + "type": "string", + "description": "The expiration timestamp of the flow item.", + "format": "date-time", + "nullable": true }, "createdAt": { "type": "string", - "description": "The timestamp when the campaign was created.", + "description": "The timestamp when the flow item was created.", "format": "date-time" - } - } - }, - "QueryCampaignsEndpoint_PagedResultOfOutput": { - "required": [ - "total", - "page", - "pageSize", - "items" - ], - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { - "type": "integer", - "format": "int32" + "startedAt": { + "type": "string", + "description": "The timestamp when the flow item started processing.", + "format": "date-time", + "nullable": true }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryCampaignsEndpoint_Output" - } + "completedAt": { + "type": "string", + "description": "The timestamp when the flow item completed.", + "format": "date-time", + "nullable": true }, - "totalPages": { - "type": "integer", - "format": "int32" + "failedAt": { + "type": "string", + "description": "The timestamp when the flow item failed.", + "format": "date-time", + "nullable": true } } }, - "QueryExternalAudiencesEndpoint_Output": { + "GetFlowItemCreationTimeseriesEndpoint_Output": { "required": [ - "id", - "name" + "datapoints" ], "type": "object", "properties": { - "id": { - "type": "integer", - "description": "The external audience identifier.", - "format": "int32" - }, - "name": { - "type": "string", - "description": "The name of the external audience." - }, - "count": { - "type": "integer", - "description": "The number of users in the audience.", - "format": "int64" + "datapoints": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetFlowItemCreationTimeseriesEndpoint_Output_DataPoint" + } + } + ], + "description": "The timeseries data points." } } }, - "QueryExternalAudiencesEndpoint_PagedResultOfOutput": { + "GetFlowItemCreationTimeseriesEndpoint_Output_DataPoint": { "required": [ - "total", - "page", - "pageSize", - "items" + "timestamp", + "count" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { - "type": "integer", - "format": "int32" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryExternalAudiencesEndpoint_Output" - } + "timestamp": { + "type": "string", + "format": "date-time" }, - "totalPages": { + "count": { "type": "integer", - "format": "int32" + "format": "int64" } } }, - "RetrievalMode": { - "enum": [ - "Random", - "Shuffled", - "Sequential" - ] - }, - "SetManualGlobalBoostLevelEndpoint_Input": { + "GetRankingFlowItemResultsEndpoint_Output": { + "required": [ + "datapoints", + "totalVotes" + ], "type": "object", "properties": { - "level": { + "datapoints": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetRankingFlowItemResultsEndpoint_Output_Datapoint" + } + } + ], + "description": "The ranked datapoints with their Elo scores." + }, + "totalVotes": { "type": "integer", - "description": "The global boost level. Null disables manual mode and returns to automatic.", - "format": "int32" + "description": "The total number of votes across all datapoints.", + "format": "int64" } } }, - "SimplifiedAudienceUserState": { - "enum": [ - "Distilling", - "Graduated", - "Dropped" - ] - }, - "StickyConfigModel": { + "GetRankingFlowItemResultsEndpoint_Output_Datapoint": { "required": [ - "isEnabled", - "bypassFilters", - "bypassPrioritySelection", - "blockOtherStickyCampaigns", - "clearOnPause" + "id", + "asset", + "elo" ], "type": "object", "properties": { - "isEnabled": { - "type": "boolean" - }, - "bypassFilters": { - "type": "boolean" - }, - "bypassPrioritySelection": { - "type": "boolean" + "id": { + "type": "string" }, - "blockOtherStickyCampaigns": { - "type": "boolean" + "asset": { + "$ref": "#/components/schemas/IAssetModel" }, - "clearOnPause": { - "type": "boolean" + "elo": { + "type": "integer", + "format": "int32" } } }, - "UpdateCampaignEndpoint_Input": { + "GetRankingFlowItemVoteMatrixEndpoint_Output": { + "required": [ + "index", + "columns", + "data" + ], "type": "object", "properties": { - "name": { - "type": "string", - "description": "The new name for the campaign.", - "nullable": true - }, - "priority": { - "type": "integer", - "description": "The new priority value for the campaign.", - "format": "int32", - "nullable": true - }, - "boostingProfile": { - "oneOf": [ - { - "$ref": "#/components/schemas/BoostingProfileModel" - }, - { - "nullable": true - } - ], - "description": "The boosting profile configuration." - }, - "stickyConfig": { - "oneOf": [ - { - "$ref": "#/components/schemas/StickyConfigModel" - }, - { - "nullable": true - } - ], - "description": "The sticky behavior configuration." - }, - "filters": { - "oneOf": [ + "index": { + "allOf": [ { "type": "array", "items": { - "$ref": "#/components/schemas/ICampaignFilterModel" + "type": "string" } - }, - { - "nullable": true } ], - "description": "The targeting filters for the campaign." + "description": "Row labels of the vote matrix." }, - "selections": { - "oneOf": [ + "columns": { + "allOf": [ { "type": "array", "items": { - "$ref": "#/components/schemas/ICampaignSelectionModel" + "type": "string" } - }, - { - "nullable": true } ], - "description": "The rapid selections for the campaign." + "description": "Column labels of the vote matrix." }, - "featureFlags": { - "oneOf": [ + "data": { + "allOf": [ { "type": "array", "items": { - "$ref": "#/components/schemas/FeatureFlag" + "type": "array", + "items": { + "type": "number", + "format": "double" + } } - }, - { - "nullable": true } ], - "description": "The feature flags for the campaign." - } - } - }, - "ValidationChanceModel": { - "required": [ - "userScoreThreshold", - "chance", - "rapidCount" - ], - "type": "object", - "properties": { - "userScoreThreshold": { - "type": "number", - "format": "double" - }, - "chance": { - "type": "number", - "format": "double" - }, - "rapidCount": { - "type": "integer", - "format": "int32" - }, - "selections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignSelectionModel" - }, - "nullable": true + "description": "The vote counts as a two-dimensional matrix where Data[i][j] is the number of times row i was preferred over column j." } } }, - "CreateDatapointModel": { + "GetResponseCountHistogramEndpoint_Output": { "required": [ - "asset" + "buckets" ], "type": "object", "properties": { - "asset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - } - ], - "description": "The asset within the datapoint" - }, - "context": { - "type": "string", - "description": "An additional context to show the users when solving the rapid.", - "nullable": true - }, - "contextAsset": { + "buckets": { "allOf": [ { - "$ref": "#/components/schemas/IAssetInput" - } - ], - "description": "ContextAsset" - }, - "sortIndex": { - "type": "integer", - "description": "The sort index represents the order of the datapoint in the dataset", - "format": "int64" - }, - "group": { - "type": "string", - "description": "The group a datapoint belongs to.", - "nullable": true - }, - "transcription": { - "type": "string", - "description": "For audio or video assets, an optional transcription of the content.", - "nullable": true - }, - "privateMetadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Private metadata for internal tracking. Not displayed to users.", - "nullable": true + "type": "array", + "items": { + "$ref": "#/components/schemas/GetResponseCountHistogramEndpoint_Output_Bucket" + } + } + ], + "description": "The histogram buckets." } - }, - "description": "The body request for creating a new datapoint" + } }, - "CreateDatapointResult": { + "GetResponseCountHistogramEndpoint_Output_Bucket": { "required": [ - "datapointId" + "lowerBound", + "upperBound", + "count" ], "type": "object", "properties": { - "datapointId": { - "type": "string" + "lowerBound": { + "type": "number", + "format": "double" + }, + "upperBound": { + "type": "number", + "format": "double" + }, + "count": { + "type": "integer", + "format": "int32" } } }, - "CreateDatasetEndpoint_Input": { + "GetResponseCountTimeseriesEndpoint_Output": { "required": [ - "name" + "datapoints" ], "type": "object", "properties": { - "name": { - "type": "string", - "description": "The name to give to the new dataset." + "datapoints": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetResponseCountTimeseriesEndpoint_Output_DataPoint" + } + } + ], + "description": "The timeseries data points." } - }, - "description": "The input for the create dataset endpoint." + } }, - "CreateDatasetEndpoint_Output": { + "GetResponseCountTimeseriesEndpoint_Output_DataPoint": { "required": [ - "datasetId" + "timestamp", + "averageResponseCount" ], "type": "object", "properties": { - "datasetId": { + "timestamp": { "type": "string", - "description": "The id of the created dataset." + "format": "date-time" + }, + "averageResponseCount": { + "type": "number", + "format": "double" } - }, - "description": "The result when a dataset has been created." + } }, - "CreateDatasetGroupEndpoint_Input": { + "IFlowModel": { "required": [ - "group" + "_t" ], "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IFlowModelRankingFlowModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "RankingFlow": "#/components/schemas/IFlowModelRankingFlowModel" + } + } + }, + "IFlowModelRankingFlowModel": { + "required": [ + "id", + "name", + "campaignId", + "flowItemCount", + "targetResponseCount", + "pidProportionalGain", + "pidIntegralGain", + "pidDerivativeGain", + "pidMinSessionsPerMinute", + "pidMaxSessionsPerMinute", + "pidBatchMode", + "serveTimeoutSeconds", + "drainDurationSeconds", + "serveToResponseRatio", + "criteria", + "startingElo", + "minResponses", + "maxResponses", + "serveResponses", + "featureFlags", + "ownerId", + "ownerMail", + "createdAt", + "_t" + ], "properties": { - "group": { + "_t": { + "enum": [ + "RankingFlow" + ], + "type": "string" + }, + "id": { "type": "string", - "description": "The name of the group." + "description": "The unique identifier of the flow." }, - "context": { + "type": { + "$ref": "#/components/schemas/FlowType" + }, + "name": { "type": "string", - "description": "The optional text context for the group.", + "description": "The name of the flow." + }, + "campaignId": { + "type": "string", + "description": "The ID of the campaign associated with this flow." + }, + "flowItemCount": { + "type": "integer", + "description": "The total number of items that have been added to this flow. Incremented atomically on each item creation.", + "format": "int64" + }, + "targetResponseCount": { + "type": "integer", + "description": "Target average response count per completed item. Enables PID-based automatic rate control when set. Null disables PID.", + "format": "int32" + }, + "pidProportionalGain": { + "type": "number", + "description": "PID proportional gain. Controls how strongly the rate reacts to the current error between target and actual response counts.", + "format": "double" + }, + "pidIntegralGain": { + "type": "number", + "description": "PID integral gain. Eliminates steady-state error by accumulating error over time. Includes anti-windup clamping.", + "format": "double" + }, + "pidDerivativeGain": { + "type": "number", + "description": "PID derivative gain. Provides damping by reacting to the rate of change of the error, helping prevent overshoot.", + "format": "double" + }, + "pidMinSessionsPerMinute": { + "type": "integer", + "description": "Minimum sessions per minute the PID controller can set. Prevents the rate from dropping to zero.", + "format": "int32" + }, + "pidMaxSessionsPerMinute": { + "type": "integer", + "description": "Maximum sessions per minute the PID controller can set. Prevents the rate from exceeding infrastructure capacity.", + "format": "int32" + }, + "pidBatchMode": { + "$ref": "#/components/schemas/PidBatchMode" + }, + "serveTimeoutSeconds": { + "type": "integer", + "description": "Maximum time in seconds a user has to submit an answer after loading the task. Null uses the system-wide default.", + "format": "int32" + }, + "drainDurationSeconds": { + "type": "integer", + "description": "Grace period in seconds after an item stops receiving new serves, allowing in-flight responses to complete.", + "format": "int32" + }, + "serveToResponseRatio": { + "type": "number", + "description": "Ratio of serves to responses used to calculate how many tasks to serve per expected response.", + "format": "double" + }, + "globalBoostLevel": { + "type": "integer", + "description": "Priority multiplier for the flow's campaign. Higher values increase annotator compensation to attract more responses.", + "format": "int32", + "deprecated": true + }, + "audienceBoosts": { + "allOf": [ + { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/AudienceBoostModel2" + }, + "nullable": true + } + ], + "deprecated": true + } + ], + "description": "Audience-specific boost levels that override the global boost for targeted demographics." + }, + "audienceId": { + "type": "string", + "description": "Optional audience ID. When provided, the flow will only serve items to users in this audience.", + "nullable": true, + "deprecated": true + }, + "criteria": { + "type": "string", + "description": "The comparison instruction shown to annotators during ranking tasks (e.g. \"Which image is sharper?\").", "nullable": true }, - "contextAsset": { + "startingElo": { + "type": "integer", + "description": "The initial Elo rating assigned to new items entering the ranking. Standard default is 1200.", + "format": "int32" + }, + "kFactor": { + "type": "integer", + "description": "Elo K-factor controlling rating volatility. Higher values cause larger rating changes per comparison. Used as a direct multiplier on the Elo change formula.", + "format": "int32", + "deprecated": true + }, + "scalingFactor": { + "type": "integer", + "description": "Elo scaling factor that determines how rating differences translate to expected win probabilities. A difference equal to the scaling factor gives the higher-rated item approximately 90% expected win rate.", + "format": "int32", + "deprecated": true + }, + "minResponses": { + "type": "integer", + "description": "Minimum number of responses a ranking item must receive before it is considered sufficiently evaluated.", + "format": "int32" + }, + "maxResponses": { + "type": "integer", + "description": "Maximum number of responses a ranking item can receive before being removed from active ranking. Null allows unlimited responses.", + "format": "int32" + }, + "serveResponses": { + "type": "integer", + "description": "Number of accepted responses per rapid at which to stop serving. Null defaults to MaxResponses.", + "format": "int32" + }, + "featureFlags": { "allOf": [ { - "$ref": "#/components/schemas/IAssetInput" + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } } ], - "description": "The optional asset context for the group." + "description": "Key-value feature flags that enable specific behaviors for this flow (e.g. rapid_hints)." + }, + "ownerId": { + "type": "string", + "description": "The ID of the customer who owns the flow.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The email of the customer who owns the flow." + }, + "createdAt": { + "type": "string", + "description": "The timestamp when the flow was created.", + "format": "date-time" } } }, - "DatapointState": { + "PidBatchMode": { "enum": [ - "Ready", - "Pending", - "Failed" - ] + "Total", + "PerBatch", + "PerBatchTimeWeighted" + ], + "description": "How the PID output maps to the campaign rate. Total: used directly. PerBatch: multiplied by active item count. PerBatchTimeWeighted: multiplied by time-weighted active item count based on remaining TTL." }, - "GetDatapointByIdResult": { + "QueryFlowItemsEndpoint_Output": { "required": [ "id", "datasetId", "state", - "sortIndex", - "asset", "createdAt" ], "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "description": "The unique identifier of the flow item." }, "datasetId": { - "type": "string" + "type": "string", + "description": "The ID of the dataset used by this flow item." + }, + "workflowId": { + "type": "string", + "description": "The ID of the workflow created for this flow item.", + "nullable": true }, "state": { - "$ref": "#/components/schemas/DatapointState" + "$ref": "#/components/schemas/FlowItemState" }, - "sortIndex": { - "type": "integer", - "format": "int64" + "context": { + "type": "string", + "description": "Optional context associated with this flow item.", + "nullable": true }, - "asset": { - "$ref": "#/components/schemas/IAssetModel" + "failureMessage": { + "type": "string", + "description": "The failure message if the flow item failed.", + "nullable": true }, "createdAt": { "type": "string", + "description": "The timestamp when the flow item was created.", "format": "date-time" + }, + "startedAt": { + "type": "string", + "description": "The timestamp when the flow item started processing.", + "format": "date-time", + "nullable": true + }, + "completedAt": { + "type": "string", + "description": "The timestamp when the flow item completed.", + "format": "date-time", + "nullable": true + }, + "failedAt": { + "type": "string", + "description": "The timestamp when the flow item failed.", + "format": "date-time", + "nullable": true } } }, - "GetDatasetByIdResult": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - }, - "GetDatasetProgressResult": { + "QueryFlowItemsEndpoint_PagedResultOfOutput": { "required": [ "total", - "ready", - "pending", - "failed" + "page", + "pageSize", + "items" ], "type": "object", "properties": { "total": { "type": "integer", - "format": "int32" + "format": "int64" }, - "ready": { + "page": { "type": "integer", "format": "int32" }, - "pending": { + "pageSize": { "type": "integer", "format": "int32" }, - "failed": { - "type": "integer", - "format": "int32" - } - } - }, - "GetFailedDatapointsResult": { - "required": [ - "datapoints" - ], - "type": "object", - "properties": { - "datapoints": { + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/GetFailedDatapointsResult_Datapoint" + "$ref": "#/components/schemas/QueryFlowItemsEndpoint_Output" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "GetFailedDatapointsResult_Datapoint": { + "QueryFlowsEndpoint_Output": { "required": [ "id", - "datasetId", - "sortIndex", - "asset", + "name", + "type", + "ownerId", + "ownerMail", "createdAt" ], "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "description": "The unique identifier of the flow." }, - "datasetId": { - "type": "string" + "name": { + "type": "string", + "description": "The name of the flow." }, - "sortIndex": { - "type": "integer", - "format": "int64" + "type": { + "$ref": "#/components/schemas/FlowType" }, - "asset": { - "$ref": "#/components/schemas/IAssetModel" + "ownerId": { + "type": "string", + "description": "The ID of the customer who owns the flow.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The email of the customer who owns the flow." }, "createdAt": { "type": "string", + "description": "The timestamp when the flow was created.", "format": "date-time" } } }, - "PagedResultOfQueryDatapointsByDatasetIdResult": { + "QueryFlowsEndpoint_PagedResultOfOutput": { "required": [ "total", "page", @@ -20642,7 +20514,7 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryDatapointsByDatasetIdResult" + "$ref": "#/components/schemas/QueryFlowsEndpoint_Output" } }, "totalPages": { @@ -20651,842 +20523,664 @@ } } }, - "QueryDatapointsByDatasetIdResult": { - "required": [ - "id", - "datasetId", - "asset" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "datasetId": { - "type": "string" - }, - "asset": { - "$ref": "#/components/schemas/IAssetModel" - } - } - }, - "UpdateDatasetNameModel": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The new name of the dataset." - } - }, - "description": "The body request for updating the name of a dataset." - }, - "AudienceBoostModel2": { - "required": [ - "audienceId", - "level" - ], + "UpdateConfigEndpoint_Input": { "type": "object", "properties": { "audienceId": { - "type": "string" - }, - "level": { - "type": "integer", - "format": "int32" - } - } - }, - "CreateFlowEndpoint_Input": { - "required": [ - "name", - "criteria" - ], - "type": "object", - "properties": { - "name": { "type": "string", - "description": "The name of the ranking flow." + "description": "Optional audience ID. When provided, the flow will only serve items to users in this audience. Set to null to remove the audience restriction.", + "nullable": true }, "criteria": { "type": "string", - "description": "The ranking criteria used to compare items." - }, - "audienceId": { - "type": "string", - "description": "Optional audience ID. When provided, the flow will only be served to users in this audience.", + "description": "The ranking criteria used to compare items.", "nullable": true }, - "validationSetId": { - "type": "string", - "description": "Optional ID of the validation set to use.", + "startingElo": { + "type": "integer", + "description": "Initial Elo rating for new items.", + "format": "int32", "nullable": true }, - "startingElo": { + "minResponses": { "type": "integer", - "description": "Initial Elo rating for new items. Defaults to 1200.", - "format": "int32" + "description": "Minimum number of responses per comparison.", + "format": "int32", + "nullable": true }, "maxResponses": { "type": "integer", "description": "Maximum number of responses per comparison.", - "format": "int32" + "format": "int32", + "nullable": true }, "serveResponses": { "type": "integer", - "description": "Number of accepted responses per rapid at which to stop serving. When set, must be less than or equal to MaxResponses. Null defaults to MaxResponses.", - "format": "int32" + "description": "Number of accepted responses per rapid at which to stop serving. Set to null to remove. Must be less than or equal to MaxResponses when both are set.", + "format": "int32", + "nullable": true }, "serveToResponseRatio": { "type": "number", - "description": "Ratio of concurrent serves to max responses. When set, limits serving to avoid over-collection.", - "format": "double" + "description": "Ratio of concurrent serves to max responses. Set to null to remove the limit.", + "format": "double", + "nullable": true }, "serveTimeoutSeconds": { "type": "integer", - "description": "Time in seconds a user has to submit an answer after loading the task. When set, overrides the global default.", - "format": "int32" - }, - "minResponses": { - "type": "integer", - "description": "Minimum number of responses per comparison. Defaults to 1.", - "format": "int32" + "description": "Time in seconds a user has to submit an answer after loading the task. Set to null to use the global default.", + "format": "int32", + "nullable": true }, "responsesRequired": { "type": "integer", "description": "Deprecated. Use MaxResponses instead.", "format": "int32", + "nullable": true, "deprecated": true }, "featureFlags": { - "allOf": [ + "oneOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/FeatureFlag" - }, + } + }, + { "nullable": true } ], - "description": "Optional feature flags to enable for this flow." + "description": "Feature flags to enable for this flow." }, "targetResponseCount": { "type": "integer", - "description": "Target average response count per completed item. Enables PID control when set.", - "format": "int32" + "description": "Target average response count per completed item. Set to null to disable PID control.", + "format": "int32", + "nullable": true }, "pidProportionalGain": { "type": "number", - "description": "PID proportional gain. Defaults to 1.0.", - "format": "double" + "description": "PID proportional gain.", + "format": "double", + "nullable": true }, "pidIntegralGain": { "type": "number", - "description": "PID integral gain. Defaults to 0.1.", - "format": "double" + "description": "PID integral gain.", + "format": "double", + "nullable": true }, "pidDerivativeGain": { "type": "number", - "description": "PID derivative gain. Defaults to 0.05.", - "format": "double" + "description": "PID derivative gain.", + "format": "double", + "nullable": true }, "pidMinSessionsPerMinute": { "type": "integer", - "description": "Minimum sessions per minute the PID can set. Defaults to 10.", - "format": "int32" + "description": "Minimum sessions per minute the PID can set.", + "format": "int32", + "nullable": true }, "pidMaxSessionsPerMinute": { "type": "integer", - "description": "Maximum sessions per minute the PID can set. Defaults to 10000.", - "format": "int32" + "description": "Maximum sessions per minute the PID can set.", + "format": "int32", + "nullable": true }, "pidBatchMode": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/PidBatchMode" - } - ] - }, - "drainDurationSeconds": { - "type": "integer", - "description": "Duration in seconds for draining flow items. Defaults to 40.", - "format": "int32" - } - } - }, - "CreateFlowEndpoint_Output": { - "required": [ - "flowId" - ], - "type": "object", - "properties": { - "flowId": { - "type": "string", - "description": "The ID of the created ranking flow." + "enum": [ + "Total", + "PerBatch", + "PerBatchTimeWeighted" + ], + "description": "How PID output maps to campaign rate. Total: direct rate. PerBatch: multiplied by active batch count. PerBatchTimeWeighted: multiplied by time-weighted batch count." } } }, - "CreateFlowItemEndpoint_Input": { + "ClientModel": { "required": [ - "datasetId" + "client_id", + "client_secret", + "client_id_issued_at", + "client_secret_expires_at", + "redirect_uris", + "grant_types", + "response_types", + "client_name", + "client_uri", + "logo_uri", + "scope", + "contacts", + "tos_uri", + "policy_uri", + "jwks_uri", + "jwks" ], "type": "object", "properties": { - "datasetId": { - "type": "string", - "description": "The ID of the dataset to use for this flow item." + "client_id": { + "type": "string" }, - "context": { + "client_secret": { "type": "string", - "description": "Optional context to provide additional ranking guidance.", "nullable": true }, - "timeToLiveInSeconds": { + "client_id_issued_at": { "type": "integer", - "description": "Optional time-to-live in seconds before the flow item expires.", - "format": "int32" + "format": "int64" }, - "drainDurationInSeconds": { + "client_secret_expires_at": { "type": "integer", - "description": "Optional drain duration in seconds. When set, rapids are paused this many seconds before TTL expiry to allow in-flight responses to complete.", - "format": "int32" - } - } - }, - "CreateFlowItemEndpoint_Output": { - "required": [ - "flowItemId" - ], - "type": "object", - "properties": { - "flowItemId": { - "type": "string", - "description": "The ID of the created flow item." - } - } - }, - "FlowItemState": { - "enum": [ - "Pending", - "Running", - "Completed", - "Failed", - "Stopping", - "Stopped", - "Incomplete" - ], - "description": "The current state of the flow item." - }, - "FlowType": { - "enum": [ - "Ranking" - ], - "description": "The type of the flow. Use the _t discriminator instead.", - "deprecated": true - }, - "GetCompletionTimeHistogramEndpoint_Output": { - "required": [ - "buckets" - ], - "type": "object", - "properties": { - "buckets": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetCompletionTimeHistogramEndpoint_Output_Bucket" - } - } - ], - "description": "The histogram buckets." - } - } - }, - "GetCompletionTimeHistogramEndpoint_Output_Bucket": { - "required": [ - "lowerBound", - "upperBound", - "count" - ], - "type": "object", - "properties": { - "lowerBound": { - "type": "number", - "format": "double" - }, - "upperBound": { - "type": "number", - "format": "double" + "format": "int64" }, - "count": { - "type": "integer", - "format": "int32" - } - } - }, - "GetFlowItemByIdEndpoint_Output": { - "required": [ - "id", - "flowId", - "datasetId", - "state", - "createdAt" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the flow item." + "redirect_uris": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "nullable": true }, - "flowId": { - "type": "string", - "description": "The ID of the flow this item belongs to." + "grant_types": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "nullable": true }, - "datasetId": { - "type": "string", - "description": "The ID of the dataset used by this flow item." + "response_types": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "nullable": true }, - "workflowId": { + "client_name": { "type": "string", - "description": "The ID of the workflow created for this flow item.", "nullable": true }, - "state": { - "$ref": "#/components/schemas/FlowItemState" - }, - "context": { + "client_uri": { "type": "string", - "description": "Optional context associated with this flow item.", "nullable": true }, - "failureMessage": { + "logo_uri": { "type": "string", - "description": "The failure message if the flow item failed.", "nullable": true }, - "expiresAt": { + "scope": { "type": "string", - "description": "The expiration timestamp of the flow item.", - "format": "date-time", + "description": "String containing a space-separated list of scope values\n that the client can use when requesting access tokens.", "nullable": true }, - "createdAt": { - "type": "string", - "description": "The timestamp when the flow item was created.", - "format": "date-time" + "contacts": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Array of strings representing ways to contact people responsible for this client,\n typically email addresses." }, - "startedAt": { + "tos_uri": { "type": "string", - "description": "The timestamp when the flow item started processing.", - "format": "date-time", "nullable": true }, - "completedAt": { + "policy_uri": { "type": "string", - "description": "The timestamp when the flow item completed.", - "format": "date-time", "nullable": true }, - "failedAt": { + "jwks_uri": { "type": "string", - "description": "The timestamp when the flow item failed.", - "format": "date-time", "nullable": true - } - } - }, - "GetFlowItemCreationTimeseriesEndpoint_Output": { - "required": [ - "datapoints" - ], - "type": "object", - "properties": { - "datapoints": { - "allOf": [ + }, + "jwks": { + "oneOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetFlowItemCreationTimeseriesEndpoint_Output_DataPoint" - } + "nullable": true + }, + { + "$ref": "#/components/schemas/JsonWebKeySet" } - ], - "description": "The timeseries data points." + ] } - } + }, + "description": "The response containing the id and secret of a dynamically registered client.\n Additionally, it contains all registered metadata for the client." }, - "GetFlowItemCreationTimeseriesEndpoint_Output_DataPoint": { + "ClientsQueryResult": { "required": [ - "timestamp", - "count" + "clientId", + "displayName", + "createdAt" ], "type": "object", "properties": { - "timestamp": { + "clientId": { "type": "string", - "format": "date-time" + "nullable": true }, - "count": { - "type": "integer", - "format": "int64" + "displayName": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time", + "nullable": true } } }, - "GetRankingFlowItemResultsEndpoint_Output": { + "CreateBridgeTokenResult": { "required": [ - "datapoints", - "totalVotes" + "readKey", + "writeKey" ], "type": "object", "properties": { - "datapoints": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetRankingFlowItemResultsEndpoint_Output_Datapoint" - } - } - ], - "description": "The ranked datapoints with their Elo scores." + "readKey": { + "type": "string" }, - "totalVotes": { - "type": "integer", - "description": "The total number of votes across all datapoints.", - "format": "int64" + "writeKey": { + "type": "string" } } }, - "GetRankingFlowItemResultsEndpoint_Output_Datapoint": { - "required": [ - "id", - "asset", - "elo" - ], + "CreateClientModel": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "asset": { - "$ref": "#/components/schemas/IAssetModel" - }, - "elo": { - "type": "integer", - "format": "int32" + "displayName": { + "type": "string", + "description": "An optional display name for the client.", + "nullable": true } - } + }, + "description": "The model for creating a new client." }, - "GetRankingFlowItemVoteMatrixEndpoint_Output": { + "CreateCustomerClientResult": { "required": [ - "index", - "columns", - "data" + "clientId", + "clientSecret" ], "type": "object", "properties": { - "index": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "Row labels of the vote matrix." - }, - "columns": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "Column labels of the vote matrix." + "clientId": { + "type": "string" }, - "data": { - "allOf": [ - { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } - } - ], - "description": "The vote counts as a two-dimensional matrix where Data[i][j] is the number of times row i was preferred over column j." + "clientSecret": { + "type": "string" } } }, - "GetResponseCountHistogramEndpoint_Output": { - "required": [ - "buckets" - ], + "DynamicClientRegistrationRequest": { "type": "object", "properties": { - "buckets": { + "redirect_uris": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "grant_types": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "response_types": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "client_id": { + "type": "string", + "nullable": true + }, + "client_name": { + "type": "string", + "nullable": true + }, + "client_uri": { + "type": "string", + "nullable": true + }, + "logo_uri": { + "type": "string", + "nullable": true + }, + "scope": { + "type": "string", + "description": "String containing a space-separated list of scope values\n that the client can use when requesting access tokens.", + "nullable": true + }, + "contacts": { "allOf": [ { "type": "array", "items": { - "$ref": "#/components/schemas/GetResponseCountHistogramEndpoint_Output_Bucket" - } + "type": "string" + }, + "nullable": true } ], - "description": "The histogram buckets." - } - } - }, - "GetResponseCountHistogramEndpoint_Output_Bucket": { - "required": [ - "lowerBound", - "upperBound", - "count" - ], - "type": "object", - "properties": { - "lowerBound": { - "type": "number", - "format": "double" + "description": "Array of strings representing ways to contact people responsible for this client,\n typically email addresses." }, - "upperBound": { - "type": "number", - "format": "double" + "tos_uri": { + "type": "string", + "nullable": true }, - "count": { - "type": "integer", - "format": "int32" - } - } - }, - "GetResponseCountTimeseriesEndpoint_Output": { - "required": [ - "datapoints" - ], - "type": "object", - "properties": { - "datapoints": { + "policy_uri": { + "type": "string", + "nullable": true + }, + "jwks_uri": { + "type": "string", + "nullable": true + }, + "jwks": { "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetResponseCountTimeseriesEndpoint_Output_DataPoint" - } + "$ref": "#/components/schemas/JsonWebKeySet" } ], - "description": "The timeseries data points." + "description": "Client's JSON Web Key Set [RFC7517] document value, which contains the client's public keys." } - } + }, + "description": "The request body for dynamic client registration." }, - "GetResponseCountTimeseriesEndpoint_Output_DataPoint": { + "GoogleOneTapLoginModel": { "required": [ - "timestamp", - "averageResponseCount" + "idToken" ], "type": "object", "properties": { - "timestamp": { + "idToken": { "type": "string", - "format": "date-time" - }, - "averageResponseCount": { - "type": "number", - "format": "double" + "description": "The id token received from the Google One Tap login." } - } + }, + "description": "The model for the Google One Tap login." }, - "IFlowModel": { - "required": [ - "_t" - ], + "JsonWebKey": { "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IFlowModelRankingFlowModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "RankingFlow": "#/components/schemas/IFlowModelRankingFlowModel" - } - } - }, - "IFlowModelRankingFlowModel": { - "required": [ - "id", - "name", - "campaignId", - "flowItemCount", - "targetResponseCount", - "pidProportionalGain", - "pidIntegralGain", - "pidDerivativeGain", - "pidMinSessionsPerMinute", - "pidMaxSessionsPerMinute", - "pidBatchMode", - "serveTimeoutSeconds", - "drainDurationSeconds", - "serveToResponseRatio", - "criteria", - "startingElo", - "minResponses", - "maxResponses", - "serveResponses", - "featureFlags", - "ownerId", - "ownerMail", - "createdAt", - "_t" - ], "properties": { - "_t": { - "enum": [ - "RankingFlow" - ], - "type": "string" + "alg": { + "type": "string", + "nullable": true }, - "id": { + "crv": { "type": "string", - "description": "The unique identifier of the flow." + "nullable": true }, - "type": { - "$ref": "#/components/schemas/FlowType" + "d": { + "type": "string", + "nullable": true }, - "name": { + "dp": { "type": "string", - "description": "The name of the flow." + "nullable": true }, - "campaignId": { + "dq": { "type": "string", - "description": "The ID of the campaign associated with this flow." + "nullable": true }, - "flowItemCount": { - "type": "integer", - "description": "The total number of items that have been added to this flow. Incremented atomically on each item creation.", - "format": "int64" + "e": { + "type": "string", + "nullable": true }, - "targetResponseCount": { - "type": "integer", - "description": "Target average response count per completed item. Enables PID-based automatic rate control when set. Null disables PID.", - "format": "int32" + "k": { + "type": "string", + "nullable": true }, - "pidProportionalGain": { - "type": "number", - "description": "PID proportional gain. Controls how strongly the rate reacts to the current error between target and actual response counts.", - "format": "double" + "key_ops": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true }, - "pidIntegralGain": { - "type": "number", - "description": "PID integral gain. Eliminates steady-state error by accumulating error over time. Includes anti-windup clamping.", - "format": "double" + "kid": { + "type": "string", + "nullable": true }, - "pidDerivativeGain": { - "type": "number", - "description": "PID derivative gain. Provides damping by reacting to the rate of change of the error, helping prevent overshoot.", - "format": "double" + "kty": { + "type": "string", + "nullable": true }, - "pidMinSessionsPerMinute": { - "type": "integer", - "description": "Minimum sessions per minute the PID controller can set. Prevents the rate from dropping to zero.", - "format": "int32" + "n": { + "type": "string", + "nullable": true }, - "pidMaxSessionsPerMinute": { - "type": "integer", - "description": "Maximum sessions per minute the PID controller can set. Prevents the rate from exceeding infrastructure capacity.", - "format": "int32" + "oth": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true }, - "pidBatchMode": { - "$ref": "#/components/schemas/PidBatchMode" + "p": { + "type": "string", + "nullable": true }, - "serveTimeoutSeconds": { - "type": "integer", - "description": "Maximum time in seconds a user has to submit an answer after loading the task. Null uses the system-wide default.", - "format": "int32" + "q": { + "type": "string", + "nullable": true }, - "drainDurationSeconds": { - "type": "integer", - "description": "Grace period in seconds after an item stops receiving new serves, allowing in-flight responses to complete.", - "format": "int32" + "qi": { + "type": "string", + "nullable": true }, - "serveToResponseRatio": { - "type": "number", - "description": "Ratio of serves to responses used to calculate how many tasks to serve per expected response.", - "format": "double" + "use": { + "type": "string", + "nullable": true }, - "globalBoostLevel": { - "type": "integer", - "description": "Priority multiplier for the flow's campaign. Higher values increase annotator compensation to attract more responses.", - "format": "int32", - "deprecated": true + "x": { + "type": "string", + "nullable": true }, - "audienceBoosts": { - "allOf": [ - { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/AudienceBoostModel2" - }, - "nullable": true - } - ], - "deprecated": true - } - ], - "description": "Audience-specific boost levels that override the global boost for targeted demographics." + "x5c": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true }, - "audienceId": { + "x5t": { "type": "string", - "description": "Optional audience ID. When provided, the flow will only serve items to users in this audience.", - "nullable": true, - "deprecated": true + "nullable": true }, - "criteria": { + "x5t#S256": { "type": "string", - "description": "The comparison instruction shown to annotators during ranking tasks (e.g. \"Which image is sharper?\").", "nullable": true }, - "startingElo": { - "type": "integer", - "description": "The initial Elo rating assigned to new items entering the ranking. Standard default is 1200.", - "format": "int32" - }, - "kFactor": { - "type": "integer", - "description": "Elo K-factor controlling rating volatility. Higher values cause larger rating changes per comparison. Used as a direct multiplier on the Elo change formula.", - "format": "int32", - "deprecated": true + "x5u": { + "type": "string", + "nullable": true }, - "scalingFactor": { - "type": "integer", - "description": "Elo scaling factor that determines how rating differences translate to expected win probabilities. A difference equal to the scaling factor gives the higher-rated item approximately 90% expected win rate.", - "format": "int32", - "deprecated": true + "y": { + "type": "string", + "nullable": true + } + } + }, + "JsonWebKeySet": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonWebKey" + }, + "nullable": true + } + } + }, + "NewsletterModel": { + "required": [ + "email", + "token" + ], + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "The email of the user to subscribe or unsubscribe." }, - "minResponses": { + "token": { + "type": "string", + "description": "The recaptcha token to verify the user is not a bot." + } + }, + "description": "Model for subscribing and unsubscribing to the newsletter." + }, + "NotAvailableYetResult": { + "required": [ + "message" + ], + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "PagedResultOfClientsQueryResult": { + "required": [ + "total", + "page", + "pageSize", + "items" + ], + "type": "object", + "properties": { + "total": { "type": "integer", - "description": "Minimum number of responses a ranking item must receive before it is considered sufficiently evaluated.", - "format": "int32" + "format": "int64" }, - "maxResponses": { + "page": { "type": "integer", - "description": "Maximum number of responses a ranking item can receive before being removed from active ranking. Null allows unlimited responses.", "format": "int32" }, - "serveResponses": { + "pageSize": { "type": "integer", - "description": "Number of accepted responses per rapid at which to stop serving. Null defaults to MaxResponses.", "format": "int32" }, - "featureFlags": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } - } - ], - "description": "Key-value feature flags that enable specific behaviors for this flow (e.g. rapid_hints)." - }, - "ownerId": { - "type": "string", - "description": "The ID of the customer who owns the flow.", - "format": "uuid" - }, - "ownerMail": { - "type": "string", - "description": "The email of the customer who owns the flow." + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClientsQueryResult" + } }, - "createdAt": { - "type": "string", - "description": "The timestamp when the flow was created.", - "format": "date-time" + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "PidBatchMode": { - "enum": [ - "Total", - "PerBatch", - "PerBatchTimeWeighted" - ], - "description": "How the PID output maps to the campaign rate. Total: used directly. PerBatch: multiplied by active item count. PerBatchTimeWeighted: multiplied by time-weighted active item count based on remaining TTL." - }, - "QueryFlowItemsEndpoint_Output": { + "QueryCustomersEndpoint_Output": { "required": [ "id", - "datasetId", - "state", - "createdAt" + "email", + "organizationName", + "organizationId" ], "type": "object", "properties": { "id": { "type": "string", - "description": "The unique identifier of the flow item." - }, - "datasetId": { - "type": "string", - "description": "The ID of the dataset used by this flow item." + "description": "The unique identifier of the customer.", + "format": "uuid" }, - "workflowId": { + "email": { "type": "string", - "description": "The ID of the workflow created for this flow item.", + "description": "The email address of the customer.", "nullable": true }, - "state": { - "$ref": "#/components/schemas/FlowItemState" - }, - "context": { + "organizationName": { "type": "string", - "description": "Optional context associated with this flow item.", + "description": "The name of the organization this customer belongs to, if any.", "nullable": true }, - "failureMessage": { + "organizationId": { "type": "string", - "description": "The failure message if the flow item failed.", + "description": "The identifier of the organization this customer belongs to, if any.", + "format": "uuid", "nullable": true + } + } + }, + "QueryCustomersEndpoint_PagedResultOfOutput": { + "required": [ + "total", + "page", + "pageSize", + "items" + ], + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64" }, - "createdAt": { - "type": "string", - "description": "The timestamp when the flow item was created.", - "format": "date-time" + "page": { + "type": "integer", + "format": "int32" }, - "startedAt": { + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryCustomersEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, + "QueryOrganizationsEndpoint_Output": { + "required": [ + "owner", + "name", + "domain" + ], + "type": "object", + "properties": { + "owner": { "type": "string", - "description": "The timestamp when the flow item started processing.", - "format": "date-time", - "nullable": true + "description": "The customer ID of the organization owner.", + "format": "uuid" }, - "completedAt": { + "name": { "type": "string", - "description": "The timestamp when the flow item completed.", - "format": "date-time", - "nullable": true + "description": "The name of the organization." }, - "failedAt": { + "domain": { "type": "string", - "description": "The timestamp when the flow item failed.", - "format": "date-time", - "nullable": true + "description": "The domain associated with this organization." } } }, - "QueryFlowItemsEndpoint_PagedResultOfOutput": { + "QueryOrganizationsEndpoint_PagedResultOfOutput": { "required": [ "total", "page", @@ -21510,7 +21204,7 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryFlowItemsEndpoint_Output" + "$ref": "#/components/schemas/QueryOrganizationsEndpoint_Output" } }, "totalPages": { @@ -21519,838 +21213,701 @@ } } }, - "QueryFlowsEndpoint_Output": { + "ReadBridgeTokenKeysResult": { "required": [ - "id", - "name", - "type", - "ownerId", - "ownerMail", - "createdAt" + "accessToken", + "expiresIn", + "refreshToken", + "idToken", + "tokenType", + "scope" ], "type": "object", "properties": { - "id": { + "accessToken": { "type": "string", - "description": "The unique identifier of the flow." + "nullable": true }, - "name": { - "type": "string", - "description": "The name of the flow." + "expiresIn": { + "type": "integer", + "format": "int32" }, - "type": { - "$ref": "#/components/schemas/FlowType" + "refreshToken": { + "type": "string", + "nullable": true }, - "ownerId": { + "idToken": { "type": "string", - "description": "The ID of the customer who owns the flow.", - "format": "uuid" + "nullable": true }, - "ownerMail": { + "tokenType": { "type": "string", - "description": "The email of the customer who owns the flow." + "nullable": true }, - "createdAt": { + "scope": { "type": "string", - "description": "The timestamp when the flow was created.", - "format": "date-time" + "nullable": true } } }, - "QueryFlowsEndpoint_PagedResultOfOutput": { + "SendSurveyModel": { "required": [ - "total", - "page", - "pageSize", - "items" + "fields" + ], + "type": "object", + "properties": { + "fields": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The fields of the survey" + } + }, + "description": "The model user for submitting a survey" + }, + "AgeUserFilterModel_AgeGroup": { + "enum": [ + "0-17", + "18-29", + "30-39", + "40-49", + "50-64", + "65+" + ] + }, + "BenchmarkQueryResult": { + "required": [ + "id", + "name", + "isManaged", + "isPublic", + "createdAt", + "ownerMail" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" + "id": { + "type": "string" }, - "page": { - "type": "integer", - "format": "int32" + "name": { + "type": "string" }, - "pageSize": { - "type": "integer", - "format": "int32" + "isManaged": { + "type": "boolean" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryFlowsEndpoint_Output" - } + "isPublic": { + "type": "boolean" }, - "totalPages": { - "type": "integer", - "format": "int32" + "createdAt": { + "type": "string", + "format": "date-time" + }, + "ownerMail": { + "type": "string" } } }, - "UpdateConfigEndpoint_Input": { + "BoostLeaderboardModel": { + "required": [ + "participants", + "totalResponses" + ], "type": "object", "properties": { - "audienceId": { - "type": "string", - "description": "Optional audience ID. When provided, the flow will only serve items to users in this audience. Set to null to remove the audience restriction.", - "nullable": true - }, - "criteria": { - "type": "string", - "description": "The ranking criteria used to compare items.", - "nullable": true - }, - "startingElo": { - "type": "integer", - "description": "Initial Elo rating for new items.", - "format": "int32", - "nullable": true - }, - "minResponses": { - "type": "integer", - "description": "Minimum number of responses per comparison.", - "format": "int32", - "nullable": true - }, - "maxResponses": { - "type": "integer", - "description": "Maximum number of responses per comparison.", - "format": "int32", - "nullable": true - }, - "serveResponses": { - "type": "integer", - "description": "Number of accepted responses per rapid at which to stop serving. Set to null to remove. Must be less than or equal to MaxResponses when both are set.", - "format": "int32", - "nullable": true - }, - "serveToResponseRatio": { - "type": "number", - "description": "Ratio of concurrent serves to max responses. Set to null to remove the limit.", - "format": "double", - "nullable": true - }, - "serveTimeoutSeconds": { - "type": "integer", - "description": "Time in seconds a user has to submit an answer after loading the task. Set to null to use the global default.", - "format": "int32", - "nullable": true - }, - "responsesRequired": { - "type": "integer", - "description": "Deprecated. Use MaxResponses instead.", - "format": "int32", - "nullable": true, - "deprecated": true - }, - "featureFlags": { - "oneOf": [ + "participants": { + "allOf": [ { "type": "array", "items": { - "$ref": "#/components/schemas/FeatureFlag" + "type": "string" } - }, - { - "nullable": true } ], - "description": "Feature flags to enable for this flow." + "description": "The participants of the given leaderboard that should be boosted." }, - "targetResponseCount": { + "totalResponses": { "type": "integer", - "description": "Target average response count per completed item. Set to null to disable PID control.", - "format": "int32", - "nullable": true - }, - "pidProportionalGain": { - "type": "number", - "description": "PID proportional gain.", - "format": "double", - "nullable": true - }, - "pidIntegralGain": { + "description": "The amount of responses in total that should be added, shared across all participants.", + "format": "int32" + } + }, + "description": "The model for boosting a leaderboard." + }, + "ConfidenceInterval": { + "required": [ + "lowerOffset", + "upperOffset" + ], + "type": "object", + "properties": { + "lowerOffset": { "type": "number", - "description": "PID integral gain.", - "format": "double", - "nullable": true + "format": "double" }, - "pidDerivativeGain": { + "upperOffset": { "type": "number", - "description": "PID derivative gain.", - "format": "double", - "nullable": true - }, - "pidMinSessionsPerMinute": { - "type": "integer", - "description": "Minimum sessions per minute the PID can set.", - "format": "int32", - "nullable": true - }, - "pidMaxSessionsPerMinute": { - "type": "integer", - "description": "Maximum sessions per minute the PID can set.", - "format": "int32", - "nullable": true - }, - "pidBatchMode": { - "enum": [ - "Total", - "PerBatch", - "PerBatchTimeWeighted" - ], - "description": "How PID output maps to campaign rate. Total: direct rate. PerBatch: multiplied by active batch count. PerBatchTimeWeighted: multiplied by time-weighted batch count." + "format": "double" } } }, - "ClientModel": { + "CreateBenchmarkModel": { "required": [ - "client_id", - "client_secret", - "client_id_issued_at", - "client_secret_expires_at", - "redirect_uris", - "grant_types", - "response_types", - "client_name", - "client_uri", - "logo_uri", - "scope", - "contacts", - "tos_uri", - "policy_uri", - "jwks_uri", - "jwks" + "name" ], "type": "object", "properties": { - "client_id": { - "type": "string" - }, - "client_secret": { + "name": { "type": "string", - "nullable": true - }, - "client_id_issued_at": { - "type": "integer", - "format": "int64" - }, - "client_secret_expires_at": { - "type": "integer", - "format": "int64" - }, - "redirect_uris": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string" - } - }, - "nullable": true + "description": "The name of the benchmark" + } + }, + "description": "The model for creating a benchmark." + }, + "CreateBenchmarkParticipantModel": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the participant." + } + }, + "description": "The model to create a participant in a leaderboard" + }, + "CreateBenchmarkParticipantResult": { + "required": [ + "participantId" + ], + "type": "object", + "properties": { + "participantId": { + "type": "string" }, - "grant_types": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string" - } - }, + "datasetId": { + "type": "string" + } + } + }, + "CreateBenchmarkPromptResult": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "CreateBenchmarkResult": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "CreateLeaderboardModel": { + "required": [ + "name", + "instruction", + "showPrompt" + ], + "type": "object", + "properties": { + "benchmarkId": { + "type": "string", + "description": "If a leaderboard should be added to a preexisting benchmark, the benchmark Id can be provided.", "nullable": true }, - "response_types": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string" - } - }, + "benchmarkName": { + "type": "string", + "description": "If no BenchmarkId is provided a new benchmark will be created. if no name is supplied the benchmark\n will be called the same as the leaderboard.", "nullable": true }, - "client_name": { + "name": { "type": "string", - "nullable": true + "description": "The name of the leaderboard." }, - "client_uri": { + "instruction": { "type": "string", - "nullable": true + "description": "The instruction datapoints will be matched up against." }, - "logo_uri": { + "showPrompt": { + "type": "boolean", + "description": "Indicates if the prompt is shown on the rapids." + }, + "showPromptAsset": { + "type": "boolean", + "description": "Whether the prompt asset should be shown on the rapids." + }, + "responseBudget": { + "type": "integer", + "description": "Total amount of responses that get collected per run", + "format": "int32" + }, + "minResponses": { + "type": "integer", + "description": "The minimum amount of responses that need to be collected per comparison.", + "format": "int32" + }, + "isInversed": { + "type": "boolean", + "description": "If the results should be inversed, meaning people should select the worse model." + }, + "validationSetId": { "type": "string", + "description": "The Validation set that should be attached to every run.", "nullable": true }, - "scope": { + "audienceId": { "type": "string", - "description": "String containing a space-separated list of scope values\n that the client can use when requesting access tokens.", + "description": "Optional audience ID. When provided, the leaderboard will target users who have\n graduated from the audience (i.e., users with a score at or above the audience's minimum threshold).\n Cannot be specified together with Filters.", "nullable": true }, - "contacts": { + "filters": { "allOf": [ { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/IUserFilterModel" }, "nullable": true } ], - "description": "Array of strings representing ways to contact people responsible for this client,\n typically email addresses." - }, - "tos_uri": { - "type": "string", - "nullable": true - }, - "policy_uri": { - "type": "string", - "nullable": true - }, - "jwks_uri": { - "type": "string", - "nullable": true + "description": "The filters will be applied on every order that is created by this leaderboard.\n Cannot be specified together with AudienceId." }, - "jwks": { - "oneOf": [ + "featureFlags": { + "allOf": [ { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + }, "nullable": true - }, - { - "$ref": "#/components/schemas/JsonWebKeySet" } - ] + ], + "description": "Feature flags that will be applied to every order that is created by this leaderboard." } }, - "description": "The response containing the id and secret of a dynamically registered client.\n Additionally, it contains all registered metadata for the client." + "description": "The CreateLeaderboardModel class represents the model for creating a leaderboard." }, - "ClientsQueryResult": { + "CreateLeaderboardResult": { "required": [ - "clientId", - "displayName", - "createdAt" + "id", + "benchmarkId", + "showPrompt", + "showPromptAsset", + "responseBudget", + "minResponses", + "isInversed" ], "type": "object", "properties": { - "clientId": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "displayName": { - "type": "string", - "nullable": true + "benchmarkId": { + "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time", - "nullable": true + "showPrompt": { + "type": "boolean" + }, + "showPromptAsset": { + "type": "boolean" + }, + "responseBudget": { + "type": "integer", + "format": "int32" + }, + "minResponses": { + "type": "integer", + "format": "int32" + }, + "isInversed": { + "type": "boolean" } } }, - "CreateBridgeTokenResult": { + "CreateSampleModel": { "required": [ - "readKey", - "writeKey" + "identifier", + "asset" ], "type": "object", "properties": { - "readKey": { - "type": "string" - }, - "writeKey": { - "type": "string" - } - } - }, - "CreateClientModel": { - "type": "object", - "properties": { - "displayName": { + "identifier": { "type": "string", - "description": "An optional display name for the client.", - "nullable": true + "description": "The identifier used to correlate samples of different participants." + }, + "asset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetInput" + } + ], + "description": "The asset input for the sample." } }, - "description": "The model for creating a new client." + "description": "The model used to create a sample to a participant." }, - "CreateCustomerClientResult": { + "ForkBenchmarkResult": { "required": [ - "clientId", - "clientSecret" + "id" ], "type": "object", "properties": { - "clientId": { - "type": "string" - }, - "clientSecret": { + "id": { "type": "string" } } }, - "DynamicClientRegistrationRequest": { + "GenderUserFilterModel_Gender": { + "enum": [ + "Male", + "Female", + "Other" + ] + }, + "GetBenchmarkByIdResult": { + "required": [ + "id", + "name", + "isPublic", + "createdAt", + "ownerId", + "ownerMail" + ], "type": "object", "properties": { - "redirect_uris": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "grant_types": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "response_types": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "client_id": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "client_name": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "client_uri": { - "type": "string", - "nullable": true + "isPublic": { + "type": "boolean" }, - "logo_uri": { + "createdAt": { "type": "string", - "nullable": true + "format": "date-time" }, - "scope": { + "ownerId": { "type": "string", - "description": "String containing a space-separated list of scope values\n that the client can use when requesting access tokens.", - "nullable": true + "format": "uuid" }, - "contacts": { + "ownerMail": { + "type": "string" + } + } + }, + "GetCombinedBenchmarkMatrixEndpoint_Output": { + "required": [ + "index", + "columns", + "data" + ], + "type": "object", + "properties": { + "index": { "allOf": [ { "type": "array", "items": { "type": "string" - }, - "nullable": true + } } ], - "description": "Array of strings representing ways to contact people responsible for this client,\n typically email addresses." - }, - "tos_uri": { - "type": "string", - "nullable": true - }, - "policy_uri": { - "type": "string", - "nullable": true + "description": "Row participant names." }, - "jwks_uri": { - "type": "string", - "nullable": true + "columns": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Column participant names." }, - "jwks": { + "data": { "allOf": [ { - "$ref": "#/components/schemas/JsonWebKeySet" + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } } ], - "description": "Client's JSON Web Key Set [RFC7517] document value, which contains the client's public keys." + "description": "NxN matrix where Data[i][j] = wins of Index[i] over Columns[j]." } }, - "description": "The request body for dynamic client registration." + "description": "Combined benchmark matrix output in pandas split format." }, - "GoogleOneTapLoginModel": { + "GetCombinedBenchmarkStandingsEndpoint_Output": { "required": [ - "idToken" + "items" ], "type": "object", "properties": { - "idToken": { - "type": "string", - "description": "The id token received from the Google One Tap login." + "items": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetCombinedBenchmarkStandingsEndpoint_OutputItem" + } + } + ], + "description": "The standings items." } }, - "description": "The model for the Google One Tap login." + "description": "Combined benchmark standings output." }, - "JsonWebKey": { + "GetCombinedBenchmarkStandingsEndpoint_OutputItem": { + "required": [ + "id", + "name", + "status", + "score", + "wins", + "totalMatches", + "isDisabled" + ], "type": "object", "properties": { - "alg": { - "type": "string", - "nullable": true - }, - "crv": { - "type": "string", - "nullable": true - }, - "d": { - "type": "string", - "nullable": true - }, - "dp": { - "type": "string", - "nullable": true - }, - "dq": { - "type": "string", - "nullable": true - }, - "e": { - "type": "string", - "nullable": true - }, - "k": { - "type": "string", - "nullable": true - }, - "key_ops": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "kid": { - "type": "string", - "nullable": true - }, - "kty": { - "type": "string", - "nullable": true - }, - "n": { - "type": "string", - "nullable": true - }, - "oth": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "p": { - "type": "string", - "nullable": true - }, - "q": { - "type": "string", - "nullable": true - }, - "qi": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "use": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "x": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/StandingStatus" }, - "x5c": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true + "score": { + "type": "number", + "format": "double" }, - "x5t": { - "type": "string", - "nullable": true + "wins": { + "type": "number", + "format": "double" }, - "x5t#S256": { - "type": "string", - "nullable": true + "totalMatches": { + "type": "number", + "format": "double" }, - "x5u": { - "type": "string", - "nullable": true + "isDisabled": { + "type": "boolean" }, - "y": { - "type": "string", - "nullable": true - } - } - }, - "JsonWebKeySet": { - "type": "object", - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/components/schemas/JsonWebKey" - }, - "nullable": true + "confidenceInterval": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/ConfidenceInterval" + } + ] } } }, - "NewsletterModel": { + "GetCombinedLeaderboardMatrixEndpoint_Output": { "required": [ - "email", - "token" + "index", + "columns", + "data" ], "type": "object", "properties": { - "email": { - "type": "string", - "description": "The email of the user to subscribe or unsubscribe." + "index": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Row participant names." }, - "token": { - "type": "string", - "description": "The recaptcha token to verify the user is not a bot." - } - }, - "description": "Model for subscribing and unsubscribing to the newsletter." - }, - "NotAvailableYetResult": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "message": { - "type": "string" + "columns": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Column participant names." + }, + "data": { + "allOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } + } + ], + "description": "NxN matrix where Data[i][j] = wins of Index[i] over Columns[j]." } - } + }, + "description": "Combined leaderboard matrix output in pandas split format." }, - "PagedResultOfClientsQueryResult": { + "GetCombinedLeaderboardStandingsEndpoint_Output": { "required": [ - "total", - "page", - "pageSize", "items" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { - "type": "integer", - "format": "int32" - }, "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ClientsQueryResult" - } - }, - "totalPages": { - "type": "integer", - "format": "int32" + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetCombinedLeaderboardStandingsEndpoint_OutputItem" + } + } + ], + "description": "The standings items." } - } + }, + "description": "Combined leaderboard standings output." }, - "QueryCustomersEndpoint_Output": { + "GetCombinedLeaderboardStandingsEndpoint_OutputItem": { "required": [ "id", - "email", - "organizationName", - "organizationId" + "name", + "status", + "score", + "wins", + "totalMatches", + "isDisabled" ], "type": "object", "properties": { "id": { - "type": "string", - "description": "The unique identifier of the customer.", - "format": "uuid" + "type": "string" }, - "email": { - "type": "string", - "description": "The email address of the customer.", - "nullable": true + "name": { + "type": "string" }, - "organizationName": { - "type": "string", - "description": "The name of the organization this customer belongs to, if any.", - "nullable": true + "status": { + "$ref": "#/components/schemas/StandingStatus" }, - "organizationId": { - "type": "string", - "description": "The identifier of the organization this customer belongs to, if any.", - "format": "uuid", - "nullable": true - } - } - }, - "QueryCustomersEndpoint_PagedResultOfOutput": { - "required": [ - "total", - "page", - "pageSize", - "items" - ], - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" + "score": { + "type": "number", + "format": "double" }, - "page": { - "type": "integer", - "format": "int32" + "wins": { + "type": "number", + "format": "double" }, - "pageSize": { - "type": "integer", - "format": "int32" + "totalMatches": { + "type": "number", + "format": "double" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryCustomersEndpoint_Output" - } + "isDisabled": { + "type": "boolean" }, - "totalPages": { - "type": "integer", - "format": "int32" + "confidenceInterval": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/ConfidenceInterval" + } + ] } } }, - "QueryOrganizationsEndpoint_Output": { + "GetLeaderboardByIdResult": { "required": [ - "owner", + "id", "name", - "domain" + "instruction", + "showPrompt", + "showPromptAsset", + "isInversed", + "responseBudget", + "minResponses", + "filters", + "featureFlags" ], "type": "object", "properties": { - "owner": { + "id": { + "type": "string" + }, + "orderId": { "type": "string", - "description": "The customer ID of the organization owner.", - "format": "uuid" + "nullable": true }, "name": { - "type": "string", - "description": "The name of the organization." + "type": "string" }, - "domain": { - "type": "string", - "description": "The domain associated with this organization." - } - } - }, - "QueryOrganizationsEndpoint_PagedResultOfOutput": { - "required": [ - "total", - "page", - "pageSize", - "items" - ], - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" + "instruction": { + "type": "string" }, - "page": { - "type": "integer", - "format": "int32" + "showPrompt": { + "type": "boolean" }, - "pageSize": { - "type": "integer", - "format": "int32" + "showPromptAsset": { + "type": "boolean" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryOrganizationsEndpoint_Output" - } + "isInversed": { + "type": "boolean" }, - "totalPages": { + "responseBudget": { "type": "integer", "format": "int32" - } - } - }, - "ReadBridgeTokenKeysResult": { - "required": [ - "accessToken", - "expiresIn", - "refreshToken", - "idToken", - "tokenType", - "scope" - ], - "type": "object", - "properties": { - "accessToken": { - "type": "string", - "nullable": true }, - "expiresIn": { + "minResponses": { "type": "integer", "format": "int32" }, - "refreshToken": { - "type": "string", - "nullable": true - }, - "idToken": { - "type": "string", - "nullable": true - }, - "tokenType": { + "validationSetId": { "type": "string", "nullable": true }, - "scope": { - "type": "string", - "nullable": true - } - } - }, - "SendSurveyModel": { - "required": [ - "fields" - ], - "type": "object", - "properties": { - "fields": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "The fields of the survey" - } - }, - "description": "The model user for submitting a survey" - }, - "AgeUserFilterModel_AgeGroup": { - "enum": [ - "0-17", - "18-29", - "30-39", - "40-49", - "50-64", - "65+" - ] + "filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignFilter" + } + }, + "featureFlags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } + } + } }, - "BenchmarkQueryResult": { + "GetParticipantByIdResult": { "required": [ "id", "name", - "isManaged", - "isPublic", - "createdAt", - "ownerMail" + "benchmarkId" ], "type": "object", "properties": { @@ -22360,657 +21917,599 @@ "name": { "type": "string" }, - "isManaged": { - "type": "boolean" - }, - "isPublic": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "ownerMail": { + "benchmarkId": { "type": "string" } } }, - "BoostLeaderboardModel": { + "GetSampleByIdResult": { "required": [ - "participants", - "totalResponses" + "id", + "identifier", + "participantId", + "participantName", + "asset", + "tags", + "ownerMail" ], "type": "object", "properties": { - "participants": { - "allOf": [ + "id": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "participantId": { + "type": "string" + }, + "participantName": { + "type": "string" + }, + "asset": { + "$ref": "#/components/schemas/IAssetModel" + }, + "prompt": { + "type": "string", + "nullable": true + }, + "promptAsset": { + "oneOf": [ { - "type": "array", - "items": { - "type": "string" - } + "nullable": true + }, + { + "$ref": "#/components/schemas/IAssetModel" } - ], - "description": "The participants of the given leaderboard that should be boosted." + ] }, - "totalResponses": { - "type": "integer", - "description": "The amount of responses in total that should be added, shared across all participants.", - "format": "int32" + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "ownerId": { + "type": "string", + "format": "uuid" + }, + "ownerMail": { + "type": "string" } - }, - "description": "The model for boosting a leaderboard." + } }, - "ConfidenceInterval": { + "GetStandingByIdResult": { "required": [ - "lowerOffset", - "upperOffset" + "id", + "name", + "benchmarkId", + "status", + "isDisabled" ], "type": "object", "properties": { - "lowerOffset": { - "type": "number", - "format": "double" + "id": { + "type": "string" }, - "upperOffset": { - "type": "number", - "format": "double" + "name": { + "type": "string" + }, + "benchmarkId": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/StandingStatus" + }, + "isDisabled": { + "type": "boolean" } } }, - "CreateBenchmarkModel": { + "ICampaignFilter": { "required": [ - "name" + "_t" ], "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the benchmark" + "oneOf": [ + { + "$ref": "#/components/schemas/ICampaignFilterAndFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterAudienceStateFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterCampaignFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterCampaignSessionCountFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterCountryFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterDemographicFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterDeviceFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterLanguageFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterNewUserFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterNotFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterOrFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterResponseCountFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterUserActionRestrictionFilter" + }, + { + "$ref": "#/components/schemas/ICampaignFilterUserScoreFilter" } - }, - "description": "The model for creating a benchmark." - }, - "CreateBenchmarkParticipantModel": { - "required": [ - "name" ], - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the participant." + "discriminator": { + "propertyName": "_t", + "mapping": { + "AndFilter": "#/components/schemas/ICampaignFilterAndFilter", + "AudienceStateFilter": "#/components/schemas/ICampaignFilterAudienceStateFilter", + "CampaignFilter": "#/components/schemas/ICampaignFilterCampaignFilter", + "CampaignSessionCountFilter": "#/components/schemas/ICampaignFilterCampaignSessionCountFilter", + "CountryFilter": "#/components/schemas/ICampaignFilterCountryFilter", + "DemographicFilter": "#/components/schemas/ICampaignFilterDemographicFilter", + "DeviceFilter": "#/components/schemas/ICampaignFilterDeviceFilter", + "LanguageFilter": "#/components/schemas/ICampaignFilterLanguageFilter", + "NewUserFilter": "#/components/schemas/ICampaignFilterNewUserFilter", + "NotFilter": "#/components/schemas/ICampaignFilterNotFilter", + "OrFilter": "#/components/schemas/ICampaignFilterOrFilter", + "ResponseCountFilter": "#/components/schemas/ICampaignFilterResponseCountFilter", + "UserActionRestrictionFilter": "#/components/schemas/ICampaignFilterUserActionRestrictionFilter", + "UserScoreFilter": "#/components/schemas/ICampaignFilterUserScoreFilter" } - }, - "description": "The model to create a participant in a leaderboard" + } }, - "CreateBenchmarkParticipantResult": { + "ICampaignFilterAndFilter": { "required": [ - "participantId" + "filters", + "_t" ], - "type": "object", "properties": { - "participantId": { + "_t": { + "enum": [ + "AndFilter" + ], "type": "string" }, - "datasetId": { - "type": "string" + "filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignFilter" + } + }, + "innerFilters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignFilter" + }, + "nullable": true } } }, - "CreateBenchmarkPromptResult": { + "ICampaignFilterAudienceStateFilter": { "required": [ - "id" + "audienceId", + "_t" ], - "type": "object", "properties": { - "id": { + "_t": { + "enum": [ + "AudienceStateFilter" + ], + "type": "string" + }, + "audienceId": { "type": "string" + }, + "allowedStates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SimplifiedAudienceUserState" + } + }, + "includeUnknownState": { + "type": "boolean" + }, + "executionOrder": { + "type": "integer", + "format": "uint32" } } }, - "CreateBenchmarkResult": { + "ICampaignFilterCampaignFilter": { "required": [ - "id" + "campaignIds", + "_t" ], - "type": "object", "properties": { - "id": { + "_t": { + "enum": [ + "CampaignFilter" + ], "type": "string" + }, + "campaignIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "executionOrder": { + "type": "integer", + "format": "uint32" } } }, - "CreateLeaderboardModel": { + "ICampaignFilterCampaignSessionCountFilter": { "required": [ - "name", - "instruction", - "showPrompt" + "sessionCount", + "operator", + "_t" ], - "type": "object", "properties": { - "benchmarkId": { - "type": "string", - "description": "If a leaderboard should be added to a preexisting benchmark, the benchmark Id can be provided.", - "nullable": true - }, - "benchmarkName": { - "type": "string", - "description": "If no BenchmarkId is provided a new benchmark will be created. if no name is supplied the benchmark\n will be called the same as the leaderboard.", - "nullable": true - }, - "name": { - "type": "string", - "description": "The name of the leaderboard." - }, - "instruction": { - "type": "string", - "description": "The instruction datapoints will be matched up against." - }, - "showPrompt": { - "type": "boolean", - "description": "Indicates if the prompt is shown on the rapids." - }, - "showPromptAsset": { - "type": "boolean", - "description": "Whether the prompt asset should be shown on the rapids." - }, - "responseBudget": { - "type": "integer", - "description": "Total amount of responses that get collected per run", - "format": "int32" + "_t": { + "enum": [ + "CampaignSessionCountFilter" + ], + "type": "string" }, - "minResponses": { + "sessionCount": { "type": "integer", - "description": "The minimum amount of responses that need to be collected per comparison.", - "format": "int32" - }, - "isInversed": { - "type": "boolean", - "description": "If the results should be inversed, meaning people should select the worse model." - }, - "validationSetId": { - "type": "string", - "description": "The Validation set that should be attached to every run.", - "nullable": true - }, - "audienceId": { - "type": "string", - "description": "Optional audience ID. When provided, the leaderboard will target users who have\n graduated from the audience (i.e., users with a score at or above the audience's minimum threshold).\n Cannot be specified together with Filters.", - "nullable": true + "format": "uint32" }, - "filters": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/IUserFilterModel" - }, - "nullable": true - } - ], - "description": "The filters will be applied on every order that is created by this leaderboard.\n Cannot be specified together with AudienceId." + "operator": { + "$ref": "#/components/schemas/ComparisonOperator" }, - "featureFlags": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - }, - "nullable": true - } - ], - "description": "Feature flags that will be applied to every order that is created by this leaderboard." + "executionOrder": { + "type": "integer", + "format": "uint32" } - }, - "description": "The CreateLeaderboardModel class represents the model for creating a leaderboard." + } }, - "CreateLeaderboardResult": { + "ICampaignFilterCountryFilter": { "required": [ - "id", - "benchmarkId", - "showPrompt", - "showPromptAsset", - "responseBudget", - "minResponses", - "isInversed" + "countries", + "_t" ], - "type": "object", "properties": { - "id": { - "type": "string" - }, - "benchmarkId": { + "_t": { + "enum": [ + "CountryFilter" + ], "type": "string" }, - "showPrompt": { - "type": "boolean" - }, - "showPromptAsset": { - "type": "boolean" - }, - "responseBudget": { - "type": "integer", - "format": "int32" + "countries": { + "type": "array", + "items": { + "type": "string" + } }, - "minResponses": { + "executionOrder": { "type": "integer", - "format": "int32" - }, - "isInversed": { - "type": "boolean" + "format": "uint32" } } }, - "CreateSampleModel": { + "ICampaignFilterDemographicFilter": { "required": [ "identifier", - "asset" + "values", + "_t" ], - "type": "object", "properties": { + "_t": { + "enum": [ + "DemographicFilter" + ], + "type": "string" + }, "identifier": { - "type": "string", - "description": "The identifier used to correlate samples of different participants." + "type": "string" }, - "asset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - } - ], - "description": "The asset input for the sample." + "values": { + "type": "array", + "items": { + "type": "string" + } + }, + "executionOrder": { + "type": "integer", + "format": "uint32" } - }, - "description": "The model used to create a sample to a participant." + } }, - "ForkBenchmarkResult": { + "ICampaignFilterDeviceFilter": { "required": [ - "id" + "deviceTypes", + "_t" ], - "type": "object", "properties": { - "id": { + "_t": { + "enum": [ + "DeviceFilter" + ], "type": "string" + }, + "deviceTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceType" + } + }, + "executionOrder": { + "type": "integer", + "format": "uint32" } } }, - "GenderUserFilterModel_Gender": { - "enum": [ - "Male", - "Female", - "Other" - ] - }, - "GetBenchmarkByIdResult": { + "ICampaignFilterLanguageFilter": { "required": [ - "id", - "name", - "isPublic", - "createdAt", - "ownerId", - "ownerMail" + "languages", + "_t" ], - "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { + "_t": { + "enum": [ + "LanguageFilter" + ], "type": "string" }, - "isPublic": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "ownerId": { - "type": "string", - "format": "uuid" + "languages": { + "type": "array", + "items": { + "type": "string" + } }, - "ownerMail": { - "type": "string" + "executionOrder": { + "type": "integer", + "format": "uint32" } } }, - "GetCombinedBenchmarkMatrixEndpoint_Output": { + "ICampaignFilterNewUserFilter": { "required": [ - "index", - "columns", - "data" + "_t" ], - "type": "object", "properties": { - "index": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "Row participant names." - }, - "columns": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } + "_t": { + "enum": [ + "NewUserFilter" ], - "description": "Column participant names." + "type": "string" }, - "data": { - "allOf": [ - { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } - } - ], - "description": "NxN matrix where Data[i][j] = wins of Index[i] over Columns[j]." + "executionOrder": { + "type": "integer", + "format": "uint32" } - }, - "description": "Combined benchmark matrix output in pandas split format." + } }, - "GetCombinedBenchmarkStandingsEndpoint_Output": { + "ICampaignFilterNotFilter": { "required": [ - "items" + "filter", + "_t" ], - "type": "object", "properties": { - "items": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetCombinedBenchmarkStandingsEndpoint_OutputItem" - } - } + "_t": { + "enum": [ + "NotFilter" ], - "description": "The standings items." + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/ICampaignFilter" + }, + "innerFilters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignFilter" + } } - }, - "description": "Combined benchmark standings output." + } }, - "GetCombinedBenchmarkStandingsEndpoint_OutputItem": { + "ICampaignFilterOrFilter": { "required": [ - "id", - "name", - "status", - "score", - "wins", - "totalMatches", - "isDisabled" + "filters", + "_t" ], - "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { + "_t": { + "enum": [ + "OrFilter" + ], "type": "string" }, - "status": { - "$ref": "#/components/schemas/StandingStatus" - }, - "score": { - "type": "number", - "format": "double" - }, - "wins": { - "type": "number", - "format": "double" - }, - "totalMatches": { - "type": "number", - "format": "double" - }, - "isDisabled": { - "type": "boolean" + "filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignFilter" + } }, - "confidenceInterval": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/ConfidenceInterval" - } - ] + "innerFilters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignFilter" + } } } }, - "GetCombinedLeaderboardMatrixEndpoint_Output": { + "ICampaignFilterResponseCountFilter": { "required": [ - "index", - "columns", - "data" + "responseCount", + "dimension", + "operator", + "_t" ], - "type": "object", "properties": { - "index": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } + "_t": { + "enum": [ + "ResponseCountFilter" ], - "description": "Row participant names." + "type": "string" }, - "columns": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "Column participant names." + "responseCount": { + "type": "integer", + "format": "uint32" }, - "data": { - "allOf": [ - { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } - } - ], - "description": "NxN matrix where Data[i][j] = wins of Index[i] over Columns[j]." + "dimension": { + "type": "string" + }, + "operator": { + "$ref": "#/components/schemas/ComparisonOperator" + }, + "executionOrder": { + "type": "integer", + "format": "uint32" } - }, - "description": "Combined leaderboard matrix output in pandas split format." + } }, - "GetCombinedLeaderboardStandingsEndpoint_Output": { + "ICampaignFilterUserActionRestrictionFilter": { "required": [ - "items" + "requiredActions", + "_t" ], - "type": "object", "properties": { - "items": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetCombinedLeaderboardStandingsEndpoint_OutputItem" - } - } + "_t": { + "enum": [ + "UserActionRestrictionFilter" ], - "description": "The standings items." + "type": "string" + }, + "requiredActions": {}, + "executionOrder": { + "type": "integer", + "format": "uint32" } - }, - "description": "Combined leaderboard standings output." + } }, - "GetCombinedLeaderboardStandingsEndpoint_OutputItem": { + "ICampaignFilterUserScoreFilter": { "required": [ - "id", - "name", - "status", - "score", - "wins", - "totalMatches", - "isDisabled" + "lowerbound", + "upperbound", + "dimension", + "_t" ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/StandingStatus" - }, - "score": { - "type": "number", - "format": "double" + "properties": { + "_t": { + "enum": [ + "UserScoreFilter" + ], + "type": "string" }, - "wins": { + "lowerbound": { "type": "number", "format": "double" }, - "totalMatches": { + "upperbound": { "type": "number", "format": "double" }, - "isDisabled": { - "type": "boolean" + "dimension": { + "type": "string" }, - "confidenceInterval": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/ConfidenceInterval" - } - ] + "executionOrder": { + "type": "integer", + "format": "uint32" } } }, - "GetLeaderboardByIdResult": { + "ISampleByParticipant": { "required": [ - "id", - "name", - "instruction", - "showPrompt", - "showPromptAsset", - "isInversed", - "responseBudget", - "minResponses", - "filters", - "featureFlags" + "_t" ], "type": "object", - "properties": { - "id": { - "type": "string" - }, - "orderId": { - "type": "string", - "nullable": true + "oneOf": [ + { + "$ref": "#/components/schemas/ISampleByParticipantPlaceholderSampleByParticipant" }, - "name": { + { + "$ref": "#/components/schemas/ISampleByParticipantSampleByParticipant" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "PlaceholderSampleByParticipant": "#/components/schemas/ISampleByParticipantPlaceholderSampleByParticipant", + "SampleByParticipant": "#/components/schemas/ISampleByParticipantSampleByParticipant" + } + } + }, + "ISampleByParticipantPlaceholderSampleByParticipant": { + "required": [ + "identifier", + "tags", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "PlaceholderSampleByParticipant" + ], "type": "string" }, - "instruction": { + "identifier": { "type": "string" }, - "showPrompt": { - "type": "boolean" - }, - "showPromptAsset": { - "type": "boolean" - }, - "isInversed": { - "type": "boolean" - }, - "responseBudget": { - "type": "integer", - "format": "int32" - }, - "minResponses": { - "type": "integer", - "format": "int32" - }, - "validationSetId": { + "prompt": { "type": "string", "nullable": true }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignFilter" - } + "promptAsset": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/IAssetModel" + } + ] }, - "featureFlags": { + "tags": { "type": "array", "items": { - "$ref": "#/components/schemas/FeatureFlag" + "type": "string" } } } }, - "GetParticipantByIdResult": { - "required": [ - "id", - "name", - "benchmarkId" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "benchmarkId": { - "type": "string" - } - } - }, - "GetSampleByIdResult": { + "ISampleByParticipantSampleByParticipant": { "required": [ "id", "identifier", - "participantId", - "participantName", "asset", "tags", - "ownerMail" + "ownerMail", + "_t" ], - "type": "object", "properties": { - "id": { - "type": "string" - }, - "identifier": { + "_t": { + "enum": [ + "SampleByParticipant" + ], "type": "string" }, - "participantId": { + "id": { "type": "string" }, - "participantName": { + "identifier": { "type": "string" }, "asset": { @@ -23049,210 +22548,132 @@ } } }, - "GetStandingByIdResult": { - "required": [ - "id", - "name", - "benchmarkId", - "status", - "isDisabled" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "benchmarkId": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/StandingStatus" - }, - "isDisabled": { - "type": "boolean" - } - } - }, - "ICampaignFilter": { + "IUserFilterModel": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/ICampaignFilterAndFilter" - }, - { - "$ref": "#/components/schemas/ICampaignFilterAudienceStateFilter" + "$ref": "#/components/schemas/IUserFilterModelAgeUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterCampaignFilter" + "$ref": "#/components/schemas/IUserFilterModelAndUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterCampaignSessionCountFilter" + "$ref": "#/components/schemas/IUserFilterModelCampaignUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterCountryFilter" + "$ref": "#/components/schemas/IUserFilterModelCountryUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterDemographicFilter" + "$ref": "#/components/schemas/IUserFilterModelCustomUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterDeviceFilter" + "$ref": "#/components/schemas/IUserFilterModelDeviceUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterLanguageFilter" + "$ref": "#/components/schemas/IUserFilterModelGenderUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterNewUserFilter" + "$ref": "#/components/schemas/IUserFilterModelLanguageUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterNotFilter" + "$ref": "#/components/schemas/IUserFilterModelNewUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterOrFilter" + "$ref": "#/components/schemas/IUserFilterModelNotUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterResponseCountFilter" + "$ref": "#/components/schemas/IUserFilterModelOrUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterUserActionRestrictionFilter" + "$ref": "#/components/schemas/IUserFilterModelResponseCountUserFilterModel" }, { - "$ref": "#/components/schemas/ICampaignFilterUserScoreFilter" + "$ref": "#/components/schemas/IUserFilterModelUserScoreUserFilterModel" } ], "discriminator": { "propertyName": "_t", "mapping": { - "AndFilter": "#/components/schemas/ICampaignFilterAndFilter", - "AudienceStateFilter": "#/components/schemas/ICampaignFilterAudienceStateFilter", - "CampaignFilter": "#/components/schemas/ICampaignFilterCampaignFilter", - "CampaignSessionCountFilter": "#/components/schemas/ICampaignFilterCampaignSessionCountFilter", - "CountryFilter": "#/components/schemas/ICampaignFilterCountryFilter", - "DemographicFilter": "#/components/schemas/ICampaignFilterDemographicFilter", - "DeviceFilter": "#/components/schemas/ICampaignFilterDeviceFilter", - "LanguageFilter": "#/components/schemas/ICampaignFilterLanguageFilter", - "NewUserFilter": "#/components/schemas/ICampaignFilterNewUserFilter", - "NotFilter": "#/components/schemas/ICampaignFilterNotFilter", - "OrFilter": "#/components/schemas/ICampaignFilterOrFilter", - "ResponseCountFilter": "#/components/schemas/ICampaignFilterResponseCountFilter", - "UserActionRestrictionFilter": "#/components/schemas/ICampaignFilterUserActionRestrictionFilter", - "UserScoreFilter": "#/components/schemas/ICampaignFilterUserScoreFilter" - } - } - }, - "ICampaignFilterAndFilter": { - "required": [ - "filters", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "AndFilter" - ], - "type": "string" - }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignFilter" - } - }, - "innerFilters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignFilter" - }, - "nullable": true + "AgeFilter": "#/components/schemas/IUserFilterModelAgeUserFilterModel", + "AndFilter": "#/components/schemas/IUserFilterModelAndUserFilterModel", + "CampaignFilter": "#/components/schemas/IUserFilterModelCampaignUserFilterModel", + "CountryFilter": "#/components/schemas/IUserFilterModelCountryUserFilterModel", + "CustomFilter": "#/components/schemas/IUserFilterModelCustomUserFilterModel", + "DeviceFilter": "#/components/schemas/IUserFilterModelDeviceUserFilterModel", + "GenderFilter": "#/components/schemas/IUserFilterModelGenderUserFilterModel", + "LanguageFilter": "#/components/schemas/IUserFilterModelLanguageUserFilterModel", + "NewUserFilter": "#/components/schemas/IUserFilterModelNewUserFilterModel", + "NotFilter": "#/components/schemas/IUserFilterModelNotUserFilterModel", + "OrFilter": "#/components/schemas/IUserFilterModelOrUserFilterModel", + "ResponseCountFilter": "#/components/schemas/IUserFilterModelResponseCountUserFilterModel", + "UserScoreFilter": "#/components/schemas/IUserFilterModelUserScoreUserFilterModel" } } }, - "ICampaignFilterAudienceStateFilter": { + "IUserFilterModelAgeUserFilterModel": { "required": [ - "audienceId", + "ageGroups", "_t" ], "properties": { "_t": { "enum": [ - "AudienceStateFilter" + "AgeFilter" ], "type": "string" }, - "audienceId": { - "type": "string" - }, - "allowedStates": { + "ageGroups": { "type": "array", "items": { - "$ref": "#/components/schemas/SimplifiedAudienceUserState" + "$ref": "#/components/schemas/AgeUserFilterModel_AgeGroup" } - }, - "includeUnknownState": { - "type": "boolean" - }, - "executionOrder": { - "type": "integer", - "format": "uint32" } } }, - "ICampaignFilterCampaignFilter": { + "IUserFilterModelAndUserFilterModel": { "required": [ - "campaignIds", + "filters", "_t" ], "properties": { "_t": { "enum": [ - "CampaignFilter" + "AndFilter" ], "type": "string" }, - "campaignIds": { + "filters": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/IUserFilterModel" } - }, - "executionOrder": { - "type": "integer", - "format": "uint32" } } }, - "ICampaignFilterCampaignSessionCountFilter": { + "IUserFilterModelCampaignUserFilterModel": { "required": [ - "sessionCount", - "operator", + "campaignIds", "_t" ], "properties": { "_t": { "enum": [ - "CampaignSessionCountFilter" + "CampaignFilter" ], "type": "string" }, - "sessionCount": { - "type": "integer", - "format": "uint32" - }, - "operator": { - "$ref": "#/components/schemas/ComparisonOperator" - }, - "executionOrder": { - "type": "integer", - "format": "uint32" + "campaignIds": { + "type": "array", + "items": { + "type": "string" + } } } }, - "ICampaignFilterCountryFilter": { + "IUserFilterModelCountryUserFilterModel": { "required": [ "countries", "_t" @@ -23269,14 +22690,10 @@ "items": { "type": "string" } - }, - "executionOrder": { - "type": "integer", - "format": "uint32" } } }, - "ICampaignFilterDemographicFilter": { + "IUserFilterModelCustomUserFilterModel": { "required": [ "identifier", "values", @@ -23285,7 +22702,7 @@ "properties": { "_t": { "enum": [ - "DemographicFilter" + "CustomFilter" ], "type": "string" }, @@ -23297,14 +22714,10 @@ "items": { "type": "string" } - }, - "executionOrder": { - "type": "integer", - "format": "uint32" } } }, - "ICampaignFilterDeviceFilter": { + "IUserFilterModelDeviceUserFilterModel": { "required": [ "deviceTypes", "_t" @@ -23321,14 +22734,30 @@ "items": { "$ref": "#/components/schemas/DeviceType" } + } + } + }, + "IUserFilterModelGenderUserFilterModel": { + "required": [ + "genders", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "GenderFilter" + ], + "type": "string" }, - "executionOrder": { - "type": "integer", - "format": "uint32" + "genders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GenderUserFilterModel_Gender" + } } } }, - "ICampaignFilterLanguageFilter": { + "IUserFilterModelLanguageUserFilterModel": { "required": [ "languages", "_t" @@ -23345,14 +22774,10 @@ "items": { "type": "string" } - }, - "executionOrder": { - "type": "integer", - "format": "uint32" } } }, - "ICampaignFilterNewUserFilter": { + "IUserFilterModelNewUserFilterModel": { "required": [ "_t" ], @@ -23362,14 +22787,10 @@ "NewUserFilter" ], "type": "string" - }, - "executionOrder": { - "type": "integer", - "format": "uint32" } } }, - "ICampaignFilterNotFilter": { + "IUserFilterModelNotUserFilterModel": { "required": [ "filter", "_t" @@ -23382,17 +22803,11 @@ "type": "string" }, "filter": { - "$ref": "#/components/schemas/ICampaignFilter" - }, - "innerFilters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignFilter" - } + "$ref": "#/components/schemas/IUserFilterModel" } } }, - "ICampaignFilterOrFilter": { + "IUserFilterModelOrUserFilterModel": { "required": [ "filters", "_t" @@ -23407,18 +22822,12 @@ "filters": { "type": "array", "items": { - "$ref": "#/components/schemas/ICampaignFilter" - } - }, - "innerFilters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignFilter" + "$ref": "#/components/schemas/IUserFilterModel" } } } }, - "ICampaignFilterResponseCountFilter": { + "IUserFilterModelResponseCountUserFilterModel": { "required": [ "responseCount", "dimension", @@ -23441,1189 +22850,1365 @@ }, "operator": { "$ref": "#/components/schemas/ComparisonOperator" - }, - "executionOrder": { - "type": "integer", - "format": "uint32" - } - } - }, - "ICampaignFilterUserActionRestrictionFilter": { - "required": [ - "requiredActions", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "UserActionRestrictionFilter" - ], - "type": "string" - }, - "requiredActions": {}, - "executionOrder": { - "type": "integer", - "format": "uint32" - } - } - }, - "ICampaignFilterUserScoreFilter": { - "required": [ - "lowerbound", - "upperbound", - "dimension", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "UserScoreFilter" - ], - "type": "string" - }, - "lowerbound": { - "type": "number", - "format": "double" - }, - "upperbound": { - "type": "number", - "format": "double" - }, - "dimension": { - "type": "string" - }, - "executionOrder": { - "type": "integer", - "format": "uint32" - } - } - }, - "ISampleByParticipant": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/ISampleByParticipantPlaceholderSampleByParticipant" - }, - { - "$ref": "#/components/schemas/ISampleByParticipantSampleByParticipant" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "PlaceholderSampleByParticipant": "#/components/schemas/ISampleByParticipantPlaceholderSampleByParticipant", - "SampleByParticipant": "#/components/schemas/ISampleByParticipantSampleByParticipant" - } - } - }, - "ISampleByParticipantPlaceholderSampleByParticipant": { - "required": [ - "identifier", - "tags", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "PlaceholderSampleByParticipant" - ], - "type": "string" - }, - "identifier": { - "type": "string" - }, - "prompt": { - "type": "string", - "nullable": true - }, - "promptAsset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAssetModel" - } - ] - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } } } }, - "ISampleByParticipantSampleByParticipant": { - "required": [ - "id", - "identifier", - "asset", - "tags", - "ownerMail", + "IUserFilterModelUserScoreUserFilterModel": { + "required": [ "_t" ], "properties": { "_t": { "enum": [ - "SampleByParticipant" + "UserScoreFilter" ], "type": "string" }, - "id": { - "type": "string" - }, - "identifier": { - "type": "string" + "lowerbound": { + "type": "number", + "format": "double" }, - "asset": { - "$ref": "#/components/schemas/IAssetModel" + "upperbound": { + "type": "number", + "format": "double" }, - "prompt": { + "dimension": { "type": "string", "nullable": true - }, - "promptAsset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAssetModel" - } - ] - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "ownerId": { - "type": "string", - "format": "uuid" - }, - "ownerMail": { - "type": "string" } } }, - "IUserFilterModel": { + "LeaderboardsQueryResult": { "required": [ - "_t" + "id", + "name", + "instruction", + "showPrompt", + "showPromptAsset", + "isInversed", + "responseBudget", + "minResponses", + "filters", + "featureFlags" ], "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IUserFilterModelAgeUserFilterModel" - }, - { - "$ref": "#/components/schemas/IUserFilterModelAndUserFilterModel" + "properties": { + "id": { + "type": "string" }, - { - "$ref": "#/components/schemas/IUserFilterModelCampaignUserFilterModel" + "orderId": { + "type": "string", + "nullable": true }, - { - "$ref": "#/components/schemas/IUserFilterModelCountryUserFilterModel" + "name": { + "type": "string" }, - { - "$ref": "#/components/schemas/IUserFilterModelCustomUserFilterModel" + "instruction": { + "type": "string" }, - { - "$ref": "#/components/schemas/IUserFilterModelDeviceUserFilterModel" + "showPrompt": { + "type": "boolean" }, - { - "$ref": "#/components/schemas/IUserFilterModelGenderUserFilterModel" + "showPromptAsset": { + "type": "boolean" }, - { - "$ref": "#/components/schemas/IUserFilterModelLanguageUserFilterModel" + "isInversed": { + "type": "boolean" }, - { - "$ref": "#/components/schemas/IUserFilterModelNewUserFilterModel" + "responseBudget": { + "type": "integer", + "format": "int32" }, - { - "$ref": "#/components/schemas/IUserFilterModelNotUserFilterModel" + "minResponses": { + "type": "integer", + "format": "int32" }, - { - "$ref": "#/components/schemas/IUserFilterModelOrUserFilterModel" + "validationSetId": { + "type": "string", + "nullable": true }, - { - "$ref": "#/components/schemas/IUserFilterModelResponseCountUserFilterModel" + "filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ICampaignFilter" + } }, - { - "$ref": "#/components/schemas/IUserFilterModelUserScoreUserFilterModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "AgeFilter": "#/components/schemas/IUserFilterModelAgeUserFilterModel", - "AndFilter": "#/components/schemas/IUserFilterModelAndUserFilterModel", - "CampaignFilter": "#/components/schemas/IUserFilterModelCampaignUserFilterModel", - "CountryFilter": "#/components/schemas/IUserFilterModelCountryUserFilterModel", - "CustomFilter": "#/components/schemas/IUserFilterModelCustomUserFilterModel", - "DeviceFilter": "#/components/schemas/IUserFilterModelDeviceUserFilterModel", - "GenderFilter": "#/components/schemas/IUserFilterModelGenderUserFilterModel", - "LanguageFilter": "#/components/schemas/IUserFilterModelLanguageUserFilterModel", - "NewUserFilter": "#/components/schemas/IUserFilterModelNewUserFilterModel", - "NotFilter": "#/components/schemas/IUserFilterModelNotUserFilterModel", - "OrFilter": "#/components/schemas/IUserFilterModelOrUserFilterModel", - "ResponseCountFilter": "#/components/schemas/IUserFilterModelResponseCountUserFilterModel", - "UserScoreFilter": "#/components/schemas/IUserFilterModelUserScoreUserFilterModel" + "featureFlags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } } } }, - "IUserFilterModelAgeUserFilterModel": { + "PagedResultOfBenchmarkQueryResult": { "required": [ - "ageGroups", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "AgeFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "ageGroups": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/AgeUserFilterModel_AgeGroup" + "$ref": "#/components/schemas/BenchmarkQueryResult" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IUserFilterModelAndUserFilterModel": { + "PagedResultOfISampleByParticipant": { "required": [ - "filters", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "AndFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "filters": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/IUserFilterModel" + "$ref": "#/components/schemas/ISampleByParticipant" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IUserFilterModelCampaignUserFilterModel": { + "PagedResultOfLeaderboardsQueryResult": { "required": [ - "campaignIds", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CampaignFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "campaignIds": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/LeaderboardsQueryResult" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IUserFilterModelCountryUserFilterModel": { + "PagedResultOfParticipantByBenchmark": { "required": [ - "countries", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CountryFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" + }, + "page": { + "type": "integer", + "format": "int32" }, - "countries": { + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/ParticipantByBenchmark" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IUserFilterModelCustomUserFilterModel": { + "PagedResultOfPromptByBenchmarkResult": { "required": [ - "identifier", - "values", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CustomFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "identifier": { - "type": "string" + "page": { + "type": "integer", + "format": "int32" }, - "values": { + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/PromptByBenchmarkResult" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IUserFilterModelDeviceUserFilterModel": { + "PagedResultOfRunsByLeaderboardResult": { "required": [ - "deviceTypes", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "DeviceFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "deviceTypes": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/DeviceType" + "$ref": "#/components/schemas/RunsByLeaderboardResult" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IUserFilterModelGenderUserFilterModel": { + "PagedResultOfSampleByIdentifier": { "required": [ - "genders", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "GenderFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "genders": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/GenderUserFilterModel_Gender" + "$ref": "#/components/schemas/SampleByIdentifier" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IUserFilterModelLanguageUserFilterModel": { + "PagedResultOfStandingByLeaderboard": { "required": [ - "languages", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "LanguageFilter" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "languages": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/StandingByLeaderboard" } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IUserFilterModelNewUserFilterModel": { + "ParticipantByBenchmark": { "required": [ - "_t" + "id", + "name", + "benchmarkId", + "status" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "NewUserFilter" - ], + "id": { "type": "string" - } - } - }, - "IUserFilterModelNotUserFilterModel": { - "required": [ - "filter", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "NotFilter" - ], + }, + "name": { "type": "string" }, - "filter": { - "$ref": "#/components/schemas/IUserFilterModel" - } - } - }, - "IUserFilterModelOrUserFilterModel": { - "required": [ - "filters", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "OrFilter" - ], + "benchmarkId": { "type": "string" }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IUserFilterModel" - } + "status": { + "$ref": "#/components/schemas/ParticipantStatus" } } }, - "IUserFilterModelResponseCountUserFilterModel": { + "ParticipantStatus": { + "enum": [ + "Created", + "Submitted", + "Disabled" + ] + }, + "PromptByBenchmarkResult": { "required": [ - "responseCount", - "dimension", - "operator", - "_t" + "id", + "identifier", + "createdAt", + "tags" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "ResponseCountFilter" - ], + "id": { "type": "string" }, - "responseCount": { - "type": "integer", - "format": "uint32" + "prompt": { + "type": "string", + "nullable": true }, - "dimension": { + "promptAsset": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/IAssetModel" + } + ] + }, + "identifier": { "type": "string" }, - "operator": { - "$ref": "#/components/schemas/ComparisonOperator" + "createdAt": { + "type": "string", + "format": "date-time" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } } } }, - "IUserFilterModelUserScoreUserFilterModel": { + "RunsByLeaderboardResult": { "required": [ - "_t" + "id", + "name", + "status", + "createdAt", + "ownerMail", + "orderId" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "UserScoreFilter" - ], + "id": { "type": "string" }, - "lowerbound": { - "type": "number", - "format": "double" + "name": { + "type": "string" }, - "upperbound": { - "type": "number", - "format": "double" + "status": { + "$ref": "#/components/schemas/RunStatus" }, - "dimension": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "ownerMail": { + "type": "string" + }, + "orderId": { "type": "string", "nullable": true } } }, - "LeaderboardsQueryResult": { + "RunStatus": { + "enum": [ + "Queued", + "Running", + "Completed", + "Failed" + ] + }, + "SampleByIdentifier": { "required": [ "id", - "name", - "instruction", - "showPrompt", - "showPromptAsset", - "isInversed", - "responseBudget", - "minResponses", - "filters", - "featureFlags" + "identifier", + "participantId", + "participantName", + "asset", + "tags", + "ownerMail" ], "type": "object", "properties": { "id": { "type": "string" }, - "orderId": { - "type": "string", - "nullable": true - }, - "name": { + "identifier": { "type": "string" }, - "instruction": { + "participantId": { "type": "string" }, - "showPrompt": { - "type": "boolean" - }, - "showPromptAsset": { - "type": "boolean" - }, - "isInversed": { - "type": "boolean" - }, - "responseBudget": { - "type": "integer", - "format": "int32" + "participantName": { + "type": "string" }, - "minResponses": { - "type": "integer", - "format": "int32" + "asset": { + "$ref": "#/components/schemas/IAssetModel" }, - "validationSetId": { + "prompt": { "type": "string", "nullable": true }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ICampaignFilter" - } + "promptAsset": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/IAssetModel" + } + ] }, - "featureFlags": { + "tags": { "type": "array", "items": { - "$ref": "#/components/schemas/FeatureFlag" + "type": "string" } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "ownerId": { + "type": "string", + "format": "uuid" + }, + "ownerMail": { + "type": "string" } } }, - "PagedResultOfBenchmarkQueryResult": { + "StandingByBenchmark": { "required": [ - "total", - "page", - "pageSize", - "items" + "id", + "name", + "benchmarkId", + "status", + "score", + "wins", + "totalMatches", + "isDisabled" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" + "id": { + "type": "string" }, - "page": { - "type": "integer", - "format": "int32" + "name": { + "type": "string" }, - "pageSize": { - "type": "integer", - "format": "int32" + "benchmarkId": { + "type": "string" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BenchmarkQueryResult" - } + "status": { + "$ref": "#/components/schemas/StandingStatus" }, - "totalPages": { - "type": "integer", - "format": "int32" + "score": { + "type": "number", + "format": "double" + }, + "wins": { + "type": "number", + "format": "double" + }, + "totalMatches": { + "type": "number", + "format": "double" + }, + "isDisabled": { + "type": "boolean" + }, + "confidenceInterval": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/ConfidenceInterval" + } + ] } } }, - "PagedResultOfISampleByParticipant": { + "StandingByLeaderboard": { "required": [ - "total", - "page", - "pageSize", - "items" + "id", + "name", + "leaderboardId", + "status", + "score", + "wins", + "totalMatches", + "isDisabled" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" + "id": { + "type": "string" }, - "page": { - "type": "integer", - "format": "int32" + "name": { + "type": "string" }, - "pageSize": { - "type": "integer", - "format": "int32" + "leaderboardId": { + "type": "string" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ISampleByParticipant" - } + "status": { + "$ref": "#/components/schemas/StandingStatus" }, - "totalPages": { - "type": "integer", - "format": "int32" + "score": { + "type": "number", + "format": "double" + }, + "wins": { + "type": "number", + "format": "double" + }, + "totalMatches": { + "type": "number", + "format": "double" + }, + "isDisabled": { + "type": "boolean" + }, + "confidenceInterval": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/ConfidenceInterval" + } + ] } } }, - "PagedResultOfLeaderboardsQueryResult": { + "StandingsByBenchmarkResult": { "required": [ - "total", - "page", - "pageSize", "items" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { - "type": "integer", - "format": "int32" - }, "items": { "type": "array", "items": { - "$ref": "#/components/schemas/LeaderboardsQueryResult" + "$ref": "#/components/schemas/StandingByBenchmark" } - }, - "totalPages": { - "type": "integer", - "format": "int32" } } }, - "PagedResultOfParticipantByBenchmark": { + "StandingsByLeaderboardResult": { "required": [ - "total", - "page", - "pageSize", "items" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { - "type": "integer", - "format": "int32" - }, "items": { "type": "array", "items": { - "$ref": "#/components/schemas/ParticipantByBenchmark" + "$ref": "#/components/schemas/StandingByLeaderboard" } - }, - "totalPages": { - "type": "integer", - "format": "int32" } } }, - "PagedResultOfPromptByBenchmarkResult": { + "StandingStatus": { + "enum": [ + "Created", + "Active", + "Idle" + ] + }, + "SubmitParticipantResult": { "required": [ - "total", - "page", - "pageSize", - "items" + "validDatapoints", + "invalidDatapoints" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { + "validDatapoints": { "type": "integer", "format": "int32" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PromptByBenchmarkResult" - } - }, - "totalPages": { + "invalidDatapoints": { "type": "integer", "format": "int32" } } }, - "PagedResultOfRunsByLeaderboardResult": { + "SubmitPromptModel": { "required": [ - "total", - "page", - "pageSize", - "items" + "identifier" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" + "identifier": { + "type": "string", + "description": "An identifier associated to the prompt" }, - "page": { - "type": "integer", - "format": "int32" + "prompt": { + "type": "string", + "description": "The prompt", + "nullable": true }, - "pageSize": { - "type": "integer", - "format": "int32" + "promptAsset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetInput" + } + ], + "description": "PromptAsset" }, - "items": { + "tags": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "The tags of a given prompt" + } + }, + "description": "The model user for submitting a prompt to a benchmark." + }, + "TagsByBenchmarkResult": { + "required": [ + "tags" + ], + "type": "object", + "properties": { + "tags": { "type": "array", "items": { - "$ref": "#/components/schemas/RunsByLeaderboardResult" + "type": "string" } - }, - "totalPages": { - "type": "integer", - "format": "int32" } } }, - "PagedResultOfSampleByIdentifier": { + "UpdateBenchmarkModel": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name of the benchmark.", + "nullable": true + }, + "isPublic": { + "type": "boolean", + "description": "Whether the benchmark should be public (only admins can change this).", + "nullable": true + } + }, + "description": "The model used to update a benchmark." + }, + "UpdateBenchmarkNameModel": { "required": [ - "total", - "page", - "pageSize", - "items" + "name" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" + "name": { + "type": "string", + "description": "The new name of the benchmark." + } + }, + "description": "The model used to update the name of a benchmark." + }, + "UpdateLeaderboardModel": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name of the leaderboard.", + "nullable": true }, - "page": { + "responseBudget": { "type": "integer", - "format": "int32" + "description": "The amount of responses that will be collected when onboarding a new participant.", + "format": "int32", + "nullable": true }, - "pageSize": { + "minResponses": { + "type": "integer", + "description": "The amount of responses that will be collected as a minimum on each matchup.", + "format": "int32", + "nullable": true + } + }, + "description": "The model used to update a leaderboard." + }, + "UpdateLeaderboardNameModel": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name of the leaderboard." + } + }, + "description": "The model used to update the name of a leaderboard." + }, + "UpdateLeaderboardResponseConfigModel": { + "required": [ + "responseBudget", + "minResponses" + ], + "type": "object", + "properties": { + "responseBudget": { "type": "integer", + "description": "The amount of responses that will be collected when onboarding a new participant.", "format": "int32" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SampleByIdentifier" - } - }, - "totalPages": { + "minResponses": { "type": "integer", + "description": "The amount of responses that will be collected as a minimum on each matchup.", "format": "int32" } - } + }, + "description": "The model used to update the name of a leaderboard." }, - "PagedResultOfStandingByLeaderboard": { + "UpdateParticipantModel": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name of the participant.", + "nullable": true + } + }, + "description": "The model used to update a participant." + }, + "UpdateParticipantNameModel": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name of the participant." + } + }, + "description": "The model used to update the name of a participant." + }, + "UpdatePromptTagsModel": { + "required": [ + "tags" + ], + "type": "object", + "properties": { + "tags": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "The list of tags to be associated with the prompt." + } + }, + "description": "The model for updating prompt tags." + }, + "VoteMatrixResult": { "required": [ - "total", - "page", - "pageSize", - "items" + "index", + "columns", + "data" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { - "type": "integer", - "format": "int32" + "index": { + "type": "array", + "items": { + "type": "string" + } }, - "items": { + "columns": { "type": "array", "items": { - "$ref": "#/components/schemas/StandingByLeaderboard" + "type": "string" } }, - "totalPages": { - "type": "integer", - "format": "int32" + "data": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } } } }, - "ParticipantByBenchmark": { + "AggregatorType": { + "enum": [ + "NonCommittal", + "MajorityVote", + "SimpleMatchup", + "LocateCluster", + "Classification", + "Locate", + "BoundingBox", + "Line", + "Transcription", + "SinglePointLocate", + "FreeText", + "Scrub", + "Ranking", + "MultiRanking", + null + ], + "description": "The aggregator type." + }, + "AttachCategoryRapidBlueprint_Category": { "required": [ - "id", - "name", - "benchmarkId", - "status" + "label", + "value" ], "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { + "label": { "type": "string" }, - "benchmarkId": { + "value": { "type": "string" - }, - "status": { - "$ref": "#/components/schemas/ParticipantStatus" } } }, - "ParticipantStatus": { - "enum": [ - "Created", - "Submitted", - "Disabled" - ] + "CloneOrderEndpoint_Input": { + "required": [ + "orderName" + ], + "type": "object", + "properties": { + "orderName": { + "type": "string", + "description": "The name of the new cloned order." + } + } }, - "PromptByBenchmarkResult": { + "CloneOrderEndpoint_Output": { "required": [ - "id", - "identifier", - "createdAt", - "tags" + "orderId" ], "type": "object", "properties": { - "id": { - "type": "string" - }, - "prompt": { + "datasetId": { "type": "string", + "description": "The dataset ID of the cloned order.", "nullable": true }, - "promptAsset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAssetModel" - } - ] + "orderId": { + "type": "string", + "description": "The ID of the newly cloned order." + } + } + }, + "ConditionalValidationSelection_ValidationChance": { + "required": [ + "userScoreThreshold", + "chance", + "rapidCount" + ], + "type": "object", + "properties": { + "userScoreThreshold": { + "type": "number", + "format": "double" }, - "identifier": { - "type": "string" + "chance": { + "type": "number", + "format": "double" }, - "createdAt": { - "type": "string", - "format": "date-time" + "rapidCount": { + "type": "integer", + "format": "int32" }, - "tags": { + "selections": { "type": "array", "items": { - "type": "string" - } + "$ref": "#/components/schemas/ISelection" + }, + "nullable": true } } }, - "RunsByLeaderboardResult": { + "CreateComplexOrderEndpoint_Input": { "required": [ - "id", - "name", - "status", - "createdAt", - "ownerMail", - "orderId" + "orderName", + "pipeline" ], "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/RunStatus" - }, - "createdAt": { + "orderName": { "type": "string", - "format": "date-time" + "description": "The name of the order." }, - "ownerMail": { - "type": "string" + "pipeline": { + "allOf": [ + { + "$ref": "#/components/schemas/IPipelineModel" + } + ], + "description": "The pipeline configuration to use." }, - "orderId": { + "isDemo": { + "type": "boolean", + "description": "Whether the order is a demo." + }, + "precedingOrderId": { "type": "string", + "description": "Optional ID of the order that must complete before this order starts processing.", "nullable": true } } }, - "RunStatus": { - "enum": [ - "Queued", - "Running", - "Completed", - "Failed" - ] - }, - "SampleByIdentifier": { + "CreateComplexOrderEndpoint_Output": { "required": [ - "id", - "identifier", - "participantId", - "participantName", - "asset", - "tags", - "ownerMail" + "orderId", + "pipelineId" ], "type": "object", "properties": { - "id": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "participantId": { - "type": "string" - }, - "participantName": { - "type": "string" - }, - "asset": { - "$ref": "#/components/schemas/IAssetModel" - }, - "prompt": { + "datasetId": { "type": "string", + "description": "The dataset ID of the created order.", "nullable": true }, - "promptAsset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAssetModel" - } - ] - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "createdAt": { + "orderId": { "type": "string", - "format": "date-time" + "description": "The ID of the created order." }, - "ownerId": { + "campaignId": { "type": "string", - "format": "uuid" + "description": "The campaign ID of the created order.", + "nullable": true }, - "ownerMail": { - "type": "string" + "pipelineId": { + "type": "string", + "description": "The pipeline ID of the created order." } } }, - "StandingByBenchmark": { + "CreateJobDefinitionEndpoint_Input": { "required": [ - "id", - "name", - "benchmarkId", - "status", - "score", - "wins", - "totalMatches", - "isDisabled" + "definitionName", + "workflow", + "referee", + "datasetId" ], "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "benchmarkId": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/StandingStatus" + "definitionName": { + "type": "string", + "description": "The name of the definition." }, - "score": { - "type": "number", - "format": "double" + "workflow": { + "allOf": [ + { + "$ref": "#/components/schemas/IOrderWorkflowModel" + } + ], + "description": "The workflow configuration." }, - "wins": { - "type": "number", - "format": "double" + "referee": { + "allOf": [ + { + "$ref": "#/components/schemas/IRefereeModel" + } + ], + "description": "The referee configuration." }, - "totalMatches": { - "type": "number", - "format": "double" + "datasetId": { + "type": "string", + "description": "The dataset id." }, - "isDisabled": { - "type": "boolean" + "featureFlags": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } + } + ], + "description": "The feature flags." }, - "confidenceInterval": { + "aggregatorType": { "oneOf": [ { "nullable": true }, { - "$ref": "#/components/schemas/ConfidenceInterval" + "$ref": "#/components/schemas/AggregatorType" } ] } - } + }, + "description": "The input for the create job definition endpoint." }, - "StandingByLeaderboard": { + "CreateJobDefinitionEndpoint_Output": { "required": [ - "id", - "name", - "leaderboardId", - "status", - "score", - "wins", - "totalMatches", - "isDisabled" + "definitionId", + "pipelineId" ], "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "leaderboardId": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/StandingStatus" + "definitionId": { + "type": "string", + "description": "The id of the created job definition." }, - "score": { - "type": "number", - "format": "double" + "pipelineId": { + "type": "string", + "description": "The id of the created preview pipeline." + } + }, + "description": "The result when a job definition has been created." + }, + "CreateJobEndpoint_Input": { + "required": [ + "jobDefinitionId", + "audienceId" + ], + "type": "object", + "properties": { + "jobDefinitionId": { + "type": "string", + "description": "The id of the job definition to use." }, - "wins": { - "type": "number", - "format": "double" + "audienceId": { + "type": "string", + "description": "The id of the audience to target." }, - "totalMatches": { - "type": "number", - "format": "double" + "revisionNumber": { + "type": "integer", + "description": "The revision number to use. If not specified, the latest revision will be used.", + "format": "int32" }, - "isDisabled": { - "type": "boolean" + "name": { + "type": "string", + "description": "The name of the job. If not specified, defaults to \"{definition name}:{revision number}\".", + "nullable": true }, - "confidenceInterval": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/ConfidenceInterval" - } - ] + "priority": { + "type": "integer", + "description": "The priority of the job. Higher values mean higher priority. Default is 50.", + "format": "int32" } - } + }, + "description": "The input for the create job endpoint." }, - "StandingsByBenchmarkResult": { + "CreateJobEndpoint_Output": { "required": [ - "items" + "jobId", + "recruitingStarted" ], "type": "object", "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StandingByBenchmark" - } + "jobId": { + "type": "string", + "description": "The id of the created job." + }, + "recruitingStarted": { + "type": "boolean", + "description": "Whether recruiting was automatically started for the audience." } - } + }, + "description": "The result when a job has been created." }, - "StandingsByLeaderboardResult": { - "required": [ - "items" - ], + "CreateJobRevisionEndpoint_Input": { "type": "object", "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StandingByLeaderboard" - } + "workflow": { + "oneOf": [ + { + "$ref": "#/components/schemas/IOrderWorkflowModel" + }, + { + "nullable": true + } + ], + "description": "The workflow configuration. If not provided, inherits from the previous revision.\n Must be provided together with Referee if either is specified." + }, + "referee": { + "oneOf": [ + { + "$ref": "#/components/schemas/IRefereeModel" + }, + { + "nullable": true + } + ], + "description": "The referee configuration. If not provided, inherits from the previous revision.\n Must be provided together with Workflow if either is specified." + }, + "datasetId": { + "type": "string", + "description": "The dataset id. If not provided, inherits from the previous revision.", + "nullable": true + }, + "featureFlags": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } + }, + { + "nullable": true + } + ], + "description": "The feature flags. If not provided, inherits from the previous revision." + }, + "aggregatorType": { + "enum": [ + "NonCommittal", + "MajorityVote", + "SimpleMatchup", + "LocateCluster", + "Classification", + "Locate", + "BoundingBox", + "Line", + "Transcription", + "SinglePointLocate", + "FreeText", + "Scrub", + "Ranking", + "MultiRanking", + null + ], + "description": "The aggregator type. If not provided, inherits from the previous revision." } - } - }, - "StandingStatus": { - "enum": [ - "Created", - "Active", - "Idle" - ] + }, + "description": "The input for the create job revision endpoint." }, - "SubmitParticipantResult": { + "CreateJobRevisionEndpoint_Output": { "required": [ - "validDatapoints", - "invalidDatapoints" + "revisionNumber", + "pipelineId" ], "type": "object", "properties": { - "validDatapoints": { + "revisionNumber": { "type": "integer", + "description": "The revision number of the created job revision.", "format": "int32" }, - "invalidDatapoints": { - "type": "integer", - "format": "int32" + "pipelineId": { + "type": "string", + "description": "The id of the created preview pipeline." } - } + }, + "description": "The result when a job revision has been created." }, - "SubmitPromptModel": { + "CreateOrderEndpoint_Output": { "required": [ - "identifier" + "orderId", + "pipelineId" ], "type": "object", "properties": { - "identifier": { + "datasetId": { "type": "string", - "description": "An identifier associated to the prompt" + "description": "The dataset ID of the created order.", + "nullable": true }, - "prompt": { + "orderId": { "type": "string", - "description": "The prompt", + "description": "The ID of the created order." + }, + "campaignId": { + "type": "string", + "description": "The campaign ID of the created order.", "nullable": true }, - "promptAsset": { + "pipelineId": { + "type": "string", + "description": "The pipeline ID of the created order." + } + } + }, + "CreateOrderModel": { + "required": [ + "orderName", + "workflow", + "referee" + ], + "type": "object", + "properties": { + "orderName": { + "type": "string", + "description": "The name is used as an identifier for an order and can be freely chosen." + }, + "workflow": { "allOf": [ { - "$ref": "#/components/schemas/IAssetInput" + "$ref": "#/components/schemas/IOrderWorkflowModel" } ], - "description": "PromptAsset" + "description": "The workflow helps to determine the tasks that need to be completed by the users." }, - "tags": { + "referee": { + "allOf": [ + { + "$ref": "#/components/schemas/IRefereeModel" + } + ], + "description": "The referee is used to determine how many votes will be collected." + }, + "aggregator": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/AggregatorType" + } + ] + }, + "featureFlags": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + }, + "nullable": true + } + ], + "description": "The feature flags are used to enable or disable certain features." + }, + "priority": { + "type": "integer", + "description": "The priority is used to prioritize over other orders.", + "format": "int32" + }, + "stickyState": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/StickyState" + } + ] + }, + "stickyConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/StickyConfig" + } + ], + "description": "Configuration for sticky campaign behavior. Takes precedence over StickyState if both are provided." + }, + "userScoreDimensions": { "allOf": [ { "type": "array", @@ -24633,4055 +24218,4349 @@ "nullable": true } ], - "description": "The tags of a given prompt" - } - }, - "description": "The model user for submitting a prompt to a benchmark." - }, - "TagsByBenchmarkResult": { - "required": [ - "tags" - ], - "type": "object", - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "UpdateBenchmarkModel": { - "type": "object", - "properties": { - "name": { + "description": "The user score dimensions are used to determine the score of the responses from the user." + }, + "demographicKeys": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "The demographic keys are used to determine which demographics to store on the responses from the user." + }, + "userFilters": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/IUserFilterModel" + }, + "nullable": true + } + ], + "description": "The user filters are used to restrict the order to only collect votes from a specific demographic." + }, + "validationSetId": { "type": "string", - "description": "The new name of the benchmark.", + "description": "The validation set id can be changed to point to a specific validation set. if not provided a sane default will be\n used.", "nullable": true }, - "isPublic": { - "type": "boolean", - "description": "Whether the benchmark should be public (only admins can change this).", + "selections": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ISelection" + }, + "nullable": true + } + ], + "description": "The selections are used to determine which tasks are shown to a user." + }, + "retrievalMode": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/RetrievalMode" + } + ] + }, + "maxIterations": { + "type": "integer", + "description": "The maximum number of times a user is allowed to see the same rapid.", + "format": "int32" + }, + "precedingOrderId": { + "type": "string", + "description": "Optional ID of the order that must complete before this order starts processing.", "nullable": true } }, - "description": "The model used to update a benchmark." + "description": "This model is used to create a simple order" }, - "UpdateBenchmarkNameModel": { + "CreateUnsupportedOrderEndpoint_Input": { "required": [ - "name" + "orderName", + "dataType", + "labelType" ], "type": "object", "properties": { - "name": { + "orderName": { "type": "string", - "description": "The new name of the benchmark." + "description": "The name of the order." + }, + "dataType": { + "type": "string", + "description": "The type of data that was attempted to be ordered." + }, + "labelType": { + "type": "string", + "description": "The type of labels that were attempted to be ordered." } - }, - "description": "The model used to update the name of a benchmark." + } }, - "UpdateLeaderboardModel": { + "DefinitionType": { + "enum": [ + "Unknown", + "Classify", + "Compare", + "BoundingBox", + "Line", + "Polygon", + "Locate", + "Transcription", + "NamedEntity", + "FreeText", + "Scrub", + "Ranking", + "GroupedRanking", + "Evaluation" + ], + "description": "The type of the job definition." + }, + "EloConfigModel": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "The new name of the leaderboard.", - "nullable": true - }, - "responseBudget": { + "startingElo": { "type": "integer", - "description": "The amount of responses that will be collected when onboarding a new participant.", - "format": "int32", - "nullable": true + "format": "int32" + }, + "kFactor": { + "type": "integer", + "format": "int32" }, - "minResponses": { + "scalingFactor": { "type": "integer", - "description": "The amount of responses that will be collected as a minimum on each matchup.", - "format": "int32", - "nullable": true + "format": "int32" } - }, - "description": "The model used to update a leaderboard." + } }, - "UpdateLeaderboardNameModel": { + "FeedbackModel": { "required": [ - "name" + "feedback" ], "type": "object", "properties": { - "name": { + "feedback": { "type": "string", - "description": "The new name of the leaderboard." + "description": "The feedback" + }, + "email": { + "type": "string", + "description": "The email of the user submitting the feedback", + "nullable": true + }, + "token": { + "type": "string", + "description": "The recaptcha token of the user submitting the feedback", + "nullable": true } }, - "description": "The model used to update the name of a leaderboard." + "description": "The model for submitting feedback." }, - "UpdateLeaderboardResponseConfigModel": { + "GetJobByIdEndpoint_Output": { "required": [ - "responseBudget", - "minResponses" + "jobId", + "name", + "definitionId", + "audienceId", + "revisionNumber", + "pipelineId", + "status", + "createdAt", + "ownerId", + "ownerMail" ], "type": "object", "properties": { - "responseBudget": { - "type": "integer", - "description": "The amount of responses that will be collected when onboarding a new participant.", - "format": "int32" + "jobId": { + "type": "string", + "description": "The job id." }, - "minResponses": { + "name": { + "type": "string", + "description": "The job name." + }, + "definitionId": { + "type": "string", + "description": "The job definition id." + }, + "audienceId": { + "type": "string", + "description": "The audience id." + }, + "revisionNumber": { "type": "integer", - "description": "The amount of responses that will be collected as a minimum on each matchup.", + "description": "The revision number.", "format": "int32" - } - }, - "description": "The model used to update the name of a leaderboard." - }, - "UpdateParticipantModel": { - "type": "object", - "properties": { - "name": { + }, + "pipelineId": { "type": "string", - "description": "The new name of the participant.", + "description": "The pipeline id." + }, + "status": { + "type": "string", + "description": "The job status." + }, + "completedAt": { + "type": "string", + "description": "The timestamp when the job was completed.", + "format": "date-time", + "nullable": true + }, + "resultFileName": { + "type": "string", + "description": "The file name of the result.", + "nullable": true + }, + "failedAt": { + "type": "string", + "description": "The timestamp when the job failed.", + "format": "date-time", + "nullable": true + }, + "failureMessage": { + "type": "string", + "description": "The failure message.", "nullable": true + }, + "createdAt": { + "type": "string", + "description": "The creation timestamp.", + "format": "date-time" + }, + "ownerId": { + "type": "string", + "description": "The owner id.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The owner email." } }, - "description": "The model used to update a participant." + "description": "The result when a job has been retrieved." }, - "UpdateParticipantNameModel": { + "GetJobDefinitionByIdEndpoint_Output": { "required": [ - "name" + "definitionId", + "name", + "definitionType", + "createdAt", + "ownerId", + "ownerMail" ], "type": "object", "properties": { + "definitionId": { + "type": "string", + "description": "The job definition id." + }, "name": { "type": "string", - "description": "The new name of the participant." + "description": "The name of the job definition." + }, + "definitionType": { + "$ref": "#/components/schemas/DefinitionType" + }, + "createdAt": { + "type": "string", + "description": "The creation timestamp.", + "format": "date-time" + }, + "ownerId": { + "type": "string", + "description": "The id of the job definition's owner.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The email of the job definition's owner." } }, - "description": "The model used to update the name of a participant." + "description": "The result when a job definition has been retrieved." }, - "UpdatePromptTagsModel": { + "GetJobRevisionEndpoint_Output": { "required": [ - "tags" + "definitionId", + "revisionNumber", + "state", + "pipelineId", + "datasetId", + "workflow", + "referee", + "featureFlags", + "createdAt", + "createdById", + "createdByMail" ], "type": "object", "properties": { - "tags": { + "definitionId": { + "type": "string", + "description": "The job definition id." + }, + "revisionNumber": { + "type": "integer", + "description": "The revision number.", + "format": "int32" + }, + "state": { + "$ref": "#/components/schemas/JobDefinitionRevisionState" + }, + "pipelineId": { + "type": "string", + "description": "The pipeline id." + }, + "datasetId": { + "type": "string", + "description": "The dataset id." + }, + "aggregatorType": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/AggregatorType" + } + ] + }, + "workflow": { + "allOf": [ + { + "$ref": "#/components/schemas/IOrderWorkflowModel" + } + ], + "description": "The workflow configuration. Can be used directly to create a new revision." + }, + "referee": { + "allOf": [ + { + "$ref": "#/components/schemas/IRefereeModel" + } + ], + "description": "The referee configuration. Can be used directly to create a new revision." + }, + "featureFlags": { "allOf": [ { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/FeatureFlag" } } ], - "description": "The list of tags to be associated with the prompt." + "description": "The feature flags." + }, + "createdAt": { + "type": "string", + "description": "The creation timestamp.", + "format": "date-time" + }, + "createdById": { + "type": "string", + "description": "The id of the user who created the revision.", + "format": "uuid" + }, + "createdByMail": { + "type": "string", + "description": "The email of the user who created the revision." } }, - "description": "The model for updating prompt tags." + "description": "The result when a job revision has been retrieved." }, - "VoteMatrixResult": { + "GetOrderByIdEndpoint_Output": { "required": [ - "index", - "columns", - "data" + "orderName", + "customerMail", + "orderDate", + "state", + "pipelineId", + "isLocked", + "isPublic" ], "type": "object", "properties": { - "index": { - "type": "array", - "items": { - "type": "string" - } + "orderName": { + "type": "string", + "description": "The name of the order." }, - "columns": { - "type": "array", - "items": { - "type": "string" - } + "customerMail": { + "type": "string", + "description": "The email of the customer who placed the order." }, - "data": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } + "orderDate": { + "type": "string", + "description": "The date the order was placed.", + "format": "date-time" + }, + "state": { + "type": "string", + "description": "The current state of the order." + }, + "pipelineId": { + "type": "string", + "description": "The ID of the pipeline associated with the order." + }, + "isLocked": { + "type": "boolean", + "description": "Whether the order is locked." + }, + "isPublic": { + "type": "boolean", + "description": "Whether the order is publicly visible." + }, + "failureMessage": { + "type": "string", + "description": "The failure message if the order failed.", + "nullable": true } } }, - "AggregatorType": { - "enum": [ - "NonCommittal", - "MajorityVote", - "SimpleMatchup", - "LocateCluster", - "Classification", - "Locate", - "BoundingBox", - "Line", - "Transcription", - "SinglePointLocate", - "FreeText", - "Scrub", - "Ranking", - "MultiRanking", - null - ], - "description": "The aggregator type." - }, - "AttachCategoryRapidBlueprint_Category": { + "GetPublicOrdersEndpoint_OrderOutput": { "required": [ - "label", - "value" + "id", + "name", + "isPublic" ], "type": "object", "properties": { - "label": { + "id": { "type": "string" }, - "value": { + "name": { "type": "string" + }, + "isPublic": { + "type": "boolean" } } }, - "CloneOrderEndpoint_Input": { + "GetPublicOrdersEndpoint_Output": { "required": [ - "orderName" + "orders" ], "type": "object", "properties": { - "orderName": { - "type": "string", - "description": "The name of the new cloned order." + "orders": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetPublicOrdersEndpoint_OrderOutput" + } + } + ], + "description": "The list of publicly available orders." } } }, - "CloneOrderEndpoint_Output": { + "IDatasetModel": { "required": [ - "orderId" + "_t" ], "type": "object", - "properties": { - "datasetId": { - "type": "string", - "description": "The dataset ID of the cloned order.", - "nullable": true - }, - "orderId": { - "type": "string", - "description": "The ID of the newly cloned order." + "oneOf": [ + { + "$ref": "#/components/schemas/IDatasetModelCloneDatasetModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "CloneDatasetModel": "#/components/schemas/IDatasetModelCloneDatasetModel" } } }, - "ConditionalValidationSelection_ValidationChance": { + "IDatasetModelCloneDatasetModel": { "required": [ - "userScoreThreshold", - "chance", - "rapidCount" + "datasetToCloneId", + "datasetName", + "_t" ], - "type": "object", "properties": { - "userScoreThreshold": { - "type": "number", - "format": "double" - }, - "chance": { - "type": "number", - "format": "double" + "_t": { + "enum": [ + "CloneDatasetModel" + ], + "type": "string" }, - "rapidCount": { - "type": "integer", - "format": "int32" + "datasetToCloneId": { + "type": "string" }, - "selections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ISelection" - }, - "nullable": true + "datasetName": { + "type": "string" } } }, - "CreateComplexOrderEndpoint_Input": { + "IOrderWorkflowModel": { "required": [ - "orderName", - "pipeline" + "_t" ], "type": "object", - "properties": { - "orderName": { - "type": "string", - "description": "The name of the order." + "oneOf": [ + { + "$ref": "#/components/schemas/IOrderWorkflowModelEvaluationWorkflowModel" }, - "pipeline": { - "allOf": [ - { - "$ref": "#/components/schemas/IPipelineModel" - } - ], - "description": "The pipeline configuration to use." + { + "$ref": "#/components/schemas/IOrderWorkflowModelGroupedRankingWorkflowModel" }, - "isDemo": { - "type": "boolean", - "description": "Whether the order is a demo." + { + "$ref": "#/components/schemas/IOrderWorkflowModelRankingWorkflowModel" }, - "precedingOrderId": { - "type": "string", - "description": "Optional ID of the order that must complete before this order starts processing.", - "nullable": true + { + "$ref": "#/components/schemas/IOrderWorkflowModelSimpleWorkflowModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "EvaluationWorkflow": "#/components/schemas/IOrderWorkflowModelEvaluationWorkflowModel", + "GroupedRankingWorkflow": "#/components/schemas/IOrderWorkflowModelGroupedRankingWorkflowModel", + "RankingWorkflow": "#/components/schemas/IOrderWorkflowModelRankingWorkflowModel", + "SimpleWorkflow": "#/components/schemas/IOrderWorkflowModelSimpleWorkflowModel" } } }, - "CreateComplexOrderEndpoint_Output": { + "IOrderWorkflowModelEvaluationWorkflowModel": { "required": [ - "orderId", - "pipelineId" + "validationSetId", + "shouldAcceptIncorrect", + "_t" ], - "type": "object", "properties": { - "datasetId": { - "type": "string", - "description": "The dataset ID of the created order.", - "nullable": true + "_t": { + "enum": [ + "EvaluationWorkflow" + ], + "type": "string" }, - "orderId": { - "type": "string", - "description": "The ID of the created order." + "validationSetId": { + "type": "string" }, - "campaignId": { - "type": "string", - "description": "The campaign ID of the created order.", - "nullable": true + "shouldAcceptIncorrect": { + "type": "boolean" }, - "pipelineId": { - "type": "string", - "description": "The pipeline ID of the created order." + "featureFlags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } } } }, - "CreateJobDefinitionEndpoint_Input": { + "IOrderWorkflowModelGroupedRankingWorkflowModel": { "required": [ - "definitionName", - "workflow", - "referee", - "datasetId" + "criteria", + "_t" ], - "type": "object", "properties": { - "definitionName": { - "type": "string", - "description": "The name of the definition." - }, - "workflow": { - "allOf": [ - { - "$ref": "#/components/schemas/IOrderWorkflowModel" - } + "_t": { + "enum": [ + "GroupedRankingWorkflow" ], - "description": "The workflow configuration." + "type": "string" }, - "referee": { - "allOf": [ - { - "$ref": "#/components/schemas/IRefereeModel" - } - ], - "description": "The referee configuration." + "criteria": { + "type": "string" }, - "datasetId": { - "type": "string", - "description": "The dataset id." + "pairMakerConfig": { + "$ref": "#/components/schemas/IPairMakerConfigModel" }, - "featureFlags": { + "eloConfig": { "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } + "$ref": "#/components/schemas/EloConfigModel" } ], - "description": "The feature flags." + "deprecated": true }, - "aggregatorType": { + "rankingConfig": { "oneOf": [ { "nullable": true }, { - "$ref": "#/components/schemas/AggregatorType" + "$ref": "#/components/schemas/IRankingConfigModel" } ] - } - }, - "description": "The input for the create job definition endpoint." - }, - "CreateJobDefinitionEndpoint_Output": { - "required": [ - "definitionId", - "pipelineId" - ], - "type": "object", - "properties": { - "definitionId": { - "type": "string", - "description": "The id of the created job definition." - }, - "pipelineId": { - "type": "string", - "description": "The id of the created preview pipeline." - } - }, - "description": "The result when a job definition has been created." - }, - "CreateJobEndpoint_Input": { - "required": [ - "jobDefinitionId", - "audienceId" - ], - "type": "object", - "properties": { - "jobDefinitionId": { - "type": "string", - "description": "The id of the job definition to use." - }, - "audienceId": { - "type": "string", - "description": "The id of the audience to target." }, - "revisionNumber": { - "type": "integer", - "description": "The revision number to use. If not specified, the latest revision will be used.", - "format": "int32" + "contexts": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true }, - "name": { - "type": "string", - "description": "The name of the job. If not specified, defaults to \"{definition name}:{revision number}\".", + "contextAssets": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IAssetInput" + }, "nullable": true }, - "priority": { + "featureFlags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } + }, + "maxParallelism": { "type": "integer", - "description": "The priority of the job. Higher values mean higher priority. Default is 50.", "format": "int32" } - }, - "description": "The input for the create job endpoint." + } }, - "CreateJobEndpoint_Output": { + "IOrderWorkflowModelRankingWorkflowModel": { "required": [ - "jobId", - "recruitingStarted" + "criteria", + "_t" ], - "type": "object", "properties": { - "jobId": { - "type": "string", - "description": "The id of the created job." + "_t": { + "enum": [ + "RankingWorkflow" + ], + "type": "string" }, - "recruitingStarted": { - "type": "boolean", - "description": "Whether recruiting was automatically started for the audience." - } - }, - "description": "The result when a job has been created." - }, - "CreateJobRevisionEndpoint_Input": { - "type": "object", - "properties": { - "workflow": { - "oneOf": [ - { - "$ref": "#/components/schemas/IOrderWorkflowModel" - }, + "criteria": { + "type": "string" + }, + "pairMakerConfig": { + "$ref": "#/components/schemas/IPairMakerConfigModel" + }, + "eloConfig": { + "allOf": [ { - "nullable": true + "$ref": "#/components/schemas/EloConfigModel" } ], - "description": "The workflow configuration. If not provided, inherits from the previous revision.\n Must be provided together with Referee if either is specified." + "deprecated": true }, - "referee": { + "rankingConfig": { "oneOf": [ { - "$ref": "#/components/schemas/IRefereeModel" + "nullable": true }, { - "nullable": true + "$ref": "#/components/schemas/IRankingConfigModel" } - ], - "description": "The referee configuration. If not provided, inherits from the previous revision.\n Must be provided together with Workflow if either is specified." + ] }, - "datasetId": { + "context": { "type": "string", - "description": "The dataset id. If not provided, inherits from the previous revision.", "nullable": true }, - "featureFlags": { + "contextAsset": { "oneOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } + "nullable": true }, { + "$ref": "#/components/schemas/IAssetInput" + } + ] + }, + "metadata": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Metadata_IOrderMetadataInput" + }, "nullable": true } ], - "description": "The feature flags. If not provided, inherits from the previous revision." + "deprecated": true }, - "aggregatorType": { + "featureFlags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } + } + } + }, + "IOrderWorkflowModelSimpleWorkflowModel": { + "required": [ + "blueprint", + "_t" + ], + "properties": { + "_t": { "enum": [ - "NonCommittal", - "MajorityVote", - "SimpleMatchup", - "LocateCluster", - "Classification", - "Locate", - "BoundingBox", - "Line", - "Transcription", - "SinglePointLocate", - "FreeText", - "Scrub", - "Ranking", - "MultiRanking", - null + "SimpleWorkflow" ], - "description": "The aggregator type. If not provided, inherits from the previous revision." + "type": "string" + }, + "blueprint": { + "$ref": "#/components/schemas/IRapidBlueprint" + }, + "batchSize": { + "type": "integer", + "format": "int32" + }, + "featureFlags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } + } + } + }, + "IPairMakerConfigModel": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IPairMakerConfigModelOnlinePairMakerConfigModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "OnlinePairMaker": "#/components/schemas/IPairMakerConfigModelOnlinePairMakerConfigModel" + } + } + }, + "IPairMakerConfigModelOnlinePairMakerConfigModel": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "OnlinePairMaker" + ], + "type": "string" + }, + "randomMatchesRatio": { + "type": "number", + "format": "float" + }, + "totalComparisonBudget": { + "type": "integer", + "format": "int32" + } + } + }, + "IPipelineArtifactModel": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IPipelineArtifactModelCreateDatasetArtifactModel" } - }, - "description": "The input for the create job revision endpoint." + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "CreateDatasetArtifactModel": "#/components/schemas/IPipelineArtifactModelCreateDatasetArtifactModel" + } + } }, - "CreateJobRevisionEndpoint_Output": { + "IPipelineArtifactModelCreateDatasetArtifactModel": { "required": [ - "revisionNumber", - "pipelineId" + "identifier", + "dataset", + "_t" ], - "type": "object", "properties": { - "revisionNumber": { - "type": "integer", - "description": "The revision number of the created job revision.", - "format": "int32" + "_t": { + "enum": [ + "CreateDatasetArtifactModel" + ], + "type": "string" }, - "pipelineId": { - "type": "string", - "description": "The id of the created preview pipeline." + "identifier": { + "type": "string" + }, + "dataset": { + "$ref": "#/components/schemas/IDatasetModel" } - }, - "description": "The result when a job revision has been created." + } }, - "CreateOrderEndpoint_Output": { + "IPipelineModel": { "required": [ - "orderId", - "pipelineId" + "_t" ], "type": "object", - "properties": { - "datasetId": { - "type": "string", - "description": "The dataset ID of the created order.", - "nullable": true - }, - "orderId": { - "type": "string", - "description": "The ID of the created order." - }, - "campaignId": { - "type": "string", - "description": "The campaign ID of the created order.", - "nullable": true - }, - "pipelineId": { - "type": "string", - "description": "The pipeline ID of the created order." + "oneOf": [ + { + "$ref": "#/components/schemas/IPipelineModelCreateSimplePipelineModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "CreateSimplePipelineModel": "#/components/schemas/IPipelineModelCreateSimplePipelineModel" } } }, - "CreateOrderModel": { + "IPipelineModelCreateSimplePipelineModel": { "required": [ - "orderName", - "workflow", - "referee" + "artifacts", + "pipelineSteps", + "namePrefix", + "_t" ], - "type": "object", "properties": { - "orderName": { - "type": "string", - "description": "The name is used as an identifier for an order and can be freely chosen." - }, - "workflow": { - "allOf": [ - { - "$ref": "#/components/schemas/IOrderWorkflowModel" - } - ], - "description": "The workflow helps to determine the tasks that need to be completed by the users." - }, - "referee": { - "allOf": [ - { - "$ref": "#/components/schemas/IRefereeModel" - } - ], - "description": "The referee is used to determine how many votes will be collected." - }, - "aggregator": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/AggregatorType" - } - ] - }, - "featureFlags": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - }, - "nullable": true - } + "_t": { + "enum": [ + "CreateSimplePipelineModel" ], - "description": "The feature flags are used to enable or disable certain features." + "type": "string" }, - "priority": { - "type": "integer", - "description": "The priority is used to prioritize over other orders.", - "format": "int32" + "artifacts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IPipelineArtifactModel" + } }, - "stickyState": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/StickyState" - } - ] + "pipelineSteps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IPipelineStepModel" + } }, - "stickyConfig": { - "allOf": [ - { - "$ref": "#/components/schemas/StickyConfig" - } - ], - "description": "Configuration for sticky campaign behavior. Takes precedence over StickyState if both are provided." + "namePrefix": { + "type": "string" + } + } + }, + "IPipelineStepModel": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IPipelineStepModelDatasetEvaluationStepModel" }, - "userScoreDimensions": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - ], - "description": "The user score dimensions are used to determine the score of the responses from the user." + { + "$ref": "#/components/schemas/IPipelineStepModelSendCompletionMailStepModel" }, - "demographicKeys": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - ], - "description": "The demographic keys are used to determine which demographics to store on the responses from the user." + { + "$ref": "#/components/schemas/IPipelineStepModelWorkflowAggregationStepModel" }, - "userFilters": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/IUserFilterModel" - }, - "nullable": true - } + { + "$ref": "#/components/schemas/IPipelineStepModelWorkflowLabelingStepModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "DatasetEvaluationStepModel": "#/components/schemas/IPipelineStepModelDatasetEvaluationStepModel", + "SendCompletionMailStepModel": "#/components/schemas/IPipelineStepModelSendCompletionMailStepModel", + "WorkflowAggregationStepModel": "#/components/schemas/IPipelineStepModelWorkflowAggregationStepModel", + "WorkflowLabelingStepModel": "#/components/schemas/IPipelineStepModelWorkflowLabelingStepModel" + } + } + }, + "IPipelineStepModelDatasetEvaluationStepModel": { + "required": [ + "datasetArtifactId", + "aggregationResultFileArtifactId", + "evaluationResultFileArtifactId", + "receiver", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "DatasetEvaluationStepModel" ], - "description": "The user filters are used to restrict the order to only collect votes from a specific demographic." - }, - "validationSetId": { - "type": "string", - "description": "The validation set id can be changed to point to a specific validation set. if not provided a sane default will be\n used.", - "nullable": true + "type": "string" }, - "selections": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ISelection" - }, - "nullable": true - } - ], - "description": "The selections are used to determine which tasks are shown to a user." + "datasetArtifactId": { + "type": "string" }, - "retrievalMode": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/RetrievalMode" - } - ] + "aggregationResultFileArtifactId": { + "type": "string" }, - "maxIterations": { - "type": "integer", - "description": "The maximum number of times a user is allowed to see the same rapid.", - "format": "int32" + "evaluationResultFileArtifactId": { + "type": "string" }, - "precedingOrderId": { - "type": "string", - "description": "Optional ID of the order that must complete before this order starts processing.", - "nullable": true + "receiver": { + "type": "string" } - }, - "description": "This model is used to create a simple order" + } }, - "CreateUnsupportedOrderEndpoint_Input": { + "IPipelineStepModelSendCompletionMailStepModel": { "required": [ - "orderName", - "dataType", - "labelType" + "receiver", + "resultsFileArtifactIdentifier", + "_t" ], - "type": "object", "properties": { - "orderName": { - "type": "string", - "description": "The name of the order." + "_t": { + "enum": [ + "SendCompletionMailStepModel" + ], + "type": "string" }, - "dataType": { - "type": "string", - "description": "The type of data that was attempted to be ordered." + "receiver": { + "type": "string" }, - "labelType": { - "type": "string", - "description": "The type of labels that were attempted to be ordered." + "resultsFileArtifactIdentifier": { + "type": "string" } } }, - "DefinitionType": { - "enum": [ - "Unknown", - "Classify", - "Compare", - "BoundingBox", - "Line", - "Polygon", - "Locate", - "Transcription", - "NamedEntity", - "FreeText", - "Scrub", - "Ranking", - "GroupedRanking", - "Evaluation" + "IPipelineStepModelWorkflowAggregationStepModel": { + "required": [ + "campaignArtifactId", + "workflowArtifactId", + "fileArtifactId", + "_t" ], - "description": "The type of the job definition." - }, - "EloConfigModel": { - "type": "object", "properties": { - "startingElo": { - "type": "integer", - "format": "int32" + "_t": { + "enum": [ + "WorkflowAggregationStepModel" + ], + "type": "string" }, - "kFactor": { - "type": "integer", - "format": "int32" + "campaignArtifactId": { + "type": "string" }, - "scalingFactor": { - "type": "integer", - "format": "int32" + "workflowArtifactId": { + "type": "string" + }, + "fileArtifactId": { + "type": "string" + }, + "aggregatorType": { + "$ref": "#/components/schemas/AggregatorType" } } }, - "FeedbackModel": { + "IPipelineStepModelWorkflowLabelingStepModel": { "required": [ - "feedback" + "workflowArtifactId", + "_t" ], - "type": "object", "properties": { - "feedback": { - "type": "string", - "description": "The feedback" - }, - "email": { - "type": "string", - "description": "The email of the user submitting the feedback", - "nullable": true + "_t": { + "enum": [ + "WorkflowLabelingStepModel" + ], + "type": "string" }, - "token": { - "type": "string", - "description": "The recaptcha token of the user submitting the feedback", - "nullable": true + "workflowArtifactId": { + "type": "string" } - }, - "description": "The model for submitting feedback." + } }, - "GetJobByIdEndpoint_Output": { + "IRankingConfigModel": { "required": [ - "jobId", - "name", - "definitionId", - "audienceId", - "revisionNumber", - "pipelineId", - "status", - "createdAt", - "ownerId", - "ownerMail" + "_t" ], "type": "object", - "properties": { - "jobId": { - "type": "string", - "description": "The job id." - }, - "name": { - "type": "string", - "description": "The job name." - }, - "definitionId": { - "type": "string", - "description": "The job definition id." + "oneOf": [ + { + "$ref": "#/components/schemas/IRankingConfigModelBradleyTerryRankingConfigModel" }, - "audienceId": { - "type": "string", - "description": "The audience id." + { + "$ref": "#/components/schemas/IRankingConfigModelEloConfigModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "BradleyTerryRankingConfig": "#/components/schemas/IRankingConfigModelBradleyTerryRankingConfigModel", + "EloConfig": "#/components/schemas/IRankingConfigModelEloConfigModel" + } + } + }, + "IRankingConfigModelBradleyTerryRankingConfigModel": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "BradleyTerryRankingConfig" + ], + "type": "string" }, - "revisionNumber": { + "startingScore": { "type": "integer", - "description": "The revision number.", "format": "int32" - }, - "pipelineId": { - "type": "string", - "description": "The pipeline id." - }, - "status": { - "type": "string", - "description": "The job status." - }, - "completedAt": { - "type": "string", - "description": "The timestamp when the job was completed.", - "format": "date-time", - "nullable": true - }, - "resultFileName": { - "type": "string", - "description": "The file name of the result.", - "nullable": true - }, - "failedAt": { - "type": "string", - "description": "The timestamp when the job failed.", - "format": "date-time", - "nullable": true - }, - "failureMessage": { - "type": "string", - "description": "The failure message.", - "nullable": true - }, - "createdAt": { - "type": "string", - "description": "The creation timestamp.", - "format": "date-time" - }, - "ownerId": { - "type": "string", - "description": "The owner id.", - "format": "uuid" - }, - "ownerMail": { - "type": "string", - "description": "The owner email." } - }, - "description": "The result when a job has been retrieved." + } }, - "GetJobDefinitionByIdEndpoint_Output": { + "IRankingConfigModelEloConfigModel": { "required": [ - "definitionId", - "name", - "definitionType", - "createdAt" + "_t" ], - "type": "object", "properties": { - "definitionId": { - "type": "string", - "description": "The job definition id." - }, - "name": { - "type": "string", - "description": "The name of the job definition." + "_t": { + "enum": [ + "EloConfig" + ], + "type": "string" }, - "definitionType": { - "$ref": "#/components/schemas/DefinitionType" + "startingElo": { + "type": "integer", + "format": "int32" }, - "createdAt": { - "type": "string", - "description": "The creation timestamp.", - "format": "date-time" + "kFactor": { + "type": "integer", + "format": "int32" + }, + "scalingFactor": { + "type": "integer", + "format": "int32" } - }, - "description": "The result when a job definition has been retrieved." + } }, - "GetJobRevisionEndpoint_Output": { + "IRapidBlueprint": { "required": [ - "definitionId", - "revisionNumber", - "state", - "pipelineId", - "datasetId", - "workflow", - "referee", - "featureFlags", - "createdAt", - "createdById", - "createdByMail" + "_t" ], "type": "object", - "properties": { - "definitionId": { - "type": "string", - "description": "The job definition id." + "oneOf": [ + { + "$ref": "#/components/schemas/IRapidBlueprintTranscriptionRapidBlueprint" }, - "revisionNumber": { - "type": "integer", - "description": "The revision number.", - "format": "int32" + { + "$ref": "#/components/schemas/IRapidBlueprintScrubRapidBlueprint" }, - "state": { - "$ref": "#/components/schemas/JobDefinitionRevisionState" + { + "$ref": "#/components/schemas/IRapidBlueprintPolygonRapidBlueprint" }, - "pipelineId": { - "type": "string", - "description": "The pipeline id." + { + "$ref": "#/components/schemas/IRapidBlueprintNamedEntityRapidBlueprint" }, - "datasetId": { - "type": "string", - "description": "The dataset id." + { + "$ref": "#/components/schemas/IRapidBlueprintLocateRapidBlueprint" }, - "aggregatorType": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/AggregatorType" - } - ] + { + "$ref": "#/components/schemas/IRapidBlueprintLineRapidBlueprint" }, - "workflow": { - "allOf": [ - { - "$ref": "#/components/schemas/IOrderWorkflowModel" - } - ], - "description": "The workflow configuration. Can be used directly to create a new revision." + { + "$ref": "#/components/schemas/IRapidBlueprintFreeTextRapidBlueprint" }, - "referee": { - "allOf": [ - { - "$ref": "#/components/schemas/IRefereeModel" - } + { + "$ref": "#/components/schemas/IRapidBlueprintCompareRapidBlueprint" + }, + { + "$ref": "#/components/schemas/IRapidBlueprintAttachCategoryRapidBlueprint" + }, + { + "$ref": "#/components/schemas/IRapidBlueprintBoundingBoxRapidBlueprint" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "TranscriptionBlueprint": "#/components/schemas/IRapidBlueprintTranscriptionRapidBlueprint", + "ScrubBlueprint": "#/components/schemas/IRapidBlueprintScrubRapidBlueprint", + "PolygonBlueprint": "#/components/schemas/IRapidBlueprintPolygonRapidBlueprint", + "NamedEntityBlueprint": "#/components/schemas/IRapidBlueprintNamedEntityRapidBlueprint", + "LocateBlueprint": "#/components/schemas/IRapidBlueprintLocateRapidBlueprint", + "LineBlueprint": "#/components/schemas/IRapidBlueprintLineRapidBlueprint", + "FreeTextBlueprint": "#/components/schemas/IRapidBlueprintFreeTextRapidBlueprint", + "CompareBlueprint": "#/components/schemas/IRapidBlueprintCompareRapidBlueprint", + "ClassifyBlueprint": "#/components/schemas/IRapidBlueprintAttachCategoryRapidBlueprint", + "BoundingBoxBlueprint": "#/components/schemas/IRapidBlueprintBoundingBoxRapidBlueprint" + } + } + }, + "IRapidBlueprintAttachCategoryRapidBlueprint": { + "required": [ + "title", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "ClassifyBlueprint" ], - "description": "The referee configuration. Can be used directly to create a new revision." + "type": "string" }, - "featureFlags": { + "possibleCategories": { "allOf": [ { "type": "array", "items": { - "$ref": "#/components/schemas/FeatureFlag" + "type": "string" } } ], - "description": "The feature flags." + "deprecated": true }, - "createdAt": { - "type": "string", - "description": "The creation timestamp.", - "format": "date-time" + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AttachCategoryRapidBlueprint_Category" + } }, - "createdById": { - "type": "string", - "description": "The id of the user who created the revision.", - "format": "uuid" + "title": { + "type": "string" + } + } + }, + "IRapidBlueprintBoundingBoxRapidBlueprint": { + "required": [ + "target", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "BoundingBoxBlueprint" + ], + "type": "string" }, - "createdByMail": { - "type": "string", - "description": "The email of the user who created the revision." + "target": { + "type": "string" } - }, - "description": "The result when a job revision has been retrieved." + } }, - "GetOrderByIdEndpoint_Output": { + "IRapidBlueprintCompareRapidBlueprint": { "required": [ - "orderName", - "customerMail", - "orderDate", - "state", - "pipelineId", - "isLocked", - "isPublic" + "criteria", + "_t" ], - "type": "object", "properties": { - "orderName": { - "type": "string", - "description": "The name of the order." + "_t": { + "enum": [ + "CompareBlueprint" + ], + "type": "string" }, - "customerMail": { - "type": "string", - "description": "The email of the customer who placed the order." + "criteria": { + "type": "string" }, - "orderDate": { - "type": "string", - "description": "The date the order was placed.", - "format": "date-time" + "indexIdentifiers": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "IRapidBlueprintFreeTextRapidBlueprint": { + "required": [ + "question", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "FreeTextBlueprint" + ], + "type": "string" }, - "state": { - "type": "string", - "description": "The current state of the order." + "question": { + "type": "string" }, - "pipelineId": { + "shouldValidateResponse": { + "type": "boolean" + }, + "validationSystemPrompt": { "type": "string", - "description": "The ID of the pipeline associated with the order." + "nullable": true + } + } + }, + "IRapidBlueprintLineRapidBlueprint": { + "required": [ + "target", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "LineBlueprint" + ], + "type": "string" }, - "isLocked": { - "type": "boolean", - "description": "Whether the order is locked." + "target": { + "type": "string" + } + } + }, + "IRapidBlueprintLocateRapidBlueprint": { + "required": [ + "target", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "LocateBlueprint" + ], + "type": "string" + }, + "target": { + "type": "string" + } + } + }, + "IRapidBlueprintNamedEntityRapidBlueprint": { + "required": [ + "target", + "classes", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "NamedEntityBlueprint" + ], + "type": "string" }, - "isPublic": { - "type": "boolean", - "description": "Whether the order is publicly visible." + "target": { + "type": "string" }, - "failureMessage": { - "type": "string", - "description": "The failure message if the order failed.", - "nullable": true + "classes": { + "type": "array", + "items": { + "type": "string" + } } } }, - "GetPublicOrdersEndpoint_OrderOutput": { + "IRapidBlueprintPolygonRapidBlueprint": { "required": [ - "id", - "name", - "isPublic" + "target", + "_t" ], - "type": "object", "properties": { - "id": { + "_t": { + "enum": [ + "PolygonBlueprint" + ], "type": "string" }, - "name": { + "target": { + "type": "string" + } + } + }, + "IRapidBlueprintScrubRapidBlueprint": { + "required": [ + "target", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "ScrubBlueprint" + ], "type": "string" }, - "isPublic": { - "type": "boolean" + "target": { + "type": "string" } } }, - "GetPublicOrdersEndpoint_Output": { + "IRapidBlueprintTranscriptionRapidBlueprint": { "required": [ - "orders" + "title", + "_t" ], - "type": "object", "properties": { - "orders": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetPublicOrdersEndpoint_OrderOutput" - } - } + "_t": { + "enum": [ + "TranscriptionBlueprint" ], - "description": "The list of publicly available orders." + "type": "string" + }, + "title": { + "type": "string" } } }, - "IDatasetModel": { + "IRefereeModel": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IDatasetModelCloneDatasetModel" + "$ref": "#/components/schemas/IRefereeModelBudgetRefereeModel" + }, + { + "$ref": "#/components/schemas/IRefereeModelEarlyStoppingRefereeModel" + }, + { + "$ref": "#/components/schemas/IRefereeModelNaiveRefereeModel" + }, + { + "$ref": "#/components/schemas/IRefereeModelQuorumRefereeModel" } ], "discriminator": { "propertyName": "_t", "mapping": { - "CloneDatasetModel": "#/components/schemas/IDatasetModelCloneDatasetModel" + "BudgetReferee": "#/components/schemas/IRefereeModelBudgetRefereeModel", + "EarlyStoppingReferee": "#/components/schemas/IRefereeModelEarlyStoppingRefereeModel", + "NaiveReferee": "#/components/schemas/IRefereeModelNaiveRefereeModel", + "QuorumReferee": "#/components/schemas/IRefereeModelQuorumRefereeModel" } } }, - "IDatasetModelCloneDatasetModel": { + "IRefereeModelBudgetRefereeModel": { "required": [ - "datasetToCloneId", - "datasetName", + "totalBudget", "_t" ], "properties": { "_t": { "enum": [ - "CloneDatasetModel" + "BudgetReferee" ], "type": "string" }, - "datasetToCloneId": { + "totalBudget": { + "type": "integer", + "format": "int32" + } + } + }, + "IRefereeModelEarlyStoppingRefereeModel": { + "required": [ + "maxVotes", + "threshold", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "EarlyStoppingReferee" + ], "type": "string" }, - "datasetName": { + "maxVotes": { + "type": "integer", + "format": "int32" + }, + "threshold": { + "type": "number", + "format": "double" + } + } + }, + "IRefereeModelNaiveRefereeModel": { + "required": [ + "totalVotes", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "NaiveReferee" + ], "type": "string" + }, + "totalVotes": { + "type": "integer", + "format": "int32" } } }, - "IOrderWorkflowModel": { + "IRefereeModelQuorumRefereeModel": { + "required": [ + "maxVotes", + "threshold", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "QuorumReferee" + ], + "type": "string" + }, + "maxVotes": { + "type": "integer", + "format": "int32" + }, + "threshold": { + "type": "integer", + "format": "int32" + } + } + }, + "ISelection": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IOrderWorkflowModelEvaluationWorkflowModel" + "$ref": "#/components/schemas/ISelectionAbTestSelection" }, { - "$ref": "#/components/schemas/IOrderWorkflowModelGroupedRankingWorkflowModel" + "$ref": "#/components/schemas/ISelectionCappedSelection" }, { - "$ref": "#/components/schemas/IOrderWorkflowModelRankingWorkflowModel" + "$ref": "#/components/schemas/ISelectionConditionalValidationSelection" }, { - "$ref": "#/components/schemas/IOrderWorkflowModelSimpleWorkflowModel" + "$ref": "#/components/schemas/ISelectionDemographicSelection" + }, + { + "$ref": "#/components/schemas/ISelectionEffortCappedSelection" + }, + { + "$ref": "#/components/schemas/ISelectionLabelingSelection" + }, + { + "$ref": "#/components/schemas/ISelectionShufflingSelection" + }, + { + "$ref": "#/components/schemas/ISelectionStaticSelection" + }, + { + "$ref": "#/components/schemas/ISelectionValidationSelection" } ], "discriminator": { "propertyName": "_t", "mapping": { - "EvaluationWorkflow": "#/components/schemas/IOrderWorkflowModelEvaluationWorkflowModel", - "GroupedRankingWorkflow": "#/components/schemas/IOrderWorkflowModelGroupedRankingWorkflowModel", - "RankingWorkflow": "#/components/schemas/IOrderWorkflowModelRankingWorkflowModel", - "SimpleWorkflow": "#/components/schemas/IOrderWorkflowModelSimpleWorkflowModel" + "AbTestSelection": "#/components/schemas/ISelectionAbTestSelection", + "CappedSelection": "#/components/schemas/ISelectionCappedSelection", + "ConditionalValidationSelection": "#/components/schemas/ISelectionConditionalValidationSelection", + "DemographicSelection": "#/components/schemas/ISelectionDemographicSelection", + "EffortCappedSelection": "#/components/schemas/ISelectionEffortCappedSelection", + "LabelingSelection": "#/components/schemas/ISelectionLabelingSelection", + "ShufflingSelection": "#/components/schemas/ISelectionShufflingSelection", + "StaticSelection": "#/components/schemas/ISelectionStaticSelection", + "ValidationSelection": "#/components/schemas/ISelectionValidationSelection" + } + } + }, + "ISelectionAbTestSelection": { + "required": [ + "a", + "b", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "AbTestSelection" + ], + "type": "string" + }, + "a": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ISelection" + } + }, + "b": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ISelection" + } + } + } + }, + "ISelectionCappedSelection": { + "required": [ + "selections", + "maxRapids", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "CappedSelection" + ], + "type": "string" + }, + "selections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ISelection" + } + }, + "maxRapids": { + "type": "integer", + "format": "int32" } } }, - "IOrderWorkflowModelEvaluationWorkflowModel": { + "ISelectionConditionalValidationSelection": { "required": [ "validationSetId", - "shouldAcceptIncorrect", + "validationChances", "_t" ], "properties": { "_t": { "enum": [ - "EvaluationWorkflow" + "ConditionalValidationSelection" ], "type": "string" }, "validationSetId": { "type": "string" }, - "shouldAcceptIncorrect": { - "type": "boolean" + "validationChances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionalValidationSelection_ValidationChance" + } }, - "featureFlags": { + "dimensions": { "type": "array", "items": { - "$ref": "#/components/schemas/FeatureFlag" + "type": "string" } } } }, - "IOrderWorkflowModelGroupedRankingWorkflowModel": { + "ISelectionDemographicSelection": { "required": [ - "criteria", + "keys", "_t" ], "properties": { "_t": { "enum": [ - "GroupedRankingWorkflow" + "DemographicSelection" ], "type": "string" }, - "criteria": { - "type": "string" - }, - "pairMakerConfig": { - "$ref": "#/components/schemas/IPairMakerConfigModel" - }, - "eloConfig": { - "allOf": [ - { - "$ref": "#/components/schemas/EloConfigModel" - } - ], - "deprecated": true - }, - "rankingConfig": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IRankingConfigModel" - } - ] - }, - "contexts": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "nullable": true - }, - "contextAssets": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IAssetInput" - }, - "nullable": true - }, - "featureFlags": { + "keys": { "type": "array", "items": { - "$ref": "#/components/schemas/FeatureFlag" + "type": "string" } }, - "maxParallelism": { + "maxRapids": { "type": "integer", "format": "int32" } } }, - "IOrderWorkflowModelRankingWorkflowModel": { + "ISelectionEffortCappedSelection": { "required": [ - "criteria", + "effortBudget", "_t" ], "properties": { "_t": { "enum": [ - "RankingWorkflow" + "EffortCappedSelection" ], "type": "string" }, - "criteria": { - "type": "string" + "effortBudget": { + "type": "integer", + "format": "int32" }, - "pairMakerConfig": { - "$ref": "#/components/schemas/IPairMakerConfigModel" + "retrievalMode": { + "$ref": "#/components/schemas/RetrievalMode" }, - "eloConfig": { - "allOf": [ - { - "$ref": "#/components/schemas/EloConfigModel" - } + "maxIterations": { + "type": "integer", + "format": "int32" + } + } + }, + "ISelectionLabelingSelection": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "LabelingSelection" ], - "deprecated": true - }, - "rankingConfig": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IRankingConfigModel" - } - ] + "type": "string" }, - "context": { - "type": "string", - "nullable": true + "amount": { + "type": "integer", + "format": "int32" }, - "contextAsset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAssetInput" - } - ] + "effortBudget": { + "type": "integer", + "format": "int32" }, - "metadata": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/Metadata_IOrderMetadataInput" - }, - "nullable": true - } - ], - "deprecated": true + "retrievalMode": { + "$ref": "#/components/schemas/RetrievalMode" }, - "featureFlags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } + "maxIterations": { + "type": "integer", + "format": "int32" } } }, - "IOrderWorkflowModelSimpleWorkflowModel": { + "ISelectionShufflingSelection": { "required": [ - "blueprint", + "selections", "_t" ], "properties": { "_t": { "enum": [ - "SimpleWorkflow" + "ShufflingSelection" ], "type": "string" }, - "blueprint": { - "$ref": "#/components/schemas/IRapidBlueprint" - }, - "batchSize": { - "type": "integer", - "format": "int32" - }, - "featureFlags": { + "selections": { "type": "array", "items": { - "$ref": "#/components/schemas/FeatureFlag" + "$ref": "#/components/schemas/ISelection" } } } }, - "IPairMakerConfigModel": { + "ISelectionStaticSelection": { "required": [ + "rapidIds", "_t" ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IPairMakerConfigModelOnlinePairMakerConfigModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "OnlinePairMaker": "#/components/schemas/IPairMakerConfigModelOnlinePairMakerConfigModel" + "properties": { + "_t": { + "enum": [ + "StaticSelection" + ], + "type": "string" + }, + "rapidIds": { + "type": "array", + "items": { + "type": "string" + } } } }, - "IPairMakerConfigModelOnlinePairMakerConfigModel": { + "ISelectionValidationSelection": { "required": [ + "amount", + "validationSetId", "_t" ], "properties": { "_t": { "enum": [ - "OnlinePairMaker" + "ValidationSelection" ], "type": "string" }, - "randomMatchesRatio": { - "type": "number", - "format": "float" - }, - "totalComparisonBudget": { + "amount": { "type": "integer", "format": "int32" + }, + "validationSetId": { + "type": "string" } } }, - "IPipelineArtifactModel": { + "JobDefinitionRevisionState": { + "enum": [ + "Pending", + "Completed", + "Failed" + ], + "description": "The state of the revision." + }, + "Metadata_IOrderMetadataInput": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IPipelineArtifactModelCreateDatasetArtifactModel" + "$ref": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_PromptMetadataInput" + }, + { + "$ref": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_PromptAssetMetadataInput" + }, + { + "$ref": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_TranscriptionMetadataInput" } ], "discriminator": { "propertyName": "_t", "mapping": { - "CreateDatasetArtifactModel": "#/components/schemas/IPipelineArtifactModelCreateDatasetArtifactModel" + "PromptMetadataInput": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_PromptMetadataInput", + "PromptAssetMetadataInput": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_PromptAssetMetadataInput", + "TranscriptionMetadataInput": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_TranscriptionMetadataInput" } } }, - "IPipelineArtifactModelCreateDatasetArtifactModel": { + "Metadata_IOrderMetadataInputMetadata_PromptAssetMetadataInput": { "required": [ - "identifier", - "dataset", + "asset", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "PromptAssetMetadataInput" + ], + "type": "string" + }, + "asset": { + "$ref": "#/components/schemas/IAssetInput" + } + } + }, + "Metadata_IOrderMetadataInputMetadata_PromptMetadataInput": { + "required": [ + "prompt", "_t" ], "properties": { "_t": { "enum": [ - "CreateDatasetArtifactModel" + "PromptMetadataInput" ], "type": "string" }, - "identifier": { + "prompt": { "type": "string" - }, - "dataset": { - "$ref": "#/components/schemas/IDatasetModel" } } }, - "IPipelineModel": { + "Metadata_IOrderMetadataInputMetadata_TranscriptionMetadataInput": { "required": [ + "transcription", "_t" ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IPipelineModelCreateSimplePipelineModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "CreateSimplePipelineModel": "#/components/schemas/IPipelineModelCreateSimplePipelineModel" + "properties": { + "_t": { + "enum": [ + "TranscriptionMetadataInput" + ], + "type": "string" + }, + "transcription": { + "type": "string" } } }, - "IPipelineModelCreateSimplePipelineModel": { + "OrderState": { + "enum": [ + "Created", + "Preview", + "Submitted", + "ManualReview", + "Queued", + "Processing", + "Paused", + "Completed", + "Cancelled", + "Failed", + "StaleResults" + ], + "description": "The current state of the order." + }, + "PagedResultOfQueryJobDefinitionsResult": { "required": [ - "artifacts", - "pipelineSteps", - "namePrefix", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CreateSimplePipelineModel" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "artifacts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IPipelineArtifactModel" - } + "page": { + "type": "integer", + "format": "int32" }, - "pipelineSteps": { + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/IPipelineStepModel" + "$ref": "#/components/schemas/QueryJobDefinitionsResult" } }, - "namePrefix": { - "type": "string" + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IPipelineStepModel": { + "PagedResultOfQueryJobRevisionsResult": { "required": [ - "_t" + "total", + "page", + "pageSize", + "items" ], "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IPipelineStepModelDatasetEvaluationStepModel" + "properties": { + "total": { + "type": "integer", + "format": "int64" }, - { - "$ref": "#/components/schemas/IPipelineStepModelSendCompletionMailStepModel" + "page": { + "type": "integer", + "format": "int32" }, - { - "$ref": "#/components/schemas/IPipelineStepModelWorkflowAggregationStepModel" + "pageSize": { + "type": "integer", + "format": "int32" }, - { - "$ref": "#/components/schemas/IPipelineStepModelWorkflowLabelingStepModel" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryJobRevisionsResult" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "DatasetEvaluationStepModel": "#/components/schemas/IPipelineStepModelDatasetEvaluationStepModel", - "SendCompletionMailStepModel": "#/components/schemas/IPipelineStepModelSendCompletionMailStepModel", - "WorkflowAggregationStepModel": "#/components/schemas/IPipelineStepModelWorkflowAggregationStepModel", - "WorkflowLabelingStepModel": "#/components/schemas/IPipelineStepModelWorkflowLabelingStepModel" + } + }, + "PreviewOrderEndpoint_Input": { + "type": "object", + "properties": { + "ignoreFailedDatapoints": { + "type": "boolean", + "description": "Whether the order should proceed even if certain datapoints failed.", + "nullable": true } } }, - "IPipelineStepModelDatasetEvaluationStepModel": { + "QueryAggregatedOrdersEndpoint_Output": { "required": [ - "datasetArtifactId", - "aggregationResultFileArtifactId", - "evaluationResultFileArtifactId", - "receiver", - "_t" + "amount", + "last7Days", + "lastOrderDate", + "lastOrderName", + "lastOrderId", + "customerMail" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "DatasetEvaluationStepModel" - ], - "type": "string" + "amount": { + "type": "integer", + "description": "The total number of orders for this customer.", + "format": "int32" }, - "datasetArtifactId": { - "type": "string" + "last7Days": { + "type": "integer", + "description": "The number of orders placed in the last 7 days.", + "format": "int32" }, - "aggregationResultFileArtifactId": { - "type": "string" + "lastOrderDate": { + "type": "string", + "description": "The date of the most recent order.", + "format": "date-time" }, - "evaluationResultFileArtifactId": { - "type": "string" + "lastOrderName": { + "type": "string", + "description": "The name of the most recent order." }, - "receiver": { - "type": "string" + "lastOrderId": { + "type": "string", + "description": "The ID of the most recent order." + }, + "customerMail": { + "type": "string", + "description": "The customer's email address." } } }, - "IPipelineStepModelSendCompletionMailStepModel": { + "QueryAggregatedOrdersEndpoint_PagedResultOfOutput": { "required": [ - "receiver", - "resultsFileArtifactIdentifier", - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "SendCompletionMailStepModel" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "receiver": { - "type": "string" + "page": { + "type": "integer", + "format": "int32" }, - "resultsFileArtifactIdentifier": { - "type": "string" + "pageSize": { + "type": "integer", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryAggregatedOrdersEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, - "IPipelineStepModelWorkflowAggregationStepModel": { + "QueryJobDefinitionsResult": { "required": [ - "campaignArtifactId", - "workflowArtifactId", - "fileArtifactId", - "_t" + "definitionId", + "name", + "definitionType", + "createdAt", + "revisionCount", + "ownerId", + "ownerMail" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "WorkflowAggregationStepModel" - ], + "definitionId": { "type": "string" }, - "campaignArtifactId": { + "name": { "type": "string" }, - "workflowArtifactId": { - "type": "string" + "definitionType": { + "$ref": "#/components/schemas/DefinitionType" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "revisionCount": { + "type": "integer", + "format": "int32" }, - "fileArtifactId": { - "type": "string" + "ownerId": { + "type": "string", + "format": "uuid" }, - "aggregatorType": { - "$ref": "#/components/schemas/AggregatorType" + "ownerMail": { + "type": "string" } } }, - "IPipelineStepModelWorkflowLabelingStepModel": { + "QueryJobRevisionsResult": { "required": [ - "workflowArtifactId", - "_t" + "definitionId", + "revisionNumber", + "createdAt", + "state" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "WorkflowLabelingStepModel" - ], + "definitionId": { "type": "string" }, - "workflowArtifactId": { - "type": "string" - } - } - }, - "IRankingConfigModel": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IRankingConfigModelBradleyTerryRankingConfigModel" + "revisionNumber": { + "type": "integer", + "format": "int32" }, - { - "$ref": "#/components/schemas/IRankingConfigModelEloConfigModel" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "BradleyTerryRankingConfig": "#/components/schemas/IRankingConfigModelBradleyTerryRankingConfigModel", - "EloConfig": "#/components/schemas/IRankingConfigModelEloConfigModel" + "createdAt": { + "type": "string", + "format": "date-time" + }, + "state": { + "$ref": "#/components/schemas/JobDefinitionRevisionState" } } }, - "IRankingConfigModelBradleyTerryRankingConfigModel": { + "QueryOrdersEndpoint_Output": { "required": [ - "_t" + "id", + "pipelineId", + "orderDate", + "customerMail", + "state", + "orderName", + "isPublic" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "BradleyTerryRankingConfig" - ], - "type": "string" + "id": { + "type": "string", + "description": "The unique identifier of the order." }, - "startingScore": { - "type": "integer", - "format": "int32" + "pipelineId": { + "type": "string", + "description": "The ID of the pipeline associated with the order." + }, + "orderDate": { + "type": "string", + "description": "The date the order was placed.", + "format": "date-time", + "nullable": true + }, + "customerMail": { + "type": "string", + "description": "The email of the customer who placed the order." + }, + "state": { + "$ref": "#/components/schemas/OrderState" + }, + "orderName": { + "type": "string", + "description": "The name of the order." + }, + "isPublic": { + "type": "boolean", + "description": "Whether the order is publicly visible." + }, + "failureMessage": { + "type": "string", + "description": "The failure message if the order failed.", + "nullable": true } } }, - "IRankingConfigModelEloConfigModel": { + "QueryOrdersEndpoint_PagedResultOfOutput": { "required": [ - "_t" + "total", + "page", + "pageSize", + "items" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "EloConfig" - ], - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "startingElo": { + "page": { "type": "integer", "format": "int32" }, - "kFactor": { + "pageSize": { "type": "integer", "format": "int32" }, - "scalingFactor": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryOrdersEndpoint_Output" + } + }, + "totalPages": { "type": "integer", "format": "int32" } } }, - "IRapidBlueprint": { - "required": [ - "_t" - ], + "StickyConfig": { "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IRapidBlueprintTranscriptionRapidBlueprint" - }, - { - "$ref": "#/components/schemas/IRapidBlueprintScrubRapidBlueprint" - }, - { - "$ref": "#/components/schemas/IRapidBlueprintPolygonRapidBlueprint" - }, - { - "$ref": "#/components/schemas/IRapidBlueprintNamedEntityRapidBlueprint" - }, - { - "$ref": "#/components/schemas/IRapidBlueprintLocateRapidBlueprint" - }, - { - "$ref": "#/components/schemas/IRapidBlueprintLineRapidBlueprint" + "properties": { + "isEnabled": { + "type": "boolean" }, - { - "$ref": "#/components/schemas/IRapidBlueprintFreeTextRapidBlueprint" + "bypassFilters": { + "type": "boolean" }, - { - "$ref": "#/components/schemas/IRapidBlueprintCompareRapidBlueprint" + "bypassPrioritySelection": { + "type": "boolean" }, - { - "$ref": "#/components/schemas/IRapidBlueprintAttachCategoryRapidBlueprint" + "blockOtherStickyCampaigns": { + "type": "boolean" }, - { - "$ref": "#/components/schemas/IRapidBlueprintBoundingBoxRapidBlueprint" + "clearOnPause": { + "type": "boolean" } + } + }, + "StickyState": { + "enum": [ + "None", + "Temporary", + "Permanent", + "Passive", + null ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "TranscriptionBlueprint": "#/components/schemas/IRapidBlueprintTranscriptionRapidBlueprint", - "ScrubBlueprint": "#/components/schemas/IRapidBlueprintScrubRapidBlueprint", - "PolygonBlueprint": "#/components/schemas/IRapidBlueprintPolygonRapidBlueprint", - "NamedEntityBlueprint": "#/components/schemas/IRapidBlueprintNamedEntityRapidBlueprint", - "LocateBlueprint": "#/components/schemas/IRapidBlueprintLocateRapidBlueprint", - "LineBlueprint": "#/components/schemas/IRapidBlueprintLineRapidBlueprint", - "FreeTextBlueprint": "#/components/schemas/IRapidBlueprintFreeTextRapidBlueprint", - "CompareBlueprint": "#/components/schemas/IRapidBlueprintCompareRapidBlueprint", - "ClassifyBlueprint": "#/components/schemas/IRapidBlueprintAttachCategoryRapidBlueprint", - "BoundingBoxBlueprint": "#/components/schemas/IRapidBlueprintBoundingBoxRapidBlueprint" + "description": "Indicates if the underlying campaign should be sticky.", + "deprecated": true + }, + "SubmitOrderEndpoint_Input": { + "type": "object", + "properties": { + "ignoreFailedDatapoints": { + "type": "boolean", + "description": "Whether the order should proceed even if certain datapoints failed.", + "nullable": true + } + } + }, + "UnlockOrderEndpoint_Output": { + "required": [ + "datasetIds" + ], + "type": "object", + "properties": { + "datasetIds": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The dataset IDs created by unlocking the order." + } + } + }, + "UpdateJobDefinitionEndpoint_Input": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name for the job definition.", + "nullable": true + } + }, + "description": "The input for the update job definition endpoint." + }, + "UpdateJobEndpoint_Input": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name for the job.", + "nullable": true + } + }, + "description": "The input for the update job endpoint." + }, + "UpdateOrderEndpoint_Input": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name of the order, if specified.", + "nullable": true + }, + "precedingOrderId": { + "type": "string", + "description": "The ID of the order that must complete before this order starts processing.\n Set to null to clear an existing preceding order.", + "nullable": true } } }, - "IRapidBlueprintAttachCategoryRapidBlueprint": { - "required": [ - "title", - "_t" - ], + "EloConfig": { + "type": "object", "properties": { - "_t": { - "enum": [ - "ClassifyBlueprint" - ], - "type": "string" + "startingElo": { + "type": "integer", + "format": "int32" }, - "possibleCategories": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "deprecated": true + "startingScore": { + "type": "integer", + "format": "int32" }, - "categories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttachCategoryRapidBlueprint_Category" - } + "kFactor": { + "type": "integer", + "format": "int32" }, - "title": { - "type": "string" + "scalingFactor": { + "type": "integer", + "format": "int32" } } }, - "IRapidBlueprintBoundingBoxRapidBlueprint": { - "required": [ - "target", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "BoundingBoxBlueprint" - ], - "type": "string" - }, - "target": { - "type": "string" - } - } + "FileStreamResult": { + "type": "string", + "format": "binary" }, - "IRapidBlueprintCompareRapidBlueprint": { + "GetPipelineByIdResult": { "required": [ - "criteria", - "_t" + "artifacts", + "featureFlags" ], + "type": "object", "properties": { - "_t": { - "enum": [ - "CompareBlueprint" - ], - "type": "string" - }, - "criteria": { - "type": "string" + "artifacts": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IArtifactModel" + } }, - "indexIdentifiers": { + "featureFlags": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/FeatureFlag" } } } }, - "IRapidBlueprintFreeTextRapidBlueprint": { + "IArtifactModel": { "required": [ - "question", "_t" ], - "properties": { - "_t": { - "enum": [ - "FreeTextBlueprint" - ], - "type": "string" + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IArtifactModelCampaignArtifactModel" }, - "question": { - "type": "string" + { + "$ref": "#/components/schemas/IArtifactModelDatasetArtifactModel" }, - "shouldValidateResponse": { - "type": "boolean" + { + "$ref": "#/components/schemas/IArtifactModelFileArtifactModel" }, - "validationSystemPrompt": { - "type": "string", - "nullable": true + { + "$ref": "#/components/schemas/IArtifactModelWorkflowArtifactModel" + }, + { + "$ref": "#/components/schemas/IArtifactModelWorkflowConfigArtifactModel" } - } - }, - "IRapidBlueprintLineRapidBlueprint": { - "required": [ - "target", - "_t" ], - "properties": { - "_t": { - "enum": [ - "LineBlueprint" - ], - "type": "string" - }, - "target": { - "type": "string" + "discriminator": { + "propertyName": "_t", + "mapping": { + "CampaignArtifactModel": "#/components/schemas/IArtifactModelCampaignArtifactModel", + "DatasetArtifactModel": "#/components/schemas/IArtifactModelDatasetArtifactModel", + "FileArtifactModel": "#/components/schemas/IArtifactModelFileArtifactModel", + "WorkflowArtifactModel": "#/components/schemas/IArtifactModelWorkflowArtifactModel", + "WorkflowConfigArtifactModel": "#/components/schemas/IArtifactModelWorkflowConfigArtifactModel" } } }, - "IRapidBlueprintLocateRapidBlueprint": { + "IArtifactModelCampaignArtifactModel": { "required": [ - "target", + "campaignId", + "identifier", "_t" ], "properties": { "_t": { "enum": [ - "LocateBlueprint" + "CampaignArtifactModel" ], "type": "string" }, - "target": { + "campaignId": { + "type": "string" + }, + "identifier": { "type": "string" } } }, - "IRapidBlueprintNamedEntityRapidBlueprint": { + "IArtifactModelDatasetArtifactModel": { "required": [ - "target", - "classes", + "datasetId", + "identifier", "_t" ], "properties": { "_t": { "enum": [ - "NamedEntityBlueprint" + "DatasetArtifactModel" ], "type": "string" }, - "target": { + "datasetId": { "type": "string" }, - "classes": { - "type": "array", - "items": { - "type": "string" - } + "identifier": { + "type": "string" } } }, - "IRapidBlueprintPolygonRapidBlueprint": { + "IArtifactModelFileArtifactModel": { "required": [ - "target", + "fileName", + "identifier", "_t" ], "properties": { "_t": { "enum": [ - "PolygonBlueprint" + "FileArtifactModel" ], "type": "string" }, - "target": { + "fileName": { + "type": "string" + }, + "identifier": { "type": "string" } } }, - "IRapidBlueprintScrubRapidBlueprint": { + "IArtifactModelWorkflowArtifactModel": { "required": [ - "target", + "workflowId", + "identifier", "_t" ], "properties": { "_t": { "enum": [ - "ScrubBlueprint" + "WorkflowArtifactModel" ], "type": "string" }, - "target": { + "workflowId": { + "type": "string" + }, + "identifier": { "type": "string" } } }, - "IRapidBlueprintTranscriptionRapidBlueprint": { + "IArtifactModelWorkflowConfigArtifactModel": { "required": [ - "title", + "workflowConfig", + "identifier", "_t" ], "properties": { "_t": { "enum": [ - "TranscriptionBlueprint" + "WorkflowConfigArtifactModel" ], "type": "string" }, - "title": { + "workflowConfig": { + "$ref": "#/components/schemas/IWorkflowConfig" + }, + "identifier": { "type": "string" } } }, - "IRefereeModel": { + "IAsset": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IRefereeModelBudgetRefereeModel" + "$ref": "#/components/schemas/IAssetFileAsset" }, { - "$ref": "#/components/schemas/IRefereeModelEarlyStoppingRefereeModel" + "$ref": "#/components/schemas/IAssetMultiAsset" }, { - "$ref": "#/components/schemas/IRefereeModelNaiveRefereeModel" + "$ref": "#/components/schemas/IAssetNullAsset" }, { - "$ref": "#/components/schemas/IRefereeModelQuorumRefereeModel" + "$ref": "#/components/schemas/IAssetTextAsset" } ], "discriminator": { "propertyName": "_t", "mapping": { - "BudgetReferee": "#/components/schemas/IRefereeModelBudgetRefereeModel", - "EarlyStoppingReferee": "#/components/schemas/IRefereeModelEarlyStoppingRefereeModel", - "NaiveReferee": "#/components/schemas/IRefereeModelNaiveRefereeModel", - "QuorumReferee": "#/components/schemas/IRefereeModelQuorumRefereeModel" + "FileAsset": "#/components/schemas/IAssetFileAsset", + "MultiAsset": "#/components/schemas/IAssetMultiAsset", + "NullAsset": "#/components/schemas/IAssetNullAsset", + "TextAsset": "#/components/schemas/IAssetTextAsset" } } }, - "IRefereeModelBudgetRefereeModel": { + "IAssetFileAsset": { "required": [ - "totalBudget", + "fileName", + "metadata", "_t" ], "properties": { "_t": { "enum": [ - "BudgetReferee" + "FileAsset" ], "type": "string" }, - "totalBudget": { - "type": "integer", - "format": "int32" + "fileName": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IMetadata" + } } } }, - "IRefereeModelEarlyStoppingRefereeModel": { + "IAssetMultiAsset": { "required": [ - "maxVotes", - "threshold", + "assets", + "metadata", "_t" ], "properties": { "_t": { "enum": [ - "EarlyStoppingReferee" + "MultiAsset" ], "type": "string" }, - "maxVotes": { - "type": "integer", - "format": "int32" + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IAsset" + } }, - "threshold": { - "type": "number", - "format": "double" + "metadata": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IMetadata" + } } } }, - "IRefereeModelNaiveRefereeModel": { + "IAssetNullAsset": { "required": [ - "totalVotes", + "metadata", "_t" ], "properties": { "_t": { "enum": [ - "NaiveReferee" + "NullAsset" ], "type": "string" }, - "totalVotes": { - "type": "integer", - "format": "int32" + "metadata": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IMetadata" + } } } }, - "IRefereeModelQuorumRefereeModel": { + "IAssetTextAsset": { "required": [ - "maxVotes", - "threshold", + "text", + "metadata", "_t" ], "properties": { "_t": { "enum": [ - "QuorumReferee" + "TextAsset" ], "type": "string" }, - "maxVotes": { - "type": "integer", - "format": "int32" + "text": { + "type": "string" }, - "threshold": { - "type": "integer", - "format": "int32" + "metadata": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IMetadata" + } } } }, - "ISelection": { + "IPairMakerConfig": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/ISelectionAbTestSelection" - }, - { - "$ref": "#/components/schemas/ISelectionCappedSelection" - }, - { - "$ref": "#/components/schemas/ISelectionConditionalValidationSelection" - }, - { - "$ref": "#/components/schemas/ISelectionDemographicSelection" - }, - { - "$ref": "#/components/schemas/ISelectionEffortCappedSelection" - }, - { - "$ref": "#/components/schemas/ISelectionLabelingSelection" - }, - { - "$ref": "#/components/schemas/ISelectionShufflingSelection" - }, - { - "$ref": "#/components/schemas/ISelectionStaticSelection" + "$ref": "#/components/schemas/IPairMakerConfigFullPermutationPairMakerConfig" }, { - "$ref": "#/components/schemas/ISelectionValidationSelection" + "$ref": "#/components/schemas/IPairMakerConfigOnlinePairMakerConfig" } ], "discriminator": { "propertyName": "_t", "mapping": { - "AbTestSelection": "#/components/schemas/ISelectionAbTestSelection", - "CappedSelection": "#/components/schemas/ISelectionCappedSelection", - "ConditionalValidationSelection": "#/components/schemas/ISelectionConditionalValidationSelection", - "DemographicSelection": "#/components/schemas/ISelectionDemographicSelection", - "EffortCappedSelection": "#/components/schemas/ISelectionEffortCappedSelection", - "LabelingSelection": "#/components/schemas/ISelectionLabelingSelection", - "ShufflingSelection": "#/components/schemas/ISelectionShufflingSelection", - "StaticSelection": "#/components/schemas/ISelectionStaticSelection", - "ValidationSelection": "#/components/schemas/ISelectionValidationSelection" + "FullPermutationPairMakerConfig": "#/components/schemas/IPairMakerConfigFullPermutationPairMakerConfig", + "OnlinePairMakerConfig": "#/components/schemas/IPairMakerConfigOnlinePairMakerConfig" } } }, - "ISelectionAbTestSelection": { + "IPairMakerConfigFullPermutationPairMakerConfig": { "required": [ - "a", - "b", "_t" ], "properties": { "_t": { "enum": [ - "AbTestSelection" + "FullPermutationPairMakerConfig" ], "type": "string" - }, - "a": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ISelection" - } - }, - "b": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ISelection" - } } } }, - "ISelectionCappedSelection": { + "IPairMakerConfigOnlinePairMakerConfig": { "required": [ - "selections", - "maxRapids", "_t" ], "properties": { "_t": { "enum": [ - "CappedSelection" + "OnlinePairMakerConfig" ], "type": "string" }, - "selections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ISelection" - } + "randomMatchesRatio": { + "type": "number", + "format": "float" }, - "maxRapids": { + "totalComparisonBudget": { "type": "integer", "format": "int32" } } }, - "ISelectionConditionalValidationSelection": { + "IRankingConfig": { "required": [ - "validationSetId", - "validationChances", "_t" ], - "properties": { - "_t": { - "enum": [ - "ConditionalValidationSelection" - ], - "type": "string" - }, - "validationSetId": { - "type": "string" - }, - "validationChances": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConditionalValidationSelection_ValidationChance" - } + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IRankingConfigBradleyTerryRankingConfig" }, - "dimensions": { - "type": "array", - "items": { - "type": "string" - } + { + "$ref": "#/components/schemas/IRankingConfigEloConfig" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "BradleyTerryRankingConfig": "#/components/schemas/IRankingConfigBradleyTerryRankingConfig", + "EloConfig": "#/components/schemas/IRankingConfigEloConfig" } } }, - "ISelectionDemographicSelection": { + "IRankingConfigBradleyTerryRankingConfig": { "required": [ - "keys", "_t" ], "properties": { "_t": { "enum": [ - "DemographicSelection" + "BradleyTerryRankingConfig" ], "type": "string" }, - "keys": { - "type": "array", - "items": { - "type": "string" - } - }, - "maxRapids": { + "startingScore": { "type": "integer", "format": "int32" } } }, - "ISelectionEffortCappedSelection": { + "IRankingConfigEloConfig": { "required": [ - "effortBudget", "_t" ], "properties": { "_t": { "enum": [ - "EffortCappedSelection" + "EloConfig" ], "type": "string" }, - "effortBudget": { + "startingElo": { "type": "integer", "format": "int32" }, - "retrievalMode": { - "$ref": "#/components/schemas/RetrievalMode" + "startingScore": { + "type": "integer", + "format": "int32" }, - "maxIterations": { + "kFactor": { + "type": "integer", + "format": "int32" + }, + "scalingFactor": { "type": "integer", "format": "int32" } } }, - "ISelectionLabelingSelection": { + "IRefereeConfig": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IRefereeConfigBudgetRefereeConfig" + }, + { + "$ref": "#/components/schemas/IRefereeConfigNaiveRefereeConfig" + }, + { + "$ref": "#/components/schemas/IRefereeConfigNeverEndingRefereeConfig" + }, + { + "$ref": "#/components/schemas/IRefereeConfigProbabilisticAttachCategoryRefereeConfig" + }, + { + "$ref": "#/components/schemas/IRefereeConfigQuorumRefereeConfig" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "BudgetRefereeConfig": "#/components/schemas/IRefereeConfigBudgetRefereeConfig", + "NaiveRefereeConfig": "#/components/schemas/IRefereeConfigNaiveRefereeConfig", + "NeverEndingRefereeConfig": "#/components/schemas/IRefereeConfigNeverEndingRefereeConfig", + "ProbabilisticAttachCategoryRefereeConfig": "#/components/schemas/IRefereeConfigProbabilisticAttachCategoryRefereeConfig", + "QuorumRefereeConfig": "#/components/schemas/IRefereeConfigQuorumRefereeConfig" + } + } + }, + "IRefereeConfigBudgetRefereeConfig": { "required": [ + "totalBudget", "_t" ], "properties": { "_t": { "enum": [ - "LabelingSelection" + "BudgetRefereeConfig" ], "type": "string" }, - "amount": { - "type": "integer", - "format": "int32" - }, - "effortBudget": { + "totalBudget": { "type": "integer", "format": "int32" }, - "retrievalMode": { - "$ref": "#/components/schemas/RetrievalMode" - }, - "maxIterations": { + "totalServeBudget": { "type": "integer", "format": "int32" } } }, - "ISelectionShufflingSelection": { + "IRefereeConfigNaiveRefereeConfig": { "required": [ - "selections", "_t" ], "properties": { "_t": { "enum": [ - "ShufflingSelection" + "NaiveRefereeConfig" ], "type": "string" }, - "selections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ISelection" - } + "guessesRequired": { + "type": "integer", + "format": "int32" + } + } + }, + "IRefereeConfigNeverEndingRefereeConfig": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "NeverEndingRefereeConfig" + ], + "type": "string" } } }, - "ISelectionStaticSelection": { + "IRefereeConfigProbabilisticAttachCategoryRefereeConfig": { "required": [ - "rapidIds", + "threshold", + "maxVotes", "_t" ], "properties": { "_t": { "enum": [ - "StaticSelection" + "ProbabilisticAttachCategoryRefereeConfig" ], "type": "string" }, - "rapidIds": { - "type": "array", - "items": { - "type": "string" - } + "threshold": { + "type": "number", + "format": "double" + }, + "maxVotes": { + "type": "integer", + "format": "int32" } } }, - "ISelectionValidationSelection": { + "IRefereeConfigQuorumRefereeConfig": { "required": [ - "amount", - "validationSetId", + "maxVotes", + "threshold", "_t" ], "properties": { "_t": { "enum": [ - "ValidationSelection" + "QuorumRefereeConfig" ], "type": "string" }, - "amount": { + "maxVotes": { "type": "integer", "format": "int32" }, - "validationSetId": { - "type": "string" + "threshold": { + "type": "integer", + "format": "int32" } } }, - "JobDefinitionRevisionState": { - "enum": [ - "Pending", - "Completed", - "Failed" - ], - "description": "The state of the revision." - }, - "Metadata_IOrderMetadataInput": { + "IWorkflowConfig": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_PromptMetadataInput" + "$ref": "#/components/schemas/IWorkflowConfigEvaluationWorkflowConfig" }, { - "$ref": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_PromptAssetMetadataInput" + "$ref": "#/components/schemas/IWorkflowConfigGroupedRankingWorkflowConfig" }, { - "$ref": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_TranscriptionMetadataInput" + "$ref": "#/components/schemas/IWorkflowConfigRankingWorkflowConfig" + }, + { + "$ref": "#/components/schemas/IWorkflowConfigSimpleWorkflowConfig" } ], "discriminator": { "propertyName": "_t", "mapping": { - "PromptMetadataInput": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_PromptMetadataInput", - "PromptAssetMetadataInput": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_PromptAssetMetadataInput", - "TranscriptionMetadataInput": "#/components/schemas/Metadata_IOrderMetadataInputMetadata_TranscriptionMetadataInput" + "EvaluationWorkflowConfig": "#/components/schemas/IWorkflowConfigEvaluationWorkflowConfig", + "GroupedRankingWorkflowConfig": "#/components/schemas/IWorkflowConfigGroupedRankingWorkflowConfig", + "RankingWorkflowConfig": "#/components/schemas/IWorkflowConfigRankingWorkflowConfig", + "SimpleWorkflowConfig": "#/components/schemas/IWorkflowConfigSimpleWorkflowConfig" } } }, - "Metadata_IOrderMetadataInputMetadata_PromptAssetMetadataInput": { + "IWorkflowConfigEvaluationWorkflowConfig": { "required": [ - "asset", + "validationSetId", + "referee", + "shouldAcceptIncorrect", "_t" ], "properties": { "_t": { "enum": [ - "PromptAssetMetadataInput" + "EvaluationWorkflowConfig" ], "type": "string" }, - "asset": { - "$ref": "#/components/schemas/IAssetInput" - } - } - }, - "Metadata_IOrderMetadataInputMetadata_PromptMetadataInput": { - "required": [ - "prompt", - "_t" - ], - "properties": { - "_t": { - "enum": [ - "PromptMetadataInput" - ], + "validationSetId": { "type": "string" }, - "prompt": { - "type": "string" + "referee": { + "$ref": "#/components/schemas/IRefereeConfig" + }, + "shouldAcceptIncorrect": { + "type": "boolean" + }, + "featureFlags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } } } }, - "Metadata_IOrderMetadataInputMetadata_TranscriptionMetadataInput": { + "IWorkflowConfigGroupedRankingWorkflowConfig": { "required": [ - "transcription", + "criteria", + "referee", + "targetCountryCodes", + "maxParallelism", "_t" ], "properties": { "_t": { "enum": [ - "TranscriptionMetadataInput" + "GroupedRankingWorkflowConfig" ], "type": "string" }, - "transcription": { + "criteria": { "type": "string" - } - } - }, - "OrderState": { - "enum": [ - "Created", - "Preview", - "Submitted", - "ManualReview", - "Queued", - "Processing", - "Paused", - "Completed", - "Cancelled", - "Failed", - "StaleResults" - ], - "description": "The current state of the order." - }, - "PagedResultOfQueryJobDefinitionsResult": { - "required": [ - "total", - "page", - "pageSize", - "items" - ], - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" }, - "pageSize": { - "type": "integer", - "format": "int32" + "referee": { + "$ref": "#/components/schemas/IRefereeConfig" }, - "items": { + "targetCountryCodes": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryJobDefinitionsResult" + "type": "string" } }, - "totalPages": { - "type": "integer", - "format": "int32" - } - } - }, - "PagedResultOfQueryJobRevisionsResult": { - "required": [ - "total", - "page", - "pageSize", - "items" - ], - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pageSize": { + "maxParallelism": { "type": "integer", "format": "int32" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryJobRevisionsResult" - } - }, - "totalPages": { - "type": "integer", - "format": "int32" - } - } - }, - "PreviewOrderEndpoint_Input": { - "type": "object", - "properties": { - "ignoreFailedDatapoints": { - "type": "boolean", - "description": "Whether the order should proceed even if certain datapoints failed.", - "nullable": true - } - } - }, - "QueryAggregatedOrdersEndpoint_Output": { - "required": [ - "amount", - "last7Days", - "lastOrderDate", - "lastOrderName", - "lastOrderId", - "customerMail" - ], - "type": "object", - "properties": { - "amount": { - "type": "integer", - "description": "The total number of orders for this customer.", - "format": "int32" + "contexts": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true, + "deprecated": true }, - "last7Days": { - "type": "integer", - "description": "The number of orders placed in the last 7 days.", - "format": "int32" + "contextAssets": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IAsset" + }, + "nullable": true, + "deprecated": true }, - "lastOrderDate": { - "type": "string", - "description": "The date of the most recent order.", - "format": "date-time" + "eloConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/EloConfig" + } + ], + "deprecated": true }, - "lastOrderName": { - "type": "string", - "description": "The name of the most recent order." + "rankingConfig": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/IRankingConfig" + } + ] }, - "lastOrderId": { - "type": "string", - "description": "The ID of the most recent order." + "pairMakerConfig": { + "$ref": "#/components/schemas/IPairMakerConfig" }, - "customerMail": { - "type": "string", - "description": "The customer's email address." + "featureFlags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } } } }, - "QueryAggregatedOrdersEndpoint_PagedResultOfOutput": { + "IWorkflowConfigRankingWorkflowConfig": { "required": [ - "total", - "page", - "pageSize", - "items" + "criteria", + "referee", + "_t" ], - "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" + "_t": { + "enum": [ + "RankingWorkflowConfig" + ], + "type": "string" }, - "page": { - "type": "integer", - "format": "int32" + "criteria": { + "type": "string" }, - "pageSize": { - "type": "integer", - "format": "int32" + "referee": { + "$ref": "#/components/schemas/IRefereeConfig" }, - "items": { + "context": { + "type": "string", + "nullable": true + }, + "contextAsset": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/IAsset" + } + ] + }, + "eloConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/EloConfig" + } + ], + "deprecated": true + }, + "rankingConfig": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/IRankingConfig" + } + ] + }, + "pairMakerConfig": { + "$ref": "#/components/schemas/IPairMakerConfig" + }, + "featureFlags": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryAggregatedOrdersEndpoint_Output" + "$ref": "#/components/schemas/FeatureFlag" } - }, - "totalPages": { - "type": "integer", - "format": "int32" } } }, - "QueryJobDefinitionsResult": { + "IWorkflowConfigSimpleWorkflowConfig": { "required": [ - "definitionId", - "name", - "definitionType", - "createdAt", - "revisionCount" + "referee", + "blueprint", + "_t" ], - "type": "object", "properties": { - "definitionId": { - "type": "string" - }, - "name": { + "_t": { + "enum": [ + "SimpleWorkflowConfig" + ], "type": "string" }, - "definitionType": { - "$ref": "#/components/schemas/DefinitionType" + "referee": { + "$ref": "#/components/schemas/IRefereeConfig" }, - "createdAt": { - "type": "string", - "format": "date-time" + "blueprint": { + "$ref": "#/components/schemas/IRapidBlueprint" }, - "revisionCount": { + "batchSize": { "type": "integer", "format": "int32" + }, + "featureFlags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } } } }, - "QueryJobRevisionsResult": { + "PreliminaryDownloadModel": { + "type": "object", + "properties": { + "sendEmail": { + "type": "boolean", + "description": "Whether to email the user when the download is ready." + } + }, + "description": "The model for creating a preliminary download." + }, + "StartPreliminaryDownloadResult": { "required": [ - "definitionId", - "revisionNumber", - "createdAt", - "state" + "downloadId" ], "type": "object", "properties": { - "definitionId": { + "downloadId": { "type": "string" - }, - "revisionNumber": { - "type": "integer", - "format": "int32" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "state": { - "$ref": "#/components/schemas/JobDefinitionRevisionState" } } }, - "QueryOrdersEndpoint_Output": { + "AddUserResponseResult": { "required": [ - "id", - "pipelineId", - "orderDate", - "customerMail", - "state", - "orderName", - "isPublic" + "isAccepted", + "userScore" ], "type": "object", "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the order." - }, - "pipelineId": { - "type": "string", - "description": "The ID of the pipeline associated with the order." - }, - "orderDate": { - "type": "string", - "description": "The date the order was placed.", - "format": "date-time", - "nullable": true - }, - "customerMail": { - "type": "string", - "description": "The email of the customer who placed the order." - }, - "state": { - "$ref": "#/components/schemas/OrderState" + "isAccepted": { + "type": "boolean" }, - "orderName": { - "type": "string", - "description": "The name of the order." + "validationTruth": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/IValidationTruth" + } + ] }, - "isPublic": { - "type": "boolean", - "description": "Whether the order is publicly visible." + "explanation": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/TranslatedString" + } + ] }, - "failureMessage": { - "type": "string", - "description": "The failure message if the order failed.", - "nullable": true + "userScore": { + "type": "number", + "format": "double" } } }, - "QueryOrdersEndpoint_PagedResultOfOutput": { + "AreRapidsActiveResult": { "required": [ - "total", - "page", - "pageSize", - "items" + "isValid" ], "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int64" + "isValid": { + "type": "boolean" + } + } + }, + "BoxShape": { + "type": "object", + "properties": { + "xMin": { + "type": "number", + "format": "double" }, - "page": { - "type": "integer", - "format": "int32" + "yMin": { + "type": "number", + "format": "double" }, - "pageSize": { - "type": "integer", - "format": "int32" + "xMax": { + "type": "number", + "format": "double" }, - "items": { + "yMax": { + "type": "number", + "format": "double" + } + } + }, + "ClassifyPayload": { + "required": [ + "categories", + "title" + ], + "type": "object", + "properties": { + "categories": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryOrdersEndpoint_Output" + "$ref": "#/components/schemas/ClassifyPayload_Category" } }, - "totalPages": { - "type": "integer", - "format": "int32" + "title": { + "type": "string" } } }, - "StickyConfig": { + "ClassifyPayload_Category": { + "required": [ + "label", + "value" + ], "type": "object", "properties": { - "isEnabled": { - "type": "boolean" - }, - "bypassFilters": { - "type": "boolean" - }, - "bypassPrioritySelection": { - "type": "boolean" - }, - "blockOtherStickyCampaigns": { - "type": "boolean" + "label": { + "type": "string" }, - "clearOnPause": { - "type": "boolean" + "value": { + "type": "string" } } }, - "StickyState": { - "enum": [ - "None", - "Temporary", - "Permanent", - "Passive", - null + "CreateDemographicRapidModel": { + "required": [ + "key", + "payload" ], - "description": "Indicates if the underlying campaign should be sticky.", - "deprecated": true - }, - "SubmitOrderEndpoint_Input": { "type": "object", "properties": { - "ignoreFailedDatapoints": { - "type": "boolean", - "description": "Whether the order should proceed even if certain datapoints failed.", + "key": { + "type": "string", + "description": "The identifier of the demographic classification." + }, + "payload": { + "allOf": [ + { + "$ref": "#/components/schemas/ClassifyPayload" + } + ], + "description": "The payload for the classification." + }, + "featureFlags": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + }, + "nullable": true + } + ], + "description": "Optional feature flags to apply to the rapid." + }, + "asset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetInput" + } + ], + "description": "An optional asset to associate with the rapid." + }, + "context": { + "type": "string", + "description": "An optional text context to show to the user.", "nullable": true + }, + "contextAsset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetInput" + } + ], + "description": "An optional asset to use as context to show to the user." } - } + }, + "description": "The model for creating a demographic rapid." }, - "UnlockOrderEndpoint_Output": { + "CreateRapidResult": { "required": [ - "datasetIds" + "rapidId" ], "type": "object", "properties": { - "datasetIds": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "The dataset IDs created by unlocking the order." + "rapidId": { + "type": "string" } } }, - "UpdateJobDefinitionEndpoint_Input": { + "CreateValidationFeedbackEndpoint_Input": { + "required": [ + "feedback" + ], "type": "object", "properties": { - "name": { + "feedback": { "type": "string", - "description": "The new name for the job definition.", - "nullable": true + "description": "The feedback text." } - }, - "description": "The input for the update job definition endpoint." + } }, - "UpdateJobEndpoint_Input": { + "GetPublicResponsesResult": { + "required": [ + "responses" + ], "type": "object", "properties": { - "name": { - "type": "string", - "description": "The new name for the job.", - "nullable": true + "responses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetPublicResponsesResult_Response" + } } - }, - "description": "The input for the update job endpoint." + } }, - "UpdateOrderEndpoint_Input": { + "GetPublicResponsesResult_Response": { + "required": [ + "id", + "userId", + "country" + ], "type": "object", "properties": { - "name": { + "id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "country": { + "type": "string" + }, + "age": { "type": "string", - "description": "The new name of the order, if specified.", "nullable": true }, - "precedingOrderId": { + "occupation": { + "type": "string", + "nullable": true + }, + "gender": { "type": "string", - "description": "The ID of the order that must complete before this order starts processing.\n Set to null to clear an existing preceding order.", "nullable": true } } }, - "EloConfig": { + "GetResponsesForRapidResult": { + "required": [ + "rapidId", + "asset", + "responses", + "state" + ], "type": "object", "properties": { - "startingElo": { - "type": "integer", - "format": "int32" + "rapidId": { + "type": "string" }, - "startingScore": { - "type": "integer", - "format": "int32" + "asset": { + "$ref": "#/components/schemas/IAssetModel" }, - "kFactor": { - "type": "integer", - "format": "int32" + "responses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetResponsesForRapidResult_Response" + } }, - "scalingFactor": { - "type": "integer", - "format": "int32" + "state": { + "$ref": "#/components/schemas/RapidState" } } }, - "FileStreamResult": { - "type": "string", - "format": "binary" - }, - "GetPipelineByIdResult": { + "GetResponsesForRapidResult_Response": { "required": [ - "artifacts", - "featureFlags" + "id", + "userId", + "country", + "result", + "userScore", + "userScores", + "demographicInformation" ], "type": "object", "properties": { - "artifacts": { + "id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "country": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/IRapidResult" + }, + "userScore": { + "type": "number", + "format": "double" + }, + "userScores": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/IArtifactModel" + "type": "number", + "format": "double" } }, - "featureFlags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" + "demographicInformation": { + "type": "object", + "additionalProperties": { + "type": "string" } } } }, - "IArtifactModel": { + "InspectReportResult": { + "type": "object", + "properties": { + "dump": { + "type": "string", + "nullable": true + } + } + }, + "IRapidPayload": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IArtifactModelCampaignArtifactModel" + "$ref": "#/components/schemas/IRapidPayloadTranscriptionPayload" + }, + { + "$ref": "#/components/schemas/IRapidPayloadScrubPayload" }, { - "$ref": "#/components/schemas/IArtifactModelDatasetArtifactModel" + "$ref": "#/components/schemas/IRapidPayloadPolygonPayload" }, { - "$ref": "#/components/schemas/IArtifactModelFileArtifactModel" + "$ref": "#/components/schemas/IRapidPayloadNamedEntityPayload" }, { - "$ref": "#/components/schemas/IArtifactModelWorkflowArtifactModel" + "$ref": "#/components/schemas/IRapidPayloadLocatePayload" }, { - "$ref": "#/components/schemas/IArtifactModelWorkflowConfigArtifactModel" + "$ref": "#/components/schemas/IRapidPayloadLinePayload" + }, + { + "$ref": "#/components/schemas/IRapidPayloadFreeTextPayload" + }, + { + "$ref": "#/components/schemas/IRapidPayloadComparePayload" + }, + { + "$ref": "#/components/schemas/IRapidPayloadClassifyPayload" + }, + { + "$ref": "#/components/schemas/IRapidPayloadBoundingBoxPayload" } ], "discriminator": { "propertyName": "_t", "mapping": { - "CampaignArtifactModel": "#/components/schemas/IArtifactModelCampaignArtifactModel", - "DatasetArtifactModel": "#/components/schemas/IArtifactModelDatasetArtifactModel", - "FileArtifactModel": "#/components/schemas/IArtifactModelFileArtifactModel", - "WorkflowArtifactModel": "#/components/schemas/IArtifactModelWorkflowArtifactModel", - "WorkflowConfigArtifactModel": "#/components/schemas/IArtifactModelWorkflowConfigArtifactModel" + "TranscriptionPayload": "#/components/schemas/IRapidPayloadTranscriptionPayload", + "ScrubPayload": "#/components/schemas/IRapidPayloadScrubPayload", + "PolygonPayload": "#/components/schemas/IRapidPayloadPolygonPayload", + "NamedEntityPayload": "#/components/schemas/IRapidPayloadNamedEntityPayload", + "LocatePayload": "#/components/schemas/IRapidPayloadLocatePayload", + "LinePayload": "#/components/schemas/IRapidPayloadLinePayload", + "FreeTextPayload": "#/components/schemas/IRapidPayloadFreeTextPayload", + "ComparePayload": "#/components/schemas/IRapidPayloadComparePayload", + "ClassifyPayload": "#/components/schemas/IRapidPayloadClassifyPayload", + "BoundingBoxPayload": "#/components/schemas/IRapidPayloadBoundingBoxPayload" } } }, - "IArtifactModelCampaignArtifactModel": { + "IRapidPayloadBoundingBoxPayload": { "required": [ - "campaignId", - "identifier", + "target", "_t" ], "properties": { "_t": { "enum": [ - "CampaignArtifactModel" + "BoundingBoxPayload" ], "type": "string" }, - "campaignId": { - "type": "string" - }, - "identifier": { + "target": { "type": "string" } } }, - "IArtifactModelDatasetArtifactModel": { + "IRapidPayloadClassifyPayload": { "required": [ - "datasetId", - "identifier", + "categories", + "title", "_t" ], "properties": { "_t": { "enum": [ - "DatasetArtifactModel" + "ClassifyPayload" ], "type": "string" }, - "datasetId": { - "type": "string" + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClassifyPayload_Category" + } }, - "identifier": { + "title": { "type": "string" } } }, - "IArtifactModelFileArtifactModel": { + "IRapidPayloadComparePayload": { "required": [ - "fileName", - "identifier", + "criteria", "_t" ], "properties": { "_t": { "enum": [ - "FileArtifactModel" + "ComparePayload" ], "type": "string" }, - "fileName": { - "type": "string" - }, - "identifier": { + "criteria": { "type": "string" } } }, - "IArtifactModelWorkflowArtifactModel": { + "IRapidPayloadFreeTextPayload": { "required": [ - "workflowId", - "identifier", + "question", "_t" ], "properties": { "_t": { "enum": [ - "WorkflowArtifactModel" + "FreeTextPayload" ], "type": "string" }, - "workflowId": { + "question": { "type": "string" }, - "identifier": { - "type": "string" + "shouldValidateResponse": { + "type": "boolean" + }, + "validationSystemPrompt": { + "type": "string", + "nullable": true } } }, - "IArtifactModelWorkflowConfigArtifactModel": { + "IRapidPayloadLinePayload": { "required": [ - "workflowConfig", - "identifier", + "target", "_t" ], "properties": { "_t": { "enum": [ - "WorkflowConfigArtifactModel" + "LinePayload" ], "type": "string" }, - "workflowConfig": { - "$ref": "#/components/schemas/IWorkflowConfig" - }, - "identifier": { + "target": { "type": "string" } } }, - "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": { + "IRapidPayloadLocatePayload": { "required": [ - "fileName", - "metadata", + "target", "_t" ], "properties": { "_t": { "enum": [ - "FileAsset" + "LocatePayload" ], "type": "string" }, - "fileName": { + "target": { "type": "string" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IMetadata" - } } } }, - "IAssetMultiAsset": { + "IRapidPayloadNamedEntityPayload": { "required": [ - "assets", - "metadata", + "target", + "classes", "_t" ], "properties": { "_t": { "enum": [ - "MultiAsset" + "NamedEntityPayload" ], "type": "string" }, - "assets": { + "target": { + "type": "string" + }, + "classes": { "type": "array", "items": { - "$ref": "#/components/schemas/IAsset" - } - }, - "metadata": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IMetadata" + "type": "string" } } } }, - "IAssetNullAsset": { + "IRapidPayloadPolygonPayload": { "required": [ - "metadata", + "target", "_t" ], "properties": { "_t": { "enum": [ - "NullAsset" + "PolygonPayload" ], "type": "string" }, - "metadata": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IMetadata" - } + "target": { + "type": "string" } } }, - "IAssetTextAsset": { + "IRapidPayloadScrubPayload": { "required": [ - "text", - "metadata", + "target", "_t" ], "properties": { "_t": { "enum": [ - "TextAsset" + "ScrubPayload" ], "type": "string" }, - "text": { - "type": "string" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IMetadata" - } - } - } - }, - "IPairMakerConfig": { - "required": [ - "_t" - ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IPairMakerConfigFullPermutationPairMakerConfig" - }, - { - "$ref": "#/components/schemas/IPairMakerConfigOnlinePairMakerConfig" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "FullPermutationPairMakerConfig": "#/components/schemas/IPairMakerConfigFullPermutationPairMakerConfig", - "OnlinePairMakerConfig": "#/components/schemas/IPairMakerConfigOnlinePairMakerConfig" - } - } - }, - "IPairMakerConfigFullPermutationPairMakerConfig": { - "required": [ - "_t" - ], - "properties": { - "_t": { - "enum": [ - "FullPermutationPairMakerConfig" - ], + "target": { "type": "string" } } }, - "IPairMakerConfigOnlinePairMakerConfig": { + "IRapidPayloadTranscriptionPayload": { "required": [ + "title", + "transcription", "_t" ], "properties": { "_t": { "enum": [ - "OnlinePairMakerConfig" + "TranscriptionPayload" ], "type": "string" }, - "randomMatchesRatio": { - "type": "number", - "format": "float" + "title": { + "type": "string" }, - "totalComparisonBudget": { - "type": "integer", - "format": "int32" + "transcription": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TranscriptionWord" + } } } }, - "IRankingConfig": { + "IRapidResult": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IRankingConfigBradleyTerryRankingConfig" + "$ref": "#/components/schemas/IRapidResultTranscriptionResult" }, { - "$ref": "#/components/schemas/IRankingConfigEloConfig" + "$ref": "#/components/schemas/IRapidResultScrubResult" + }, + { + "$ref": "#/components/schemas/IRapidResultPolygonResult" + }, + { + "$ref": "#/components/schemas/IRapidResultNamedEntityResult" + }, + { + "$ref": "#/components/schemas/IRapidResultLocateResult" + }, + { + "$ref": "#/components/schemas/IRapidResultLineResult" + }, + { + "$ref": "#/components/schemas/IRapidResultFreeTextResult" + }, + { + "$ref": "#/components/schemas/IRapidResultCompareResult" + }, + { + "$ref": "#/components/schemas/IRapidResultSkipResult" + }, + { + "$ref": "#/components/schemas/IRapidResultAttachCategoryResult" + }, + { + "$ref": "#/components/schemas/IRapidResultBoundingBoxResult" } ], "discriminator": { "propertyName": "_t", "mapping": { - "BradleyTerryRankingConfig": "#/components/schemas/IRankingConfigBradleyTerryRankingConfig", - "EloConfig": "#/components/schemas/IRankingConfigEloConfig" + "TranscriptionResult": "#/components/schemas/IRapidResultTranscriptionResult", + "ScrubResult": "#/components/schemas/IRapidResultScrubResult", + "PolygonResult": "#/components/schemas/IRapidResultPolygonResult", + "NamedEntityResult": "#/components/schemas/IRapidResultNamedEntityResult", + "LocateResult": "#/components/schemas/IRapidResultLocateResult", + "LineResult": "#/components/schemas/IRapidResultLineResult", + "FreeTextResult": "#/components/schemas/IRapidResultFreeTextResult", + "CompareResult": "#/components/schemas/IRapidResultCompareResult", + "SkipResult": "#/components/schemas/IRapidResultSkipResult", + "AttachCategoryResult": "#/components/schemas/IRapidResultAttachCategoryResult", + "BoundingBoxResult": "#/components/schemas/IRapidResultBoundingBoxResult" } } }, - "IRankingConfigBradleyTerryRankingConfig": { + "IRapidResultAttachCategoryResult": { "required": [ + "category", + "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "BradleyTerryRankingConfig" + "AttachCategoryResult" ], "type": "string" }, - "startingScore": { - "type": "integer", - "format": "int32" + "category": { + "type": "string" + }, + "rapidId": { + "type": "string" } } }, - "IRankingConfigEloConfig": { + "IRapidResultBoundingBoxResult": { "required": [ + "boundingBoxes", + "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "EloConfig" + "BoundingBoxResult" ], "type": "string" }, - "startingElo": { - "type": "integer", - "format": "int32" - }, - "startingScore": { - "type": "integer", - "format": "int32" - }, - "kFactor": { - "type": "integer", - "format": "int32" + "boundingBoxes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BoxShape" + } }, - "scalingFactor": { - "type": "integer", - "format": "int32" + "rapidId": { + "type": "string" } } }, - "IRefereeConfig": { + "IRapidResultCompareResult": { "required": [ + "rapidId", "_t" ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IRefereeConfigBudgetRefereeConfig" - }, - { - "$ref": "#/components/schemas/IRefereeConfigNaiveRefereeConfig" - }, - { - "$ref": "#/components/schemas/IRefereeConfigNeverEndingRefereeConfig" + "properties": { + "_t": { + "enum": [ + "CompareResult" + ], + "type": "string" }, - { - "$ref": "#/components/schemas/IRefereeConfigProbabilisticAttachCategoryRefereeConfig" + "winners": { + "type": "array", + "items": { + "type": "string" + } }, - { - "$ref": "#/components/schemas/IRefereeConfigQuorumRefereeConfig" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "BudgetRefereeConfig": "#/components/schemas/IRefereeConfigBudgetRefereeConfig", - "NaiveRefereeConfig": "#/components/schemas/IRefereeConfigNaiveRefereeConfig", - "NeverEndingRefereeConfig": "#/components/schemas/IRefereeConfigNeverEndingRefereeConfig", - "ProbabilisticAttachCategoryRefereeConfig": "#/components/schemas/IRefereeConfigProbabilisticAttachCategoryRefereeConfig", - "QuorumRefereeConfig": "#/components/schemas/IRefereeConfigQuorumRefereeConfig" + "rapidId": { + "type": "string" } } }, - "IRefereeConfigBudgetRefereeConfig": { + "IRapidResultFreeTextResult": { "required": [ - "totalBudget", + "answer", + "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "BudgetRefereeConfig" + "FreeTextResult" ], "type": "string" }, - "totalBudget": { - "type": "integer", - "format": "int32" + "answer": { + "type": "string" }, - "totalServeBudget": { - "type": "integer", - "format": "int32" + "rapidId": { + "type": "string" } } }, - "IRefereeConfigNaiveRefereeConfig": { + "IRapidResultLineResult": { "required": [ + "lines", + "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "NaiveRefereeConfig" + "LineResult" ], "type": "string" }, - "guessesRequired": { - "type": "integer", - "format": "int32" + "lines": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LineResult_Line" + } + }, + "rapidId": { + "type": "string" } } }, - "IRefereeConfigNeverEndingRefereeConfig": { + "IRapidResultLocateResult": { "required": [ + "coordinates", + "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "NeverEndingRefereeConfig" + "LocateResult" ], "type": "string" + }, + "coordinates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocateCoordinate" + } + }, + "rapidId": { + "type": "string" } } }, - "IRefereeConfigProbabilisticAttachCategoryRefereeConfig": { + "IRapidResultNamedEntityResult": { "required": [ - "threshold", - "maxVotes", + "classifications", + "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "ProbabilisticAttachCategoryRefereeConfig" + "NamedEntityResult" ], "type": "string" }, - "threshold": { - "type": "number", - "format": "double" + "classifications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NamedClassification" + } }, - "maxVotes": { - "type": "integer", - "format": "int32" + "rapidId": { + "type": "string" } } }, - "IRefereeConfigQuorumRefereeConfig": { + "IRapidResultPolygonResult": { "required": [ - "maxVotes", - "threshold", + "shapes", + "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "QuorumRefereeConfig" + "PolygonResult" ], "type": "string" }, - "maxVotes": { - "type": "integer", - "format": "int32" + "shapes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PolygonResult_Shape" + } }, - "threshold": { - "type": "integer", - "format": "int32" + "rapidId": { + "type": "string" } } }, - "IWorkflowConfig": { + "IRapidResultScrubResult": { "required": [ + "timestamps", + "rapidId", "_t" ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IWorkflowConfigEvaluationWorkflowConfig" - }, - { - "$ref": "#/components/schemas/IWorkflowConfigGroupedRankingWorkflowConfig" + "properties": { + "_t": { + "enum": [ + "ScrubResult" + ], + "type": "string" }, - { - "$ref": "#/components/schemas/IWorkflowConfigRankingWorkflowConfig" + "timestamps": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } }, - { - "$ref": "#/components/schemas/IWorkflowConfigSimpleWorkflowConfig" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "EvaluationWorkflowConfig": "#/components/schemas/IWorkflowConfigEvaluationWorkflowConfig", - "GroupedRankingWorkflowConfig": "#/components/schemas/IWorkflowConfigGroupedRankingWorkflowConfig", - "RankingWorkflowConfig": "#/components/schemas/IWorkflowConfigRankingWorkflowConfig", - "SimpleWorkflowConfig": "#/components/schemas/IWorkflowConfigSimpleWorkflowConfig" + "rapidId": { + "type": "string" } } }, - "IWorkflowConfigEvaluationWorkflowConfig": { + "IRapidResultSkipResult": { "required": [ - "validationSetId", - "referee", - "shouldAcceptIncorrect", + "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "EvaluationWorkflowConfig" + "SkipResult" ], "type": "string" }, - "validationSetId": { + "rapidId": { "type": "string" - }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "shouldAcceptIncorrect": { - "type": "boolean" - }, - "featureFlags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } } } }, - "IWorkflowConfigGroupedRankingWorkflowConfig": { + "IRapidResultTranscriptionResult": { "required": [ - "criteria", - "referee", - "targetCountryCodes", - "maxParallelism", + "selectedWords", + "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "GroupedRankingWorkflowConfig" + "TranscriptionResult" ], "type": "string" }, - "criteria": { - "type": "string" - }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "targetCountryCodes": { + "selectedWords": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/TranscriptionWord" } }, - "maxParallelism": { - "type": "integer", - "format": "int32" - }, - "contexts": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "nullable": true, - "deprecated": true - }, - "contextAssets": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IAsset" - }, - "nullable": true, - "deprecated": true - }, - "eloConfig": { - "allOf": [ - { - "$ref": "#/components/schemas/EloConfig" - } - ], - "deprecated": true - }, - "rankingConfig": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IRankingConfig" - } - ] - }, - "pairMakerConfig": { - "$ref": "#/components/schemas/IPairMakerConfig" - }, - "featureFlags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } + "rapidId": { + "type": "string" } } }, - "IWorkflowConfigRankingWorkflowConfig": { + "IRefereeInfo": { "required": [ - "criteria", - "referee", "_t" ], - "properties": { - "_t": { - "enum": [ - "RankingWorkflowConfig" - ], - "type": "string" - }, - "criteria": { - "type": "string" - }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "context": { - "type": "string", - "nullable": true - }, - "contextAsset": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IAsset" - } - ] - }, - "eloConfig": { - "allOf": [ - { - "$ref": "#/components/schemas/EloConfig" - } - ], - "deprecated": true + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IRefereeInfoQuorumRefereeInfo" }, - "rankingConfig": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IRankingConfig" - } - ] + { + "$ref": "#/components/schemas/IRefereeInfoProbabilisticAttachCategoryRefereeInfo" }, - "pairMakerConfig": { - "$ref": "#/components/schemas/IPairMakerConfig" + { + "$ref": "#/components/schemas/IRefereeInfoNeverEndingRefereeInfo" }, - "featureFlags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } + { + "$ref": "#/components/schemas/IRefereeInfoNaiveRefereeInfo" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "QuorumRefereeInfo": "#/components/schemas/IRefereeInfoQuorumRefereeInfo", + "ProbabilisticAttachCategoryRefereeInfo": "#/components/schemas/IRefereeInfoProbabilisticAttachCategoryRefereeInfo", + "NeverEndingRefereeInfo": "#/components/schemas/IRefereeInfoNeverEndingRefereeInfo", + "NaiveRefereeInfo": "#/components/schemas/IRefereeInfoNaiveRefereeInfo" } } }, - "IWorkflowConfigSimpleWorkflowConfig": { + "IRefereeInfoNaiveRefereeInfo": { "required": [ - "referee", - "blueprint", "_t" ], "properties": { "_t": { "enum": [ - "SimpleWorkflowConfig" + "NaiveRefereeInfo" ], "type": "string" }, - "referee": { - "$ref": "#/components/schemas/IRefereeConfig" - }, - "blueprint": { - "$ref": "#/components/schemas/IRapidBlueprint" - }, - "batchSize": { + "guessAmountThreshold": { "type": "integer", "format": "int32" }, - "featureFlags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } + "serveThreshold": { + "type": "integer", + "format": "int32" } } }, - "PreliminaryDownloadModel": { - "type": "object", - "properties": { - "sendEmail": { - "type": "boolean", - "description": "Whether to email the user when the download is ready." - } - }, - "description": "The model for creating a preliminary download." - }, - "StartPreliminaryDownloadResult": { + "IRefereeInfoNeverEndingRefereeInfo": { "required": [ - "downloadId" + "_t" ], - "type": "object", "properties": { - "downloadId": { + "_t": { + "enum": [ + "NeverEndingRefereeInfo" + ], "type": "string" } } }, - "AddUserResponseResult": { + "IRefereeInfoProbabilisticAttachCategoryRefereeInfo": { "required": [ - "isAccepted", - "userScore" + "threshold", + "maxVotes", + "_t" ], - "type": "object", "properties": { - "isAccepted": { - "type": "boolean" - }, - "validationTruth": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/IValidationTruth" - } - ] - }, - "explanation": { - "oneOf": [ - { - "nullable": true - }, - { - "$ref": "#/components/schemas/TranslatedString" - } - ] + "_t": { + "enum": [ + "ProbabilisticAttachCategoryRefereeInfo" + ], + "type": "string" }, - "userScore": { + "threshold": { "type": "number", "format": "double" + }, + "maxVotes": { + "type": "integer", + "format": "int32" } } }, - "AreRapidsActiveResult": { - "required": [ - "isValid" - ], - "type": "object", - "properties": { - "isValid": { - "type": "boolean" - } - } - }, - "ClassifyPayload": { + "IRefereeInfoQuorumRefereeInfo": { "required": [ - "categories", - "title" + "maxVotes", + "threshold", + "_t" ], - "type": "object", "properties": { - "categories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ClassifyPayload_Category" - } - }, - "title": { + "_t": { + "enum": [ + "QuorumRefereeInfo" + ], "type": "string" + }, + "maxVotes": { + "type": "integer", + "format": "int32" + }, + "threshold": { + "type": "integer", + "format": "int32" } } }, - "CreateDemographicRapidModel": { + "IValidationTruth": { "required": [ - "key", - "payload" + "_t" ], "type": "object", - "properties": { - "key": { - "type": "string", - "description": "The identifier of the demographic classification." + "oneOf": [ + { + "$ref": "#/components/schemas/IValidationTruthTranscriptionTruth" }, - "payload": { - "allOf": [ - { - "$ref": "#/components/schemas/ClassifyPayload" - } - ], - "description": "The payload for the classification." + { + "$ref": "#/components/schemas/IValidationTruthScrubTruth" }, - "featureFlags": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - }, - "nullable": true - } - ], - "description": "Optional feature flags to apply to the rapid." + { + "$ref": "#/components/schemas/IValidationTruthPolygonTruth" }, - "asset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - } - ], - "description": "An optional asset to associate with the rapid." + { + "$ref": "#/components/schemas/IValidationTruthNamedEntityTruth" }, - "context": { - "type": "string", - "description": "An optional text context to show to the user.", - "nullable": true + { + "$ref": "#/components/schemas/IValidationTruthLocateBoxTruth" }, - "contextAsset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetInput" - } - ], - "description": "An optional asset to use as context to show to the user." + { + "$ref": "#/components/schemas/IValidationTruthLineTruth" + }, + { + "$ref": "#/components/schemas/IValidationTruthEmptyValidationTruth" + }, + { + "$ref": "#/components/schemas/IValidationTruthCompareTruth" + }, + { + "$ref": "#/components/schemas/IValidationTruthMultiCompareTruth" + }, + { + "$ref": "#/components/schemas/IValidationTruthSkipTruth" + }, + { + "$ref": "#/components/schemas/IValidationTruthAttachCategoryTruth" + }, + { + "$ref": "#/components/schemas/IValidationTruthBoundingBoxTruth" } - }, - "description": "The model for creating a demographic rapid." + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "TranscriptionTruth": "#/components/schemas/IValidationTruthTranscriptionTruth", + "ScrubTruth": "#/components/schemas/IValidationTruthScrubTruth", + "PolygonTruth": "#/components/schemas/IValidationTruthPolygonTruth", + "NamedEntityTruth": "#/components/schemas/IValidationTruthNamedEntityTruth", + "LocateBoxTruth": "#/components/schemas/IValidationTruthLocateBoxTruth", + "LineTruth": "#/components/schemas/IValidationTruthLineTruth", + "EmptyValidationTruth": "#/components/schemas/IValidationTruthEmptyValidationTruth", + "CompareTruth": "#/components/schemas/IValidationTruthCompareTruth", + "MultiCompareTruth": "#/components/schemas/IValidationTruthMultiCompareTruth", + "SkipTruth": "#/components/schemas/IValidationTruthSkipTruth", + "AttachCategoryTruth": "#/components/schemas/IValidationTruthAttachCategoryTruth", + "BoundingBoxTruth": "#/components/schemas/IValidationTruthBoundingBoxTruth" + } + } }, - "CreateRapidResult": { + "IValidationTruthAttachCategoryTruth": { "required": [ - "rapidId" + "correctCategories", + "_t" ], - "type": "object", "properties": { - "rapidId": { + "_t": { + "enum": [ + "AttachCategoryTruth" + ], "type": "string" + }, + "correctCategories": { + "type": "array", + "items": { + "type": "string" + } } } }, - "CreateValidationFeedbackEndpoint_Input": { + "IValidationTruthBoundingBoxTruth": { "required": [ - "feedback" + "xMin", + "yMin", + "xMax", + "yMax", + "_t" ], - "type": "object", "properties": { - "feedback": { - "type": "string", - "description": "The feedback text." + "_t": { + "enum": [ + "BoundingBoxTruth" + ], + "type": "string" + }, + "xMin": { + "type": "number", + "format": "double" + }, + "yMin": { + "type": "number", + "format": "double" + }, + "xMax": { + "type": "number", + "format": "double" + }, + "yMax": { + "type": "number", + "format": "double" } } }, - "GetPublicResponsesResult": { + "IValidationTruthCompareTruth": { "required": [ - "responses" + "winnerId", + "_t" ], - "type": "object", "properties": { - "responses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetPublicResponsesResult_Response" - } + "_t": { + "enum": [ + "CompareTruth" + ], + "type": "string" + }, + "winnerId": { + "type": "string" } } }, - "GetPublicResponsesResult_Response": { + "IValidationTruthEmptyValidationTruth": { "required": [ - "id", - "userId", - "country" + "_t" ], - "type": "object", "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "country": { + "_t": { + "enum": [ + "EmptyValidationTruth" + ], "type": "string" - }, - "age": { - "type": "string", - "nullable": true - }, - "occupation": { - "type": "string", - "nullable": true - }, - "gender": { - "type": "string", - "nullable": true } } }, - "GetResponsesForRapidResult": { + "IValidationTruthLineTruth": { "required": [ - "rapidId", - "asset", - "responses", - "state" + "_t" ], - "type": "object", "properties": { - "rapidId": { + "_t": { + "enum": [ + "LineTruth" + ], "type": "string" - }, - "asset": { - "$ref": "#/components/schemas/IAssetModel" - }, - "responses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetResponsesForRapidResult_Response" - } - }, - "state": { - "$ref": "#/components/schemas/RapidState" } } }, - "GetResponsesForRapidResult_Response": { + "IValidationTruthLocateBoxTruth": { "required": [ - "id", - "userId", - "country", - "result", - "userScore", - "userScores", - "demographicInformation" + "boundingBoxes", + "_t" ], - "type": "object", "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "country": { + "_t": { + "enum": [ + "LocateBoxTruth" + ], "type": "string" }, - "result": { - "$ref": "#/components/schemas/IRapidResult" + "boundingBoxes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BoxShape" + } }, - "userScore": { + "requiredPrecision": { "type": "number", "format": "double" }, - "userScores": { - "type": "object", - "additionalProperties": { - "type": "number", - "format": "double" - } - }, - "demographicInformation": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "InspectReportResult": { - "type": "object", - "properties": { - "dump": { - "type": "string", - "nullable": true + "requiredCompleteness": { + "type": "number", + "format": "double" } } }, - "IRapidResult": { + "IValidationTruthModel": { "required": [ "_t" ], "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/IRapidResultTranscriptionResult" + "$ref": "#/components/schemas/IValidationTruthModelAttachCategoryTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultScrubResult" + "$ref": "#/components/schemas/IValidationTruthModelBoundingBoxTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultPolygonResult" + "$ref": "#/components/schemas/IValidationTruthModelClassifyTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultNamedEntityResult" + "$ref": "#/components/schemas/IValidationTruthModelCompareTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultLocateResult" + "$ref": "#/components/schemas/IValidationTruthModelEmptyValidationTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultLineResult" + "$ref": "#/components/schemas/IValidationTruthModelLineTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultFreeTextResult" + "$ref": "#/components/schemas/IValidationTruthModelLocateBoxTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultCompareResult" + "$ref": "#/components/schemas/IValidationTruthModelMultiCompareTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultSkipResult" + "$ref": "#/components/schemas/IValidationTruthModelNamedEntityTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultAttachCategoryResult" + "$ref": "#/components/schemas/IValidationTruthModelPolygonTruthModel" }, { - "$ref": "#/components/schemas/IRapidResultBoundingBoxResult" + "$ref": "#/components/schemas/IValidationTruthModelScrubTruthModel" + }, + { + "$ref": "#/components/schemas/IValidationTruthModelSkipTruthModel" + }, + { + "$ref": "#/components/schemas/IValidationTruthModelTranscriptionTruthModel" } ], "discriminator": { "propertyName": "_t", "mapping": { - "TranscriptionResult": "#/components/schemas/IRapidResultTranscriptionResult", - "ScrubResult": "#/components/schemas/IRapidResultScrubResult", - "PolygonResult": "#/components/schemas/IRapidResultPolygonResult", - "NamedEntityResult": "#/components/schemas/IRapidResultNamedEntityResult", - "LocateResult": "#/components/schemas/IRapidResultLocateResult", - "LineResult": "#/components/schemas/IRapidResultLineResult", - "FreeTextResult": "#/components/schemas/IRapidResultFreeTextResult", - "CompareResult": "#/components/schemas/IRapidResultCompareResult", - "SkipResult": "#/components/schemas/IRapidResultSkipResult", - "AttachCategoryResult": "#/components/schemas/IRapidResultAttachCategoryResult", - "BoundingBoxResult": "#/components/schemas/IRapidResultBoundingBoxResult" + "AttachCategoryTruth": "#/components/schemas/IValidationTruthModelAttachCategoryTruthModel", + "BoundingBoxTruth": "#/components/schemas/IValidationTruthModelBoundingBoxTruthModel", + "ClassifyTruth": "#/components/schemas/IValidationTruthModelClassifyTruthModel", + "CompareTruth": "#/components/schemas/IValidationTruthModelCompareTruthModel", + "EmptyValidationTruth": "#/components/schemas/IValidationTruthModelEmptyValidationTruthModel", + "LineTruth": "#/components/schemas/IValidationTruthModelLineTruthModel", + "LocateBoxTruth": "#/components/schemas/IValidationTruthModelLocateBoxTruthModel", + "MultiCompareTruth": "#/components/schemas/IValidationTruthModelMultiCompareTruthModel", + "NamedEntityTruth": "#/components/schemas/IValidationTruthModelNamedEntityTruthModel", + "PolygonTruth": "#/components/schemas/IValidationTruthModelPolygonTruthModel", + "ScrubTruth": "#/components/schemas/IValidationTruthModelScrubTruthModel", + "SkipTruth": "#/components/schemas/IValidationTruthModelSkipTruthModel", + "TranscriptionTruth": "#/components/schemas/IValidationTruthModelTranscriptionTruthModel" } } }, - "IRapidResultAttachCategoryResult": { + "IValidationTruthModelAttachCategoryTruthModel": { "required": [ - "category", - "rapidId", + "correctCategories", "_t" ], "properties": { "_t": { "enum": [ - "AttachCategoryResult" + "AttachCategoryTruth" ], "type": "string" }, - "category": { - "type": "string" - }, - "rapidId": { - "type": "string" + "correctCategories": { + "type": "array", + "items": { + "type": "string" + } } } }, - "IRapidResultBoundingBoxResult": { + "IValidationTruthModelBoundingBoxTruthModel": { "required": [ - "boundingBoxes", - "rapidId", + "xMin", + "yMin", + "xMax", + "yMax", "_t" ], "properties": { "_t": { "enum": [ - "BoundingBoxResult" + "BoundingBoxTruth" ], "type": "string" }, - "boundingBoxes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BoxShape" - } + "xMin": { + "type": "number", + "format": "double" }, - "rapidId": { - "type": "string" + "yMin": { + "type": "number", + "format": "double" + }, + "xMax": { + "type": "number", + "format": "double" + }, + "yMax": { + "type": "number", + "format": "double" } } }, - "IRapidResultCompareResult": { + "IValidationTruthModelClassifyTruthModel": { "required": [ - "rapidId", + "correctCategories", "_t" ], "properties": { "_t": { "enum": [ - "CompareResult" + "ClassifyTruth" ], "type": "string" }, - "winners": { + "correctCategories": { "type": "array", "items": { "type": "string" } - }, - "rapidId": { - "type": "string" } } }, - "IRapidResultFreeTextResult": { + "IValidationTruthModelCompareTruthModel": { "required": [ - "answer", - "rapidId", + "winnerId", "_t" ], "properties": { "_t": { "enum": [ - "FreeTextResult" + "CompareTruth" ], "type": "string" }, - "answer": { + "winnerId": { "type": "string" - }, - "rapidId": { + } + } + }, + "IValidationTruthModelEmptyValidationTruthModel": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "EmptyValidationTruth" + ], "type": "string" } } }, - "IRapidResultLineResult": { + "IValidationTruthModelLineTruthModel": { "required": [ - "lines", - "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "LineResult" + "LineTruth" + ], + "type": "string" + } + } + }, + "IValidationTruthModelLocateBoxTruthModel": { + "required": [ + "boundingBoxes", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "LocateBoxTruth" ], "type": "string" }, - "lines": { + "boundingBoxes": { "type": "array", "items": { - "$ref": "#/components/schemas/LineResult_Line" + "$ref": "#/components/schemas/BoxShape" } }, - "rapidId": { - "type": "string" + "requiredPrecision": { + "type": "number", + "format": "double" + }, + "requiredCompleteness": { + "type": "number", + "format": "double" } } }, - "IRapidResultLocateResult": { + "IValidationTruthModelMultiCompareTruthModel": { "required": [ - "coordinates", - "rapidId", + "correctCombinations", "_t" ], "properties": { "_t": { "enum": [ - "LocateResult" + "MultiCompareTruth" ], "type": "string" }, - "coordinates": { + "correctCombinations": { "type": "array", "items": { - "$ref": "#/components/schemas/LocateCoordinate" + "type": "array", + "items": { + "type": "string" + } } - }, - "rapidId": { - "type": "string" } } }, - "IRapidResultNamedEntityResult": { + "IValidationTruthModelNamedEntityTruthModel": { "required": [ "classifications", - "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "NamedEntityResult" + "NamedEntityTruth" ], "type": "string" }, @@ -28690,208 +28569,205 @@ "items": { "$ref": "#/components/schemas/NamedClassification" } - }, - "rapidId": { + } + } + }, + "IValidationTruthModelPolygonTruthModel": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "PolygonTruth" + ], "type": "string" } } }, - "IRapidResultPolygonResult": { + "IValidationTruthModelScrubTruthModel": { "required": [ - "shapes", - "rapidId", + "validRanges", "_t" ], "properties": { "_t": { "enum": [ - "PolygonResult" + "ScrubTruth" ], "type": "string" }, - "shapes": { + "validRanges": { "type": "array", "items": { - "$ref": "#/components/schemas/PolygonResult_Shape" + "$ref": "#/components/schemas/ScrubRange" } - }, - "rapidId": { - "type": "string" } } }, - "IRapidResultScrubResult": { + "IValidationTruthModelSkipTruthModel": { "required": [ - "timestamps", - "rapidId", "_t" ], "properties": { "_t": { "enum": [ - "ScrubResult" + "SkipTruth" ], "type": "string" - }, - "timestamps": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - }, - "rapidId": { - "type": "string" } } }, - "IRapidResultSkipResult": { + "IValidationTruthModelTranscriptionTruthModel": { "required": [ - "rapidId", + "correctWords", "_t" ], "properties": { "_t": { "enum": [ - "SkipResult" + "TranscriptionTruth" ], "type": "string" }, - "rapidId": { - "type": "string" + "correctWords": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TranscriptionWord" + } + }, + "strictGrading": { + "type": "boolean", + "nullable": true + }, + "requiredPrecision": { + "type": "number", + "format": "double" + }, + "requiredCompleteness": { + "type": "number", + "format": "double" } } }, - "IRapidResultTranscriptionResult": { + "IValidationTruthMultiCompareTruth": { "required": [ - "selectedWords", - "rapidId", + "correctCombinations", "_t" ], "properties": { "_t": { "enum": [ - "TranscriptionResult" + "MultiCompareTruth" ], "type": "string" }, - "selectedWords": { + "correctCombinations": { "type": "array", "items": { - "$ref": "#/components/schemas/TranscriptionWord" + "type": "array", + "items": { + "type": "string" + } } - }, - "rapidId": { - "type": "string" } } }, - "IRefereeInfo": { + "IValidationTruthNamedEntityTruth": { "required": [ + "classifications", "_t" ], - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/IRefereeInfoQuorumRefereeInfo" - }, - { - "$ref": "#/components/schemas/IRefereeInfoProbabilisticAttachCategoryRefereeInfo" - }, - { - "$ref": "#/components/schemas/IRefereeInfoNeverEndingRefereeInfo" + "properties": { + "_t": { + "enum": [ + "NamedEntityTruth" + ], + "type": "string" }, - { - "$ref": "#/components/schemas/IRefereeInfoNaiveRefereeInfo" - } - ], - "discriminator": { - "propertyName": "_t", - "mapping": { - "QuorumRefereeInfo": "#/components/schemas/IRefereeInfoQuorumRefereeInfo", - "ProbabilisticAttachCategoryRefereeInfo": "#/components/schemas/IRefereeInfoProbabilisticAttachCategoryRefereeInfo", - "NeverEndingRefereeInfo": "#/components/schemas/IRefereeInfoNeverEndingRefereeInfo", - "NaiveRefereeInfo": "#/components/schemas/IRefereeInfoNaiveRefereeInfo" + "classifications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NamedClassification" + } } } }, - "IRefereeInfoNaiveRefereeInfo": { + "IValidationTruthPolygonTruth": { "required": [ "_t" ], "properties": { "_t": { "enum": [ - "NaiveRefereeInfo" + "PolygonTruth" ], "type": "string" - }, - "guessAmountThreshold": { - "type": "integer", - "format": "int32" - }, - "serveThreshold": { - "type": "integer", - "format": "int32" } } }, - "IRefereeInfoNeverEndingRefereeInfo": { + "IValidationTruthScrubTruth": { "required": [ + "validRanges", "_t" ], "properties": { "_t": { "enum": [ - "NeverEndingRefereeInfo" + "ScrubTruth" ], "type": "string" + }, + "validRanges": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScrubRange" + } } } }, - "IRefereeInfoProbabilisticAttachCategoryRefereeInfo": { + "IValidationTruthSkipTruth": { "required": [ - "threshold", - "maxVotes", "_t" ], "properties": { "_t": { "enum": [ - "ProbabilisticAttachCategoryRefereeInfo" + "SkipTruth" ], "type": "string" - }, - "threshold": { - "type": "number", - "format": "double" - }, - "maxVotes": { - "type": "integer", - "format": "int32" } } }, - "IRefereeInfoQuorumRefereeInfo": { + "IValidationTruthTranscriptionTruth": { "required": [ - "maxVotes", - "threshold", + "correctWords", "_t" ], "properties": { "_t": { "enum": [ - "QuorumRefereeInfo" + "TranscriptionTruth" ], "type": "string" }, - "maxVotes": { - "type": "integer", - "format": "int32" + "correctWords": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TranscriptionWord" + } }, - "threshold": { - "type": "integer", - "format": "int32" + "strictGrading": { + "type": "boolean", + "nullable": true + }, + "requiredPrecision": { + "type": "number", + "format": "double" + }, + "requiredCompleteness": { + "type": "number", + "format": "double" } } }, @@ -28948,6 +28824,27 @@ } } }, + "NamedClassification": { + "required": [ + "start", + "end", + "classification" + ], + "type": "object", + "properties": { + "start": { + "type": "integer", + "format": "int32" + }, + "end": { + "type": "integer", + "format": "int32" + }, + "classification": { + "type": "string" + } + } + }, "PagedResultOfQueryValidationRapidEligibilityResult": { "required": [ "total", @@ -29117,7 +29014,7 @@ "page": { "allOf": [ { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ], "description": "pagination information" @@ -29293,6 +29190,17 @@ }, "description": "The model for a Rapid skipped." }, + "RapidState": { + "enum": [ + "Labeling", + "Paused", + "Incomplete", + "Flagged", + "Done", + "None", + "Rejected" + ] + }, "ReportModel": { "required": [ "issue" @@ -29320,6 +29228,39 @@ }, "description": "The model for reporting an issue with a rapid." }, + "ScrubRange": { + "required": [ + "start", + "end" + ], + "type": "object", + "properties": { + "start": { + "type": "integer", + "format": "int32" + }, + "end": { + "type": "integer", + "format": "int32" + } + } + }, + "TranscriptionWord": { + "required": [ + "word", + "wordIndex" + ], + "type": "object", + "properties": { + "word": { + "type": "string" + }, + "wordIndex": { + "type": "integer", + "format": "int32" + } + } + }, "TranslatedString": { "required": [ "wasTranslated", @@ -29909,7 +29850,7 @@ "page": { "allOf": [ { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ], "description": "The size of the page and the page number to display." @@ -29929,11 +29870,7 @@ "sortCriteria": { "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/SortCriterion" - }, - "nullable": true + "$ref": "#/components/schemas/SortCriteria" } ], "description": "A list of criteria to sort the results by." @@ -29970,7 +29907,7 @@ "page": { "allOf": [ { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ], "description": "The size of the page and the page number to display." @@ -29978,11 +29915,7 @@ "sortCriteria": { "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/SortCriterion" - }, - "nullable": true + "$ref": "#/components/schemas/SortCriteria" } ], "description": "A list of criteria to sort the results by." @@ -30111,7 +30044,7 @@ "page": { "allOf": [ { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ], "description": "The size of the page and the page number to display." @@ -30131,11 +30064,7 @@ "sortCriteria": { "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/SortCriterion" - }, - "nullable": true + "$ref": "#/components/schemas/SortCriteria" } ], "description": "A list of criteria to sort the results by." @@ -30666,6 +30595,18 @@ } } }, + "SortCriteria": { + "type": "object", + "properties": { + "criteria": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SortCriterion" + }, + "nullable": true + } + } + }, "WorkflowState": { "enum": [ "Created", @@ -30719,8 +30660,7 @@ "name": "Rapidata Audience API", "tags": [ "Audience", - "Examples", - "Rapids" + "Examples" ] }, { diff --git a/openapi/schemas/validation.openapi.json b/openapi/schemas/validation.openapi.json index a8905b98..b046c849 100644 --- a/openapi/schemas/validation.openapi.json +++ b/openapi/schemas/validation.openapi.json @@ -807,7 +807,8 @@ "type": "array", "items": { "$ref": "#/components/schemas/Filter" - } + }, + "nullable": true } } }, @@ -2203,7 +2204,7 @@ } } }, - "PageInfo": { + "Pagination": { "type": "object", "properties": { "index": { @@ -2261,7 +2262,7 @@ "nullable": true }, { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ] }, @@ -2315,6 +2316,9 @@ ] }, "RootFilter": { + "required": [ + "filters" + ], "type": "object", "properties": { "filters": { @@ -2347,8 +2351,7 @@ }, "SortCriterion": { "required": [ - "propertyName", - "direction" + "propertyName" ], "type": "object", "properties": { diff --git a/openapi/schemas/workflow.openapi.json b/openapi/schemas/workflow.openapi.json index f73f0d8c..c4490dc7 100644 --- a/openapi/schemas/workflow.openapi.json +++ b/openapi/schemas/workflow.openapi.json @@ -582,7 +582,8 @@ "type": "array", "items": { "$ref": "#/components/schemas/Filter" - } + }, + "nullable": true } } }, @@ -626,7 +627,7 @@ "page": { "allOf": [ { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ], "description": "The size of the page and the page number to display." @@ -646,11 +647,7 @@ "sortCriteria": { "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/SortCriterion" - }, - "nullable": true + "$ref": "#/components/schemas/SortCriteria" } ], "description": "A list of criteria to sort the results by." @@ -687,7 +684,7 @@ "page": { "allOf": [ { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ], "description": "The size of the page and the page number to display." @@ -695,11 +692,7 @@ "sortCriteria": { "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/SortCriterion" - }, - "nullable": true + "$ref": "#/components/schemas/SortCriteria" } ], "description": "A list of criteria to sort the results by." @@ -828,7 +821,7 @@ "page": { "allOf": [ { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ], "description": "The size of the page and the page number to display." @@ -848,11 +841,7 @@ "sortCriteria": { "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/SortCriterion" - }, - "nullable": true + "$ref": "#/components/schemas/SortCriteria" } ], "description": "A list of criteria to sort the results by." @@ -2859,7 +2848,7 @@ } } }, - "PageInfo": { + "Pagination": { "type": "object", "properties": { "index": { @@ -2912,7 +2901,7 @@ "nullable": true }, { - "$ref": "#/components/schemas/PageInfo" + "$ref": "#/components/schemas/Pagination" } ] }, @@ -2947,6 +2936,9 @@ ] }, "RootFilter": { + "required": [ + "filters" + ], "type": "object", "properties": { "filters": { @@ -2960,10 +2952,21 @@ } } }, + "SortCriteria": { + "type": "object", + "properties": { + "criteria": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SortCriterion" + }, + "nullable": true + } + } + }, "SortCriterion": { "required": [ - "propertyName", - "direction" + "propertyName" ], "type": "object", "properties": { diff --git a/src/rapidata/api_client/__init__.py b/src/rapidata/api_client/__init__.py index 675f8dd2..149010f6 100644 --- a/src/rapidata/api_client/__init__.py +++ b/src/rapidata/api_client/__init__.py @@ -62,7 +62,6 @@ "RankingWorkflowApi": "rapidata.api_client.api.ranking_workflow_api", "RapidApi": "rapidata.api_client.api.rapid_api", "RapidataIdentityAPIApi": "rapidata.api_client.api.rapidata_identity_api_api", - "RapidsApi": "rapidata.api_client.api.rapids_api", "SampleApi": "rapidata.api_client.api.sample_api", "SimpleWorkflowApi": "rapidata.api_client.api.simple_workflow_api", "SurveyApi": "rapidata.api_client.api.survey_api", diff --git a/src/rapidata/api_client/api/__init__.py b/src/rapidata/api_client/api/__init__.py index 464b3fcd..2ed973b5 100644 --- a/src/rapidata/api_client/api/__init__.py +++ b/src/rapidata/api_client/api/__init__.py @@ -34,7 +34,6 @@ from rapidata.api_client.api.ranking_workflow_api import RankingWorkflowApi from rapidata.api_client.api.rapid_api import RapidApi from rapidata.api_client.api.rapidata_identity_api_api import RapidataIdentityAPIApi -from rapidata.api_client.api.rapids_api import RapidsApi from rapidata.api_client.api.sample_api import SampleApi from rapidata.api_client.api.simple_workflow_api import SimpleWorkflowApi from rapidata.api_client.api.survey_api import SurveyApi diff --git a/src/rapidata/api_client/api/audience_api.py b/src/rapidata/api_client/api/audience_api.py index 29c24080..1088ee48 100644 --- a/src/rapidata/api_client/api/audience_api.py +++ b/src/rapidata/api_client/api/audience_api.py @@ -16,18 +16,18 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictStr -from typing import Optional +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import List, Optional from typing_extensions import Annotated -from rapidata.api_client.models.create_audience_request import CreateAudienceRequest -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.audiences_get_name_parameter import AudiencesGetNameParameter +from rapidata.api_client.models.create_audience_endpoint_input import CreateAudienceEndpointInput +from rapidata.api_client.models.create_audience_endpoint_output import CreateAudienceEndpointOutput +from rapidata.api_client.models.get_audience_by_id_endpoint_output import GetAudienceByIdEndpointOutput from rapidata.api_client.models.get_audience_user_state_metrics_result import GetAudienceUserStateMetricsResult -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.query_model import QueryModel +from rapidata.api_client.models.query_audiences_endpoint_paged_result_of_output import QueryAudiencesEndpointPagedResultOfOutput from rapidata.api_client.models.recreate_external_audiences_endpoint_input import RecreateExternalAudiencesEndpointInput -from rapidata.api_client.models.update_audience_request import UpdateAudienceRequest +from rapidata.api_client.models.update_audience_endpoint_input import UpdateAudienceEndpointInput from rapidata.api_client.models.update_boost_config_endpoint_input import UpdateBoostConfigEndpointInput from rapidata.api_client.api_client import ApiClient, RequestSerialized @@ -617,7 +617,7 @@ def _audience_audience_id_delete_serialize( @validate_call def audience_audience_id_get( self, - audience_id: Annotated[StrictStr, Field(description="The id of the audience to get.")], + audience_id: Annotated[StrictStr, Field(description="The unique identifier of the audience.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -630,11 +630,11 @@ def audience_audience_id_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetAudienceByIdResult: - """Gets an audience by its Id. + ) -> GetAudienceByIdEndpointOutput: + """Returns the audience with the specified id. - :param audience_id: The id of the audience to get. (required) + :param audience_id: The unique identifier of the audience. (required) :type audience_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -667,7 +667,10 @@ def audience_audience_id_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAudienceByIdResult", + '200': "GetAudienceByIdEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, } response_data = self.api_client.call_api( *_param, @@ -683,7 +686,7 @@ def audience_audience_id_get( @validate_call def audience_audience_id_get_with_http_info( self, - audience_id: Annotated[StrictStr, Field(description="The id of the audience to get.")], + audience_id: Annotated[StrictStr, Field(description="The unique identifier of the audience.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -696,11 +699,11 @@ def audience_audience_id_get_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetAudienceByIdResult]: - """Gets an audience by its Id. + ) -> ApiResponse[GetAudienceByIdEndpointOutput]: + """Returns the audience with the specified id. - :param audience_id: The id of the audience to get. (required) + :param audience_id: The unique identifier of the audience. (required) :type audience_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -733,7 +736,10 @@ def audience_audience_id_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAudienceByIdResult", + '200': "GetAudienceByIdEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, } response_data = self.api_client.call_api( *_param, @@ -749,7 +755,7 @@ def audience_audience_id_get_with_http_info( @validate_call def audience_audience_id_get_without_preload_content( self, - audience_id: Annotated[StrictStr, Field(description="The id of the audience to get.")], + audience_id: Annotated[StrictStr, Field(description="The unique identifier of the audience.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -763,10 +769,10 @@ def audience_audience_id_get_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Gets an audience by its Id. + """Returns the audience with the specified id. - :param audience_id: The id of the audience to get. (required) + :param audience_id: The unique identifier of the audience. (required) :type audience_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -799,7 +805,10 @@ def audience_audience_id_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAudienceByIdResult", + '200': "GetAudienceByIdEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, } response_data = self.api_client.call_api( *_param, @@ -844,9 +853,7 @@ def _audience_audience_id_get_serialize( if 'Accept' not in _header_params: _header_params['Accept'] = self.api_client.select_header_accept( [ - 'text/plain', - 'application/json', - 'text/json' + 'application/json' ] ) @@ -1148,8 +1155,8 @@ def _audience_audience_id_jobs_get_serialize( @validate_call def audience_audience_id_patch( self, - audience_id: StrictStr, - update_audience_request: UpdateAudienceRequest, + audience_id: Annotated[StrictStr, Field(description="The unique identifier of the audience to update.")], + update_audience_endpoint_input: Annotated[UpdateAudienceEndpointInput, Field(description="The audience properties to update.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1166,10 +1173,10 @@ def audience_audience_id_patch( """Patches an existing audience. - :param audience_id: (required) + :param audience_id: The unique identifier of the audience to update. (required) :type audience_id: str - :param update_audience_request: (required) - :type update_audience_request: UpdateAudienceRequest + :param update_audience_endpoint_input: The audience properties to update. (required) + :type update_audience_endpoint_input: UpdateAudienceEndpointInput :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 @@ -1194,7 +1201,7 @@ def audience_audience_id_patch( _param = self._audience_audience_id_patch_serialize( audience_id=audience_id, - update_audience_request=update_audience_request, + update_audience_endpoint_input=update_audience_endpoint_input, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1203,6 +1210,9 @@ def audience_audience_id_patch( _response_types_map: Dict[str, Optional[str]] = { '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, } response_data = self.api_client.call_api( *_param, @@ -1218,8 +1228,8 @@ def audience_audience_id_patch( @validate_call def audience_audience_id_patch_with_http_info( self, - audience_id: StrictStr, - update_audience_request: UpdateAudienceRequest, + audience_id: Annotated[StrictStr, Field(description="The unique identifier of the audience to update.")], + update_audience_endpoint_input: Annotated[UpdateAudienceEndpointInput, Field(description="The audience properties to update.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1236,10 +1246,10 @@ def audience_audience_id_patch_with_http_info( """Patches an existing audience. - :param audience_id: (required) + :param audience_id: The unique identifier of the audience to update. (required) :type audience_id: str - :param update_audience_request: (required) - :type update_audience_request: UpdateAudienceRequest + :param update_audience_endpoint_input: The audience properties to update. (required) + :type update_audience_endpoint_input: UpdateAudienceEndpointInput :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 @@ -1264,7 +1274,7 @@ def audience_audience_id_patch_with_http_info( _param = self._audience_audience_id_patch_serialize( audience_id=audience_id, - update_audience_request=update_audience_request, + update_audience_endpoint_input=update_audience_endpoint_input, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1273,6 +1283,9 @@ def audience_audience_id_patch_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, } response_data = self.api_client.call_api( *_param, @@ -1288,8 +1301,8 @@ def audience_audience_id_patch_with_http_info( @validate_call def audience_audience_id_patch_without_preload_content( self, - audience_id: StrictStr, - update_audience_request: UpdateAudienceRequest, + audience_id: Annotated[StrictStr, Field(description="The unique identifier of the audience to update.")], + update_audience_endpoint_input: Annotated[UpdateAudienceEndpointInput, Field(description="The audience properties to update.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1306,10 +1319,10 @@ def audience_audience_id_patch_without_preload_content( """Patches an existing audience. - :param audience_id: (required) + :param audience_id: The unique identifier of the audience to update. (required) :type audience_id: str - :param update_audience_request: (required) - :type update_audience_request: UpdateAudienceRequest + :param update_audience_endpoint_input: The audience properties to update. (required) + :type update_audience_endpoint_input: UpdateAudienceEndpointInput :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 @@ -1334,7 +1347,7 @@ def audience_audience_id_patch_without_preload_content( _param = self._audience_audience_id_patch_serialize( audience_id=audience_id, - update_audience_request=update_audience_request, + update_audience_endpoint_input=update_audience_endpoint_input, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1343,6 +1356,9 @@ def audience_audience_id_patch_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, } response_data = self.api_client.call_api( *_param, @@ -1354,7 +1370,7 @@ def audience_audience_id_patch_without_preload_content( def _audience_audience_id_patch_serialize( self, audience_id, - update_audience_request, + update_audience_endpoint_input, _request_auth, _content_type, _headers, @@ -1382,10 +1398,17 @@ def _audience_audience_id_patch_serialize( # process the header parameters # process the form parameters # process the body parameter - if update_audience_request is not None: - _body_params = update_audience_request + if update_audience_endpoint_input is not None: + _body_params = update_audience_endpoint_input + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1394,9 +1417,7 @@ def _audience_audience_id_patch_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ - 'application/json', - 'text/json', - 'application/*+json' + 'application/json' ] ) ) @@ -3076,7 +3097,7 @@ def _audience_audience_id_user_metrics_get_serialize( @validate_call def audience_post( self, - create_audience_request: CreateAudienceRequest, + create_audience_endpoint_input: Annotated[CreateAudienceEndpointInput, Field(description="The properties of the audience to create.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3089,13 +3110,12 @@ def audience_post( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CreateAudienceResult: + ) -> CreateAudienceEndpointOutput: """Creates a new empty audience. - An audience is a group of users that are trained to solve particular tasks. - :param create_audience_request: (required) - :type create_audience_request: CreateAudienceRequest + :param create_audience_endpoint_input: The properties of the audience to create. (required) + :type create_audience_endpoint_input: CreateAudienceEndpointInput :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 @@ -3119,7 +3139,7 @@ def audience_post( """ # noqa: E501 _param = self._audience_post_serialize( - create_audience_request=create_audience_request, + create_audience_endpoint_input=create_audience_endpoint_input, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3127,7 +3147,10 @@ def audience_post( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateAudienceResult", + '200': "CreateAudienceEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, } response_data = self.api_client.call_api( *_param, @@ -3143,7 +3166,7 @@ def audience_post( @validate_call def audience_post_with_http_info( self, - create_audience_request: CreateAudienceRequest, + create_audience_endpoint_input: Annotated[CreateAudienceEndpointInput, Field(description="The properties of the audience to create.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3156,13 +3179,12 @@ def audience_post_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CreateAudienceResult]: + ) -> ApiResponse[CreateAudienceEndpointOutput]: """Creates a new empty audience. - An audience is a group of users that are trained to solve particular tasks. - :param create_audience_request: (required) - :type create_audience_request: CreateAudienceRequest + :param create_audience_endpoint_input: The properties of the audience to create. (required) + :type create_audience_endpoint_input: CreateAudienceEndpointInput :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 @@ -3186,7 +3208,7 @@ def audience_post_with_http_info( """ # noqa: E501 _param = self._audience_post_serialize( - create_audience_request=create_audience_request, + create_audience_endpoint_input=create_audience_endpoint_input, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3194,7 +3216,10 @@ def audience_post_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateAudienceResult", + '200': "CreateAudienceEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, } response_data = self.api_client.call_api( *_param, @@ -3210,7 +3235,7 @@ def audience_post_with_http_info( @validate_call def audience_post_without_preload_content( self, - create_audience_request: CreateAudienceRequest, + create_audience_endpoint_input: Annotated[CreateAudienceEndpointInput, Field(description="The properties of the audience to create.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3226,10 +3251,9 @@ def audience_post_without_preload_content( ) -> RESTResponseType: """Creates a new empty audience. - An audience is a group of users that are trained to solve particular tasks. - :param create_audience_request: (required) - :type create_audience_request: CreateAudienceRequest + :param create_audience_endpoint_input: The properties of the audience to create. (required) + :type create_audience_endpoint_input: CreateAudienceEndpointInput :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 @@ -3253,7 +3277,7 @@ def audience_post_without_preload_content( """ # noqa: E501 _param = self._audience_post_serialize( - create_audience_request=create_audience_request, + create_audience_endpoint_input=create_audience_endpoint_input, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3261,7 +3285,10 @@ def audience_post_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateAudienceResult", + '200': "CreateAudienceEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, } response_data = self.api_client.call_api( *_param, @@ -3272,7 +3299,7 @@ def audience_post_without_preload_content( def _audience_post_serialize( self, - create_audience_request, + create_audience_endpoint_input, _request_auth, _content_type, _headers, @@ -3298,17 +3325,15 @@ def _audience_post_serialize( # process the header parameters # process the form parameters # process the body parameter - if create_audience_request is not None: - _body_params = create_audience_request + if create_audience_endpoint_input is not None: + _body_params = create_audience_endpoint_input # set the HTTP header `Accept` if 'Accept' not in _header_params: _header_params['Accept'] = self.api_client.select_header_accept( [ - 'text/plain', - 'application/json', - 'text/json' + 'application/json' ] ) @@ -3319,9 +3344,7 @@ def _audience_post_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ - 'application/json', - 'text/json', - 'application/*+json' + 'application/json' ] ) ) @@ -3356,7 +3379,15 @@ def _audience_post_serialize( @validate_call def audiences_get( self, - request: Optional[QueryModel] = None, + page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, + sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, + name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by name.")] = None, + status: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by status.")] = None, + is_public: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by is_public.")] = None, + is_distilling: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by is_distilling.")] = None, + owner_mail: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by owner_mail.")] = None, + created_at: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by created_at.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3369,12 +3400,28 @@ def audiences_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PagedResultOfQueryAudiencesResult: - """Queries all available audiences. - - - :param request: - :type request: QueryModel + ) -> QueryAudiencesEndpointPagedResultOfOutput: + """Queries all audiences visible to the caller. + + + :param page: The 1-based page index. + :type page: int + :param page_size: The number of items per page. + :type page_size: int + :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). + :type sort: List[str] + :param name: Filter by name. + :type name: AudiencesGetNameParameter + :param status: Filter by status. + :type status: AudiencesGetNameParameter + :param is_public: Filter by is_public. + :type is_public: AudiencesGetNameParameter + :param is_distilling: Filter by is_distilling. + :type is_distilling: AudiencesGetNameParameter + :param owner_mail: Filter by owner_mail. + :type owner_mail: AudiencesGetNameParameter + :param created_at: Filter by created_at. + :type created_at: AudiencesGetNameParameter :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 @@ -3398,7 +3445,15 @@ def audiences_get( """ # noqa: E501 _param = self._audiences_get_serialize( - request=request, + page=page, + page_size=page_size, + sort=sort, + name=name, + status=status, + is_public=is_public, + is_distilling=is_distilling, + owner_mail=owner_mail, + created_at=created_at, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3406,7 +3461,10 @@ def audiences_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PagedResultOfQueryAudiencesResult", + '200': "QueryAudiencesEndpointPagedResultOfOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, } response_data = self.api_client.call_api( *_param, @@ -3422,7 +3480,15 @@ def audiences_get( @validate_call def audiences_get_with_http_info( self, - request: Optional[QueryModel] = None, + page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, + sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, + name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by name.")] = None, + status: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by status.")] = None, + is_public: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by is_public.")] = None, + is_distilling: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by is_distilling.")] = None, + owner_mail: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by owner_mail.")] = None, + created_at: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by created_at.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3435,12 +3501,28 @@ def audiences_get_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PagedResultOfQueryAudiencesResult]: - """Queries all available audiences. - - - :param request: - :type request: QueryModel + ) -> ApiResponse[QueryAudiencesEndpointPagedResultOfOutput]: + """Queries all audiences visible to the caller. + + + :param page: The 1-based page index. + :type page: int + :param page_size: The number of items per page. + :type page_size: int + :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). + :type sort: List[str] + :param name: Filter by name. + :type name: AudiencesGetNameParameter + :param status: Filter by status. + :type status: AudiencesGetNameParameter + :param is_public: Filter by is_public. + :type is_public: AudiencesGetNameParameter + :param is_distilling: Filter by is_distilling. + :type is_distilling: AudiencesGetNameParameter + :param owner_mail: Filter by owner_mail. + :type owner_mail: AudiencesGetNameParameter + :param created_at: Filter by created_at. + :type created_at: AudiencesGetNameParameter :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 @@ -3464,7 +3546,15 @@ def audiences_get_with_http_info( """ # noqa: E501 _param = self._audiences_get_serialize( - request=request, + page=page, + page_size=page_size, + sort=sort, + name=name, + status=status, + is_public=is_public, + is_distilling=is_distilling, + owner_mail=owner_mail, + created_at=created_at, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3472,7 +3562,10 @@ def audiences_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PagedResultOfQueryAudiencesResult", + '200': "QueryAudiencesEndpointPagedResultOfOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, } response_data = self.api_client.call_api( *_param, @@ -3488,7 +3581,15 @@ def audiences_get_with_http_info( @validate_call def audiences_get_without_preload_content( self, - request: Optional[QueryModel] = None, + page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, + sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, + name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by name.")] = None, + status: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by status.")] = None, + is_public: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by is_public.")] = None, + is_distilling: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by is_distilling.")] = None, + owner_mail: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by owner_mail.")] = None, + created_at: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by created_at.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3502,11 +3603,27 @@ def audiences_get_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Queries all available audiences. - - - :param request: - :type request: QueryModel + """Queries all audiences visible to the caller. + + + :param page: The 1-based page index. + :type page: int + :param page_size: The number of items per page. + :type page_size: int + :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). + :type sort: List[str] + :param name: Filter by name. + :type name: AudiencesGetNameParameter + :param status: Filter by status. + :type status: AudiencesGetNameParameter + :param is_public: Filter by is_public. + :type is_public: AudiencesGetNameParameter + :param is_distilling: Filter by is_distilling. + :type is_distilling: AudiencesGetNameParameter + :param owner_mail: Filter by owner_mail. + :type owner_mail: AudiencesGetNameParameter + :param created_at: Filter by created_at. + :type created_at: AudiencesGetNameParameter :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 @@ -3530,7 +3647,15 @@ def audiences_get_without_preload_content( """ # noqa: E501 _param = self._audiences_get_serialize( - request=request, + page=page, + page_size=page_size, + sort=sort, + name=name, + status=status, + is_public=is_public, + is_distilling=is_distilling, + owner_mail=owner_mail, + created_at=created_at, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3538,7 +3663,10 @@ def audiences_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PagedResultOfQueryAudiencesResult", + '200': "QueryAudiencesEndpointPagedResultOfOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, } response_data = self.api_client.call_api( *_param, @@ -3549,7 +3677,15 @@ def audiences_get_without_preload_content( def _audiences_get_serialize( self, - request, + page, + page_size, + sort, + name, + status, + is_public, + is_distilling, + owner_mail, + created_at, _request_auth, _content_type, _headers, @@ -3559,6 +3695,7 @@ def _audiences_get_serialize( _host = None _collection_formats: Dict[str, str] = { + 'sort': 'multi', } _path_params: Dict[str, str] = {} @@ -3572,10 +3709,66 @@ def _audiences_get_serialize( # process the path parameters # process the query parameters - if request is not None: + if page is not None: + + _query_params.append(('page', page)) - _query_params.append(('request', request)) + if page_size is not None: + _query_params.append(('page_size', page_size)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if name is not None: + _param_val = name + if hasattr(_param_val, 'to_dict'): + _param_val = _param_val.to_dict() + if isinstance(_param_val, dict): + for _k, _v in _param_val.items(): + if _v is not None: + _query_params.append(('name[' + _k + ']', _v)) + if status is not None: + _param_val = status + if hasattr(_param_val, 'to_dict'): + _param_val = _param_val.to_dict() + if isinstance(_param_val, dict): + for _k, _v in _param_val.items(): + if _v is not None: + _query_params.append(('status[' + _k + ']', _v)) + if is_public is not None: + _param_val = is_public + if hasattr(_param_val, 'to_dict'): + _param_val = _param_val.to_dict() + if isinstance(_param_val, dict): + for _k, _v in _param_val.items(): + if _v is not None: + _query_params.append(('is_public[' + _k + ']', _v)) + if is_distilling is not None: + _param_val = is_distilling + if hasattr(_param_val, 'to_dict'): + _param_val = _param_val.to_dict() + if isinstance(_param_val, dict): + for _k, _v in _param_val.items(): + if _v is not None: + _query_params.append(('is_distilling[' + _k + ']', _v)) + if owner_mail is not None: + _param_val = owner_mail + if hasattr(_param_val, 'to_dict'): + _param_val = _param_val.to_dict() + if isinstance(_param_val, dict): + for _k, _v in _param_val.items(): + if _v is not None: + _query_params.append(('owner_mail[' + _k + ']', _v)) + if created_at is not None: + _param_val = created_at + if hasattr(_param_val, 'to_dict'): + _param_val = _param_val.to_dict() + if isinstance(_param_val, dict): + for _k, _v in _param_val.items(): + if _v is not None: + _query_params.append(('created_at[' + _k + ']', _v)) # process the header parameters # process the form parameters # process the body parameter @@ -3585,9 +3778,7 @@ def _audiences_get_serialize( if 'Accept' not in _header_params: _header_params['Accept'] = self.api_client.select_header_accept( [ - 'text/plain', - 'application/json', - 'text/json' + 'application/json' ] ) diff --git a/src/rapidata/api_client/api/campaign_api.py b/src/rapidata/api_client/api/campaign_api.py index a2133e37..4fd925e8 100644 --- a/src/rapidata/api_client/api/campaign_api.py +++ b/src/rapidata/api_client/api/campaign_api.py @@ -19,7 +19,7 @@ from pydantic import Field, StrictInt, StrictStr, field_validator from typing import List, Optional from typing_extensions import Annotated -from rapidata.api_client.models.campaigns_get_id_parameter import CampaignsGetIdParameter +from rapidata.api_client.models.audiences_get_name_parameter import AudiencesGetNameParameter from rapidata.api_client.models.get_boost_insights_endpoint_output import GetBoostInsightsEndpointOutput from rapidata.api_client.models.get_boost_status_endpoint_output import GetBoostStatusEndpointOutput from rapidata.api_client.models.get_campaign_by_id_endpoint_output import GetCampaignByIdEndpointOutput @@ -581,6 +581,260 @@ def _campaign_boost_insights_get_serialize( + @validate_call + def campaign_boost_preheat_post( + self, + _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: + """campaign_boost_preheat_post + + + :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._campaign_boost_preheat_post_serialize( + _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 campaign_boost_preheat_post_with_http_info( + self, + _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]: + """campaign_boost_preheat_post + + + :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._campaign_boost_preheat_post_serialize( + _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 campaign_boost_preheat_post_without_preload_content( + self, + _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: + """campaign_boost_preheat_post + + + :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._campaign_boost_preheat_post_serialize( + _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 _campaign_boost_preheat_post_serialize( + self, + _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 + # 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='POST', + resource_path='/campaign/boost/preheat', + 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 campaign_boost_status_get( self, @@ -2193,12 +2447,12 @@ def campaigns_get( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - id: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by id.")] = None, - name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by name.")] = None, - status: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by status.")] = None, - priority: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by priority.")] = None, - owner_mail: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by owner_mail.")] = None, - created_at: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by created_at.")] = None, + id: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by id.")] = None, + name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by name.")] = None, + status: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by status.")] = None, + priority: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by priority.")] = None, + owner_mail: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by owner_mail.")] = None, + created_at: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by created_at.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2222,17 +2476,17 @@ def campaigns_get( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param id: Filter by id. - :type id: CampaignsGetIdParameter + :type id: AudiencesGetNameParameter :param name: Filter by name. - :type name: CampaignsGetIdParameter + :type name: AudiencesGetNameParameter :param status: Filter by status. - :type status: CampaignsGetIdParameter + :type status: AudiencesGetNameParameter :param priority: Filter by priority. - :type priority: CampaignsGetIdParameter + :type priority: AudiencesGetNameParameter :param owner_mail: Filter by owner_mail. - :type owner_mail: CampaignsGetIdParameter + :type owner_mail: AudiencesGetNameParameter :param created_at: Filter by created_at. - :type created_at: CampaignsGetIdParameter + :type created_at: AudiencesGetNameParameter :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 @@ -2294,12 +2548,12 @@ def campaigns_get_with_http_info( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - id: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by id.")] = None, - name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by name.")] = None, - status: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by status.")] = None, - priority: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by priority.")] = None, - owner_mail: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by owner_mail.")] = None, - created_at: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by created_at.")] = None, + id: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by id.")] = None, + name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by name.")] = None, + status: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by status.")] = None, + priority: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by priority.")] = None, + owner_mail: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by owner_mail.")] = None, + created_at: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by created_at.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2323,17 +2577,17 @@ def campaigns_get_with_http_info( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param id: Filter by id. - :type id: CampaignsGetIdParameter + :type id: AudiencesGetNameParameter :param name: Filter by name. - :type name: CampaignsGetIdParameter + :type name: AudiencesGetNameParameter :param status: Filter by status. - :type status: CampaignsGetIdParameter + :type status: AudiencesGetNameParameter :param priority: Filter by priority. - :type priority: CampaignsGetIdParameter + :type priority: AudiencesGetNameParameter :param owner_mail: Filter by owner_mail. - :type owner_mail: CampaignsGetIdParameter + :type owner_mail: AudiencesGetNameParameter :param created_at: Filter by created_at. - :type created_at: CampaignsGetIdParameter + :type created_at: AudiencesGetNameParameter :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 @@ -2395,12 +2649,12 @@ def campaigns_get_without_preload_content( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - id: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by id.")] = None, - name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by name.")] = None, - status: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by status.")] = None, - priority: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by priority.")] = None, - owner_mail: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by owner_mail.")] = None, - created_at: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by created_at.")] = None, + id: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by id.")] = None, + name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by name.")] = None, + status: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by status.")] = None, + priority: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by priority.")] = None, + owner_mail: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by owner_mail.")] = None, + created_at: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by created_at.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2424,17 +2678,17 @@ def campaigns_get_without_preload_content( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param id: Filter by id. - :type id: CampaignsGetIdParameter + :type id: AudiencesGetNameParameter :param name: Filter by name. - :type name: CampaignsGetIdParameter + :type name: AudiencesGetNameParameter :param status: Filter by status. - :type status: CampaignsGetIdParameter + :type status: AudiencesGetNameParameter :param priority: Filter by priority. - :type priority: CampaignsGetIdParameter + :type priority: AudiencesGetNameParameter :param owner_mail: Filter by owner_mail. - :type owner_mail: CampaignsGetIdParameter + :type owner_mail: AudiencesGetNameParameter :param created_at: Filter by created_at. - :type created_at: CampaignsGetIdParameter + :type created_at: AudiencesGetNameParameter :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 diff --git a/src/rapidata/api_client/api/customer_api.py b/src/rapidata/api_client/api/customer_api.py index ea6f965a..8a6b378b 100644 --- a/src/rapidata/api_client/api/customer_api.py +++ b/src/rapidata/api_client/api/customer_api.py @@ -19,7 +19,7 @@ from pydantic import Field, StrictInt, StrictStr, field_validator from typing import List, Optional from typing_extensions import Annotated -from rapidata.api_client.models.campaigns_get_id_parameter import CampaignsGetIdParameter +from rapidata.api_client.models.audiences_get_name_parameter import AudiencesGetNameParameter from rapidata.api_client.models.query_customers_endpoint_paged_result_of_output import QueryCustomersEndpointPagedResultOfOutput from rapidata.api_client.api_client import ApiClient, RequestSerialized @@ -46,10 +46,10 @@ def customers_get( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - id: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by id.")] = None, - email: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by email.")] = None, - organization_name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by organization_name.")] = None, - organization_id: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by organization_id.")] = None, + id: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by id.")] = None, + email: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by email.")] = None, + organization_name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by organization_name.")] = None, + organization_id: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by organization_id.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -74,13 +74,13 @@ def customers_get( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param id: Filter by id. - :type id: CampaignsGetIdParameter + :type id: AudiencesGetNameParameter :param email: Filter by email. - :type email: CampaignsGetIdParameter + :type email: AudiencesGetNameParameter :param organization_name: Filter by organization_name. - :type organization_name: CampaignsGetIdParameter + :type organization_name: AudiencesGetNameParameter :param organization_id: Filter by organization_id. - :type organization_id: CampaignsGetIdParameter + :type organization_id: AudiencesGetNameParameter :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 @@ -140,10 +140,10 @@ def customers_get_with_http_info( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - id: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by id.")] = None, - email: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by email.")] = None, - organization_name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by organization_name.")] = None, - organization_id: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by organization_id.")] = None, + id: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by id.")] = None, + email: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by email.")] = None, + organization_name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by organization_name.")] = None, + organization_id: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by organization_id.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -168,13 +168,13 @@ def customers_get_with_http_info( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param id: Filter by id. - :type id: CampaignsGetIdParameter + :type id: AudiencesGetNameParameter :param email: Filter by email. - :type email: CampaignsGetIdParameter + :type email: AudiencesGetNameParameter :param organization_name: Filter by organization_name. - :type organization_name: CampaignsGetIdParameter + :type organization_name: AudiencesGetNameParameter :param organization_id: Filter by organization_id. - :type organization_id: CampaignsGetIdParameter + :type organization_id: AudiencesGetNameParameter :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 @@ -234,10 +234,10 @@ def customers_get_without_preload_content( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - id: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by id.")] = None, - email: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by email.")] = None, - organization_name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by organization_name.")] = None, - organization_id: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by organization_id.")] = None, + id: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by id.")] = None, + email: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by email.")] = None, + organization_name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by organization_name.")] = None, + organization_id: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by organization_id.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -262,13 +262,13 @@ def customers_get_without_preload_content( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param id: Filter by id. - :type id: CampaignsGetIdParameter + :type id: AudiencesGetNameParameter :param email: Filter by email. - :type email: CampaignsGetIdParameter + :type email: AudiencesGetNameParameter :param organization_name: Filter by organization_name. - :type organization_name: CampaignsGetIdParameter + :type organization_name: AudiencesGetNameParameter :param organization_id: Filter by organization_id. - :type organization_id: CampaignsGetIdParameter + :type organization_id: AudiencesGetNameParameter :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 diff --git a/src/rapidata/api_client/api/external_audience_api.py b/src/rapidata/api_client/api/external_audience_api.py index e8e6c988..e0874da1 100644 --- a/src/rapidata/api_client/api/external_audience_api.py +++ b/src/rapidata/api_client/api/external_audience_api.py @@ -19,7 +19,7 @@ from pydantic import Field, StrictInt, StrictStr, field_validator from typing import List, Optional from typing_extensions import Annotated -from rapidata.api_client.models.campaigns_get_id_parameter import CampaignsGetIdParameter +from rapidata.api_client.models.audiences_get_name_parameter import AudiencesGetNameParameter from rapidata.api_client.models.query_external_audiences_endpoint_paged_result_of_output import QueryExternalAudiencesEndpointPagedResultOfOutput from rapidata.api_client.api_client import ApiClient, RequestSerialized @@ -46,9 +46,9 @@ def campaign_external_audiences_get( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - id: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by id.")] = None, - name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by name.")] = None, - count: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by count.")] = None, + id: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by id.")] = None, + name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by name.")] = None, + count: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by count.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -72,11 +72,11 @@ def campaign_external_audiences_get( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param id: Filter by id. - :type id: CampaignsGetIdParameter + :type id: AudiencesGetNameParameter :param name: Filter by name. - :type name: CampaignsGetIdParameter + :type name: AudiencesGetNameParameter :param count: Filter by count. - :type count: CampaignsGetIdParameter + :type count: AudiencesGetNameParameter :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 @@ -135,9 +135,9 @@ def campaign_external_audiences_get_with_http_info( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - id: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by id.")] = None, - name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by name.")] = None, - count: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by count.")] = None, + id: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by id.")] = None, + name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by name.")] = None, + count: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by count.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -161,11 +161,11 @@ def campaign_external_audiences_get_with_http_info( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param id: Filter by id. - :type id: CampaignsGetIdParameter + :type id: AudiencesGetNameParameter :param name: Filter by name. - :type name: CampaignsGetIdParameter + :type name: AudiencesGetNameParameter :param count: Filter by count. - :type count: CampaignsGetIdParameter + :type count: AudiencesGetNameParameter :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 @@ -224,9 +224,9 @@ def campaign_external_audiences_get_without_preload_content( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - id: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by id.")] = None, - name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by name.")] = None, - count: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by count.")] = None, + id: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by id.")] = None, + name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by name.")] = None, + count: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by count.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -250,11 +250,11 @@ def campaign_external_audiences_get_without_preload_content( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param id: Filter by id. - :type id: CampaignsGetIdParameter + :type id: AudiencesGetNameParameter :param name: Filter by name. - :type name: CampaignsGetIdParameter + :type name: AudiencesGetNameParameter :param count: Filter by count. - :type count: CampaignsGetIdParameter + :type count: AudiencesGetNameParameter :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 diff --git a/src/rapidata/api_client/api/flow_api.py b/src/rapidata/api_client/api/flow_api.py index 91ddbe2b..b7a868f0 100644 --- a/src/rapidata/api_client/api/flow_api.py +++ b/src/rapidata/api_client/api/flow_api.py @@ -20,7 +20,7 @@ from pydantic import Field, StrictInt, StrictStr, field_validator from typing import List, Optional from typing_extensions import Annotated -from rapidata.api_client.models.campaigns_get_id_parameter import CampaignsGetIdParameter +from rapidata.api_client.models.audiences_get_name_parameter import AudiencesGetNameParameter from rapidata.api_client.models.get_completion_time_histogram_endpoint_output import GetCompletionTimeHistogramEndpointOutput from rapidata.api_client.models.get_flow_item_creation_timeseries_endpoint_output import GetFlowItemCreationTimeseriesEndpointOutput from rapidata.api_client.models.get_response_count_histogram_endpoint_output import GetResponseCountHistogramEndpointOutput @@ -590,8 +590,8 @@ def flow_get( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by name.")] = None, - created_at: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by created_at.")] = None, + name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by name.")] = None, + created_at: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by created_at.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -615,9 +615,9 @@ def flow_get( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param name: Filter by name. - :type name: CampaignsGetIdParameter + :type name: AudiencesGetNameParameter :param created_at: Filter by created_at. - :type created_at: CampaignsGetIdParameter + :type created_at: AudiencesGetNameParameter :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 @@ -675,8 +675,8 @@ def flow_get_with_http_info( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by name.")] = None, - created_at: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by created_at.")] = None, + name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by name.")] = None, + created_at: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by created_at.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -700,9 +700,9 @@ def flow_get_with_http_info( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param name: Filter by name. - :type name: CampaignsGetIdParameter + :type name: AudiencesGetNameParameter :param created_at: Filter by created_at. - :type created_at: CampaignsGetIdParameter + :type created_at: AudiencesGetNameParameter :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 @@ -760,8 +760,8 @@ def flow_get_without_preload_content( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by name.")] = None, - created_at: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by created_at.")] = None, + name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by name.")] = None, + created_at: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by created_at.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -785,9 +785,9 @@ def flow_get_without_preload_content( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param name: Filter by name. - :type name: CampaignsGetIdParameter + :type name: AudiencesGetNameParameter :param created_at: Filter by created_at. - :type created_at: CampaignsGetIdParameter + :type created_at: AudiencesGetNameParameter :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 diff --git a/src/rapidata/api_client/api/order_api.py b/src/rapidata/api_client/api/order_api.py index 05f24d17..2d682112 100644 --- a/src/rapidata/api_client/api/order_api.py +++ b/src/rapidata/api_client/api/order_api.py @@ -19,7 +19,7 @@ from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr, field_validator from typing import List, Optional, Tuple, Union from typing_extensions import Annotated -from rapidata.api_client.models.campaigns_get_id_parameter import CampaignsGetIdParameter +from rapidata.api_client.models.audiences_get_name_parameter import AudiencesGetNameParameter from rapidata.api_client.models.clone_order_endpoint_input import CloneOrderEndpointInput from rapidata.api_client.models.clone_order_endpoint_output import CloneOrderEndpointOutput from rapidata.api_client.models.create_complex_order_endpoint_input import CreateComplexOrderEndpointInput @@ -5096,9 +5096,9 @@ def orders_aggregated_overview_get( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - customer_mail: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by customer_mail.")] = None, - last_order_date: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by last_order_date.")] = None, - last_order_name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by last_order_name.")] = None, + customer_mail: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by customer_mail.")] = None, + last_order_date: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by last_order_date.")] = None, + last_order_name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by last_order_name.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5122,11 +5122,11 @@ def orders_aggregated_overview_get( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param customer_mail: Filter by customer_mail. - :type customer_mail: CampaignsGetIdParameter + :type customer_mail: AudiencesGetNameParameter :param last_order_date: Filter by last_order_date. - :type last_order_date: CampaignsGetIdParameter + :type last_order_date: AudiencesGetNameParameter :param last_order_name: Filter by last_order_name. - :type last_order_name: CampaignsGetIdParameter + :type last_order_name: AudiencesGetNameParameter :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 @@ -5185,9 +5185,9 @@ def orders_aggregated_overview_get_with_http_info( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - customer_mail: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by customer_mail.")] = None, - last_order_date: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by last_order_date.")] = None, - last_order_name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by last_order_name.")] = None, + customer_mail: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by customer_mail.")] = None, + last_order_date: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by last_order_date.")] = None, + last_order_name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by last_order_name.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5211,11 +5211,11 @@ def orders_aggregated_overview_get_with_http_info( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param customer_mail: Filter by customer_mail. - :type customer_mail: CampaignsGetIdParameter + :type customer_mail: AudiencesGetNameParameter :param last_order_date: Filter by last_order_date. - :type last_order_date: CampaignsGetIdParameter + :type last_order_date: AudiencesGetNameParameter :param last_order_name: Filter by last_order_name. - :type last_order_name: CampaignsGetIdParameter + :type last_order_name: AudiencesGetNameParameter :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 @@ -5274,9 +5274,9 @@ def orders_aggregated_overview_get_without_preload_content( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - customer_mail: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by customer_mail.")] = None, - last_order_date: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by last_order_date.")] = None, - last_order_name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by last_order_name.")] = None, + customer_mail: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by customer_mail.")] = None, + last_order_date: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by last_order_date.")] = None, + last_order_name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by last_order_name.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5300,11 +5300,11 @@ def orders_aggregated_overview_get_without_preload_content( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param customer_mail: Filter by customer_mail. - :type customer_mail: CampaignsGetIdParameter + :type customer_mail: AudiencesGetNameParameter :param last_order_date: Filter by last_order_date. - :type last_order_date: CampaignsGetIdParameter + :type last_order_date: AudiencesGetNameParameter :param last_order_name: Filter by last_order_name. - :type last_order_name: CampaignsGetIdParameter + :type last_order_name: AudiencesGetNameParameter :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 @@ -5465,11 +5465,11 @@ def orders_get( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - order_name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by order_name.")] = None, - state: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by state.")] = None, - order_date: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by order_date.")] = None, - customer_mail: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by customer_mail.")] = None, - is_public: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by is_public.")] = None, + order_name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by order_name.")] = None, + state: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by state.")] = None, + order_date: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by order_date.")] = None, + customer_mail: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by customer_mail.")] = None, + is_public: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by is_public.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5493,15 +5493,15 @@ def orders_get( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param order_name: Filter by order_name. - :type order_name: CampaignsGetIdParameter + :type order_name: AudiencesGetNameParameter :param state: Filter by state. - :type state: CampaignsGetIdParameter + :type state: AudiencesGetNameParameter :param order_date: Filter by order_date. - :type order_date: CampaignsGetIdParameter + :type order_date: AudiencesGetNameParameter :param customer_mail: Filter by customer_mail. - :type customer_mail: CampaignsGetIdParameter + :type customer_mail: AudiencesGetNameParameter :param is_public: Filter by is_public. - :type is_public: CampaignsGetIdParameter + :type is_public: AudiencesGetNameParameter :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 @@ -5562,11 +5562,11 @@ def orders_get_with_http_info( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - order_name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by order_name.")] = None, - state: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by state.")] = None, - order_date: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by order_date.")] = None, - customer_mail: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by customer_mail.")] = None, - is_public: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by is_public.")] = None, + order_name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by order_name.")] = None, + state: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by state.")] = None, + order_date: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by order_date.")] = None, + customer_mail: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by customer_mail.")] = None, + is_public: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by is_public.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5590,15 +5590,15 @@ def orders_get_with_http_info( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param order_name: Filter by order_name. - :type order_name: CampaignsGetIdParameter + :type order_name: AudiencesGetNameParameter :param state: Filter by state. - :type state: CampaignsGetIdParameter + :type state: AudiencesGetNameParameter :param order_date: Filter by order_date. - :type order_date: CampaignsGetIdParameter + :type order_date: AudiencesGetNameParameter :param customer_mail: Filter by customer_mail. - :type customer_mail: CampaignsGetIdParameter + :type customer_mail: AudiencesGetNameParameter :param is_public: Filter by is_public. - :type is_public: CampaignsGetIdParameter + :type is_public: AudiencesGetNameParameter :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 @@ -5659,11 +5659,11 @@ def orders_get_without_preload_content( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - order_name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by order_name.")] = None, - state: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by state.")] = None, - order_date: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by order_date.")] = None, - customer_mail: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by customer_mail.")] = None, - is_public: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by is_public.")] = None, + order_name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by order_name.")] = None, + state: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by state.")] = None, + order_date: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by order_date.")] = None, + customer_mail: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by customer_mail.")] = None, + is_public: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by is_public.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5687,15 +5687,15 @@ def orders_get_without_preload_content( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param order_name: Filter by order_name. - :type order_name: CampaignsGetIdParameter + :type order_name: AudiencesGetNameParameter :param state: Filter by state. - :type state: CampaignsGetIdParameter + :type state: AudiencesGetNameParameter :param order_date: Filter by order_date. - :type order_date: CampaignsGetIdParameter + :type order_date: AudiencesGetNameParameter :param customer_mail: Filter by customer_mail. - :type customer_mail: CampaignsGetIdParameter + :type customer_mail: AudiencesGetNameParameter :param is_public: Filter by is_public. - :type is_public: CampaignsGetIdParameter + :type is_public: AudiencesGetNameParameter :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 diff --git a/src/rapidata/api_client/api/organization_api.py b/src/rapidata/api_client/api/organization_api.py index 1e7c4df3..a9131d9c 100644 --- a/src/rapidata/api_client/api/organization_api.py +++ b/src/rapidata/api_client/api/organization_api.py @@ -19,7 +19,7 @@ from pydantic import Field, StrictInt, StrictStr, field_validator from typing import List, Optional from typing_extensions import Annotated -from rapidata.api_client.models.campaigns_get_id_parameter import CampaignsGetIdParameter +from rapidata.api_client.models.audiences_get_name_parameter import AudiencesGetNameParameter from rapidata.api_client.models.query_organizations_endpoint_paged_result_of_output import QueryOrganizationsEndpointPagedResultOfOutput from rapidata.api_client.api_client import ApiClient, RequestSerialized @@ -46,9 +46,9 @@ def organizations_get( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by name.")] = None, - domain: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by domain.")] = None, - owner: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by owner.")] = None, + name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by name.")] = None, + domain: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by domain.")] = None, + owner: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by owner.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -72,11 +72,11 @@ def organizations_get( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param name: Filter by name. - :type name: CampaignsGetIdParameter + :type name: AudiencesGetNameParameter :param domain: Filter by domain. - :type domain: CampaignsGetIdParameter + :type domain: AudiencesGetNameParameter :param owner: Filter by owner. - :type owner: CampaignsGetIdParameter + :type owner: AudiencesGetNameParameter :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 @@ -135,9 +135,9 @@ def organizations_get_with_http_info( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by name.")] = None, - domain: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by domain.")] = None, - owner: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by owner.")] = None, + name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by name.")] = None, + domain: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by domain.")] = None, + owner: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by owner.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -161,11 +161,11 @@ def organizations_get_with_http_info( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param name: Filter by name. - :type name: CampaignsGetIdParameter + :type name: AudiencesGetNameParameter :param domain: Filter by domain. - :type domain: CampaignsGetIdParameter + :type domain: AudiencesGetNameParameter :param owner: Filter by owner. - :type owner: CampaignsGetIdParameter + :type owner: AudiencesGetNameParameter :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 @@ -224,9 +224,9 @@ def organizations_get_without_preload_content( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - name: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by name.")] = None, - domain: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by domain.")] = None, - owner: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by owner.")] = None, + name: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by name.")] = None, + domain: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by domain.")] = None, + owner: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by owner.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -250,11 +250,11 @@ def organizations_get_without_preload_content( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param name: Filter by name. - :type name: CampaignsGetIdParameter + :type name: AudiencesGetNameParameter :param domain: Filter by domain. - :type domain: CampaignsGetIdParameter + :type domain: AudiencesGetNameParameter :param owner: Filter by owner. - :type owner: CampaignsGetIdParameter + :type owner: AudiencesGetNameParameter :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 diff --git a/src/rapidata/api_client/api/ranking_flow_item_api.py b/src/rapidata/api_client/api/ranking_flow_item_api.py index adb09984..95be317d 100644 --- a/src/rapidata/api_client/api/ranking_flow_item_api.py +++ b/src/rapidata/api_client/api/ranking_flow_item_api.py @@ -19,7 +19,7 @@ from pydantic import Field, StrictInt, StrictStr, field_validator from typing import List, Optional from typing_extensions import Annotated -from rapidata.api_client.models.campaigns_get_id_parameter import CampaignsGetIdParameter +from rapidata.api_client.models.audiences_get_name_parameter import AudiencesGetNameParameter from rapidata.api_client.models.create_flow_item_endpoint_input import CreateFlowItemEndpointInput from rapidata.api_client.models.create_flow_item_endpoint_output import CreateFlowItemEndpointOutput from rapidata.api_client.models.get_flow_item_by_id_endpoint_output import GetFlowItemByIdEndpointOutput @@ -52,8 +52,8 @@ def flow_ranking_flow_id_item_get( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - state: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by state.")] = None, - created_at: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by created_at.")] = None, + state: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by state.")] = None, + created_at: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by created_at.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -79,9 +79,9 @@ def flow_ranking_flow_id_item_get( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param state: Filter by state. - :type state: CampaignsGetIdParameter + :type state: AudiencesGetNameParameter :param created_at: Filter by created_at. - :type created_at: CampaignsGetIdParameter + :type created_at: AudiencesGetNameParameter :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 @@ -141,8 +141,8 @@ def flow_ranking_flow_id_item_get_with_http_info( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - state: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by state.")] = None, - created_at: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by created_at.")] = None, + state: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by state.")] = None, + created_at: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by created_at.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -168,9 +168,9 @@ def flow_ranking_flow_id_item_get_with_http_info( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param state: Filter by state. - :type state: CampaignsGetIdParameter + :type state: AudiencesGetNameParameter :param created_at: Filter by created_at. - :type created_at: CampaignsGetIdParameter + :type created_at: AudiencesGetNameParameter :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 @@ -230,8 +230,8 @@ def flow_ranking_flow_id_item_get_without_preload_content( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - state: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by state.")] = None, - created_at: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by created_at.")] = None, + state: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by state.")] = None, + created_at: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by created_at.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -257,9 +257,9 @@ def flow_ranking_flow_id_item_get_without_preload_content( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param state: Filter by state. - :type state: CampaignsGetIdParameter + :type state: AudiencesGetNameParameter :param created_at: Filter by created_at. - :type created_at: CampaignsGetIdParameter + :type created_at: AudiencesGetNameParameter :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 diff --git a/src/rapidata/api_client/api/validation_feedback_api.py b/src/rapidata/api_client/api/validation_feedback_api.py index ddbdfc22..88df489f 100644 --- a/src/rapidata/api_client/api/validation_feedback_api.py +++ b/src/rapidata/api_client/api/validation_feedback_api.py @@ -19,7 +19,7 @@ from pydantic import Field, StrictInt, StrictStr, field_validator from typing import List, Optional from typing_extensions import Annotated -from rapidata.api_client.models.campaigns_get_id_parameter import CampaignsGetIdParameter +from rapidata.api_client.models.audiences_get_name_parameter import AudiencesGetNameParameter from rapidata.api_client.models.create_validation_feedback_endpoint_input import CreateValidationFeedbackEndpointInput from rapidata.api_client.models.query_validation_feedbacks_endpoint_paged_result_of_output import QueryValidationFeedbacksEndpointPagedResultOfOutput @@ -48,9 +48,9 @@ def rapid_rapid_id_validation_feedback_get( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - user_id: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by user_id.")] = None, - feedback: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by feedback.")] = None, - created_at: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by created_at.")] = None, + user_id: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by user_id.")] = None, + feedback: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by feedback.")] = None, + created_at: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by created_at.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -76,11 +76,11 @@ def rapid_rapid_id_validation_feedback_get( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param user_id: Filter by user_id. - :type user_id: CampaignsGetIdParameter + :type user_id: AudiencesGetNameParameter :param feedback: Filter by feedback. - :type feedback: CampaignsGetIdParameter + :type feedback: AudiencesGetNameParameter :param created_at: Filter by created_at. - :type created_at: CampaignsGetIdParameter + :type created_at: AudiencesGetNameParameter :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 @@ -141,9 +141,9 @@ def rapid_rapid_id_validation_feedback_get_with_http_info( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - user_id: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by user_id.")] = None, - feedback: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by feedback.")] = None, - created_at: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by created_at.")] = None, + user_id: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by user_id.")] = None, + feedback: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by feedback.")] = None, + created_at: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by created_at.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -169,11 +169,11 @@ def rapid_rapid_id_validation_feedback_get_with_http_info( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param user_id: Filter by user_id. - :type user_id: CampaignsGetIdParameter + :type user_id: AudiencesGetNameParameter :param feedback: Filter by feedback. - :type feedback: CampaignsGetIdParameter + :type feedback: AudiencesGetNameParameter :param created_at: Filter by created_at. - :type created_at: CampaignsGetIdParameter + :type created_at: AudiencesGetNameParameter :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 @@ -234,9 +234,9 @@ def rapid_rapid_id_validation_feedback_get_without_preload_content( page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, - user_id: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by user_id.")] = None, - feedback: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by feedback.")] = None, - created_at: Annotated[Optional[CampaignsGetIdParameter], Field(description="Filter by created_at.")] = None, + user_id: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by user_id.")] = None, + feedback: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by feedback.")] = None, + created_at: Annotated[Optional[AudiencesGetNameParameter], Field(description="Filter by created_at.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -262,11 +262,11 @@ def rapid_rapid_id_validation_feedback_get_without_preload_content( :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). :type sort: List[str] :param user_id: Filter by user_id. - :type user_id: CampaignsGetIdParameter + :type user_id: AudiencesGetNameParameter :param feedback: Filter by feedback. - :type feedback: CampaignsGetIdParameter + :type feedback: AudiencesGetNameParameter :param created_at: Filter by created_at. - :type created_at: CampaignsGetIdParameter + :type created_at: AudiencesGetNameParameter :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 diff --git a/src/rapidata/api_client/models/audience_status.py b/src/rapidata/api_client/models/audience_status.py index 71238fcc..5afe2ec2 100644 --- a/src/rapidata/api_client/models/audience_status.py +++ b/src/rapidata/api_client/models/audience_status.py @@ -20,7 +20,7 @@ class AudienceStatus(str, Enum): """ - AudienceStatus + The current status of the audience. """ """ diff --git a/src/rapidata/api_client/models/audiences_get_name_parameter.py b/src/rapidata/api_client/models/audiences_get_name_parameter.py new file mode 100644 index 00000000..6243b1f8 --- /dev/null +++ b/src/rapidata/api_client/models/audiences_get_name_parameter.py @@ -0,0 +1,107 @@ +# 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 pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AudiencesGetNameParameter(BaseModel): + """ + AudiencesGetNameParameter + """ # noqa: E501 + eq: Optional[StrictStr] = None + neq: Optional[StrictStr] = None + gt: Optional[StrictStr] = None + gte: Optional[StrictStr] = None + lt: Optional[StrictStr] = None + lte: Optional[StrictStr] = None + contains: Optional[StrictStr] = None + starts_with: Optional[StrictStr] = None + ends_with: Optional[StrictStr] = None + var_in: Optional[StrictStr] = Field(default=None, alias="in") + not_contains: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["eq", "neq", "gt", "gte", "lt", "lte", "contains", "starts_with", "ends_with", "in", "not_contains"] + + 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 AudiencesGetNameParameter 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 AudiencesGetNameParameter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "eq": obj.get("eq"), + "neq": obj.get("neq"), + "gt": obj.get("gt"), + "gte": obj.get("gte"), + "lt": obj.get("lt"), + "lte": obj.get("lte"), + "contains": obj.get("contains"), + "starts_with": obj.get("starts_with"), + "ends_with": obj.get("ends_with"), + "in": obj.get("in"), + "not_contains": obj.get("not_contains") + }) + return _obj + + diff --git a/src/rapidata/api_client/models/boost_level.py b/src/rapidata/api_client/models/boost_level.py index 6a3e0318..9682e235 100644 --- a/src/rapidata/api_client/models/boost_level.py +++ b/src/rapidata/api_client/models/boost_level.py @@ -20,7 +20,7 @@ class BoostLevel(str, Enum): """ - BoostLevel + The current boost level applied to the audience. """ """ diff --git a/src/rapidata/api_client/models/create_audience_endpoint_input.py b/src/rapidata/api_client/models/create_audience_endpoint_input.py new file mode 100644 index 00000000..a35b026c --- /dev/null +++ b/src/rapidata/api_client/models/create_audience_endpoint_input.py @@ -0,0 +1,146 @@ +# 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 pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from rapidata.api_client.models.distilling_retrieval_mode import DistillingRetrievalMode +from rapidata.api_client.models.existing_asset_input import ExistingAssetInput +from rapidata.api_client.models.i_audience_filter import IAudienceFilter +from typing import Optional, Set +from typing_extensions import Self + +class CreateAudienceEndpointInput(BaseModel): + """ + CreateAudienceEndpointInput + """ # noqa: E501 + name: StrictStr = Field(description="The name to give the newly created audience.") + description: Optional[StrictStr] = Field(default=None, description="An optional markdown-supported description of the audience's purpose.") + filters: Optional[List[IAudienceFilter]] = None + graduation_score: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The score used to determine whether a user graduates from the distilling campaign.", alias="graduationScore") + demotion_score: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Score below which a graduated user is demoted back to distilling. Must be less than or equal to GraduationScore. Defaults to null (uses GraduationScore).", alias="demotionScore") + minimum_size_for_activation: Optional[StrictInt] = Field(default=None, description="The minimum number of users required for an audience to be activated.", alias="minimumSizeForActivation") + logo: Optional[ExistingAssetInput] = Field(default=None, description="An optional logo image for the audience. Must be an existing image asset.") + max_distilling_responses: Optional[StrictInt] = Field(default=None, description="Maximum responses before user exits the distilling campaign. Defaults to 10. Set to null to disable this exit condition.", alias="maxDistillingResponses") + drop_min_responses: Optional[StrictInt] = Field(default=None, description="Minimum responses before the drop score check applies. Users need at least this many responses before they can be kicked out for low score. Defaults to 3. Set to null to apply drop score check from the first response.", alias="dropMinResponses") + drop_score: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Score floor - users below this score exit the distilling campaign (only after completing DropMinResponses). Defaults to 0.2. Set to null to disable this exit condition.", alias="dropScore") + is_distilling_campaign_sticky: Optional[StrictBool] = Field(default=None, description="Whether the distilling campaign should be sticky (users stay until filters don't match). Defaults to true (Temporary sticky).", alias="isDistillingCampaignSticky") + max_distilling_sessions: Optional[StrictInt] = Field(default=None, description="Maximum sessions (rapid retrievals) before user exits the distilling campaign. Defaults to null (disabled). Set to a value to enable session-based exit condition.", alias="maxDistillingSessions") + inactivity_drop_days: Optional[StrictInt] = Field(default=None, description="Number of days of inactivity before a distilling user is dropped. Defaults to null (disabled).", alias="inactivityDropDays") + min_submission_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum submission rate (responses / sessions) before a user is dropped. Defaults to null (disabled).", alias="minSubmissionRate") + min_sessions_for_submission_rate: Optional[StrictInt] = Field(default=None, description="Minimum number of sessions before the submission rate check applies. Defaults to null (applies from first session).", alias="minSessionsForSubmissionRate") + min_submission_rate_graduated: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum submission rate for graduated users. If null, MinSubmissionRate applies to graduated users. Set a lower value to be more lenient with graduated users.", alias="minSubmissionRateGraduated") + distilling_retrieval_mode: Optional[DistillingRetrievalMode] = Field(default=None, alias="distillingRetrievalMode") + min_distilling_for_global_boost: Optional[StrictInt] = Field(default=None, description="Minimum distilling users before disabling global boost. Defaults to 200. Admin-only override.", alias="minDistillingForGlobalBoost") + min_graduated_for_distilling_boost: Optional[StrictInt] = Field(default=None, description="Minimum graduated users before disabling distilling boost. Defaults to 100. Admin-only override.", alias="minGraduatedForDistillingBoost") + __properties: ClassVar[List[str]] = ["name", "description", "filters", "graduationScore", "demotionScore", "minimumSizeForActivation", "logo", "maxDistillingResponses", "dropMinResponses", "dropScore", "isDistillingCampaignSticky", "maxDistillingSessions", "inactivityDropDays", "minSubmissionRate", "minSessionsForSubmissionRate", "minSubmissionRateGraduated", "distillingRetrievalMode", "minDistillingForGlobalBoost", "minGraduatedForDistillingBoost"] + + 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 CreateAudienceEndpointInput 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, + ) + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + # override the default output from pydantic by calling `to_dict()` of logo + if self.logo: + _dict['logo'] = self.logo.to_dict() + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if filters (nullable) is None + # and model_fields_set contains the field + if self.filters is None and "filters" in self.model_fields_set: + _dict['filters'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateAudienceEndpointInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "filters": [IAudienceFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, + "graduationScore": obj.get("graduationScore"), + "demotionScore": obj.get("demotionScore"), + "minimumSizeForActivation": obj.get("minimumSizeForActivation"), + "logo": ExistingAssetInput.from_dict(obj["logo"]) if obj.get("logo") is not None else None, + "maxDistillingResponses": obj.get("maxDistillingResponses"), + "dropMinResponses": obj.get("dropMinResponses"), + "dropScore": obj.get("dropScore"), + "isDistillingCampaignSticky": obj.get("isDistillingCampaignSticky"), + "maxDistillingSessions": obj.get("maxDistillingSessions"), + "inactivityDropDays": obj.get("inactivityDropDays"), + "minSubmissionRate": obj.get("minSubmissionRate"), + "minSessionsForSubmissionRate": obj.get("minSessionsForSubmissionRate"), + "minSubmissionRateGraduated": obj.get("minSubmissionRateGraduated"), + "distillingRetrievalMode": obj.get("distillingRetrievalMode"), + "minDistillingForGlobalBoost": obj.get("minDistillingForGlobalBoost"), + "minGraduatedForDistillingBoost": obj.get("minGraduatedForDistillingBoost") + }) + return _obj + + diff --git a/src/rapidata/api_client/models/create_audience_endpoint_output.py b/src/rapidata/api_client/models/create_audience_endpoint_output.py new file mode 100644 index 00000000..680c84f6 --- /dev/null +++ b/src/rapidata/api_client/models/create_audience_endpoint_output.py @@ -0,0 +1,87 @@ +# 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 pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateAudienceEndpointOutput(BaseModel): + """ + CreateAudienceEndpointOutput + """ # noqa: E501 + audience_id: StrictStr = Field(description="The unique identifier of the newly created audience.", alias="audienceId") + __properties: ClassVar[List[str]] = ["audienceId"] + + 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 CreateAudienceEndpointOutput 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 CreateAudienceEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "audienceId": obj.get("audienceId") + }) + return _obj + + diff --git a/src/rapidata/api_client/models/distilling_retrieval_mode.py b/src/rapidata/api_client/models/distilling_retrieval_mode.py index 0326c3de..c45e9e60 100644 --- a/src/rapidata/api_client/models/distilling_retrieval_mode.py +++ b/src/rapidata/api_client/models/distilling_retrieval_mode.py @@ -20,7 +20,7 @@ class DistillingRetrievalMode(str, Enum): """ - DistillingRetrievalMode + The retrieval mode used by the distilling campaign to select rapids for users. Defaults to Shuffled. """ """ diff --git a/src/rapidata/api_client/models/filter.py b/src/rapidata/api_client/models/filter.py index 7f5532e6..944ecc89 100644 --- a/src/rapidata/api_client/models/filter.py +++ b/src/rapidata/api_client/models/filter.py @@ -91,6 +91,11 @@ def to_dict(self) -> Dict[str, Any]: if self.value is None and "value" in self.model_fields_set: _dict['value'] = None + # set to None if filters (nullable) is None + # and model_fields_set contains the field + if self.filters is None and "filters" in self.model_fields_set: + _dict['filters'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/get_audience_by_id_endpoint_output.py b/src/rapidata/api_client/models/get_audience_by_id_endpoint_output.py new file mode 100644 index 00000000..8d4d09b1 --- /dev/null +++ b/src/rapidata/api_client/models/get_audience_by_id_endpoint_output.py @@ -0,0 +1,167 @@ +# 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, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from rapidata.api_client.models.audience_status import AudienceStatus +from rapidata.api_client.models.boost_level import BoostLevel +from rapidata.api_client.models.distilling_retrieval_mode import DistillingRetrievalMode +from rapidata.api_client.models.i_audience_filter import IAudienceFilter +from typing import Optional, Set +from typing_extensions import Self + +class GetAudienceByIdEndpointOutput(BaseModel): + """ + GetAudienceByIdEndpointOutput + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the audience.") + name: StrictStr = Field(description="The name of the audience.") + description: Optional[StrictStr] = Field(default=None, description="The markdown-supported description of the audience.") + status: AudienceStatus + qualified_user_count: StrictInt = Field(description="The number of users that have qualified for this audience.", alias="qualifiedUserCount") + filters: List[IAudienceFilter] + logo: Optional[StrictStr] = Field(default=None, description="The URL of the audience logo, if any.") + created_at: datetime = Field(description="The timestamp when the audience was created.", alias="createdAt") + owner_mail: StrictStr = Field(description="The email of the audience owner.", alias="ownerMail") + is_public: StrictBool = Field(description="Whether the audience is publicly visible.", alias="isPublic") + is_distilling: StrictBool = Field(description="Whether the audience is currently distilling users.", alias="isDistilling") + distilling_campaign_id: StrictStr = Field(description="The id of the distilling campaign associated with the audience.", alias="distillingCampaignId") + min_graduated_for_distilling_boost: Optional[StrictInt] = Field(default=None, description="Minimum graduated users before disabling distilling boost.", alias="minGraduatedForDistillingBoost") + min_distilling_for_global_boost: Optional[StrictInt] = Field(default=None, description="Minimum distilling users before disabling global boost.", alias="minDistillingForGlobalBoost") + graduation_score: Union[StrictFloat, StrictInt] = Field(description="The score used to determine whether a user graduates from the distilling campaign.", alias="graduationScore") + demotion_score: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Score below which a graduated user is demoted back to distilling.", alias="demotionScore") + max_distilling_responses: Optional[StrictInt] = Field(default=None, description="Maximum responses before user exits the distilling campaign.", alias="maxDistillingResponses") + drop_min_responses: Optional[StrictInt] = Field(default=None, description="Minimum responses before the drop score check applies.", alias="dropMinResponses") + drop_score: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Score floor - users below this score exit the distilling campaign.", alias="dropScore") + max_distilling_sessions: Optional[StrictInt] = Field(default=None, description="Maximum sessions before user exits the distilling campaign.", alias="maxDistillingSessions") + inactivity_drop_days: Optional[StrictInt] = Field(default=None, description="Number of days of inactivity before a distilling user is dropped.", alias="inactivityDropDays") + min_submission_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum submission rate before a user is dropped.", alias="minSubmissionRate") + min_sessions_for_submission_rate: Optional[StrictInt] = Field(default=None, description="Minimum number of sessions before the submission rate check applies.", alias="minSessionsForSubmissionRate") + min_submission_rate_graduated: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum submission rate for graduated users.", alias="minSubmissionRateGraduated") + distilling_retrieval_mode: DistillingRetrievalMode = Field(alias="distillingRetrievalMode") + boost_level: BoostLevel = Field(alias="boostLevel") + random_admission_probability: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The probability of admitting a random user to the audience.", alias="randomAdmissionProbability") + health: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The health score of the audience.") + graduated: Optional[StrictInt] = Field(default=None, description="The number of graduated users.") + dropped: Optional[StrictInt] = Field(default=None, description="The number of dropped users.") + __properties: ClassVar[List[str]] = ["id", "name", "description", "status", "qualifiedUserCount", "filters", "logo", "createdAt", "ownerMail", "isPublic", "isDistilling", "distillingCampaignId", "minGraduatedForDistillingBoost", "minDistillingForGlobalBoost", "graduationScore", "demotionScore", "maxDistillingResponses", "dropMinResponses", "dropScore", "maxDistillingSessions", "inactivityDropDays", "minSubmissionRate", "minSessionsForSubmissionRate", "minSubmissionRateGraduated", "distillingRetrievalMode", "boostLevel", "randomAdmissionProbability", "health", "graduated", "dropped"] + + 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 GetAudienceByIdEndpointOutput 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, + ) + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if logo (nullable) is None + # and model_fields_set contains the field + if self.logo is None and "logo" in self.model_fields_set: + _dict['logo'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetAudienceByIdEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "description": obj.get("description"), + "status": obj.get("status"), + "qualifiedUserCount": obj.get("qualifiedUserCount"), + "filters": [IAudienceFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, + "logo": obj.get("logo"), + "createdAt": obj.get("createdAt"), + "ownerMail": obj.get("ownerMail"), + "isPublic": obj.get("isPublic"), + "isDistilling": obj.get("isDistilling"), + "distillingCampaignId": obj.get("distillingCampaignId"), + "minGraduatedForDistillingBoost": obj.get("minGraduatedForDistillingBoost"), + "minDistillingForGlobalBoost": obj.get("minDistillingForGlobalBoost"), + "graduationScore": obj.get("graduationScore"), + "demotionScore": obj.get("demotionScore"), + "maxDistillingResponses": obj.get("maxDistillingResponses"), + "dropMinResponses": obj.get("dropMinResponses"), + "dropScore": obj.get("dropScore"), + "maxDistillingSessions": obj.get("maxDistillingSessions"), + "inactivityDropDays": obj.get("inactivityDropDays"), + "minSubmissionRate": obj.get("minSubmissionRate"), + "minSessionsForSubmissionRate": obj.get("minSessionsForSubmissionRate"), + "minSubmissionRateGraduated": obj.get("minSubmissionRateGraduated"), + "distillingRetrievalMode": obj.get("distillingRetrievalMode"), + "boostLevel": obj.get("boostLevel"), + "randomAdmissionProbability": obj.get("randomAdmissionProbability"), + "health": obj.get("health"), + "graduated": obj.get("graduated"), + "dropped": obj.get("dropped") + }) + return _obj + + diff --git a/src/rapidata/api_client/models/get_evaluation_workflow_results_model.py b/src/rapidata/api_client/models/get_evaluation_workflow_results_model.py index fa9d880d..bcdb2435 100644 --- a/src/rapidata/api_client/models/get_evaluation_workflow_results_model.py +++ b/src/rapidata/api_client/models/get_evaluation_workflow_results_model.py @@ -19,9 +19,9 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from rapidata.api_client.models.page_info import PageInfo +from rapidata.api_client.models.pagination import Pagination from rapidata.api_client.models.rapid_state import RapidState -from rapidata.api_client.models.sort_criterion import SortCriterion +from rapidata.api_client.models.sort_criteria import SortCriteria from typing import Optional, Set from typing_extensions import Self @@ -29,9 +29,9 @@ class GetEvaluationWorkflowResultsModel(BaseModel): """ Model for getting the overview of a simple workflow result. """ # noqa: E501 - page: Optional[PageInfo] = Field(default=None, description="The size of the page and the page number to display.") + page: Optional[Pagination] = Field(default=None, description="The size of the page and the page number to display.") states: Optional[List[RapidState]] = None - sort_criteria: Optional[List[SortCriterion]] = Field(default=None, alias="sortCriteria") + sort_criteria: Optional[SortCriteria] = Field(default=None, description="A list of criteria to sort the results by.", alias="sortCriteria") __properties: ClassVar[List[str]] = ["page", "states", "sortCriteria"] model_config = ConfigDict( @@ -76,23 +76,14 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of page if self.page: _dict['page'] = self.page.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in sort_criteria (list) - _items = [] + # override the default output from pydantic by calling `to_dict()` of sort_criteria if self.sort_criteria: - for _item_sort_criteria in self.sort_criteria: - if _item_sort_criteria: - _items.append(_item_sort_criteria.to_dict()) - _dict['sortCriteria'] = _items + _dict['sortCriteria'] = self.sort_criteria.to_dict() # set to None if states (nullable) is None # and model_fields_set contains the field if self.states is None and "states" in self.model_fields_set: _dict['states'] = None - # set to None if sort_criteria (nullable) is None - # and model_fields_set contains the field - if self.sort_criteria is None and "sort_criteria" in self.model_fields_set: - _dict['sortCriteria'] = None - return _dict @classmethod @@ -105,9 +96,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "page": PageInfo.from_dict(obj["page"]) if obj.get("page") is not None else None, + "page": Pagination.from_dict(obj["page"]) if obj.get("page") is not None else None, "states": obj.get("states"), - "sortCriteria": [SortCriterion.from_dict(_item) for _item in obj["sortCriteria"]] if obj.get("sortCriteria") is not None else None + "sortCriteria": SortCriteria.from_dict(obj["sortCriteria"]) if obj.get("sortCriteria") is not None else None }) 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 index 8f8080b7..77c332fb 100644 --- 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 @@ -32,7 +32,9 @@ class GetJobDefinitionByIdEndpointOutput(BaseModel): name: StrictStr = Field(description="The name of the job definition.") definition_type: DefinitionType = Field(alias="definitionType") created_at: datetime = Field(description="The creation timestamp.", alias="createdAt") - __properties: ClassVar[List[str]] = ["definitionId", "name", "definitionType", "createdAt"] + owner_id: StrictStr = Field(description="The id of the job definition's owner.", alias="ownerId") + owner_mail: StrictStr = Field(description="The email of the job definition's owner.", alias="ownerMail") + __properties: ClassVar[List[str]] = ["definitionId", "name", "definitionType", "createdAt", "ownerId", "ownerMail"] model_config = ConfigDict( populate_by_name=True, @@ -88,7 +90,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "definitionId": obj.get("definitionId"), "name": obj.get("name"), "definitionType": obj.get("definitionType"), - "createdAt": obj.get("createdAt") + "createdAt": obj.get("createdAt"), + "ownerId": obj.get("ownerId"), + "ownerMail": obj.get("ownerMail") }) return _obj diff --git a/src/rapidata/api_client/models/get_ranking_workflow_results_model.py b/src/rapidata/api_client/models/get_ranking_workflow_results_model.py index fe4864e3..665c543f 100644 --- a/src/rapidata/api_client/models/get_ranking_workflow_results_model.py +++ b/src/rapidata/api_client/models/get_ranking_workflow_results_model.py @@ -19,8 +19,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from rapidata.api_client.models.page_info import PageInfo -from rapidata.api_client.models.sort_criterion import SortCriterion +from rapidata.api_client.models.pagination import Pagination +from rapidata.api_client.models.sort_criteria import SortCriteria from typing import Optional, Set from typing_extensions import Self @@ -28,8 +28,8 @@ class GetRankingWorkflowResultsModel(BaseModel): """ Model for getting the overview of a ranking workflow result. """ # noqa: E501 - page: Optional[PageInfo] = Field(default=None, description="The size of the page and the page number to display.") - sort_criteria: Optional[List[SortCriterion]] = Field(default=None, alias="sortCriteria") + page: Optional[Pagination] = Field(default=None, description="The size of the page and the page number to display.") + sort_criteria: Optional[SortCriteria] = Field(default=None, description="A list of criteria to sort the results by.", alias="sortCriteria") __properties: ClassVar[List[str]] = ["page", "sortCriteria"] model_config = ConfigDict( @@ -74,18 +74,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of page if self.page: _dict['page'] = self.page.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in sort_criteria (list) - _items = [] + # override the default output from pydantic by calling `to_dict()` of sort_criteria if self.sort_criteria: - for _item_sort_criteria in self.sort_criteria: - if _item_sort_criteria: - _items.append(_item_sort_criteria.to_dict()) - _dict['sortCriteria'] = _items - # set to None if sort_criteria (nullable) is None - # and model_fields_set contains the field - if self.sort_criteria is None and "sort_criteria" in self.model_fields_set: - _dict['sortCriteria'] = None - + _dict['sortCriteria'] = self.sort_criteria.to_dict() return _dict @classmethod @@ -98,8 +89,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "page": PageInfo.from_dict(obj["page"]) if obj.get("page") is not None else None, - "sortCriteria": [SortCriterion.from_dict(_item) for _item in obj["sortCriteria"]] if obj.get("sortCriteria") is not None else None + "page": Pagination.from_dict(obj["page"]) if obj.get("page") is not None else None, + "sortCriteria": SortCriteria.from_dict(obj["sortCriteria"]) if obj.get("sortCriteria") is not None else None }) return _obj diff --git a/src/rapidata/api_client/models/get_simple_workflow_results_model.py b/src/rapidata/api_client/models/get_simple_workflow_results_model.py index 9d93c475..04db59c0 100644 --- a/src/rapidata/api_client/models/get_simple_workflow_results_model.py +++ b/src/rapidata/api_client/models/get_simple_workflow_results_model.py @@ -19,9 +19,9 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from rapidata.api_client.models.page_info import PageInfo +from rapidata.api_client.models.pagination import Pagination from rapidata.api_client.models.rapid_state import RapidState -from rapidata.api_client.models.sort_criterion import SortCriterion +from rapidata.api_client.models.sort_criteria import SortCriteria from typing import Optional, Set from typing_extensions import Self @@ -29,9 +29,9 @@ class GetSimpleWorkflowResultsModel(BaseModel): """ Model for getting the overview of a simple workflow result. """ # noqa: E501 - page: Optional[PageInfo] = Field(default=None, description="The size of the page and the page number to display.") + page: Optional[Pagination] = Field(default=None, description="The size of the page and the page number to display.") states: Optional[List[RapidState]] = None - sort_criteria: Optional[List[SortCriterion]] = Field(default=None, alias="sortCriteria") + sort_criteria: Optional[SortCriteria] = Field(default=None, description="A list of criteria to sort the results by.", alias="sortCriteria") __properties: ClassVar[List[str]] = ["page", "states", "sortCriteria"] model_config = ConfigDict( @@ -76,23 +76,14 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of page if self.page: _dict['page'] = self.page.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in sort_criteria (list) - _items = [] + # override the default output from pydantic by calling `to_dict()` of sort_criteria if self.sort_criteria: - for _item_sort_criteria in self.sort_criteria: - if _item_sort_criteria: - _items.append(_item_sort_criteria.to_dict()) - _dict['sortCriteria'] = _items + _dict['sortCriteria'] = self.sort_criteria.to_dict() # set to None if states (nullable) is None # and model_fields_set contains the field if self.states is None and "states" in self.model_fields_set: _dict['states'] = None - # set to None if sort_criteria (nullable) is None - # and model_fields_set contains the field - if self.sort_criteria is None and "sort_criteria" in self.model_fields_set: - _dict['sortCriteria'] = None - return _dict @classmethod @@ -105,9 +96,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "page": PageInfo.from_dict(obj["page"]) if obj.get("page") is not None else None, + "page": Pagination.from_dict(obj["page"]) if obj.get("page") is not None else None, "states": obj.get("states"), - "sortCriteria": [SortCriterion.from_dict(_item) for _item in obj["sortCriteria"]] if obj.get("sortCriteria") is not None else None + "sortCriteria": SortCriteria.from_dict(obj["sortCriteria"]) if obj.get("sortCriteria") is not None else None }) return _obj diff --git a/src/rapidata/api_client/models/pagination.py b/src/rapidata/api_client/models/pagination.py new file mode 100644 index 00000000..004d8a7f --- /dev/null +++ b/src/rapidata/api_client/models/pagination.py @@ -0,0 +1,89 @@ +# 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 pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Pagination(BaseModel): + """ + Pagination + """ # noqa: E501 + index: Optional[StrictInt] = None + size: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["index", "size"] + + 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 Pagination 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 Pagination from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "index": obj.get("index"), + "size": obj.get("size") + }) + return _obj + + diff --git a/src/rapidata/api_client/models/query_audiences_endpoint_output.py b/src/rapidata/api_client/models/query_audiences_endpoint_output.py new file mode 100644 index 00000000..9a886b0d --- /dev/null +++ b/src/rapidata/api_client/models/query_audiences_endpoint_output.py @@ -0,0 +1,135 @@ +# 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, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from rapidata.api_client.models.audience_status import AudienceStatus +from rapidata.api_client.models.i_audience_filter import IAudienceFilter +from typing import Optional, Set +from typing_extensions import Self + +class QueryAudiencesEndpointOutput(BaseModel): + """ + QueryAudiencesEndpointOutput + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the audience.") + name: StrictStr = Field(description="The name of the audience.") + description: Optional[StrictStr] = Field(default=None, description="The markdown-supported description of the audience.") + status: AudienceStatus + qualified_user_count: StrictInt = Field(description="The number of users that have qualified for this audience.", alias="qualifiedUserCount") + filters: List[IAudienceFilter] + logo: Optional[StrictStr] = Field(default=None, description="The URL of the audience logo, if any.") + created_at: datetime = Field(description="The timestamp when the audience was created.", alias="createdAt") + owner_mail: StrictStr = Field(description="The email of the audience owner.", alias="ownerMail") + is_public: StrictBool = Field(description="Whether the audience is publicly visible.", alias="isPublic") + is_distilling: StrictBool = Field(description="Whether the audience is currently distilling users.", alias="isDistilling") + random_admission_probability: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The probability of admitting a random user to the audience.", alias="randomAdmissionProbability") + health: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The health score of the audience.") + graduated: Optional[StrictInt] = Field(default=None, description="The number of graduated users.") + dropped: Optional[StrictInt] = Field(default=None, description="The number of dropped users.") + __properties: ClassVar[List[str]] = ["id", "name", "description", "status", "qualifiedUserCount", "filters", "logo", "createdAt", "ownerMail", "isPublic", "isDistilling", "randomAdmissionProbability", "health", "graduated", "dropped"] + + 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 QueryAudiencesEndpointOutput 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, + ) + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if logo (nullable) is None + # and model_fields_set contains the field + if self.logo is None and "logo" in self.model_fields_set: + _dict['logo'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QueryAudiencesEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "description": obj.get("description"), + "status": obj.get("status"), + "qualifiedUserCount": obj.get("qualifiedUserCount"), + "filters": [IAudienceFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, + "logo": obj.get("logo"), + "createdAt": obj.get("createdAt"), + "ownerMail": obj.get("ownerMail"), + "isPublic": obj.get("isPublic"), + "isDistilling": obj.get("isDistilling"), + "randomAdmissionProbability": obj.get("randomAdmissionProbability"), + "health": obj.get("health"), + "graduated": obj.get("graduated"), + "dropped": obj.get("dropped") + }) + return _obj + + diff --git a/src/rapidata/api_client/models/query_audiences_endpoint_paged_result_of_output.py b/src/rapidata/api_client/models/query_audiences_endpoint_paged_result_of_output.py new file mode 100644 index 00000000..b9e77691 --- /dev/null +++ b/src/rapidata/api_client/models/query_audiences_endpoint_paged_result_of_output.py @@ -0,0 +1,103 @@ +# 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 pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from rapidata.api_client.models.query_audiences_endpoint_output import QueryAudiencesEndpointOutput +from typing import Optional, Set +from typing_extensions import Self + +class QueryAudiencesEndpointPagedResultOfOutput(BaseModel): + """ + QueryAudiencesEndpointPagedResultOfOutput + """ # noqa: E501 + total: StrictInt + page: StrictInt + page_size: StrictInt = Field(alias="pageSize") + items: List[QueryAudiencesEndpointOutput] + total_pages: Optional[StrictInt] = Field(default=None, alias="totalPages") + __properties: ClassVar[List[str]] = ["total", "page", "pageSize", "items", "totalPages"] + + 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 QueryAudiencesEndpointPagedResultOfOutput 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, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QueryAudiencesEndpointPagedResultOfOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "page": obj.get("page"), + "pageSize": obj.get("pageSize"), + "items": [QueryAudiencesEndpointOutput.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "totalPages": obj.get("totalPages") + }) + return _obj + + 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 136f9806..d6af6fac 100644 --- a/src/rapidata/api_client/models/query_job_definitions_result.py +++ b/src/rapidata/api_client/models/query_job_definitions_result.py @@ -33,7 +33,9 @@ class QueryJobDefinitionsResult(BaseModel): definition_type: DefinitionType = Field(alias="definitionType") created_at: datetime = Field(alias="createdAt") revision_count: StrictInt = Field(alias="revisionCount") - __properties: ClassVar[List[str]] = ["definitionId", "name", "definitionType", "createdAt", "revisionCount"] + owner_id: StrictStr = Field(alias="ownerId") + owner_mail: StrictStr = Field(alias="ownerMail") + __properties: ClassVar[List[str]] = ["definitionId", "name", "definitionType", "createdAt", "revisionCount", "ownerId", "ownerMail"] model_config = ConfigDict( populate_by_name=True, @@ -90,7 +92,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "definitionType": obj.get("definitionType"), "createdAt": obj.get("createdAt"), - "revisionCount": obj.get("revisionCount") + "revisionCount": obj.get("revisionCount"), + "ownerId": obj.get("ownerId"), + "ownerMail": obj.get("ownerMail") }) return _obj diff --git a/src/rapidata/api_client/models/query_model.py b/src/rapidata/api_client/models/query_model.py index b3fbd1f6..f6126e28 100644 --- a/src/rapidata/api_client/models/query_model.py +++ b/src/rapidata/api_client/models/query_model.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from rapidata.api_client.models.page_info import PageInfo +from rapidata.api_client.models.pagination import Pagination from rapidata.api_client.models.root_filter import RootFilter from rapidata.api_client.models.sort_criterion import SortCriterion from typing import Optional, Set @@ -29,7 +29,7 @@ class QueryModel(BaseModel): """ QueryModel """ # noqa: E501 - page: Optional[PageInfo] = None + page: Optional[Pagination] = None filter: Optional[RootFilter] = None sort_criteria: Optional[List[SortCriterion]] = Field(default=None, alias="sortCriteria") __properties: ClassVar[List[str]] = ["page", "filter", "sortCriteria"] @@ -113,7 +113,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "page": PageInfo.from_dict(obj["page"]) if obj.get("page") is not None else None, + "page": Pagination.from_dict(obj["page"]) if obj.get("page") is not None else None, "filter": RootFilter.from_dict(obj["filter"]) if obj.get("filter") is not None else None, "sortCriteria": [SortCriterion.from_dict(_item) for _item in obj["sortCriteria"]] if obj.get("sortCriteria") is not None else None }) diff --git a/src/rapidata/api_client/models/query_validation_rapid_eligibility_model_query_validation_model.py b/src/rapidata/api_client/models/query_validation_rapid_eligibility_model_query_validation_model.py index 8dfa2397..d1cce4a5 100644 --- a/src/rapidata/api_client/models/query_validation_rapid_eligibility_model_query_validation_model.py +++ b/src/rapidata/api_client/models/query_validation_rapid_eligibility_model_query_validation_model.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from rapidata.api_client.models.page_info import PageInfo +from rapidata.api_client.models.pagination import Pagination from rapidata.api_client.models.root_filter import RootFilter from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class QueryValidationRapidEligibilityModelQueryValidationModel(BaseModel): """ The Query Model specific to the validation rapid eligibility query. """ # noqa: E501 - page: Optional[PageInfo] = Field(default=None, description="pagination information") + page: Optional[Pagination] = Field(default=None, description="pagination information") filter: Optional[RootFilter] = Field(default=None, description="filter information") __properties: ClassVar[List[str]] = ["page", "filter"] @@ -89,7 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "page": PageInfo.from_dict(obj["page"]) if obj.get("page") is not None else None, + "page": Pagination.from_dict(obj["page"]) if obj.get("page") is not None else None, "filter": RootFilter.from_dict(obj["filter"]) if obj.get("filter") is not None else None }) return _obj diff --git a/src/rapidata/api_client/models/root_filter.py b/src/rapidata/api_client/models/root_filter.py index 59407a48..993c6576 100644 --- a/src/rapidata/api_client/models/root_filter.py +++ b/src/rapidata/api_client/models/root_filter.py @@ -28,7 +28,7 @@ class RootFilter(BaseModel): """ RootFilter """ # noqa: E501 - filters: Optional[List[Filter]] = None + filters: List[Filter] logic: Optional[LogicOperator] = None __properties: ClassVar[List[str]] = ["filters", "logic"] diff --git a/src/rapidata/api_client/models/sort_criteria.py b/src/rapidata/api_client/models/sort_criteria.py new file mode 100644 index 00000000..8e737875 --- /dev/null +++ b/src/rapidata/api_client/models/sort_criteria.py @@ -0,0 +1,100 @@ +# 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 pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from rapidata.api_client.models.sort_criterion import SortCriterion +from typing import Optional, Set +from typing_extensions import Self + +class SortCriteria(BaseModel): + """ + SortCriteria + """ # noqa: E501 + criteria: Optional[List[SortCriterion]] = None + __properties: ClassVar[List[str]] = ["criteria"] + + 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 SortCriteria 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, + ) + # override the default output from pydantic by calling `to_dict()` of each item in criteria (list) + _items = [] + if self.criteria: + for _item_criteria in self.criteria: + if _item_criteria: + _items.append(_item_criteria.to_dict()) + _dict['criteria'] = _items + # set to None if criteria (nullable) is None + # and model_fields_set contains the field + if self.criteria is None and "criteria" in self.model_fields_set: + _dict['criteria'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SortCriteria from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "criteria": [SortCriterion.from_dict(_item) for _item in obj["criteria"]] if obj.get("criteria") is not None else None + }) + return _obj + + diff --git a/src/rapidata/api_client/models/sort_criterion.py b/src/rapidata/api_client/models/sort_criterion.py index fecbf1b2..47df3444 100644 --- a/src/rapidata/api_client/models/sort_criterion.py +++ b/src/rapidata/api_client/models/sort_criterion.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from rapidata.api_client.models.sort_direction import SortDirection from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class SortCriterion(BaseModel): SortCriterion """ # noqa: E501 property_name: StrictStr = Field(alias="propertyName") - direction: SortDirection + direction: Optional[SortDirection] = None __properties: ClassVar[List[str]] = ["propertyName", "direction"] model_config = ConfigDict( diff --git a/src/rapidata/api_client/models/update_audience_endpoint_input.py b/src/rapidata/api_client/models/update_audience_endpoint_input.py new file mode 100644 index 00000000..26581998 --- /dev/null +++ b/src/rapidata/api_client/models/update_audience_endpoint_input.py @@ -0,0 +1,221 @@ +# 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 pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from rapidata.api_client.models.existing_asset_input import ExistingAssetInput +from rapidata.api_client.models.i_audience_filter import IAudienceFilter +from typing import Optional, Set +from typing_extensions import Self + +class UpdateAudienceEndpointInput(BaseModel): + """ + UpdateAudienceEndpointInput + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The new name to give to this audience.") + description: Optional[StrictStr] = Field(default=None, description="The new description for the audience. Supports markdown. Set to null to remove.") + filters: Optional[List[IAudienceFilter]] = None + logo: Optional[ExistingAssetInput] = None + min_graduated_for_distilling_boost: Optional[StrictInt] = Field(default=None, description="Minimum graduated users before disabling distilling boost. When graduated count is below this, external distilling audience ID is added to campaign boosting.", alias="minGraduatedForDistillingBoost") + min_distilling_for_global_boost: Optional[StrictInt] = Field(default=None, description="Minimum distilling users before disabling global boost. When distilling count is below this, GlobalBoostLevel is set above zero.", alias="minDistillingForGlobalBoost") + graduation_score: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The score used to determine whether a user graduates from the distilling campaign.", alias="graduationScore") + demotion_score: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Score below which a graduated user is demoted back to distilling. Must be less than or equal to GraduationScore. Set to null to use GraduationScore.", alias="demotionScore") + max_distilling_responses: Optional[StrictInt] = Field(default=None, description="Maximum responses before user exits the distilling campaign. Set to null to disable this exit condition.", alias="maxDistillingResponses") + drop_min_responses: Optional[StrictInt] = Field(default=None, description="Minimum responses before the drop score check applies. Users need at least this many responses before they can be kicked out for low score. Set to null to apply drop score check from the first response.", alias="dropMinResponses") + drop_score: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Score floor - users below this score exit the distilling campaign (only after completing DropMinResponses). Set to null to disable this exit condition.", alias="dropScore") + max_distilling_sessions: Optional[StrictInt] = Field(default=None, description="Maximum sessions (rapid retrievals) before user exits the distilling campaign. Set to a value to enable session-based exit condition.", alias="maxDistillingSessions") + inactivity_drop_days: Optional[StrictInt] = Field(default=None, description="Number of days of inactivity before a distilling user is dropped. Set to null to disable this exit condition.", alias="inactivityDropDays") + min_submission_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum submission rate (responses / sessions) before a user is dropped. Set to null to disable this exit condition.", alias="minSubmissionRate") + min_sessions_for_submission_rate: Optional[StrictInt] = Field(default=None, description="Minimum number of sessions before the submission rate check applies. Set to null to apply from the first session.", alias="minSessionsForSubmissionRate") + min_submission_rate_graduated: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum submission rate for graduated users. If null, MinSubmissionRate applies to graduated users. Set a lower value to be more lenient with graduated users.", alias="minSubmissionRateGraduated") + distilling_retrieval_mode: Optional[StrictStr] = Field(default=None, description="The retrieval mode used by the distilling campaign to select rapids for users.", alias="distillingRetrievalMode") + __properties: ClassVar[List[str]] = ["name", "description", "filters", "logo", "minGraduatedForDistillingBoost", "minDistillingForGlobalBoost", "graduationScore", "demotionScore", "maxDistillingResponses", "dropMinResponses", "dropScore", "maxDistillingSessions", "inactivityDropDays", "minSubmissionRate", "minSessionsForSubmissionRate", "minSubmissionRateGraduated", "distillingRetrievalMode"] + + @field_validator('distilling_retrieval_mode') + def distilling_retrieval_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Random', 'Shuffled', 'Sequential']): + raise ValueError("must be one of enum values ('Random', 'Shuffled', 'Sequential')") + return value + + 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 UpdateAudienceEndpointInput 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, + ) + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + # override the default output from pydantic by calling `to_dict()` of logo + if self.logo: + _dict['logo'] = self.logo.to_dict() + # 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 + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if filters (nullable) is None + # and model_fields_set contains the field + if self.filters is None and "filters" in self.model_fields_set: + _dict['filters'] = None + + # set to None if logo (nullable) is None + # and model_fields_set contains the field + if self.logo is None and "logo" in self.model_fields_set: + _dict['logo'] = None + + # set to None if min_graduated_for_distilling_boost (nullable) is None + # and model_fields_set contains the field + if self.min_graduated_for_distilling_boost is None and "min_graduated_for_distilling_boost" in self.model_fields_set: + _dict['minGraduatedForDistillingBoost'] = None + + # set to None if min_distilling_for_global_boost (nullable) is None + # and model_fields_set contains the field + if self.min_distilling_for_global_boost is None and "min_distilling_for_global_boost" in self.model_fields_set: + _dict['minDistillingForGlobalBoost'] = None + + # set to None if graduation_score (nullable) is None + # and model_fields_set contains the field + if self.graduation_score is None and "graduation_score" in self.model_fields_set: + _dict['graduationScore'] = None + + # set to None if demotion_score (nullable) is None + # and model_fields_set contains the field + if self.demotion_score is None and "demotion_score" in self.model_fields_set: + _dict['demotionScore'] = None + + # set to None if max_distilling_responses (nullable) is None + # and model_fields_set contains the field + if self.max_distilling_responses is None and "max_distilling_responses" in self.model_fields_set: + _dict['maxDistillingResponses'] = None + + # set to None if drop_min_responses (nullable) is None + # and model_fields_set contains the field + if self.drop_min_responses is None and "drop_min_responses" in self.model_fields_set: + _dict['dropMinResponses'] = None + + # set to None if drop_score (nullable) is None + # and model_fields_set contains the field + if self.drop_score is None and "drop_score" in self.model_fields_set: + _dict['dropScore'] = None + + # set to None if max_distilling_sessions (nullable) is None + # and model_fields_set contains the field + if self.max_distilling_sessions is None and "max_distilling_sessions" in self.model_fields_set: + _dict['maxDistillingSessions'] = None + + # set to None if inactivity_drop_days (nullable) is None + # and model_fields_set contains the field + if self.inactivity_drop_days is None and "inactivity_drop_days" in self.model_fields_set: + _dict['inactivityDropDays'] = None + + # set to None if min_submission_rate (nullable) is None + # and model_fields_set contains the field + if self.min_submission_rate is None and "min_submission_rate" in self.model_fields_set: + _dict['minSubmissionRate'] = None + + # set to None if min_sessions_for_submission_rate (nullable) is None + # and model_fields_set contains the field + if self.min_sessions_for_submission_rate is None and "min_sessions_for_submission_rate" in self.model_fields_set: + _dict['minSessionsForSubmissionRate'] = None + + # set to None if min_submission_rate_graduated (nullable) is None + # and model_fields_set contains the field + if self.min_submission_rate_graduated is None and "min_submission_rate_graduated" in self.model_fields_set: + _dict['minSubmissionRateGraduated'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateAudienceEndpointInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "filters": [IAudienceFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, + "logo": ExistingAssetInput.from_dict(obj["logo"]) if obj.get("logo") is not None else None, + "minGraduatedForDistillingBoost": obj.get("minGraduatedForDistillingBoost"), + "minDistillingForGlobalBoost": obj.get("minDistillingForGlobalBoost"), + "graduationScore": obj.get("graduationScore"), + "demotionScore": obj.get("demotionScore"), + "maxDistillingResponses": obj.get("maxDistillingResponses"), + "dropMinResponses": obj.get("dropMinResponses"), + "dropScore": obj.get("dropScore"), + "maxDistillingSessions": obj.get("maxDistillingSessions"), + "inactivityDropDays": obj.get("inactivityDropDays"), + "minSubmissionRate": obj.get("minSubmissionRate"), + "minSessionsForSubmissionRate": obj.get("minSessionsForSubmissionRate"), + "minSubmissionRateGraduated": obj.get("minSubmissionRateGraduated"), + "distillingRetrievalMode": obj.get("distillingRetrievalMode") + }) + return _obj + + diff --git a/src/rapidata/api_client_README.md b/src/rapidata/api_client_README.md index 3c38905b..887810ad 100644 --- a/src/rapidata/api_client_README.md +++ b/src/rapidata/api_client_README.md @@ -84,7 +84,7 @@ Class | Method | HTTP request | Description *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_boost_config_patch**](rapidata/api_client/docs/AudienceApi.md#audience_audience_id_boost_config_patch) | **PATCH** /audience/{audienceId}/boost-config | Updates the boost configuration for the specified audience. *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_get**](rapidata/api_client/docs/AudienceApi.md#audience_audience_id_get) | **GET** /audience/{audienceId} | Returns the audience with the specified id. *AudienceApi* | [**audience_audience_id_jobs_get**](rapidata/api_client/docs/AudienceApi.md#audience_audience_id_jobs_get) | **GET** /audience/{audienceId}/jobs | Queries 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_pause_distillation_post**](rapidata/api_client/docs/AudienceApi.md#audience_audience_id_pause_distillation_post) | **POST** /audience/{audienceId}/pause-distillation | Pauses the distillation campaign for the specified audience. @@ -94,7 +94,7 @@ Class | Method | HTTP request | Description *AudienceApi* | [**audience_audience_id_resume_distillation_post**](rapidata/api_client/docs/AudienceApi.md#audience_audience_id_resume_distillation_post) | **POST** /audience/{audienceId}/resume-distillation | Resumes the distillation campaign for the specified audience. *AudienceApi* | [**audience_audience_id_user_metrics_get**](rapidata/api_client/docs/AudienceApi.md#audience_audience_id_user_metrics_get) | **GET** /audience/{audienceId}/user-metrics | Gets the count of users in each state for the specified audience. *AudienceApi* | [**audience_post**](rapidata/api_client/docs/AudienceApi.md#audience_post) | **POST** /audience | Creates a new empty audience. -*AudienceApi* | [**audiences_get**](rapidata/api_client/docs/AudienceApi.md#audiences_get) | **GET** /audiences | Queries all available audiences. +*AudienceApi* | [**audiences_get**](rapidata/api_client/docs/AudienceApi.md#audiences_get) | **GET** /audiences | Queries all audiences visible to the caller. *BatchUploadApi* | [**asset_batch_upload_batch_upload_id_abort_post**](rapidata/api_client/docs/BatchUploadApi.md#asset_batch_upload_batch_upload_id_abort_post) | **POST** /asset/batch-upload/{batchUploadId}/abort | Aborts the specified batch upload. *BatchUploadApi* | [**asset_batch_upload_batch_upload_id_get**](rapidata/api_client/docs/BatchUploadApi.md#asset_batch_upload_batch_upload_id_get) | **GET** /asset/batch-upload/{batchUploadId} | Gets the full result of a batch upload including all items. *BatchUploadApi* | [**asset_batch_upload_post**](rapidata/api_client/docs/BatchUploadApi.md#asset_batch_upload_post) | **POST** /asset/batch-upload | Creates a batch upload and queues processing for each URL. @@ -120,6 +120,7 @@ Class | Method | HTTP request | Description *CacheApi* | [**campaign_cache_user_scores_get**](rapidata/api_client/docs/CacheApi.md#campaign_cache_user_scores_get) | **GET** /campaign/cache/user-scores | Returns the current state of the in-memory default user score cache. *CampaignApi* | [**campaign_boost_global_level_put**](rapidata/api_client/docs/CampaignApi.md#campaign_boost_global_level_put) | **PUT** /campaign/boost/global-level | Sets or clears the manual global boost level. *CampaignApi* | [**campaign_boost_insights_get**](rapidata/api_client/docs/CampaignApi.md#campaign_boost_insights_get) | **GET** /campaign/boost/insights | Returns an attributed view of the aggregated boosting profile. +*CampaignApi* | [**campaign_boost_preheat_post**](rapidata/api_client/docs/CampaignApi.md#campaign_boost_preheat_post) | **POST** /campaign/boost/preheat | *CampaignApi* | [**campaign_boost_status_get**](rapidata/api_client/docs/CampaignApi.md#campaign_boost_status_get) | **GET** /campaign/boost/status | Returns the current boost status including active and inactive campaigns. *CampaignApi* | [**campaign_campaign_id_get**](rapidata/api_client/docs/CampaignApi.md#campaign_campaign_id_get) | **GET** /campaign/{campaignId} | Retrieves the details of a specific campaign. *CampaignApi* | [**campaign_campaign_id_patch**](rapidata/api_client/docs/CampaignApi.md#campaign_campaign_id_patch) | **PATCH** /campaign/{campaignId} | Updates the specified campaign's properties. @@ -246,7 +247,6 @@ Class | Method | HTTP request | Description *RankingWorkflowApi* | [**workflow_compare_workflow_id_results_get**](rapidata/api_client/docs/RankingWorkflowApi.md#workflow_compare_workflow_id_results_get) | **GET** /workflow/compare/{workflowId}/results | Get the result overview for a ranking workflow. *RapidApi* | [**rapid_rapid_id_reject_post**](rapidata/api_client/docs/RapidApi.md#rapid_rapid_id_reject_post) | **POST** /rapid/{rapidId}/reject | Rejects a completed rapid, marking its results as invalid. *RapidataIdentityAPIApi* | [**root_get**](rapidata/api_client/docs/RapidataIdentityAPIApi.md#root_get) | **GET** / | -*RapidsApi* | [**audience_audience_id_rapid_rapid_id_patch**](rapidata/api_client/docs/RapidsApi.md#audience_audience_id_rapid_rapid_id_patch) | **PATCH** /audience/{audienceId}/rapid/{rapidId} | Updates a rapid's validation properties within an audience. *SampleApi* | [**benchmark_sample_sample_id_get**](rapidata/api_client/docs/SampleApi.md#benchmark_sample_sample_id_get) | **GET** /benchmark-sample/{sampleId} | Gets a sample by its Id. *SimpleWorkflowApi* | [**workflow_simple_workflow_id_results_get**](rapidata/api_client/docs/SimpleWorkflowApi.md#workflow_simple_workflow_id_results_get) | **GET** /workflow/simple/{workflowId}/results | Get the result overview for a simple workflow. *SurveyApi* | [**identity_survey_post**](rapidata/api_client/docs/SurveyApi.md#identity_survey_post) | **POST** /identity/survey | Sends a survey. @@ -279,7 +279,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - [AddExampleToAudienceEndpointInput](rapidata/api_client/docs/AddExampleToAudienceEndpointInput.md) - - [AddRapidToAudienceModel](rapidata/api_client/docs/AddRapidToAudienceModel.md) - [AddUserResponseResult](rapidata/api_client/docs/AddUserResponseResult.md) - [AddValidationRapidModel](rapidata/api_client/docs/AddValidationRapidModel.md) - [AgeUserFilterModelAgeGroup](rapidata/api_client/docs/AgeUserFilterModelAgeGroup.md) @@ -290,6 +289,7 @@ Class | Method | HTTP request | Description - [AudienceBoostModel2](rapidata/api_client/docs/AudienceBoostModel2.md) - [AudienceJobState](rapidata/api_client/docs/AudienceJobState.md) - [AudienceStatus](rapidata/api_client/docs/AudienceStatus.md) + - [AudiencesGetNameParameter](rapidata/api_client/docs/AudiencesGetNameParameter.md) - [BatchUploadStatus](rapidata/api_client/docs/BatchUploadStatus.md) - [BatchUploadUrlStatus](rapidata/api_client/docs/BatchUploadUrlStatus.md) - [BenchmarkQueryResult](rapidata/api_client/docs/BenchmarkQueryResult.md) @@ -301,7 +301,6 @@ Class | Method | HTTP request | Description - [BoostingProfileModel](rapidata/api_client/docs/BoostingProfileModel.md) - [BoxShape](rapidata/api_client/docs/BoxShape.md) - [CampaignStatusModel](rapidata/api_client/docs/CampaignStatusModel.md) - - [CampaignsGetIdParameter](rapidata/api_client/docs/CampaignsGetIdParameter.md) - [ChangeBoostEndpointInput](rapidata/api_client/docs/ChangeBoostEndpointInput.md) - [ClassifyPayload](rapidata/api_client/docs/ClassifyPayload.md) - [ClassifyPayloadCategory](rapidata/api_client/docs/ClassifyPayloadCategory.md) @@ -313,8 +312,8 @@ Class | Method | HTTP request | Description - [CompressionLibrary](rapidata/api_client/docs/CompressionLibrary.md) - [ConditionalValidationSelectionValidationChance](rapidata/api_client/docs/ConditionalValidationSelectionValidationChance.md) - [ConfidenceInterval](rapidata/api_client/docs/ConfidenceInterval.md) - - [CreateAudienceRequest](rapidata/api_client/docs/CreateAudienceRequest.md) - - [CreateAudienceResult](rapidata/api_client/docs/CreateAudienceResult.md) + - [CreateAudienceEndpointInput](rapidata/api_client/docs/CreateAudienceEndpointInput.md) + - [CreateAudienceEndpointOutput](rapidata/api_client/docs/CreateAudienceEndpointOutput.md) - [CreateBatchUploadEndpointInput](rapidata/api_client/docs/CreateBatchUploadEndpointInput.md) - [CreateBatchUploadEndpointOutput](rapidata/api_client/docs/CreateBatchUploadEndpointOutput.md) - [CreateBenchmarkModel](rapidata/api_client/docs/CreateBenchmarkModel.md) @@ -371,7 +370,7 @@ Class | Method | HTTP request | Description - [FlowType](rapidata/api_client/docs/FlowType.md) - [ForkBenchmarkResult](rapidata/api_client/docs/ForkBenchmarkResult.md) - [GenderUserFilterModelGender](rapidata/api_client/docs/GenderUserFilterModelGender.md) - - [GetAudienceByIdResult](rapidata/api_client/docs/GetAudienceByIdResult.md) + - [GetAudienceByIdEndpointOutput](rapidata/api_client/docs/GetAudienceByIdEndpointOutput.md) - [GetAudienceUserStateMetricsResult](rapidata/api_client/docs/GetAudienceUserStateMetricsResult.md) - [GetAvailableValidationSetsResult](rapidata/api_client/docs/GetAvailableValidationSetsResult.md) - [GetBatchUploadResultEndpointOutput](rapidata/api_client/docs/GetBatchUploadResultEndpointOutput.md) @@ -706,7 +705,6 @@ Class | Method | HTTP request | Description - [NewsletterModel](rapidata/api_client/docs/NewsletterModel.md) - [NotAvailableYetResult](rapidata/api_client/docs/NotAvailableYetResult.md) - [OrderState](rapidata/api_client/docs/OrderState.md) - - [PageInfo](rapidata/api_client/docs/PageInfo.md) - [PagedResultOfBenchmarkQueryResult](rapidata/api_client/docs/PagedResultOfBenchmarkQueryResult.md) - [PagedResultOfClientsQueryResult](rapidata/api_client/docs/PagedResultOfClientsQueryResult.md) - [PagedResultOfGetGroupedRankingWorkflowResultsResult](rapidata/api_client/docs/PagedResultOfGetGroupedRankingWorkflowResultsResult.md) @@ -717,18 +715,17 @@ Class | Method | HTTP request | Description - [PagedResultOfLeaderboardsQueryResult](rapidata/api_client/docs/PagedResultOfLeaderboardsQueryResult.md) - [PagedResultOfParticipantByBenchmark](rapidata/api_client/docs/PagedResultOfParticipantByBenchmark.md) - [PagedResultOfPromptByBenchmarkResult](rapidata/api_client/docs/PagedResultOfPromptByBenchmarkResult.md) - - [PagedResultOfQueryAudiencesResult](rapidata/api_client/docs/PagedResultOfQueryAudiencesResult.md) - [PagedResultOfQueryDatapointsByDatasetIdResult](rapidata/api_client/docs/PagedResultOfQueryDatapointsByDatasetIdResult.md) - [PagedResultOfQueryJobDefinitionsResult](rapidata/api_client/docs/PagedResultOfQueryJobDefinitionsResult.md) - [PagedResultOfQueryJobRevisionsResult](rapidata/api_client/docs/PagedResultOfQueryJobRevisionsResult.md) - [PagedResultOfQueryJobsResult](rapidata/api_client/docs/PagedResultOfQueryJobsResult.md) - - [PagedResultOfQueryRapidsOutput](rapidata/api_client/docs/PagedResultOfQueryRapidsOutput.md) - [PagedResultOfQueryValidationRapidEligibilityResult](rapidata/api_client/docs/PagedResultOfQueryValidationRapidEligibilityResult.md) - [PagedResultOfRapidModel](rapidata/api_client/docs/PagedResultOfRapidModel.md) - [PagedResultOfRunsByLeaderboardResult](rapidata/api_client/docs/PagedResultOfRunsByLeaderboardResult.md) - [PagedResultOfSampleByIdentifier](rapidata/api_client/docs/PagedResultOfSampleByIdentifier.md) - [PagedResultOfStandingByLeaderboard](rapidata/api_client/docs/PagedResultOfStandingByLeaderboard.md) - [PagedResultOfValidationSetModel](rapidata/api_client/docs/PagedResultOfValidationSetModel.md) + - [Pagination](rapidata/api_client/docs/Pagination.md) - [ParticipantByBenchmark](rapidata/api_client/docs/ParticipantByBenchmark.md) - [ParticipantStatus](rapidata/api_client/docs/ParticipantStatus.md) - [PidBatchMode](rapidata/api_client/docs/PidBatchMode.md) @@ -740,7 +737,8 @@ Class | Method | HTTP request | Description - [PromptByBenchmarkResult](rapidata/api_client/docs/PromptByBenchmarkResult.md) - [QueryAggregatedOrdersEndpointOutput](rapidata/api_client/docs/QueryAggregatedOrdersEndpointOutput.md) - [QueryAggregatedOrdersEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryAggregatedOrdersEndpointPagedResultOfOutput.md) - - [QueryAudiencesResult](rapidata/api_client/docs/QueryAudiencesResult.md) + - [QueryAudiencesEndpointOutput](rapidata/api_client/docs/QueryAudiencesEndpointOutput.md) + - [QueryAudiencesEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryAudiencesEndpointPagedResultOfOutput.md) - [QueryCampaignsEndpointOutput](rapidata/api_client/docs/QueryCampaignsEndpointOutput.md) - [QueryCampaignsEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryCampaignsEndpointPagedResultOfOutput.md) - [QueryCustomersEndpointOutput](rapidata/api_client/docs/QueryCustomersEndpointOutput.md) @@ -762,7 +760,6 @@ Class | Method | HTTP request | Description - [QueryOrdersEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryOrdersEndpointPagedResultOfOutput.md) - [QueryOrganizationsEndpointOutput](rapidata/api_client/docs/QueryOrganizationsEndpointOutput.md) - [QueryOrganizationsEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryOrganizationsEndpointPagedResultOfOutput.md) - - [QueryRapidsOutput](rapidata/api_client/docs/QueryRapidsOutput.md) - [QueryValidationFeedbacksEndpointOutput](rapidata/api_client/docs/QueryValidationFeedbacksEndpointOutput.md) - [QueryValidationFeedbacksEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryValidationFeedbacksEndpointPagedResultOfOutput.md) - [QueryValidationRapidEligibilityModelQueryValidationModel](rapidata/api_client/docs/QueryValidationRapidEligibilityModelQueryValidationModel.md) @@ -784,6 +781,7 @@ Class | Method | HTTP request | Description - [SendSurveyModel](rapidata/api_client/docs/SendSurveyModel.md) - [SetManualGlobalBoostLevelEndpointInput](rapidata/api_client/docs/SetManualGlobalBoostLevelEndpointInput.md) - [SimplifiedAudienceUserState](rapidata/api_client/docs/SimplifiedAudienceUserState.md) + - [SortCriteria](rapidata/api_client/docs/SortCriteria.md) - [SortCriterion](rapidata/api_client/docs/SortCriterion.md) - [SortDirection](rapidata/api_client/docs/SortDirection.md) - [StandingByBenchmark](rapidata/api_client/docs/StandingByBenchmark.md) @@ -802,9 +800,8 @@ Class | Method | HTTP request | Description - [TranscriptionWord](rapidata/api_client/docs/TranscriptionWord.md) - [TranslatedString](rapidata/api_client/docs/TranslatedString.md) - [UnlockOrderEndpointOutput](rapidata/api_client/docs/UnlockOrderEndpointOutput.md) + - [UpdateAudienceEndpointInput](rapidata/api_client/docs/UpdateAudienceEndpointInput.md) - [UpdateAudienceExampleEndpointInput](rapidata/api_client/docs/UpdateAudienceExampleEndpointInput.md) - - [UpdateAudienceRapidEndpointInput](rapidata/api_client/docs/UpdateAudienceRapidEndpointInput.md) - - [UpdateAudienceRequest](rapidata/api_client/docs/UpdateAudienceRequest.md) - [UpdateBenchmarkModel](rapidata/api_client/docs/UpdateBenchmarkModel.md) - [UpdateBenchmarkNameModel](rapidata/api_client/docs/UpdateBenchmarkNameModel.md) - [UpdateBoostConfigEndpointInput](rapidata/api_client/docs/UpdateBoostConfigEndpointInput.md) diff --git a/src/rapidata/rapidata_client/audience/rapidata_audience.py b/src/rapidata/rapidata_client/audience/rapidata_audience.py index 310b5b1d..8eb91615 100644 --- a/src/rapidata/rapidata_client/audience/rapidata_audience.py +++ b/src/rapidata/rapidata_client/audience/rapidata_audience.py @@ -72,14 +72,14 @@ def update_filters(self, filters: list[RapidataFilter]) -> RapidataAudience: RapidataAudience: The updated audience instance (self) for method chaining. """ with tracer.start_as_current_span("RapidataAudience.update_filters"): - from rapidata.api_client.models.update_audience_request import ( - UpdateAudienceRequest, + from rapidata.api_client.models.update_audience_endpoint_input import ( + UpdateAudienceEndpointInput, ) logger.debug(f"Updating filters for audience: {self.id} to {filters}") self._openapi_service.audience.audience_api.audience_audience_id_patch( audience_id=self.id, - update_audience_request=UpdateAudienceRequest( + update_audience_endpoint_input=UpdateAudienceEndpointInput( filters=[filter._to_audience_model() for filter in filters], ), ) @@ -96,14 +96,14 @@ def update_name(self, name: str) -> RapidataAudience: RapidataAudience: The updated audience instance (self) for method chaining. """ with tracer.start_as_current_span("RapidataAudience.update_name"): - from rapidata.api_client.models.update_audience_request import ( - UpdateAudienceRequest, + from rapidata.api_client.models.update_audience_endpoint_input import ( + UpdateAudienceEndpointInput, ) logger.debug(f"Updating name for audience: {self.id} to {name}") self._openapi_service.audience.audience_api.audience_audience_id_patch( audience_id=self.id, - update_audience_request=UpdateAudienceRequest(name=name), + update_audience_endpoint_input=UpdateAudienceEndpointInput(name=name), ) self._name = name return self @@ -255,13 +255,13 @@ def find_jobs( from rapidata.api_client.models.root_filter import RootFilter from rapidata.api_client.models.filter import Filter from rapidata.api_client.models.filter_operator import FilterOperator - from rapidata.api_client.models.page_info import PageInfo + from rapidata.api_client.models.pagination import Pagination from rapidata.api_client.models.sort_criterion import SortCriterion from rapidata.api_client.models.sort_direction import SortDirection response = self._openapi_service.order.job_api.jobs_get( request=QueryModel( - page=PageInfo(index=page, size=amount), + page=Pagination(index=page, size=amount), filter=RootFilter( filters=[ Filter( diff --git a/src/rapidata/rapidata_client/audience/rapidata_audience_manager.py b/src/rapidata/rapidata_client/audience/rapidata_audience_manager.py index f6cda4dc..7ca645ac 100644 --- a/src/rapidata/rapidata_client/audience/rapidata_audience_manager.py +++ b/src/rapidata/rapidata_client/audience/rapidata_audience_manager.py @@ -39,15 +39,15 @@ def create_audience( from rapidata.rapidata_client.audience.rapidata_audience import ( RapidataAudience, ) - from rapidata.api_client.models.create_audience_request import ( - CreateAudienceRequest, + from rapidata.api_client.models.create_audience_endpoint_input import ( + CreateAudienceEndpointInput, ) logger.debug(f"Creating audience: {name}") if filters is None: filters = [] response = self._openapi_service.audience.audience_api.audience_post( - create_audience_request=CreateAudienceRequest( + create_audience_endpoint_input=CreateAudienceEndpointInput( name=name, filters=[filter._to_audience_model() for filter in filters], ), @@ -110,36 +110,19 @@ def find_audiences( from rapidata.rapidata_client.filter._backend_filter_mapper import ( BackendFilterMapper, ) - from rapidata.api_client.models.page_info import PageInfo - from rapidata.api_client.models.query_model import QueryModel - from rapidata.api_client.models.root_filter import RootFilter - from rapidata.api_client.models.filter import Filter - from rapidata.api_client.models.filter_operator import FilterOperator - from rapidata.api_client.models.sort_criterion import SortCriterion - from rapidata.api_client.models.sort_direction import SortDirection + from rapidata.api_client.models.audiences_get_name_parameter import ( + AudiencesGetNameParameter, + ) from rapidata.rapidata_client.audience.rapidata_audience import ( RapidataAudience, ) logger.debug(f"Finding audiences: {name}, {amount}") response = self._openapi_service.audience.audience_api.audiences_get( - request=QueryModel( - page=PageInfo(index=page, size=amount), - filter=RootFilter( - filters=[ - Filter( - field="Name", - operator=FilterOperator.CONTAINS, - value=name, - ) - ] - ), - sortCriteria=[ - SortCriterion( - direction=SortDirection.DESC, propertyName="CreatedAt" - ) - ], - ) + page=page, + page_size=amount, + name=AudiencesGetNameParameter(contains=name), + sort=["-created_at"], ) audiences = [] for item in response.items: diff --git a/src/rapidata/rapidata_client/benchmark/rapidata_benchmark.py b/src/rapidata/rapidata_client/benchmark/rapidata_benchmark.py index 82bcd46e..585ff967 100644 --- a/src/rapidata/rapidata_client/benchmark/rapidata_benchmark.py +++ b/src/rapidata/rapidata_client/benchmark/rapidata_benchmark.py @@ -51,7 +51,7 @@ def __init__(self, name: str, id: str, openapi_service: OpenAPIService): def __instantiate_prompts(self) -> None: from rapidata.rapidata_client.config import tracer from rapidata.api_client.models.query_model import QueryModel - from rapidata.api_client.models.page_info import PageInfo + from rapidata.api_client.models.pagination import Pagination from rapidata.api_client.models.file_asset_model import FileAssetModel from rapidata.api_client.models.source_url_metadata_model import ( SourceUrlMetadataModel, @@ -64,7 +64,7 @@ def __instantiate_prompts(self) -> None: while True: prompts_result = self._openapi_service.leaderboard.benchmark_api.benchmark_benchmark_id_prompts_get( benchmark_id=self.id, - request=QueryModel(page=PageInfo(index=current_page, size=100)), + request=QueryModel(page=Pagination(index=current_page, size=100)), ) if prompts_result.total_pages is None: @@ -138,7 +138,7 @@ def leaderboards(self) -> list[RapidataLeaderboard]: Returns the leaderboards that are registered for the benchmark. """ from rapidata.api_client.models.query_model import QueryModel - from rapidata.api_client.models.page_info import PageInfo + from rapidata.api_client.models.pagination import Pagination from rapidata.rapidata_client.benchmark.leaderboard.rapidata_leaderboard import ( RapidataLeaderboard, ) @@ -152,7 +152,7 @@ def leaderboards(self) -> list[RapidataLeaderboard]: leaderboards_result = self._openapi_service.leaderboard.benchmark_api.benchmark_benchmark_id_leaderboards_get( benchmark_id=self.id, request=QueryModel( - page=PageInfo(index=current_page, size=100), + page=Pagination(index=current_page, size=100), ), ) diff --git a/src/rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py b/src/rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py index 93fecd9a..935c1e81 100644 --- a/src/rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py +++ b/src/rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py @@ -3,7 +3,7 @@ from rapidata.api_client.models.create_benchmark_model import CreateBenchmarkModel from rapidata.service.openapi_service import OpenAPIService from rapidata.api_client.models.query_model import QueryModel -from rapidata.api_client.models.page_info import PageInfo +from rapidata.api_client.models.pagination import Pagination from rapidata.api_client.models.root_filter import RootFilter from rapidata.api_client.models.filter import Filter from rapidata.api_client.models.sort_criterion import SortCriterion @@ -202,7 +202,7 @@ def find_benchmarks( benchmark_result = ( self.__openapi_service.leaderboard.benchmark_api.benchmarks_get( QueryModel( - page=PageInfo(index=page, size=amount), + page=Pagination(index=page, size=amount), filter=RootFilter( filters=[ Filter( diff --git a/src/rapidata/rapidata_client/flow/rapidata_flow_manager.py b/src/rapidata/rapidata_client/flow/rapidata_flow_manager.py index 213c72d0..d3086651 100644 --- a/src/rapidata/rapidata_client/flow/rapidata_flow_manager.py +++ b/src/rapidata/rapidata_client/flow/rapidata_flow_manager.py @@ -116,8 +116,8 @@ def find_flows( list[RapidataFlow]: A list of RapidataFlow instances. """ with tracer.start_as_current_span("RapidataFlowManager.find_flows"): - from rapidata.api_client.models.campaigns_get_id_parameter import ( - CampaignsGetIdParameter, + from rapidata.api_client.models.audiences_get_name_parameter import ( + AudiencesGetNameParameter, ) from rapidata.rapidata_client.flow.rapidata_flow import RapidataFlow @@ -127,7 +127,7 @@ def find_flows( page=page, page_size=amount, sort=["-created_at"], - name=CampaignsGetIdParameter(contains=name), + name=AudiencesGetNameParameter(contains=name), ) return [ diff --git a/src/rapidata/rapidata_client/job/rapidata_job_manager.py b/src/rapidata/rapidata_client/job/rapidata_job_manager.py index 33fe2a9a..b40cb9b4 100644 --- a/src/rapidata/rapidata_client/job/rapidata_job_manager.py +++ b/src/rapidata/rapidata_client/job/rapidata_job_manager.py @@ -652,7 +652,7 @@ def find_job_definitions( list[JobDefinition]: A list of JobDefinition instances. """ with tracer.start_as_current_span("JobManager.find_job_definitions"): - from rapidata.api_client.models.page_info import PageInfo + from rapidata.api_client.models.pagination import Pagination from rapidata.api_client.models.query_model import QueryModel from rapidata.api_client.models.root_filter import RootFilter from rapidata.api_client.models.filter import Filter @@ -663,7 +663,7 @@ def find_job_definitions( job_definition_page_result = ( self._openapi_service.order.job_api.job_definitions_get( request=QueryModel( - page=PageInfo(index=page, size=amount), + page=Pagination(index=page, size=amount), filter=RootFilter( filters=[ Filter( @@ -735,14 +735,14 @@ def find_jobs( from rapidata.api_client.models.root_filter import RootFilter from rapidata.api_client.models.filter import Filter from rapidata.api_client.models.filter_operator import FilterOperator - from rapidata.api_client.models.page_info import PageInfo + from rapidata.api_client.models.pagination import Pagination from rapidata.api_client.models.sort_criterion import SortCriterion from rapidata.api_client.models.sort_direction import SortDirection from rapidata.rapidata_client.job.rapidata_job import RapidataJob response = self._openapi_service.order.job_api.jobs_get( request=QueryModel( - page=PageInfo(index=page, size=amount), + page=Pagination(index=page, size=amount), filter=RootFilter( filters=[ Filter( diff --git a/src/rapidata/rapidata_client/order/rapidata_order_manager.py b/src/rapidata/rapidata_client/order/rapidata_order_manager.py index 493d032e..0e439008 100644 --- a/src/rapidata/rapidata_client/order/rapidata_order_manager.py +++ b/src/rapidata/rapidata_client/order/rapidata_order_manager.py @@ -906,14 +906,14 @@ def find_orders( list[RapidataOrder]: A list of RapidataOrder instances. """ with tracer.start_as_current_span("RapidataOrderManager.find_orders"): - from rapidata.api_client.models.campaigns_get_id_parameter import ( - CampaignsGetIdParameter, + from rapidata.api_client.models.audiences_get_name_parameter import ( + AudiencesGetNameParameter, ) order_page_result = self.__openapi_service.order.order_api.orders_get( page=page, page_size=amount, - order_name=CampaignsGetIdParameter(contains=name), + order_name=AudiencesGetNameParameter(contains=name), sort=["-order_date"], )