diff --git a/openapi/schemas/asset.openapi.json b/openapi/schemas/asset.openapi.json index 3f98ed3c2..64c46aae7 100644 --- a/openapi/schemas/asset.openapi.json +++ b/openapi/schemas/asset.openapi.json @@ -776,7 +776,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] diff --git a/openapi/schemas/audience.openapi.json b/openapi/schemas/audience.openapi.json index 5ef33a378..cb722c3d2 100644 --- a/openapi/schemas/audience.openapi.json +++ b/openapi/schemas/audience.openapi.json @@ -2124,7 +2124,10 @@ "Running", "Completed", "Failed", - "ManualApproval" + "ManualApproval", + "Queued", + "Paused", + "StaleResults" ] }, "AudienceStateRecalculationPhase": { @@ -4759,7 +4762,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] diff --git a/openapi/schemas/campaign.openapi.json b/openapi/schemas/campaign.openapi.json index a52031e18..90f6b3968 100644 --- a/openapi/schemas/campaign.openapi.json +++ b/openapi/schemas/campaign.openapi.json @@ -1861,6 +1861,9 @@ { "$ref": "#/components/schemas/ICampaignFilterModelAudienceStateFilterModel" }, + { + "$ref": "#/components/schemas/ICampaignFilterModelCampaignCooldownFilterModel" + }, { "$ref": "#/components/schemas/ICampaignFilterModelCampaignIdFilterModel" }, @@ -1903,6 +1906,7 @@ "mapping": { "AndFilter": "#/components/schemas/ICampaignFilterModelAndFilterModel", "AudienceStateFilter": "#/components/schemas/ICampaignFilterModelAudienceStateFilterModel", + "CampaignCooldownFilter": "#/components/schemas/ICampaignFilterModelCampaignCooldownFilterModel", "CampaignIdFilter": "#/components/schemas/ICampaignFilterModelCampaignIdFilterModel", "CampaignSessionCountFilter": "#/components/schemas/ICampaignFilterModelCampaignSessionCountFilterModel", "CountryFilter": "#/components/schemas/ICampaignFilterModelCountryFilterModel", @@ -1966,6 +1970,23 @@ } } }, + "ICampaignFilterModelCampaignCooldownFilterModel": { + "required": [ + "cooldown", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "CampaignCooldownFilter" + ], + "type": "string" + }, + "cooldown": { + "$ref": "#/components/schemas/ICooldownDurationModel" + } + } + }, "ICampaignFilterModelCampaignIdFilterModel": { "required": [ "campaignIds", @@ -2527,6 +2548,72 @@ } } }, + "ICooldownDurationModel": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/ICooldownDurationModelFixedCooldownDurationModel" + }, + { + "$ref": "#/components/schemas/ICooldownDurationModelRandomCooldownDurationModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "FixedCooldownDuration": "#/components/schemas/ICooldownDurationModelFixedCooldownDurationModel", + "RandomCooldownDuration": "#/components/schemas/ICooldownDurationModelRandomCooldownDurationModel" + } + } + }, + "ICooldownDurationModelFixedCooldownDurationModel": { + "required": [ + "duration", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "FixedCooldownDuration" + ], + "type": "string" + }, + "duration": { + "type": "string", + "format": "date-time" + } + } + }, + "ICooldownDurationModelRandomCooldownDurationModel": { + "required": [ + "minDuration", + "maxDuration", + "seedByUserId", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "RandomCooldownDuration" + ], + "type": "string" + }, + "minDuration": { + "type": "string", + "format": "date-time" + }, + "maxDuration": { + "type": "string", + "format": "date-time" + }, + "seedByUserId": { + "type": "boolean" + } + } + }, "QueryCampaignsEndpoint_Output": { "required": [ "id", @@ -2755,6 +2842,9 @@ "isEnabled": { "type": "boolean" }, + "dimension": { + "type": "string" + }, "bypassFilters": { "type": "boolean" }, @@ -2920,7 +3010,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] diff --git a/openapi/schemas/dataset.openapi.json b/openapi/schemas/dataset.openapi.json index 474e43922..60d814b5c 100644 --- a/openapi/schemas/dataset.openapi.json +++ b/openapi/schemas/dataset.openapi.json @@ -1576,7 +1576,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] diff --git a/openapi/schemas/flow.openapi.json b/openapi/schemas/flow.openapi.json index 03e37d467..ddcaa046f 100644 --- a/openapi/schemas/flow.openapi.json +++ b/openapi/schemas/flow.openapi.json @@ -2635,7 +2635,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] diff --git a/openapi/schemas/identity.openapi.json b/openapi/schemas/identity.openapi.json index 7c3707b8d..94021da31 100644 --- a/openapi/schemas/identity.openapi.json +++ b/openapi/schemas/identity.openapi.json @@ -1885,7 +1885,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ], diff --git a/openapi/schemas/leaderboard.openapi.json b/openapi/schemas/leaderboard.openapi.json index c6aa81af8..c73dbf67f 100644 --- a/openapi/schemas/leaderboard.openapi.json +++ b/openapi/schemas/leaderboard.openapi.json @@ -1343,6 +1343,52 @@ } }, "x-parameter-group": "filters" + }, + { + "name": "is_managed", + "in": "query", + "description": "Filter by is_managed.", + "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": { @@ -1597,6 +1643,65 @@ } } }, + "/benchmark/{benchmarkId}/sample-generation": { + "post": { + "tags": [ + "Benchmark", + "SampleGeneration" + ], + "summary": "Starts an asynchronous sample generation run.", + "parameters": [ + { + "name": "benchmarkId", + "in": "path", + "description": "The benchmark whose participants should run their faucets.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The generation configuration.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSampleGenerationEndpoint_Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSampleGenerationEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, "/benchmark/{benchmarkId}/participants/{participantId}/submit": { "post": { "tags": [ @@ -3543,6 +3648,97 @@ } } }, + "/participant/{participantId}/faucet": { + "delete": { + "tags": [ + "Participant", + "Faucet" + ], + "summary": "Removes the faucet configuration from a participant.", + "parameters": [ + { + "name": "participantId", + "in": "path", + "description": "The id of the participant.", + "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" + } + } + }, + "put": { + "tags": [ + "Participant", + "Faucet" + ], + "summary": "Sets the faucet used to auto-generate samples for a participant.", + "parameters": [ + { + "name": "participantId", + "in": "path", + "description": "The id of the participant whose faucet to set.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The faucet configuration payload.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IFaucetInput" + } + } + }, + "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" + } + } + } + }, "/participants/{participantId}/submit": { "post": { "tags": [ @@ -4041,6 +4237,17 @@ "default": false } }, + { + "name": "tags", + "in": "query", + "description": "The tags to filter the samples by; a sample matches when any of its prompt tags is in this list.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, { "name": "page", "in": "query", @@ -4199,49 +4406,556 @@ } } } - } - }, - "components": { - "schemas": { - "BoostLeaderboardEndpoint_Input": { - "required": [ - "participants", - "totalResponses" + }, + "/benchmark/sample-generation/{sampleGenerationId}": { + "get": { + "tags": [ + "SampleGeneration" ], - "type": "object", - "properties": { - "participants": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" + "summary": "Returns the current status and progress of a sample generation request.", + "parameters": [ + { + "name": "sampleGenerationId", + "in": "path", + "description": "The id of the sample generation request.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSampleGenerationEndpoint_Output" } } - ], - "description": "The participants of the given leaderboard that should be boosted." + } }, - "totalResponses": { - "type": "integer", - "description": "The total responses to add, shared across all participants.", - "format": "int32" - } - } - }, - "ConfidenceInterval": { - "required": [ - "lowerOffset", - "upperOffset" - ], - "type": "object", - "properties": { - "lowerOffset": { - "type": "number", - "format": "double" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } }, - "upperOffset": { - "type": "number", - "format": "double" + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/benchmark/sample-generation/{sampleGenerationId}/items": { + "get": { + "tags": [ + "SampleGeneration" + ], + "summary": "Returns the per-item audit trail for a sample generation request.", + "parameters": [ + { + "name": "sampleGenerationId", + "in": "path", + "description": "The id of the sample generation request.", + "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" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "created_at", + "-created_at", + "prompt_identifier", + "-prompt_identifier" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "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": "participant_id", + "in": "query", + "description": "Filter by participant_id.", + "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": "prompt_identifier", + "in": "query", + "description": "Filter by prompt_identifier.", + "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/GetSampleGenerationItemsEndpoint_PagedResultOfOutput" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/benchmark/{benchmarkId}/sample-generations": { + "get": { + "tags": [ + "SampleGeneration" + ], + "summary": "Lists historical sample generation runs for the given benchmark.", + "description": "Results are sorted by creation time (newest first) by default.", + "parameters": [ + { + "name": "benchmarkId", + "in": "path", + "description": "The id of the benchmark whose sample generations should be listed.", + "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" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "created_at", + "-created_at" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "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" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuerySampleGenerationsByBenchmarkEndpoint_PagedResultOfOutput" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/benchmark/sample-generation/{sampleGenerationId}/retry": { + "post": { + "tags": [ + "SampleGeneration" + ], + "summary": "Re-queues failed items of a sample generation so they run again.", + "description": "When no item ids are supplied, every failed item of the generation is retried. Item ids that\n do not belong to the generation or are not in a failed state are ignored. Returns the ids\n that were re-queued; a generation with no failed items yields an empty result.", + "parameters": [ + { + "name": "sampleGenerationId", + "in": "path", + "description": "The id of the sample generation request.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Optional payload restricting the retry to specific item ids.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/RetrySampleGenerationEndpoint_Input" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RetrySampleGenerationEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + } + }, + "components": { + "schemas": { + "BoostLeaderboardEndpoint_Input": { + "required": [ + "participants", + "totalResponses" + ], + "type": "object", + "properties": { + "participants": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "The participants of the given leaderboard that should be boosted." + }, + "totalResponses": { + "type": "integer", + "description": "The total responses to add, shared across all participants.", + "format": "int32" + } + } + }, + "ConfidenceInterval": { + "required": [ + "lowerOffset", + "upperOffset" + ], + "type": "object", + "properties": { + "lowerOffset": { + "type": "number", + "format": "double" + }, + "upperOffset": { + "type": "number", + "format": "double" } } }, @@ -4576,6 +5290,85 @@ } } }, + "CreateSampleGenerationEndpoint_Input": { + "required": [ + "samplesPerPrompt" + ], + "type": "object", + "properties": { + "samplesPerPrompt": { + "type": "integer", + "description": "How many samples to request per matching prompt (1 to 16).", + "format": "int32" + }, + "participantIds": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Restrict generation to specific participants. Defaults to all participants\n in the benchmark that have a configured faucet." + }, + "promptIdentifiers": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Restrict generation to specific prompt identifiers.\n Defaults to every prompt in the benchmark." + }, + "tags": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Restrict generation to prompts having at least one of these tags." + } + } + }, + "CreateSampleGenerationEndpoint_Output": { + "required": [ + "id", + "totalCount", + "skippedParticipantIds" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the created sample generation request." + }, + "totalCount": { + "type": "integer", + "description": "The total number of generation items that were queued.", + "format": "int32" + }, + "skippedParticipantIds": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Participants that matched the selection but were skipped because they have no faucet\n configured. Empty when explicit participant ids were supplied." + } + } + }, "CreateSampleNewEndpoint_Input": { "required": [ "identifier", @@ -4652,6 +5445,7 @@ "createdAt", "ownerId", "ownerMail", + "initialBoostLevel", "scoreShift", "scoreScale" ], @@ -4683,6 +5477,12 @@ "type": "string", "description": "The mail of the customer owning the benchmark." }, + "initialBoostLevel": { + "type": "integer", + "description": "The initial boost level applied to the campaign of every run created from this\n benchmark. Null means the benchmark default is used.", + "format": "int32", + "nullable": true + }, "scoreShift": { "type": "number", "description": "Additive offset applied to displayed scores on the overall scoreboard of this\n benchmark.", @@ -5048,6 +5848,14 @@ "benchmarkId": { "type": "string", "description": "The id of the benchmark the participant belongs to." + }, + "faucet": { + "allOf": [ + { + "$ref": "#/components/schemas/IFaucetOutput" + } + ], + "description": "The faucet configured to auto-generate samples, or null if none is set." } } }, @@ -5228,19 +6036,236 @@ ], "description": "The tags associated with the sample." }, - "createdAt": { - "type": "string", - "description": "The timestamp when the sample was created.", - "format": "date-time" + "createdAt": { + "type": "string", + "description": "The timestamp when the sample was created.", + "format": "date-time" + }, + "ownerId": { + "type": "string", + "description": "The id of the customer that owns the sample.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The mail of the customer that owns the sample." + } + } + }, + "GetSampleGenerationEndpoint_Output": { + "required": [ + "id", + "benchmarkId", + "status", + "samplesPerPrompt", + "totalCount", + "completedCount", + "failedCount", + "ownerId", + "ownerMail", + "createdAt" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the sample generation request." + }, + "benchmarkId": { + "type": "string", + "description": "The benchmark this generation belongs to." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/SampleGenerationStatus" + } + ], + "description": "The current status of the generation." + }, + "samplesPerPrompt": { + "type": "integer", + "description": "How many samples are being generated per prompt.", + "format": "int32" + }, + "totalCount": { + "type": "integer", + "description": "The total number of items queued.", + "format": "int32" + }, + "completedCount": { + "type": "integer", + "description": "The number of items that have succeeded so far.", + "format": "int32" + }, + "failedCount": { + "type": "integer", + "description": "The number of items that have failed.", + "format": "int32" + }, + "participantIdFilter": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Optional participant id filter that was applied when this generation was created." + }, + "promptIdentifierFilter": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Optional prompt identifier filter that was applied." + }, + "tagsFilter": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Optional tag filter that was applied." + }, + "ownerId": { + "type": "string", + "description": "The id of the customer that started this generation.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The mail of the customer that started this generation." + }, + "createdAt": { + "type": "string", + "description": "When the generation was created.", + "format": "date-time" + } + } + }, + "GetSampleGenerationItemsEndpoint_Output": { + "required": [ + "id", + "sampleGenerationId", + "participantId", + "benchmarkPromptId", + "promptIdentifier", + "sampleCount", + "status", + "attemptCount", + "sampleIds", + "createdAt" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the generation item." + }, + "sampleGenerationId": { + "type": "string", + "description": "The id of the parent sample generation." + }, + "participantId": { + "type": "string", + "description": "The participant whose faucet is producing this sample." + }, + "benchmarkPromptId": { + "type": "string", + "description": "The benchmark prompt this item targets." + }, + "promptIdentifier": { + "type": "string", + "description": "The identifier of the prompt being generated." + }, + "sampleCount": { + "type": "integer", + "description": "How many samples this item produces for its (participant, prompt) pair.", + "format": "int32" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/SampleGenerationItemStatus" + } + ], + "description": "The current status of this item." + }, + "attemptCount": { + "type": "integer", + "description": "Number of delivery attempts that have been made on this item.", + "format": "int32" + }, + "providerRequestId": { + "type": "string", + "description": "Provider-side request id used to correlate with the provider's logs.", + "nullable": true + }, + "failureReason": { + "type": "string", + "description": "Failure reason if the item is in a failed state.", + "nullable": true + }, + "sampleIds": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "The ids of the samples created from this item once it succeeds." + }, + "createdAt": { + "type": "string", + "description": "When the item was created.", + "format": "date-time" + } + } + }, + "GetSampleGenerationItemsEndpoint_PagedResultOfOutput": { + "required": [ + "total", + "page", + "pageSize", + "items" + ], + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64" + }, + "page": { + "type": "integer", + "format": "int32" }, - "ownerId": { - "type": "string", - "description": "The id of the customer that owns the sample.", - "format": "uuid" + "pageSize": { + "type": "integer", + "format": "int32" }, - "ownerMail": { - "type": "string", - "description": "The mail of the customer that owns the sample." + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetSampleGenerationItemsEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" } } }, @@ -5920,6 +6945,117 @@ } } }, + "IFaucetInput": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IFaucetInputReplicateFaucetInput" + } + ], + "description": "Polymorphic request body describing a faucet to configure on a participant. The concrete\n type is selected by the _t discriminator (e.g. \"Replicate\").", + "discriminator": { + "propertyName": "_t", + "mapping": { + "Replicate": "#/components/schemas/IFaucetInputReplicateFaucetInput" + } + } + }, + "IFaucetInputReplicateFaucetInput": { + "required": [ + "modelOwner", + "modelName", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "Replicate" + ], + "type": "string" + }, + "modelOwner": { + "type": "string", + "description": "The owner of the hosted model (e.g. \"stability-ai\")." + }, + "modelName": { + "type": "string", + "description": "The model name (e.g. \"sdxl\")." + }, + "modelVersion": { + "type": "string", + "description": "Optional pinned model version hash.", + "nullable": true + } + }, + "description": "Configures a faucet that generates samples via the Replicate API." + }, + "IFaucetOutput": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IFaucetOutputManagedFaucetOutput" + }, + { + "$ref": "#/components/schemas/IFaucetOutputReplicateFaucetOutput" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "Managed": "#/components/schemas/IFaucetOutputManagedFaucetOutput", + "Replicate": "#/components/schemas/IFaucetOutputReplicateFaucetOutput" + } + } + }, + "IFaucetOutputManagedFaucetOutput": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "Managed" + ], + "type": "string" + }, + "testTimeScaling": { + "type": "integer", + "format": "int32", + "nullable": true + } + } + }, + "IFaucetOutputReplicateFaucetOutput": { + "required": [ + "modelOwner", + "modelName", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "Replicate" + ], + "type": "string" + }, + "modelOwner": { + "type": "string" + }, + "modelName": { + "type": "string" + }, + "modelVersion": { + "type": "string", + "nullable": true + } + } + }, "IMetadataInput": { "required": [ "_t" @@ -6880,6 +8016,142 @@ } } }, + "QuerySampleGenerationsByBenchmarkEndpoint_Output": { + "required": [ + "id", + "benchmarkId", + "status", + "samplesPerPrompt", + "totalCount", + "completedCount", + "failedCount", + "ownerId", + "ownerMail", + "createdAt" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the sample generation request." + }, + "benchmarkId": { + "type": "string", + "description": "The benchmark this generation belongs to." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/SampleGenerationStatus" + } + ], + "description": "The current status of the generation." + }, + "samplesPerPrompt": { + "type": "integer", + "description": "How many samples are being generated per prompt.", + "format": "int32" + }, + "totalCount": { + "type": "integer", + "description": "The total number of items queued.", + "format": "int32" + }, + "completedCount": { + "type": "integer", + "description": "The number of items that have succeeded so far.", + "format": "int32" + }, + "failedCount": { + "type": "integer", + "description": "The number of items that have failed.", + "format": "int32" + }, + "participantIdFilter": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Optional participant id filter that was applied when this generation was created." + }, + "promptIdentifierFilter": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Optional prompt identifier filter that was applied." + }, + "tagsFilter": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Optional tag filter that was applied." + }, + "ownerId": { + "type": "string", + "description": "The id of the customer that started this generation.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The mail of the customer that started this generation." + }, + "createdAt": { + "type": "string", + "description": "When the generation was created.", + "format": "date-time" + } + } + }, + "QuerySampleGenerationsByBenchmarkEndpoint_PagedResultOfOutput": { + "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/QuerySampleGenerationsByBenchmarkEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, "QueryStandingsEndpoint_Output": { "required": [ "id", @@ -6995,6 +8267,48 @@ } } }, + "RetrySampleGenerationEndpoint_Input": { + "type": "object", + "properties": { + "itemIds": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "The specific item ids to retry. When omitted or empty, every failed item of the\n generation is retried." + } + } + }, + "RetrySampleGenerationEndpoint_Output": { + "required": [ + "retriedCount", + "retriedItemIds" + ], + "type": "object", + "properties": { + "retriedCount": { + "type": "integer", + "description": "How many failed items were re-queued.", + "format": "int32" + }, + "retriedItemIds": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "The ids of the items that were re-queued." + } + } + }, "RunStatus": { "enum": [ "Queued", @@ -7003,6 +8317,24 @@ "Failed" ] }, + "SampleGenerationItemStatus": { + "enum": [ + "Pending", + "Running", + "Succeeded", + "Failed" + ] + }, + "SampleGenerationStatus": { + "enum": [ + "Pending", + "Processing", + "Completed", + "CompletedWithFailures", + "Failed", + "Cancelled" + ] + }, "StandingStatus": { "enum": [ "Created", @@ -7285,7 +8617,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] diff --git a/openapi/schemas/order.openapi.json b/openapi/schemas/order.openapi.json index 4c66ab4d1..7c8308b45 100644 --- a/openapi/schemas/order.openapi.json +++ b/openapi/schemas/order.openapi.json @@ -3013,7 +3013,10 @@ "Running", "Completed", "Failed", - "ManualApproval" + "ManualApproval", + "Queued", + "Paused", + "StaleResults" ] }, "CloneOrderEndpoint_Input": { @@ -6084,11 +6087,17 @@ ] }, "StickyConfig": { + "required": [ + "dimension" + ], "type": "object", "properties": { "isEnabled": { "type": "boolean" }, + "dimension": { + "type": "string" + }, "bypassFilters": { "type": "boolean" }, @@ -6247,7 +6256,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] diff --git a/openapi/schemas/pipeline.openapi.json b/openapi/schemas/pipeline.openapi.json index 1643d7786..d320e0dca 100644 --- a/openapi/schemas/pipeline.openapi.json +++ b/openapi/schemas/pipeline.openapi.json @@ -599,7 +599,6 @@ }, "IMetadataCountMetadata": { "required": [ - "count", "visibilities", "_t" ], @@ -664,8 +663,6 @@ }, "IMetadataImageDimensionMetadata": { "required": [ - "height", - "width", "visibilities", "_t" ], @@ -691,8 +688,6 @@ }, "IMetadataLocationMetadata": { "required": [ - "x", - "y", "visibilities", "_t" ], @@ -760,9 +755,6 @@ }, "IMetadataStreamsMetadata": { "required": [ - "hasAudio", - "hasVideo", - "hasSubtitles", "visibilities", "_t" ], @@ -1644,7 +1636,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] diff --git a/openapi/schemas/rapid.openapi.json b/openapi/schemas/rapid.openapi.json index 0c5ebbe62..03adfbbad 100644 --- a/openapi/schemas/rapid.openapi.json +++ b/openapi/schemas/rapid.openapi.json @@ -4121,7 +4121,6 @@ }, "TranslatedString": { "required": [ - "wasTranslated", "englishText", "text", "targetLanguage" @@ -4249,7 +4248,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] diff --git a/openapi/schemas/rapidata.filtered.openapi.json b/openapi/schemas/rapidata.filtered.openapi.json index ab11e32ce..87b4b79f9 100644 --- a/openapi/schemas/rapidata.filtered.openapi.json +++ b/openapi/schemas/rapidata.filtered.openapi.json @@ -99,6 +99,10 @@ "name": "Benchmark", "x-displayName": "Benchmark" }, + { + "name": "SampleGeneration", + "x-displayName": "SampleGeneration" + }, { "name": "Leaderboard", "x-displayName": "Leaderboard" @@ -107,6 +111,10 @@ "name": "Participant", "x-displayName": "Participant" }, + { + "name": "Faucet", + "x-displayName": "Faucet" + }, { "name": "Prompt", "x-displayName": "Prompt" @@ -263,7 +271,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -355,7 +364,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -438,7 +448,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -488,7 +499,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -545,7 +557,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -601,7 +614,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -667,7 +681,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -727,7 +742,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -783,7 +799,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -850,7 +867,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -899,7 +917,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -953,7 +972,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1018,7 +1038,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1074,7 +1095,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1130,7 +1152,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1186,7 +1209,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1242,7 +1266,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1297,7 +1322,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1353,7 +1379,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1408,7 +1435,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1476,7 +1504,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1525,7 +1554,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1849,7 +1879,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2212,7 +2243,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2262,7 +2294,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2300,7 +2333,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2360,7 +2394,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2409,7 +2444,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2458,7 +2494,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2525,7 +2562,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2592,7 +2630,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2648,7 +2687,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2830,7 +2870,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2899,7 +2940,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2944,7 +2986,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2989,7 +3032,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3035,7 +3079,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3080,7 +3125,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3136,7 +3182,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3194,7 +3241,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3252,7 +3300,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3319,7 +3368,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3351,7 +3401,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3400,7 +3451,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3438,7 +3490,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3801,7 +3854,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3850,7 +3904,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3899,7 +3954,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4122,7 +4178,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4160,7 +4217,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4227,7 +4285,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4276,7 +4335,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4330,7 +4390,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4387,7 +4448,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4571,7 +4633,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4627,7 +4690,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4683,7 +4747,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4739,7 +4804,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4799,7 +4865,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4859,7 +4926,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4908,7 +4976,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4962,7 +5031,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5045,7 +5115,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5128,7 +5199,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5211,7 +5283,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5294,7 +5367,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5469,7 +5543,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5518,7 +5593,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5574,7 +5650,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5634,7 +5711,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5701,7 +5779,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5883,7 +5962,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5939,7 +6019,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6006,7 +6087,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6073,7 +6155,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6094,7 +6177,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6150,7 +6234,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6199,7 +6284,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6254,7 +6340,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6476,7 +6563,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6510,7 +6598,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6778,7 +6867,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6835,7 +6925,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6894,7 +6985,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6951,7 +7043,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6984,7 +7077,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7033,7 +7127,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7082,7 +7177,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7303,7 +7399,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7352,7 +7449,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7408,7 +7506,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7475,7 +7574,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7705,7 +7805,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7772,7 +7873,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7821,7 +7923,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7875,7 +7978,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7933,7 +8037,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7991,7 +8096,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -8047,7 +8153,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -8146,7 +8253,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -8214,7 +8322,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -8291,7 +8400,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -8475,7 +8585,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -8582,7 +8693,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -8816,6 +8928,52 @@ } }, "x-parameter-group": "filters" + }, + { + "name": "is_managed", + "in": "query", + "description": "Filter by is_managed.", + "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": { @@ -8851,7 +9009,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9035,7 +9194,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9091,148 +9251,25 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] } }, - "/benchmark/{benchmarkId}/participants/{participantId}/submit": { + "/benchmark/{benchmarkId}/sample-generation": { "post": { "tags": [ - "Benchmark" + "Benchmark", + "SampleGeneration" ], - "summary": "Submits a participant to a benchmark.", + "summary": "Starts an asynchronous sample generation run.", "parameters": [ { "name": "benchmarkId", "in": "path", - "description": "The id of the benchmark the participant belongs to.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "participantId", - "in": "path", - "description": "The id of the participant to submit.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubmitParticipantByBenchmarkEndpoint_Output" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthenticated" - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "OpenIdConnect": [ - "openid", - "profile", - "email" - ] - } - ] - } - }, - "/benchmark/{benchmarkId}/name": { - "put": { - "tags": [ - "Benchmark" - ], - "summary": "Updates the name of a benchmark.", - "parameters": [ - { - "name": "benchmarkId", - "in": "path", - "description": "The id of the benchmark to update.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "The payload describing the new name.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateBenchmarkNameEndpoint_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" - } - }, - "security": [ - { - "OpenIdConnect": [ - "openid", - "profile", - "email" - ] - } - ] - } - }, - "/leaderboard/{leaderboardId}/boost": { - "post": { - "tags": [ - "Leaderboard" - ], - "summary": "Boosts a subset of participants within a leaderboard.", - "parameters": [ - { - "name": "leaderboardId", - "in": "path", - "description": "The id of the leaderboard to boost.", + "description": "The benchmark whose participants should run their faucets.", "required": true, "schema": { "type": "string" @@ -9240,60 +9277,11 @@ } ], "requestBody": { - "description": "The payload describing the boost to apply.", + "description": "The generation configuration.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BoostLeaderboardEndpoint_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" - } - }, - "security": [ - { - "OpenIdConnect": [ - "openid", - "profile", - "email" - ] - } - ] - } - }, - "/leaderboard": { - "post": { - "tags": [ - "Leaderboard" - ], - "summary": "Creates a new leaderboard.", - "requestBody": { - "description": "The current HTTP context, used for user claims.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateLeaderboardEndpoint_Input" + "$ref": "#/components/schemas/CreateSampleGenerationEndpoint_Input" } } }, @@ -9305,7 +9293,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateLeaderboardEndpoint_Output" + "$ref": "#/components/schemas/CreateSampleGenerationEndpoint_Output" } } } @@ -9332,47 +9320,46 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] } }, - "/leaderboard/{leaderboardId}/participants": { + "/benchmark/{benchmarkId}/participants/{participantId}/submit": { "post": { "tags": [ - "Leaderboard" + "Benchmark" ], - "summary": "Creates a participant in a leaderboard.", + "summary": "Submits a participant to a benchmark.", "parameters": [ { - "name": "leaderboardId", + "name": "benchmarkId", "in": "path", - "description": "The id of the leaderboard the participant will be added to.", + "description": "The id of the benchmark the participant belongs to.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "participantId", + "in": "path", + "description": "The id of the participant to submit.", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "description": "The payload describing the participant to create.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateLeaderboardParticipantEndpoint_Input" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateLeaderboardParticipantEndpoint_Output" + "$ref": "#/components/schemas/SubmitParticipantByBenchmarkEndpoint_Output" } } } @@ -9399,7 +9386,255 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" + ] + } + ] + } + }, + "/benchmark/{benchmarkId}/name": { + "put": { + "tags": [ + "Benchmark" + ], + "summary": "Updates the name of a benchmark.", + "parameters": [ + { + "name": "benchmarkId", + "in": "path", + "description": "The id of the benchmark to update.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The payload describing the new name.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateBenchmarkNameEndpoint_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" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/leaderboard/{leaderboardId}/boost": { + "post": { + "tags": [ + "Leaderboard" + ], + "summary": "Boosts a subset of participants within a leaderboard.", + "parameters": [ + { + "name": "leaderboardId", + "in": "path", + "description": "The id of the leaderboard to boost.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The payload describing the boost to apply.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BoostLeaderboardEndpoint_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" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/leaderboard": { + "post": { + "tags": [ + "Leaderboard" + ], + "summary": "Creates a new leaderboard.", + "requestBody": { + "description": "The current HTTP context, used for user claims.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLeaderboardEndpoint_Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLeaderboardEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/leaderboard/{leaderboardId}/participants": { + "post": { + "tags": [ + "Leaderboard" + ], + "summary": "Creates a participant in a leaderboard.", + "parameters": [ + { + "name": "leaderboardId", + "in": "path", + "description": "The id of the leaderboard the participant will be added to.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The payload describing the participant to create.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLeaderboardParticipantEndpoint_Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLeaderboardParticipantEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" ] } ] @@ -9453,7 +9688,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9520,7 +9756,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9569,7 +9806,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9623,7 +9861,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9681,7 +9920,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9749,7 +9989,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9826,7 +10067,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9903,7 +10145,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9968,7 +10211,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -10033,7 +10277,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -10357,7 +10602,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -10626,7 +10872,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -10711,7 +10958,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -10776,7 +11024,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -10836,7 +11085,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -10896,7 +11146,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -10963,7 +11214,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11030,7 +11282,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11079,7 +11332,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11133,7 +11387,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11191,7 +11446,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11240,7 +11496,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11289,23 +11546,25 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] } }, - "/participants/{participantId}/submit": { - "post": { + "/participant/{participantId}/faucet": { + "delete": { "tags": [ - "Participant" + "Participant", + "Faucet" ], - "summary": "Submits a participant to a benchmark.", + "summary": "Removes the faucet configuration from a participant.", "parameters": [ { "name": "participantId", "in": "path", - "description": "The id of the participant to submit.", + "description": "The id of the participant.", "required": true, "schema": { "type": "string" @@ -11313,15 +11572,8 @@ } ], "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubmitParticipantEndpoint_Output" - } - } - } + "204": { + "description": "No Content" }, "400": { "description": "Bad Request", @@ -11345,23 +11597,23 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] - } - }, - "/participant/{participantId}/name": { + }, "put": { "tags": [ - "Participant" + "Participant", + "Faucet" ], - "summary": "Updates the name of a participant.", + "summary": "Sets the faucet used to auto-generate samples for a participant.", "parameters": [ { "name": "participantId", "in": "path", - "description": "The id of the participant whose name should be updated.", + "description": "The id of the participant whose faucet to set.", "required": true, "schema": { "type": "string" @@ -11369,11 +11621,11 @@ } ], "requestBody": { - "description": "The payload containing the new participant name.", + "description": "The faucet configuration payload.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateParticipantNameEndpoint_Input" + "$ref": "#/components/schemas/IFaucetInput" } } }, @@ -11405,7 +11657,126 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" + ] + } + ] + } + }, + "/participants/{participantId}/submit": { + "post": { + "tags": [ + "Participant" + ], + "summary": "Submits a participant to a benchmark.", + "parameters": [ + { + "name": "participantId", + "in": "path", + "description": "The id of the participant to submit.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubmitParticipantEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/participant/{participantId}/name": { + "put": { + "tags": [ + "Participant" + ], + "summary": "Updates the name of a participant.", + "parameters": [ + { + "name": "participantId", + "in": "path", + "description": "The id of the participant whose name should be updated.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The payload containing the new participant name.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateParticipantNameEndpoint_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" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" ] } ] @@ -11465,7 +11836,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11521,7 +11893,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11577,7 +11950,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11816,7 +12190,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11847,6 +12222,17 @@ "default": false } }, + { + "name": "tags", + "in": "query", + "description": "The tags to filter the samples by; a sample matches when any of its prompt tags is in this list.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, { "name": "page", "in": "query", @@ -12009,211 +12395,37 @@ "OpenIdConnect": [ "openid", "profile", - "email" - ] - } - ] - } - }, - "/feedback": { - "post": { - "tags": [ - "Feedback" - ], - "summary": "Submits feedback about our services.", - "requestBody": { - "description": "The feedback payload.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubmitFeedbackEndpoint_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" - } - }, - "security": [ - { - "OpenIdConnect": [ - "openid", - "profile", - "email" - ] - } - ] - } - }, - "/job/definition": { - "post": { - "tags": [ - "Job" - ], - "summary": "Creates a new job definition.", - "description": "A preview pipeline is automatically created and returned in the response.", - "requestBody": { - "description": "The job definition parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateJobDefinitionEndpoint_Input" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateJobDefinitionEndpoint_Output" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthenticated" - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "OpenIdConnect": [ - "openid", - "profile", - "email" + "email", + "offline_access" ] } ] } }, - "/job": { - "post": { - "tags": [ - "Job" - ], - "summary": "Creates a new job from a job definition and audience.", - "description": "If the audience is not already recruiting, recruiting is started automatically.\n The RecruitingStarted field indicates whether this happened.", - "requestBody": { - "description": "The job creation parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateJobEndpoint_Input" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateJobEndpoint_Output" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthenticated" - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "OpenIdConnect": [ - "openid", - "profile", - "email" - ] - } - ] - } - }, - "/job/definition/{definitionId}/revision": { - "post": { + "/benchmark/sample-generation/{sampleGenerationId}": { + "get": { "tags": [ - "Job" + "SampleGeneration" ], - "summary": "Creates a new revision for an existing job definition.", - "description": "Unspecified fields are inherited from the previous revision. Workflow and Referee must be\n provided together if either is specified.", + "summary": "Returns the current status and progress of a sample generation request.", "parameters": [ { - "name": "definitionId", + "name": "sampleGenerationId", "in": "path", - "description": "The id of the job definition to create a revision for.", + "description": "The id of the sample generation request.", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "description": "The revision parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateJobRevisionEndpoint_Input" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateJobRevisionEndpoint_Output" + "$ref": "#/components/schemas/GetSampleGenerationEndpoint_Output" } } } @@ -12240,7 +12452,733 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" + ] + } + ] + } + }, + "/benchmark/sample-generation/{sampleGenerationId}/items": { + "get": { + "tags": [ + "SampleGeneration" + ], + "summary": "Returns the per-item audit trail for a sample generation request.", + "parameters": [ + { + "name": "sampleGenerationId", + "in": "path", + "description": "The id of the sample generation request.", + "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" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "created_at", + "-created_at", + "prompt_identifier", + "-prompt_identifier" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "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": "participant_id", + "in": "query", + "description": "Filter by participant_id.", + "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": "prompt_identifier", + "in": "query", + "description": "Filter by prompt_identifier.", + "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/GetSampleGenerationItemsEndpoint_PagedResultOfOutput" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/benchmark/{benchmarkId}/sample-generations": { + "get": { + "tags": [ + "SampleGeneration" + ], + "summary": "Lists historical sample generation runs for the given benchmark.", + "description": "Results are sorted by creation time (newest first) by default.", + "parameters": [ + { + "name": "benchmarkId", + "in": "path", + "description": "The id of the benchmark whose sample generations should be listed.", + "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" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "created_at", + "-created_at" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "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" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuerySampleGenerationsByBenchmarkEndpoint_PagedResultOfOutput" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/benchmark/sample-generation/{sampleGenerationId}/retry": { + "post": { + "tags": [ + "SampleGeneration" + ], + "summary": "Re-queues failed items of a sample generation so they run again.", + "description": "When no item ids are supplied, every failed item of the generation is retried. Item ids that\n do not belong to the generation or are not in a failed state are ignored. Returns the ids\n that were re-queued; a generation with no failed items yields an empty result.", + "parameters": [ + { + "name": "sampleGenerationId", + "in": "path", + "description": "The id of the sample generation request.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Optional payload restricting the retry to specific item ids.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/RetrySampleGenerationEndpoint_Input" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RetrySampleGenerationEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/feedback": { + "post": { + "tags": [ + "Feedback" + ], + "summary": "Submits feedback about our services.", + "requestBody": { + "description": "The feedback payload.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubmitFeedbackEndpoint_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" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/job/definition": { + "post": { + "tags": [ + "Job" + ], + "summary": "Creates a new job definition.", + "description": "A preview pipeline is automatically created and returned in the response.", + "requestBody": { + "description": "The job definition parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateJobDefinitionEndpoint_Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateJobDefinitionEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/job": { + "post": { + "tags": [ + "Job" + ], + "summary": "Creates a new job from a job definition and audience.", + "description": "If the audience is not already recruiting, recruiting is started automatically.\n The RecruitingStarted field indicates whether this happened.", + "requestBody": { + "description": "The job creation parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateJobEndpoint_Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateJobEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/job/definition/{definitionId}/revision": { + "post": { + "tags": [ + "Job" + ], + "summary": "Creates a new revision for an existing job definition.", + "description": "Unspecified fields are inherited from the previous revision. Workflow and Referee must be\n provided together if either is specified.", + "parameters": [ + { + "name": "definitionId", + "in": "path", + "description": "The id of the job definition to create a revision for.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The revision parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateJobRevisionEndpoint_Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateJobRevisionEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" ] } ] @@ -12294,7 +13232,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -12343,7 +13282,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -12397,7 +13337,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -12455,7 +13396,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -12504,7 +13446,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -12558,7 +13501,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -12616,7 +13560,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -12663,7 +13608,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -12710,7 +13656,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -12776,7 +13723,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -13136,7 +14084,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -13366,7 +14315,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -13728,7 +14678,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -13777,7 +14728,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -13845,7 +14797,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -13901,7 +14854,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -13958,7 +14912,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14007,7 +14962,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14056,7 +15012,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14110,7 +15067,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14168,7 +15126,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14215,7 +15174,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14262,7 +15222,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14307,7 +15268,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14365,7 +15327,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14414,7 +15377,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14480,7 +15444,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14705,7 +15670,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15020,7 +15986,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15069,7 +16036,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15118,7 +16086,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15176,7 +16145,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15243,7 +16213,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15300,7 +16271,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15356,7 +16328,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15416,7 +16389,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15483,7 +16457,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15539,7 +16514,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15588,7 +16564,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15633,7 +16610,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15689,7 +16667,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16002,7 +16981,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16240,7 +17220,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16290,7 +17271,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16350,7 +17332,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16406,7 +17389,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16449,7 +17433,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16498,7 +17483,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16556,7 +17542,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16606,7 +17593,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16662,7 +17650,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16718,7 +17707,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16763,7 +17753,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16823,7 +17814,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16879,7 +17871,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16939,7 +17932,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17165,7 +18159,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17221,7 +18216,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17277,7 +18273,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17337,7 +18334,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17393,7 +18391,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17442,7 +18441,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17496,7 +18496,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17554,7 +18555,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17587,7 +18589,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17632,7 +18635,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17711,7 +18715,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17943,7 +18948,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -18440,7 +19446,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -18474,7 +19481,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -18534,7 +19542,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -18594,7 +19603,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -18653,7 +19663,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -18754,7 +19765,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -18986,7 +19998,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -19078,7 +20091,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -19137,8 +20151,8 @@ "type": "array", "items": { "enum": [ - "rapid_id", - "-rapid_id", + "id", + "-id", "state", "-state", "decisiveness", @@ -19183,7 +20197,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -19232,7 +20247,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -19286,7 +20302,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -19351,7 +20368,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -19407,7 +20425,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -19481,7 +20500,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -19750,7 +20770,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -20199,7 +21220,10 @@ "Running", "Completed", "Failed", - "ManualApproval" + "ManualApproval", + "Queued", + "Paused", + "StaleResults" ] }, "AudienceStateRecalculationPhase": { @@ -23456,6 +24480,9 @@ { "$ref": "#/components/schemas/ICampaignFilterModelAudienceStateFilterModel" }, + { + "$ref": "#/components/schemas/ICampaignFilterModelCampaignCooldownFilterModel" + }, { "$ref": "#/components/schemas/ICampaignFilterModelCampaignIdFilterModel" }, @@ -23498,6 +24525,7 @@ "mapping": { "AndFilter": "#/components/schemas/ICampaignFilterModelAndFilterModel", "AudienceStateFilter": "#/components/schemas/ICampaignFilterModelAudienceStateFilterModel", + "CampaignCooldownFilter": "#/components/schemas/ICampaignFilterModelCampaignCooldownFilterModel", "CampaignIdFilter": "#/components/schemas/ICampaignFilterModelCampaignIdFilterModel", "CampaignSessionCountFilter": "#/components/schemas/ICampaignFilterModelCampaignSessionCountFilterModel", "CountryFilter": "#/components/schemas/ICampaignFilterModelCountryFilterModel", @@ -23561,6 +24589,23 @@ } } }, + "ICampaignFilterModelCampaignCooldownFilterModel": { + "required": [ + "cooldown", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "CampaignCooldownFilter" + ], + "type": "string" + }, + "cooldown": { + "$ref": "#/components/schemas/ICooldownDurationModel" + } + } + }, "ICampaignFilterModelCampaignIdFilterModel": { "required": [ "campaignIds", @@ -24122,6 +25167,72 @@ } } }, + "ICooldownDurationModel": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/ICooldownDurationModelFixedCooldownDurationModel" + }, + { + "$ref": "#/components/schemas/ICooldownDurationModelRandomCooldownDurationModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "FixedCooldownDuration": "#/components/schemas/ICooldownDurationModelFixedCooldownDurationModel", + "RandomCooldownDuration": "#/components/schemas/ICooldownDurationModelRandomCooldownDurationModel" + } + } + }, + "ICooldownDurationModelFixedCooldownDurationModel": { + "required": [ + "duration", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "FixedCooldownDuration" + ], + "type": "string" + }, + "duration": { + "type": "string", + "format": "date-time" + } + } + }, + "ICooldownDurationModelRandomCooldownDurationModel": { + "required": [ + "minDuration", + "maxDuration", + "seedByUserId", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "RandomCooldownDuration" + ], + "type": "string" + }, + "minDuration": { + "type": "string", + "format": "date-time" + }, + "maxDuration": { + "type": "string", + "format": "date-time" + }, + "seedByUserId": { + "type": "boolean" + } + } + }, "QueryCampaignsEndpoint_Output": { "required": [ "id", @@ -24343,6 +25454,9 @@ "isEnabled": { "type": "boolean" }, + "dimension": { + "type": "string" + }, "bypassFilters": { "type": "boolean" }, @@ -26940,6 +28054,85 @@ } } }, + "CreateSampleGenerationEndpoint_Input": { + "required": [ + "samplesPerPrompt" + ], + "type": "object", + "properties": { + "samplesPerPrompt": { + "type": "integer", + "description": "How many samples to request per matching prompt (1 to 16).", + "format": "int32" + }, + "participantIds": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Restrict generation to specific participants. Defaults to all participants\n in the benchmark that have a configured faucet." + }, + "promptIdentifiers": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Restrict generation to specific prompt identifiers.\n Defaults to every prompt in the benchmark." + }, + "tags": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Restrict generation to prompts having at least one of these tags." + } + } + }, + "CreateSampleGenerationEndpoint_Output": { + "required": [ + "id", + "totalCount", + "skippedParticipantIds" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the created sample generation request." + }, + "totalCount": { + "type": "integer", + "description": "The total number of generation items that were queued.", + "format": "int32" + }, + "skippedParticipantIds": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Participants that matched the selection but were skipped because they have no faucet\n configured. Empty when explicit participant ids were supplied." + } + } + }, "CreateSampleNewEndpoint_Input": { "required": [ "identifier", @@ -26993,6 +28186,7 @@ "createdAt", "ownerId", "ownerMail", + "initialBoostLevel", "scoreShift", "scoreScale" ], @@ -27024,6 +28218,12 @@ "type": "string", "description": "The mail of the customer owning the benchmark." }, + "initialBoostLevel": { + "type": "integer", + "description": "The initial boost level applied to the campaign of every run created from this\n benchmark. Null means the benchmark default is used.", + "format": "int32", + "nullable": true + }, "scoreShift": { "type": "number", "description": "Additive offset applied to displayed scores on the overall scoreboard of this\n benchmark.", @@ -27389,6 +28589,14 @@ "benchmarkId": { "type": "string", "description": "The id of the benchmark the participant belongs to." + }, + "faucet": { + "allOf": [ + { + "$ref": "#/components/schemas/IFaucetOutput" + } + ], + "description": "The faucet configured to auto-generate samples, or null if none is set." } } }, @@ -27500,7 +28708,300 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/GetPromptsByBenchmarkEndpoint_Output" + "$ref": "#/components/schemas/GetPromptsByBenchmarkEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, + "GetSampleByIdEndpoint_Output": { + "required": [ + "id", + "identifier", + "participantId", + "participantName", + "asset", + "tags", + "ownerMail" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the sample." + }, + "identifier": { + "type": "string", + "description": "The identifier used to correlate samples of different participants." + }, + "participantId": { + "type": "string", + "description": "The id of the participant that owns the sample." + }, + "participantName": { + "type": "string", + "description": "The name of the participant that owns the sample." + }, + "asset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetModel" + } + ], + "description": "The asset associated with the sample." + }, + "prompt": { + "type": "string", + "description": "An optional prompt associated with the sample.", + "nullable": true + }, + "promptAsset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetModel" + } + ], + "description": "An optional prompt asset associated with the sample." + }, + "tags": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "The tags associated with the sample." + }, + "createdAt": { + "type": "string", + "description": "The timestamp when the sample was created.", + "format": "date-time" + }, + "ownerId": { + "type": "string", + "description": "The id of the customer that owns the sample.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The mail of the customer that owns the sample." + } + } + }, + "GetSampleGenerationEndpoint_Output": { + "required": [ + "id", + "benchmarkId", + "status", + "samplesPerPrompt", + "totalCount", + "completedCount", + "failedCount", + "ownerId", + "ownerMail", + "createdAt" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the sample generation request." + }, + "benchmarkId": { + "type": "string", + "description": "The benchmark this generation belongs to." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/SampleGenerationStatus" + } + ], + "description": "The current status of the generation." + }, + "samplesPerPrompt": { + "type": "integer", + "description": "How many samples are being generated per prompt.", + "format": "int32" + }, + "totalCount": { + "type": "integer", + "description": "The total number of items queued.", + "format": "int32" + }, + "completedCount": { + "type": "integer", + "description": "The number of items that have succeeded so far.", + "format": "int32" + }, + "failedCount": { + "type": "integer", + "description": "The number of items that have failed.", + "format": "int32" + }, + "participantIdFilter": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Optional participant id filter that was applied when this generation was created." + }, + "promptIdentifierFilter": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Optional prompt identifier filter that was applied." + }, + "tagsFilter": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Optional tag filter that was applied." + }, + "ownerId": { + "type": "string", + "description": "The id of the customer that started this generation.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The mail of the customer that started this generation." + }, + "createdAt": { + "type": "string", + "description": "When the generation was created.", + "format": "date-time" + } + } + }, + "GetSampleGenerationItemsEndpoint_Output": { + "required": [ + "id", + "sampleGenerationId", + "participantId", + "benchmarkPromptId", + "promptIdentifier", + "sampleCount", + "status", + "attemptCount", + "sampleIds", + "createdAt" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the generation item." + }, + "sampleGenerationId": { + "type": "string", + "description": "The id of the parent sample generation." + }, + "participantId": { + "type": "string", + "description": "The participant whose faucet is producing this sample." + }, + "benchmarkPromptId": { + "type": "string", + "description": "The benchmark prompt this item targets." + }, + "promptIdentifier": { + "type": "string", + "description": "The identifier of the prompt being generated." + }, + "sampleCount": { + "type": "integer", + "description": "How many samples this item produces for its (participant, prompt) pair.", + "format": "int32" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/SampleGenerationItemStatus" + } + ], + "description": "The current status of this item." + }, + "attemptCount": { + "type": "integer", + "description": "Number of delivery attempts that have been made on this item.", + "format": "int32" + }, + "providerRequestId": { + "type": "string", + "description": "Provider-side request id used to correlate with the provider's logs.", + "nullable": true + }, + "failureReason": { + "type": "string", + "description": "Failure reason if the item is in a failed state.", + "nullable": true + }, + "sampleIds": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "The ids of the samples created from this item once it succeeds." + }, + "createdAt": { + "type": "string", + "description": "When the item was created.", + "format": "date-time" + } + } + }, + "GetSampleGenerationItemsEndpoint_PagedResultOfOutput": { + "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/GetSampleGenerationItemsEndpoint_Output" } }, "totalPages": { @@ -27509,82 +29010,6 @@ } } }, - "GetSampleByIdEndpoint_Output": { - "required": [ - "id", - "identifier", - "participantId", - "participantName", - "asset", - "tags", - "ownerMail" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the sample." - }, - "identifier": { - "type": "string", - "description": "The identifier used to correlate samples of different participants." - }, - "participantId": { - "type": "string", - "description": "The id of the participant that owns the sample." - }, - "participantName": { - "type": "string", - "description": "The name of the participant that owns the sample." - }, - "asset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetModel" - } - ], - "description": "The asset associated with the sample." - }, - "prompt": { - "type": "string", - "description": "An optional prompt associated with the sample.", - "nullable": true - }, - "promptAsset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetModel" - } - ], - "description": "An optional prompt asset associated with the sample." - }, - "tags": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "The tags associated with the sample." - }, - "createdAt": { - "type": "string", - "description": "The timestamp when the sample was created.", - "format": "date-time" - }, - "ownerId": { - "type": "string", - "description": "The id of the customer that owns the sample.", - "format": "uuid" - }, - "ownerMail": { - "type": "string", - "description": "The mail of the customer that owns the sample." - } - } - }, "GetSampleNavigationEndpoint_Output": { "required": [ "current", @@ -28012,6 +29437,117 @@ } } }, + "IFaucetInput": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IFaucetInputReplicateFaucetInput" + } + ], + "description": "Polymorphic request body describing a faucet to configure on a participant. The concrete\n type is selected by the _t discriminator (e.g. \"Replicate\").", + "discriminator": { + "propertyName": "_t", + "mapping": { + "Replicate": "#/components/schemas/IFaucetInputReplicateFaucetInput" + } + } + }, + "IFaucetInputReplicateFaucetInput": { + "required": [ + "modelOwner", + "modelName", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "Replicate" + ], + "type": "string" + }, + "modelOwner": { + "type": "string", + "description": "The owner of the hosted model (e.g. \"stability-ai\")." + }, + "modelName": { + "type": "string", + "description": "The model name (e.g. \"sdxl\")." + }, + "modelVersion": { + "type": "string", + "description": "Optional pinned model version hash.", + "nullable": true + } + }, + "description": "Configures a faucet that generates samples via the Replicate API." + }, + "IFaucetOutput": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IFaucetOutputManagedFaucetOutput" + }, + { + "$ref": "#/components/schemas/IFaucetOutputReplicateFaucetOutput" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "Managed": "#/components/schemas/IFaucetOutputManagedFaucetOutput", + "Replicate": "#/components/schemas/IFaucetOutputReplicateFaucetOutput" + } + } + }, + "IFaucetOutputManagedFaucetOutput": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "Managed" + ], + "type": "string" + }, + "testTimeScaling": { + "type": "integer", + "format": "int32", + "nullable": true + } + } + }, + "IFaucetOutputReplicateFaucetOutput": { + "required": [ + "modelOwner", + "modelName", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "Replicate" + ], + "type": "string" + }, + "modelOwner": { + "type": "string" + }, + "modelName": { + "type": "string" + }, + "modelVersion": { + "type": "string", + "nullable": true + } + } + }, "ParticipantStatus": { "enum": [ "Created", @@ -28663,6 +30199,142 @@ } } }, + "QuerySampleGenerationsByBenchmarkEndpoint_Output": { + "required": [ + "id", + "benchmarkId", + "status", + "samplesPerPrompt", + "totalCount", + "completedCount", + "failedCount", + "ownerId", + "ownerMail", + "createdAt" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the sample generation request." + }, + "benchmarkId": { + "type": "string", + "description": "The benchmark this generation belongs to." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/SampleGenerationStatus" + } + ], + "description": "The current status of the generation." + }, + "samplesPerPrompt": { + "type": "integer", + "description": "How many samples are being generated per prompt.", + "format": "int32" + }, + "totalCount": { + "type": "integer", + "description": "The total number of items queued.", + "format": "int32" + }, + "completedCount": { + "type": "integer", + "description": "The number of items that have succeeded so far.", + "format": "int32" + }, + "failedCount": { + "type": "integer", + "description": "The number of items that have failed.", + "format": "int32" + }, + "participantIdFilter": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Optional participant id filter that was applied when this generation was created." + }, + "promptIdentifierFilter": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Optional prompt identifier filter that was applied." + }, + "tagsFilter": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Optional tag filter that was applied." + }, + "ownerId": { + "type": "string", + "description": "The id of the customer that started this generation.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The mail of the customer that started this generation." + }, + "createdAt": { + "type": "string", + "description": "When the generation was created.", + "format": "date-time" + } + } + }, + "QuerySampleGenerationsByBenchmarkEndpoint_PagedResultOfOutput": { + "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/QuerySampleGenerationsByBenchmarkEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, "QueryStandingsEndpoint_Output": { "required": [ "id", @@ -28778,6 +30450,48 @@ } } }, + "RetrySampleGenerationEndpoint_Input": { + "type": "object", + "properties": { + "itemIds": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "The specific item ids to retry. When omitted or empty, every failed item of the\n generation is retried." + } + } + }, + "RetrySampleGenerationEndpoint_Output": { + "required": [ + "retriedCount", + "retriedItemIds" + ], + "type": "object", + "properties": { + "retriedCount": { + "type": "integer", + "description": "How many failed items were re-queued.", + "format": "int32" + }, + "retriedItemIds": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "The ids of the items that were re-queued." + } + } + }, "RunStatus": { "enum": [ "Queued", @@ -28786,6 +30500,24 @@ "Failed" ] }, + "SampleGenerationItemStatus": { + "enum": [ + "Pending", + "Running", + "Succeeded", + "Failed" + ] + }, + "SampleGenerationStatus": { + "enum": [ + "Pending", + "Processing", + "Completed", + "CompletedWithFailures", + "Failed", + "Cancelled" + ] + }, "StandingStatus": { "enum": [ "Created", @@ -29069,7 +30801,10 @@ "Running", "Completed", "Failed", - "ManualApproval" + "ManualApproval", + "Queued", + "Paused", + "StaleResults" ] }, "CloneOrderEndpoint_Input": { @@ -31921,11 +33656,17 @@ } }, "StickyConfig": { + "required": [ + "dimension" + ], "type": "object", "properties": { "isEnabled": { "type": "boolean" }, + "dimension": { + "type": "string" + }, "bypassFilters": { "type": "boolean" }, @@ -32426,7 +34167,6 @@ }, "IMetadataCountMetadata": { "required": [ - "count", "visibilities", "_t" ], @@ -32491,8 +34231,6 @@ }, "IMetadataImageDimensionMetadata": { "required": [ - "height", - "width", "visibilities", "_t" ], @@ -32518,8 +34256,6 @@ }, "IMetadataLocationMetadata": { "required": [ - "x", - "y", "visibilities", "_t" ], @@ -32587,9 +34323,6 @@ }, "IMetadataStreamsMetadata": { "required": [ - "hasAudio", - "hasVideo", - "hasSubtitles", "visibilities", "_t" ], @@ -35173,7 +36906,6 @@ }, "TranslatedString": { "required": [ - "wasTranslated", "englishText", "text", "targetLanguage" @@ -38158,8 +39890,10 @@ "name": "Rapidata Leaderboard API", "tags": [ "Benchmark", + "SampleGeneration", "Leaderboard", "Participant", + "Faucet", "Prompt", "Sample" ] diff --git a/openapi/schemas/rapidata.openapi.json b/openapi/schemas/rapidata.openapi.json index 0a9101632..4895b43ab 100644 --- a/openapi/schemas/rapidata.openapi.json +++ b/openapi/schemas/rapidata.openapi.json @@ -99,6 +99,10 @@ "name": "Benchmark", "x-displayName": "Benchmark" }, + { + "name": "SampleGeneration", + "x-displayName": "SampleGeneration" + }, { "name": "Leaderboard", "x-displayName": "Leaderboard" @@ -107,6 +111,10 @@ "name": "Participant", "x-displayName": "Participant" }, + { + "name": "Faucet", + "x-displayName": "Faucet" + }, { "name": "Prompt", "x-displayName": "Prompt" @@ -263,7 +271,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -355,7 +364,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -438,7 +448,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -488,7 +499,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -545,7 +557,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -601,7 +614,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -667,7 +681,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -727,7 +742,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -783,7 +799,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -850,7 +867,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -899,7 +917,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -953,7 +972,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1018,7 +1038,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1074,7 +1095,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1130,7 +1152,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1186,7 +1209,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1242,7 +1266,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1297,7 +1322,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1353,7 +1379,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1408,7 +1435,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1476,7 +1504,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1525,7 +1554,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -1849,7 +1879,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2212,7 +2243,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2262,7 +2294,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2300,7 +2333,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2360,7 +2394,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2409,7 +2444,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2458,7 +2494,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2525,7 +2562,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2592,7 +2630,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2648,7 +2687,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2830,7 +2870,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2899,7 +2940,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2944,7 +2986,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -2989,7 +3032,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3039,7 +3083,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3084,7 +3129,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3129,7 +3175,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3185,7 +3232,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3243,7 +3291,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3301,7 +3350,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3368,7 +3418,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3400,7 +3451,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3449,7 +3501,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3487,7 +3540,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3850,7 +3904,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3899,7 +3954,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -3948,7 +4004,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4171,7 +4228,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4209,7 +4267,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4276,7 +4335,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4325,7 +4385,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4379,7 +4440,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4436,7 +4498,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4620,7 +4683,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4676,7 +4740,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4732,7 +4797,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4788,7 +4854,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4848,7 +4915,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4908,7 +4976,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -4957,7 +5026,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5011,7 +5081,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5094,7 +5165,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5177,7 +5249,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5260,7 +5333,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5343,7 +5417,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5518,7 +5593,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5567,7 +5643,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5623,7 +5700,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5683,7 +5761,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5750,7 +5829,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5932,7 +6012,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -5988,7 +6069,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6055,7 +6137,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6122,7 +6205,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6143,7 +6227,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6199,7 +6284,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6248,7 +6334,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6303,7 +6390,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6525,7 +6613,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6559,7 +6648,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6827,7 +6917,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6884,7 +6975,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -6943,7 +7035,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7000,7 +7093,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7033,7 +7127,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7082,7 +7177,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7131,7 +7227,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7352,7 +7449,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7401,7 +7499,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7457,7 +7556,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7524,7 +7624,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7754,7 +7855,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7821,7 +7923,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7870,7 +7973,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7924,7 +8028,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -7982,7 +8087,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -8040,7 +8146,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -8096,7 +8203,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -8195,7 +8303,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -8263,7 +8372,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -8340,7 +8450,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -8524,7 +8635,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -8631,7 +8743,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -8865,6 +8978,52 @@ } }, "x-parameter-group": "filters" + }, + { + "name": "is_managed", + "in": "query", + "description": "Filter by is_managed.", + "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": { @@ -8900,7 +9059,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9084,7 +9244,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9140,148 +9301,25 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] } }, - "/benchmark/{benchmarkId}/participants/{participantId}/submit": { + "/benchmark/{benchmarkId}/sample-generation": { "post": { "tags": [ - "Benchmark" + "Benchmark", + "SampleGeneration" ], - "summary": "Submits a participant to a benchmark.", + "summary": "Starts an asynchronous sample generation run.", "parameters": [ { "name": "benchmarkId", "in": "path", - "description": "The id of the benchmark the participant belongs to.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "participantId", - "in": "path", - "description": "The id of the participant to submit.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubmitParticipantByBenchmarkEndpoint_Output" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthenticated" - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "OpenIdConnect": [ - "openid", - "profile", - "email" - ] - } - ] - } - }, - "/benchmark/{benchmarkId}/name": { - "put": { - "tags": [ - "Benchmark" - ], - "summary": "Updates the name of a benchmark.", - "parameters": [ - { - "name": "benchmarkId", - "in": "path", - "description": "The id of the benchmark to update.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "The payload describing the new name.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateBenchmarkNameEndpoint_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" - } - }, - "security": [ - { - "OpenIdConnect": [ - "openid", - "profile", - "email" - ] - } - ] - } - }, - "/leaderboard/{leaderboardId}/boost": { - "post": { - "tags": [ - "Leaderboard" - ], - "summary": "Boosts a subset of participants within a leaderboard.", - "parameters": [ - { - "name": "leaderboardId", - "in": "path", - "description": "The id of the leaderboard to boost.", + "description": "The benchmark whose participants should run their faucets.", "required": true, "schema": { "type": "string" @@ -9289,60 +9327,11 @@ } ], "requestBody": { - "description": "The payload describing the boost to apply.", + "description": "The generation configuration.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BoostLeaderboardEndpoint_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" - } - }, - "security": [ - { - "OpenIdConnect": [ - "openid", - "profile", - "email" - ] - } - ] - } - }, - "/leaderboard": { - "post": { - "tags": [ - "Leaderboard" - ], - "summary": "Creates a new leaderboard.", - "requestBody": { - "description": "The current HTTP context, used for user claims.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateLeaderboardEndpoint_Input" + "$ref": "#/components/schemas/CreateSampleGenerationEndpoint_Input" } } }, @@ -9354,7 +9343,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateLeaderboardEndpoint_Output" + "$ref": "#/components/schemas/CreateSampleGenerationEndpoint_Output" } } } @@ -9381,47 +9370,46 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] } }, - "/leaderboard/{leaderboardId}/participants": { + "/benchmark/{benchmarkId}/participants/{participantId}/submit": { "post": { "tags": [ - "Leaderboard" + "Benchmark" ], - "summary": "Creates a participant in a leaderboard.", + "summary": "Submits a participant to a benchmark.", "parameters": [ { - "name": "leaderboardId", + "name": "benchmarkId", "in": "path", - "description": "The id of the leaderboard the participant will be added to.", + "description": "The id of the benchmark the participant belongs to.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "participantId", + "in": "path", + "description": "The id of the participant to submit.", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "description": "The payload describing the participant to create.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateLeaderboardParticipantEndpoint_Input" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateLeaderboardParticipantEndpoint_Output" + "$ref": "#/components/schemas/SubmitParticipantByBenchmarkEndpoint_Output" } } } @@ -9448,7 +9436,255 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" + ] + } + ] + } + }, + "/benchmark/{benchmarkId}/name": { + "put": { + "tags": [ + "Benchmark" + ], + "summary": "Updates the name of a benchmark.", + "parameters": [ + { + "name": "benchmarkId", + "in": "path", + "description": "The id of the benchmark to update.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The payload describing the new name.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateBenchmarkNameEndpoint_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" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/leaderboard/{leaderboardId}/boost": { + "post": { + "tags": [ + "Leaderboard" + ], + "summary": "Boosts a subset of participants within a leaderboard.", + "parameters": [ + { + "name": "leaderboardId", + "in": "path", + "description": "The id of the leaderboard to boost.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The payload describing the boost to apply.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BoostLeaderboardEndpoint_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" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/leaderboard": { + "post": { + "tags": [ + "Leaderboard" + ], + "summary": "Creates a new leaderboard.", + "requestBody": { + "description": "The current HTTP context, used for user claims.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLeaderboardEndpoint_Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLeaderboardEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/leaderboard/{leaderboardId}/participants": { + "post": { + "tags": [ + "Leaderboard" + ], + "summary": "Creates a participant in a leaderboard.", + "parameters": [ + { + "name": "leaderboardId", + "in": "path", + "description": "The id of the leaderboard the participant will be added to.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The payload describing the participant to create.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLeaderboardParticipantEndpoint_Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLeaderboardParticipantEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" ] } ] @@ -9502,7 +9738,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9569,7 +9806,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9618,7 +9856,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9672,7 +9911,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9730,7 +9970,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9798,7 +10039,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9875,7 +10117,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -9952,7 +10195,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -10017,7 +10261,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -10082,7 +10327,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -10406,7 +10652,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -10675,7 +10922,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -10760,7 +11008,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -10825,7 +11074,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -10885,7 +11135,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -10945,7 +11196,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11012,7 +11264,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11079,7 +11332,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11128,7 +11382,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11182,7 +11437,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11240,7 +11496,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11289,7 +11546,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11338,23 +11596,25 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] } }, - "/participants/{participantId}/submit": { - "post": { + "/participant/{participantId}/faucet": { + "delete": { "tags": [ - "Participant" + "Participant", + "Faucet" ], - "summary": "Submits a participant to a benchmark.", + "summary": "Removes the faucet configuration from a participant.", "parameters": [ { "name": "participantId", "in": "path", - "description": "The id of the participant to submit.", + "description": "The id of the participant.", "required": true, "schema": { "type": "string" @@ -11362,15 +11622,8 @@ } ], "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubmitParticipantEndpoint_Output" - } - } - } + "204": { + "description": "No Content" }, "400": { "description": "Bad Request", @@ -11394,23 +11647,23 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] - } - }, - "/participant/{participantId}/name": { + }, "put": { "tags": [ - "Participant" + "Participant", + "Faucet" ], - "summary": "Updates the name of a participant.", + "summary": "Sets the faucet used to auto-generate samples for a participant.", "parameters": [ { "name": "participantId", "in": "path", - "description": "The id of the participant whose name should be updated.", + "description": "The id of the participant whose faucet to set.", "required": true, "schema": { "type": "string" @@ -11418,11 +11671,11 @@ } ], "requestBody": { - "description": "The payload containing the new participant name.", + "description": "The faucet configuration payload.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateParticipantNameEndpoint_Input" + "$ref": "#/components/schemas/IFaucetInput" } } }, @@ -11454,7 +11707,126 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" + ] + } + ] + } + }, + "/participants/{participantId}/submit": { + "post": { + "tags": [ + "Participant" + ], + "summary": "Submits a participant to a benchmark.", + "parameters": [ + { + "name": "participantId", + "in": "path", + "description": "The id of the participant to submit.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubmitParticipantEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/participant/{participantId}/name": { + "put": { + "tags": [ + "Participant" + ], + "summary": "Updates the name of a participant.", + "parameters": [ + { + "name": "participantId", + "in": "path", + "description": "The id of the participant whose name should be updated.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The payload containing the new participant name.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateParticipantNameEndpoint_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" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" ] } ] @@ -11514,7 +11886,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11570,7 +11943,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11626,7 +12000,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11865,7 +12240,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -11896,6 +12272,17 @@ "default": false } }, + { + "name": "tags", + "in": "query", + "description": "The tags to filter the samples by; a sample matches when any of its prompt tags is in this list.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, { "name": "page", "in": "query", @@ -12058,211 +12445,37 @@ "OpenIdConnect": [ "openid", "profile", - "email" - ] - } - ] - } - }, - "/feedback": { - "post": { - "tags": [ - "Feedback" - ], - "summary": "Submits feedback about our services.", - "requestBody": { - "description": "The feedback payload.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubmitFeedbackEndpoint_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" - } - }, - "security": [ - { - "OpenIdConnect": [ - "openid", - "profile", - "email" - ] - } - ] - } - }, - "/job/definition": { - "post": { - "tags": [ - "Job" - ], - "summary": "Creates a new job definition.", - "description": "A preview pipeline is automatically created and returned in the response.", - "requestBody": { - "description": "The job definition parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateJobDefinitionEndpoint_Input" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateJobDefinitionEndpoint_Output" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthenticated" - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "OpenIdConnect": [ - "openid", - "profile", - "email" + "email", + "offline_access" ] } ] } }, - "/job": { - "post": { - "tags": [ - "Job" - ], - "summary": "Creates a new job from a job definition and audience.", - "description": "If the audience is not already recruiting, recruiting is started automatically.\n The RecruitingStarted field indicates whether this happened.", - "requestBody": { - "description": "The job creation parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateJobEndpoint_Input" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateJobEndpoint_Output" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthenticated" - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "OpenIdConnect": [ - "openid", - "profile", - "email" - ] - } - ] - } - }, - "/job/definition/{definitionId}/revision": { - "post": { + "/benchmark/sample-generation/{sampleGenerationId}": { + "get": { "tags": [ - "Job" + "SampleGeneration" ], - "summary": "Creates a new revision for an existing job definition.", - "description": "Unspecified fields are inherited from the previous revision. Workflow and Referee must be\n provided together if either is specified.", + "summary": "Returns the current status and progress of a sample generation request.", "parameters": [ { - "name": "definitionId", + "name": "sampleGenerationId", "in": "path", - "description": "The id of the job definition to create a revision for.", + "description": "The id of the sample generation request.", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "description": "The revision parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateJobRevisionEndpoint_Input" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateJobRevisionEndpoint_Output" + "$ref": "#/components/schemas/GetSampleGenerationEndpoint_Output" } } } @@ -12289,7 +12502,733 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" + ] + } + ] + } + }, + "/benchmark/sample-generation/{sampleGenerationId}/items": { + "get": { + "tags": [ + "SampleGeneration" + ], + "summary": "Returns the per-item audit trail for a sample generation request.", + "parameters": [ + { + "name": "sampleGenerationId", + "in": "path", + "description": "The id of the sample generation request.", + "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" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "created_at", + "-created_at", + "prompt_identifier", + "-prompt_identifier" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "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": "participant_id", + "in": "query", + "description": "Filter by participant_id.", + "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": "prompt_identifier", + "in": "query", + "description": "Filter by prompt_identifier.", + "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/GetSampleGenerationItemsEndpoint_PagedResultOfOutput" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/benchmark/{benchmarkId}/sample-generations": { + "get": { + "tags": [ + "SampleGeneration" + ], + "summary": "Lists historical sample generation runs for the given benchmark.", + "description": "Results are sorted by creation time (newest first) by default.", + "parameters": [ + { + "name": "benchmarkId", + "in": "path", + "description": "The id of the benchmark whose sample generations should be listed.", + "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" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "created_at", + "-created_at" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "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" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuerySampleGenerationsByBenchmarkEndpoint_PagedResultOfOutput" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/benchmark/sample-generation/{sampleGenerationId}/retry": { + "post": { + "tags": [ + "SampleGeneration" + ], + "summary": "Re-queues failed items of a sample generation so they run again.", + "description": "When no item ids are supplied, every failed item of the generation is retried. Item ids that\n do not belong to the generation or are not in a failed state are ignored. Returns the ids\n that were re-queued; a generation with no failed items yields an empty result.", + "parameters": [ + { + "name": "sampleGenerationId", + "in": "path", + "description": "The id of the sample generation request.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Optional payload restricting the retry to specific item ids.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "nullable": true + }, + { + "$ref": "#/components/schemas/RetrySampleGenerationEndpoint_Input" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RetrySampleGenerationEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/feedback": { + "post": { + "tags": [ + "Feedback" + ], + "summary": "Submits feedback about our services.", + "requestBody": { + "description": "The feedback payload.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubmitFeedbackEndpoint_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" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/job/definition": { + "post": { + "tags": [ + "Job" + ], + "summary": "Creates a new job definition.", + "description": "A preview pipeline is automatically created and returned in the response.", + "requestBody": { + "description": "The job definition parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateJobDefinitionEndpoint_Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateJobDefinitionEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/job": { + "post": { + "tags": [ + "Job" + ], + "summary": "Creates a new job from a job definition and audience.", + "description": "If the audience is not already recruiting, recruiting is started automatically.\n The RecruitingStarted field indicates whether this happened.", + "requestBody": { + "description": "The job creation parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateJobEndpoint_Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateJobEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/job/definition/{definitionId}/revision": { + "post": { + "tags": [ + "Job" + ], + "summary": "Creates a new revision for an existing job definition.", + "description": "Unspecified fields are inherited from the previous revision. Workflow and Referee must be\n provided together if either is specified.", + "parameters": [ + { + "name": "definitionId", + "in": "path", + "description": "The id of the job definition to create a revision for.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The revision parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateJobRevisionEndpoint_Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateJobRevisionEndpoint_Output" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" ] } ] @@ -12343,7 +13282,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -12392,7 +13332,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -12446,7 +13387,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -12504,7 +13446,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -12553,7 +13496,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -12607,7 +13551,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -12665,7 +13610,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -12712,7 +13658,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -12759,7 +13706,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -12825,7 +13773,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -13185,7 +14134,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -13415,7 +14365,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -13777,7 +14728,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -13826,7 +14778,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -13894,7 +14847,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -13950,7 +14904,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14007,7 +14962,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14056,7 +15012,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14105,7 +15062,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14159,7 +15117,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14217,7 +15176,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14264,7 +15224,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14311,7 +15272,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14356,7 +15318,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14414,7 +15377,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14463,7 +15427,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14529,7 +15494,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -14754,7 +15720,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15069,7 +16036,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15118,7 +16086,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15167,7 +16136,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15225,7 +16195,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15292,7 +16263,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15349,7 +16321,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15405,7 +16378,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15465,7 +16439,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15532,7 +16507,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15588,7 +16564,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15637,7 +16614,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15682,7 +16660,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -15738,7 +16717,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16051,7 +17031,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16289,7 +17270,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16339,7 +17321,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16399,7 +17382,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16455,7 +17439,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16498,7 +17483,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16547,7 +17533,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16605,7 +17592,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16655,7 +17643,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16711,7 +17700,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16767,7 +17757,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16812,7 +17803,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16872,7 +17864,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16928,7 +17921,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -16988,7 +17982,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17214,7 +18209,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17270,7 +18266,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17326,7 +18323,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17386,7 +18384,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17442,7 +18441,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17491,7 +18491,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17545,7 +18546,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17603,7 +18605,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17636,7 +18639,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17681,7 +18685,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17760,7 +18765,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -17992,7 +18998,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -18489,7 +19496,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -18523,7 +19531,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -18583,7 +19592,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -18643,7 +19653,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -18702,7 +19713,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -18803,7 +19815,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -19035,7 +20048,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -19127,7 +20141,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -19186,8 +20201,8 @@ "type": "array", "items": { "enum": [ - "rapid_id", - "-rapid_id", + "id", + "-id", "state", "-state", "decisiveness", @@ -19232,7 +20247,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -19281,7 +20297,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -19335,7 +20352,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -19400,7 +20418,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -19456,7 +20475,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -19530,7 +20550,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -19799,7 +20820,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] @@ -20248,7 +21270,10 @@ "Running", "Completed", "Failed", - "ManualApproval" + "ManualApproval", + "Queued", + "Paused", + "StaleResults" ] }, "AudienceStateRecalculationPhase": { @@ -23505,6 +24530,9 @@ { "$ref": "#/components/schemas/ICampaignFilterModelAudienceStateFilterModel" }, + { + "$ref": "#/components/schemas/ICampaignFilterModelCampaignCooldownFilterModel" + }, { "$ref": "#/components/schemas/ICampaignFilterModelCampaignIdFilterModel" }, @@ -23547,6 +24575,7 @@ "mapping": { "AndFilter": "#/components/schemas/ICampaignFilterModelAndFilterModel", "AudienceStateFilter": "#/components/schemas/ICampaignFilterModelAudienceStateFilterModel", + "CampaignCooldownFilter": "#/components/schemas/ICampaignFilterModelCampaignCooldownFilterModel", "CampaignIdFilter": "#/components/schemas/ICampaignFilterModelCampaignIdFilterModel", "CampaignSessionCountFilter": "#/components/schemas/ICampaignFilterModelCampaignSessionCountFilterModel", "CountryFilter": "#/components/schemas/ICampaignFilterModelCountryFilterModel", @@ -23610,6 +24639,23 @@ } } }, + "ICampaignFilterModelCampaignCooldownFilterModel": { + "required": [ + "cooldown", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "CampaignCooldownFilter" + ], + "type": "string" + }, + "cooldown": { + "$ref": "#/components/schemas/ICooldownDurationModel" + } + } + }, "ICampaignFilterModelCampaignIdFilterModel": { "required": [ "campaignIds", @@ -24171,6 +25217,72 @@ } } }, + "ICooldownDurationModel": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/ICooldownDurationModelFixedCooldownDurationModel" + }, + { + "$ref": "#/components/schemas/ICooldownDurationModelRandomCooldownDurationModel" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "FixedCooldownDuration": "#/components/schemas/ICooldownDurationModelFixedCooldownDurationModel", + "RandomCooldownDuration": "#/components/schemas/ICooldownDurationModelRandomCooldownDurationModel" + } + } + }, + "ICooldownDurationModelFixedCooldownDurationModel": { + "required": [ + "duration", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "FixedCooldownDuration" + ], + "type": "string" + }, + "duration": { + "type": "string", + "format": "date-time" + } + } + }, + "ICooldownDurationModelRandomCooldownDurationModel": { + "required": [ + "minDuration", + "maxDuration", + "seedByUserId", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "RandomCooldownDuration" + ], + "type": "string" + }, + "minDuration": { + "type": "string", + "format": "date-time" + }, + "maxDuration": { + "type": "string", + "format": "date-time" + }, + "seedByUserId": { + "type": "boolean" + } + } + }, "QueryCampaignsEndpoint_Output": { "required": [ "id", @@ -24392,6 +25504,9 @@ "isEnabled": { "type": "boolean" }, + "dimension": { + "type": "string" + }, "bypassFilters": { "type": "boolean" }, @@ -26989,6 +28104,85 @@ } } }, + "CreateSampleGenerationEndpoint_Input": { + "required": [ + "samplesPerPrompt" + ], + "type": "object", + "properties": { + "samplesPerPrompt": { + "type": "integer", + "description": "How many samples to request per matching prompt (1 to 16).", + "format": "int32" + }, + "participantIds": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Restrict generation to specific participants. Defaults to all participants\n in the benchmark that have a configured faucet." + }, + "promptIdentifiers": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Restrict generation to specific prompt identifiers.\n Defaults to every prompt in the benchmark." + }, + "tags": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Restrict generation to prompts having at least one of these tags." + } + } + }, + "CreateSampleGenerationEndpoint_Output": { + "required": [ + "id", + "totalCount", + "skippedParticipantIds" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the created sample generation request." + }, + "totalCount": { + "type": "integer", + "description": "The total number of generation items that were queued.", + "format": "int32" + }, + "skippedParticipantIds": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Participants that matched the selection but were skipped because they have no faucet\n configured. Empty when explicit participant ids were supplied." + } + } + }, "CreateSampleNewEndpoint_Input": { "required": [ "identifier", @@ -27042,6 +28236,7 @@ "createdAt", "ownerId", "ownerMail", + "initialBoostLevel", "scoreShift", "scoreScale" ], @@ -27073,6 +28268,12 @@ "type": "string", "description": "The mail of the customer owning the benchmark." }, + "initialBoostLevel": { + "type": "integer", + "description": "The initial boost level applied to the campaign of every run created from this\n benchmark. Null means the benchmark default is used.", + "format": "int32", + "nullable": true + }, "scoreShift": { "type": "number", "description": "Additive offset applied to displayed scores on the overall scoreboard of this\n benchmark.", @@ -27438,6 +28639,14 @@ "benchmarkId": { "type": "string", "description": "The id of the benchmark the participant belongs to." + }, + "faucet": { + "allOf": [ + { + "$ref": "#/components/schemas/IFaucetOutput" + } + ], + "description": "The faucet configured to auto-generate samples, or null if none is set." } } }, @@ -27549,7 +28758,300 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/GetPromptsByBenchmarkEndpoint_Output" + "$ref": "#/components/schemas/GetPromptsByBenchmarkEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, + "GetSampleByIdEndpoint_Output": { + "required": [ + "id", + "identifier", + "participantId", + "participantName", + "asset", + "tags", + "ownerMail" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the sample." + }, + "identifier": { + "type": "string", + "description": "The identifier used to correlate samples of different participants." + }, + "participantId": { + "type": "string", + "description": "The id of the participant that owns the sample." + }, + "participantName": { + "type": "string", + "description": "The name of the participant that owns the sample." + }, + "asset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetModel" + } + ], + "description": "The asset associated with the sample." + }, + "prompt": { + "type": "string", + "description": "An optional prompt associated with the sample.", + "nullable": true + }, + "promptAsset": { + "allOf": [ + { + "$ref": "#/components/schemas/IAssetModel" + } + ], + "description": "An optional prompt asset associated with the sample." + }, + "tags": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "The tags associated with the sample." + }, + "createdAt": { + "type": "string", + "description": "The timestamp when the sample was created.", + "format": "date-time" + }, + "ownerId": { + "type": "string", + "description": "The id of the customer that owns the sample.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The mail of the customer that owns the sample." + } + } + }, + "GetSampleGenerationEndpoint_Output": { + "required": [ + "id", + "benchmarkId", + "status", + "samplesPerPrompt", + "totalCount", + "completedCount", + "failedCount", + "ownerId", + "ownerMail", + "createdAt" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the sample generation request." + }, + "benchmarkId": { + "type": "string", + "description": "The benchmark this generation belongs to." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/SampleGenerationStatus" + } + ], + "description": "The current status of the generation." + }, + "samplesPerPrompt": { + "type": "integer", + "description": "How many samples are being generated per prompt.", + "format": "int32" + }, + "totalCount": { + "type": "integer", + "description": "The total number of items queued.", + "format": "int32" + }, + "completedCount": { + "type": "integer", + "description": "The number of items that have succeeded so far.", + "format": "int32" + }, + "failedCount": { + "type": "integer", + "description": "The number of items that have failed.", + "format": "int32" + }, + "participantIdFilter": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Optional participant id filter that was applied when this generation was created." + }, + "promptIdentifierFilter": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Optional prompt identifier filter that was applied." + }, + "tagsFilter": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Optional tag filter that was applied." + }, + "ownerId": { + "type": "string", + "description": "The id of the customer that started this generation.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The mail of the customer that started this generation." + }, + "createdAt": { + "type": "string", + "description": "When the generation was created.", + "format": "date-time" + } + } + }, + "GetSampleGenerationItemsEndpoint_Output": { + "required": [ + "id", + "sampleGenerationId", + "participantId", + "benchmarkPromptId", + "promptIdentifier", + "sampleCount", + "status", + "attemptCount", + "sampleIds", + "createdAt" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the generation item." + }, + "sampleGenerationId": { + "type": "string", + "description": "The id of the parent sample generation." + }, + "participantId": { + "type": "string", + "description": "The participant whose faucet is producing this sample." + }, + "benchmarkPromptId": { + "type": "string", + "description": "The benchmark prompt this item targets." + }, + "promptIdentifier": { + "type": "string", + "description": "The identifier of the prompt being generated." + }, + "sampleCount": { + "type": "integer", + "description": "How many samples this item produces for its (participant, prompt) pair.", + "format": "int32" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/SampleGenerationItemStatus" + } + ], + "description": "The current status of this item." + }, + "attemptCount": { + "type": "integer", + "description": "Number of delivery attempts that have been made on this item.", + "format": "int32" + }, + "providerRequestId": { + "type": "string", + "description": "Provider-side request id used to correlate with the provider's logs.", + "nullable": true + }, + "failureReason": { + "type": "string", + "description": "Failure reason if the item is in a failed state.", + "nullable": true + }, + "sampleIds": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "The ids of the samples created from this item once it succeeds." + }, + "createdAt": { + "type": "string", + "description": "When the item was created.", + "format": "date-time" + } + } + }, + "GetSampleGenerationItemsEndpoint_PagedResultOfOutput": { + "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/GetSampleGenerationItemsEndpoint_Output" } }, "totalPages": { @@ -27558,82 +29060,6 @@ } } }, - "GetSampleByIdEndpoint_Output": { - "required": [ - "id", - "identifier", - "participantId", - "participantName", - "asset", - "tags", - "ownerMail" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the sample." - }, - "identifier": { - "type": "string", - "description": "The identifier used to correlate samples of different participants." - }, - "participantId": { - "type": "string", - "description": "The id of the participant that owns the sample." - }, - "participantName": { - "type": "string", - "description": "The name of the participant that owns the sample." - }, - "asset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetModel" - } - ], - "description": "The asset associated with the sample." - }, - "prompt": { - "type": "string", - "description": "An optional prompt associated with the sample.", - "nullable": true - }, - "promptAsset": { - "allOf": [ - { - "$ref": "#/components/schemas/IAssetModel" - } - ], - "description": "An optional prompt asset associated with the sample." - }, - "tags": { - "allOf": [ - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "The tags associated with the sample." - }, - "createdAt": { - "type": "string", - "description": "The timestamp when the sample was created.", - "format": "date-time" - }, - "ownerId": { - "type": "string", - "description": "The id of the customer that owns the sample.", - "format": "uuid" - }, - "ownerMail": { - "type": "string", - "description": "The mail of the customer that owns the sample." - } - } - }, "GetSampleNavigationEndpoint_Output": { "required": [ "current", @@ -28061,6 +29487,117 @@ } } }, + "IFaucetInput": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IFaucetInputReplicateFaucetInput" + } + ], + "description": "Polymorphic request body describing a faucet to configure on a participant. The concrete\n type is selected by the _t discriminator (e.g. \"Replicate\").", + "discriminator": { + "propertyName": "_t", + "mapping": { + "Replicate": "#/components/schemas/IFaucetInputReplicateFaucetInput" + } + } + }, + "IFaucetInputReplicateFaucetInput": { + "required": [ + "modelOwner", + "modelName", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "Replicate" + ], + "type": "string" + }, + "modelOwner": { + "type": "string", + "description": "The owner of the hosted model (e.g. \"stability-ai\")." + }, + "modelName": { + "type": "string", + "description": "The model name (e.g. \"sdxl\")." + }, + "modelVersion": { + "type": "string", + "description": "Optional pinned model version hash.", + "nullable": true + } + }, + "description": "Configures a faucet that generates samples via the Replicate API." + }, + "IFaucetOutput": { + "required": [ + "_t" + ], + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/IFaucetOutputManagedFaucetOutput" + }, + { + "$ref": "#/components/schemas/IFaucetOutputReplicateFaucetOutput" + } + ], + "discriminator": { + "propertyName": "_t", + "mapping": { + "Managed": "#/components/schemas/IFaucetOutputManagedFaucetOutput", + "Replicate": "#/components/schemas/IFaucetOutputReplicateFaucetOutput" + } + } + }, + "IFaucetOutputManagedFaucetOutput": { + "required": [ + "_t" + ], + "properties": { + "_t": { + "enum": [ + "Managed" + ], + "type": "string" + }, + "testTimeScaling": { + "type": "integer", + "format": "int32", + "nullable": true + } + } + }, + "IFaucetOutputReplicateFaucetOutput": { + "required": [ + "modelOwner", + "modelName", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "Replicate" + ], + "type": "string" + }, + "modelOwner": { + "type": "string" + }, + "modelName": { + "type": "string" + }, + "modelVersion": { + "type": "string", + "nullable": true + } + } + }, "ParticipantStatus": { "enum": [ "Created", @@ -28712,6 +30249,142 @@ } } }, + "QuerySampleGenerationsByBenchmarkEndpoint_Output": { + "required": [ + "id", + "benchmarkId", + "status", + "samplesPerPrompt", + "totalCount", + "completedCount", + "failedCount", + "ownerId", + "ownerMail", + "createdAt" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The id of the sample generation request." + }, + "benchmarkId": { + "type": "string", + "description": "The benchmark this generation belongs to." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/SampleGenerationStatus" + } + ], + "description": "The current status of the generation." + }, + "samplesPerPrompt": { + "type": "integer", + "description": "How many samples are being generated per prompt.", + "format": "int32" + }, + "totalCount": { + "type": "integer", + "description": "The total number of items queued.", + "format": "int32" + }, + "completedCount": { + "type": "integer", + "description": "The number of items that have succeeded so far.", + "format": "int32" + }, + "failedCount": { + "type": "integer", + "description": "The number of items that have failed.", + "format": "int32" + }, + "participantIdFilter": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Optional participant id filter that was applied when this generation was created." + }, + "promptIdentifierFilter": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Optional prompt identifier filter that was applied." + }, + "tagsFilter": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "Optional tag filter that was applied." + }, + "ownerId": { + "type": "string", + "description": "The id of the customer that started this generation.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The mail of the customer that started this generation." + }, + "createdAt": { + "type": "string", + "description": "When the generation was created.", + "format": "date-time" + } + } + }, + "QuerySampleGenerationsByBenchmarkEndpoint_PagedResultOfOutput": { + "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/QuerySampleGenerationsByBenchmarkEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, "QueryStandingsEndpoint_Output": { "required": [ "id", @@ -28827,6 +30500,48 @@ } } }, + "RetrySampleGenerationEndpoint_Input": { + "type": "object", + "properties": { + "itemIds": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + ], + "description": "The specific item ids to retry. When omitted or empty, every failed item of the\n generation is retried." + } + } + }, + "RetrySampleGenerationEndpoint_Output": { + "required": [ + "retriedCount", + "retriedItemIds" + ], + "type": "object", + "properties": { + "retriedCount": { + "type": "integer", + "description": "How many failed items were re-queued.", + "format": "int32" + }, + "retriedItemIds": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "The ids of the items that were re-queued." + } + } + }, "RunStatus": { "enum": [ "Queued", @@ -28835,6 +30550,24 @@ "Failed" ] }, + "SampleGenerationItemStatus": { + "enum": [ + "Pending", + "Running", + "Succeeded", + "Failed" + ] + }, + "SampleGenerationStatus": { + "enum": [ + "Pending", + "Processing", + "Completed", + "CompletedWithFailures", + "Failed", + "Cancelled" + ] + }, "StandingStatus": { "enum": [ "Created", @@ -29118,7 +30851,10 @@ "Running", "Completed", "Failed", - "ManualApproval" + "ManualApproval", + "Queued", + "Paused", + "StaleResults" ] }, "CloneOrderEndpoint_Input": { @@ -31970,11 +33706,17 @@ } }, "StickyConfig": { + "required": [ + "dimension" + ], "type": "object", "properties": { "isEnabled": { "type": "boolean" }, + "dimension": { + "type": "string" + }, "bypassFilters": { "type": "boolean" }, @@ -32475,7 +34217,6 @@ }, "IMetadataCountMetadata": { "required": [ - "count", "visibilities", "_t" ], @@ -32540,8 +34281,6 @@ }, "IMetadataImageDimensionMetadata": { "required": [ - "height", - "width", "visibilities", "_t" ], @@ -32567,8 +34306,6 @@ }, "IMetadataLocationMetadata": { "required": [ - "x", - "y", "visibilities", "_t" ], @@ -32636,9 +34373,6 @@ }, "IMetadataStreamsMetadata": { "required": [ - "hasAudio", - "hasVideo", - "hasSubtitles", "visibilities", "_t" ], @@ -35222,7 +36956,6 @@ }, "TranslatedString": { "required": [ - "wasTranslated", "englishText", "text", "targetLanguage" @@ -38207,8 +39940,10 @@ "name": "Rapidata Leaderboard API", "tags": [ "Benchmark", + "SampleGeneration", "Leaderboard", "Participant", + "Faucet", "Prompt", "Sample" ] diff --git a/openapi/schemas/translation.openapi.json b/openapi/schemas/translation.openapi.json index ab4e346ec..a6ede4f30 100644 --- a/openapi/schemas/translation.openapi.json +++ b/openapi/schemas/translation.openapi.json @@ -246,7 +246,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] diff --git a/openapi/schemas/validation.openapi.json b/openapi/schemas/validation.openapi.json index e5f89d896..04309860c 100644 --- a/openapi/schemas/validation.openapi.json +++ b/openapi/schemas/validation.openapi.json @@ -3192,7 +3192,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] diff --git a/openapi/schemas/workflow.openapi.json b/openapi/schemas/workflow.openapi.json index 2c598b235..c2c6e5482 100644 --- a/openapi/schemas/workflow.openapi.json +++ b/openapi/schemas/workflow.openapi.json @@ -462,8 +462,8 @@ "type": "array", "items": { "enum": [ - "rapid_id", - "-rapid_id", + "id", + "-id", "state", "-state", "decisiveness", @@ -3681,7 +3681,8 @@ "OpenIdConnect": [ "openid", "profile", - "email" + "email", + "offline_access" ] } ] diff --git a/src/rapidata/api_client/__init__.py b/src/rapidata/api_client/__init__.py index 7b6482c5e..6ed73c663 100644 --- a/src/rapidata/api_client/__init__.py +++ b/src/rapidata/api_client/__init__.py @@ -44,6 +44,7 @@ "EvaluationApi": "rapidata.api_client.api.evaluation_api", "ExamplesApi": "rapidata.api_client.api.examples_api", "ExternalAudienceApi": "rapidata.api_client.api.external_audience_api", + "FaucetApi": "rapidata.api_client.api.faucet_api", "FeedbackApi": "rapidata.api_client.api.feedback_api", "FlowApi": "rapidata.api_client.api.flow_api", "FlowItemApi": "rapidata.api_client.api.flow_item_api", @@ -64,6 +65,7 @@ "RapidApi": "rapidata.api_client.api.rapid_api", "RapidataIdentityAPIApi": "rapidata.api_client.api.rapidata_identity_api_api", "SampleApi": "rapidata.api_client.api.sample_api", + "SampleGenerationApi": "rapidata.api_client.api.sample_generation_api", "SimpleWorkflowApi": "rapidata.api_client.api.simple_workflow_api", "SurveyApi": "rapidata.api_client.api.survey_api", "TranslationApi": "rapidata.api_client.api.translation_api", diff --git a/src/rapidata/api_client/api/__init__.py b/src/rapidata/api_client/api/__init__.py index 06b9369bd..ef0051ce0 100644 --- a/src/rapidata/api_client/api/__init__.py +++ b/src/rapidata/api_client/api/__init__.py @@ -16,6 +16,7 @@ from rapidata.api_client.api.evaluation_api import EvaluationApi from rapidata.api_client.api.examples_api import ExamplesApi from rapidata.api_client.api.external_audience_api import ExternalAudienceApi +from rapidata.api_client.api.faucet_api import FaucetApi from rapidata.api_client.api.feedback_api import FeedbackApi from rapidata.api_client.api.flow_api import FlowApi from rapidata.api_client.api.flow_item_api import FlowItemApi @@ -36,6 +37,7 @@ 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.sample_api import SampleApi +from rapidata.api_client.api.sample_generation_api import SampleGenerationApi from rapidata.api_client.api.simple_workflow_api import SimpleWorkflowApi from rapidata.api_client.api.survey_api import SurveyApi from rapidata.api_client.api.translation_api import TranslationApi diff --git a/src/rapidata/api_client/api/benchmark_api.py b/src/rapidata/api_client/api/benchmark_api.py index adfa07a0a..66bd55456 100644 --- a/src/rapidata/api_client/api/benchmark_api.py +++ b/src/rapidata/api_client/api/benchmark_api.py @@ -26,6 +26,8 @@ from rapidata.api_client.models.create_benchmark_participant_endpoint_output import CreateBenchmarkParticipantEndpointOutput from rapidata.api_client.models.create_prompt_for_benchmark_endpoint_input import CreatePromptForBenchmarkEndpointInput from rapidata.api_client.models.create_prompt_for_benchmark_endpoint_output import CreatePromptForBenchmarkEndpointOutput +from rapidata.api_client.models.create_sample_generation_endpoint_input import CreateSampleGenerationEndpointInput +from rapidata.api_client.models.create_sample_generation_endpoint_output import CreateSampleGenerationEndpointOutput from rapidata.api_client.models.fork_benchmark_endpoint_output import ForkBenchmarkEndpointOutput from rapidata.api_client.models.get_benchmark_by_id_endpoint_output import GetBenchmarkByIdEndpointOutput from rapidata.api_client.models.get_combined_benchmark_matrix_endpoint_output import GetCombinedBenchmarkMatrixEndpointOutput @@ -4049,6 +4051,301 @@ def _benchmark_benchmark_id_prompts_get_serialize( + @validate_call + def benchmark_benchmark_id_sample_generation_post( + self, + benchmark_id: Annotated[StrictStr, Field(description="The benchmark whose participants should run their faucets.")], + create_sample_generation_endpoint_input: Annotated[CreateSampleGenerationEndpointInput, Field(description="The generation configuration.")], + _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, + ) -> CreateSampleGenerationEndpointOutput: + """Starts an asynchronous sample generation run. + + + :param benchmark_id: The benchmark whose participants should run their faucets. (required) + :type benchmark_id: str + :param create_sample_generation_endpoint_input: The generation configuration. (required) + :type create_sample_generation_endpoint_input: CreateSampleGenerationEndpointInput + :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._benchmark_benchmark_id_sample_generation_post_serialize( + benchmark_id=benchmark_id, + create_sample_generation_endpoint_input=create_sample_generation_endpoint_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateSampleGenerationEndpointOutput", + '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 benchmark_benchmark_id_sample_generation_post_with_http_info( + self, + benchmark_id: Annotated[StrictStr, Field(description="The benchmark whose participants should run their faucets.")], + create_sample_generation_endpoint_input: Annotated[CreateSampleGenerationEndpointInput, Field(description="The generation configuration.")], + _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[CreateSampleGenerationEndpointOutput]: + """Starts an asynchronous sample generation run. + + + :param benchmark_id: The benchmark whose participants should run their faucets. (required) + :type benchmark_id: str + :param create_sample_generation_endpoint_input: The generation configuration. (required) + :type create_sample_generation_endpoint_input: CreateSampleGenerationEndpointInput + :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._benchmark_benchmark_id_sample_generation_post_serialize( + benchmark_id=benchmark_id, + create_sample_generation_endpoint_input=create_sample_generation_endpoint_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateSampleGenerationEndpointOutput", + '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 benchmark_benchmark_id_sample_generation_post_without_preload_content( + self, + benchmark_id: Annotated[StrictStr, Field(description="The benchmark whose participants should run their faucets.")], + create_sample_generation_endpoint_input: Annotated[CreateSampleGenerationEndpointInput, Field(description="The generation configuration.")], + _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: + """Starts an asynchronous sample generation run. + + + :param benchmark_id: The benchmark whose participants should run their faucets. (required) + :type benchmark_id: str + :param create_sample_generation_endpoint_input: The generation configuration. (required) + :type create_sample_generation_endpoint_input: CreateSampleGenerationEndpointInput + :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._benchmark_benchmark_id_sample_generation_post_serialize( + benchmark_id=benchmark_id, + create_sample_generation_endpoint_input=create_sample_generation_endpoint_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateSampleGenerationEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _benchmark_benchmark_id_sample_generation_post_serialize( + self, + benchmark_id, + create_sample_generation_endpoint_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if benchmark_id is not None: + _path_params['benchmarkId'] = benchmark_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_sample_generation_endpoint_input is not None: + _body_params = create_sample_generation_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: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/benchmark/{benchmarkId}/sample-generation', + 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 benchmark_benchmark_id_standings_get( self, @@ -5552,6 +5849,7 @@ def benchmarks_get( name: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by name.")] = None, owner_mail: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_mail.")] = None, created_at: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by created_at.")] = None, + is_managed: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by is_managed.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5582,6 +5880,8 @@ def benchmarks_get( :type owner_mail: AudienceAudienceIdJobsGetJobIdParameter :param created_at: Filter by created_at. :type created_at: AudienceAudienceIdJobsGetJobIdParameter + :param is_managed: Filter by is_managed. + :type is_managed: AudienceAudienceIdJobsGetJobIdParameter :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 @@ -5612,6 +5912,7 @@ def benchmarks_get( name=name, owner_mail=owner_mail, created_at=created_at, + is_managed=is_managed, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5645,6 +5946,7 @@ def benchmarks_get_with_http_info( name: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by name.")] = None, owner_mail: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_mail.")] = None, created_at: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by created_at.")] = None, + is_managed: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by is_managed.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5675,6 +5977,8 @@ def benchmarks_get_with_http_info( :type owner_mail: AudienceAudienceIdJobsGetJobIdParameter :param created_at: Filter by created_at. :type created_at: AudienceAudienceIdJobsGetJobIdParameter + :param is_managed: Filter by is_managed. + :type is_managed: AudienceAudienceIdJobsGetJobIdParameter :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 @@ -5705,6 +6009,7 @@ def benchmarks_get_with_http_info( name=name, owner_mail=owner_mail, created_at=created_at, + is_managed=is_managed, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5738,6 +6043,7 @@ def benchmarks_get_without_preload_content( name: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by name.")] = None, owner_mail: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_mail.")] = None, created_at: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by created_at.")] = None, + is_managed: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by is_managed.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5768,6 +6074,8 @@ def benchmarks_get_without_preload_content( :type owner_mail: AudienceAudienceIdJobsGetJobIdParameter :param created_at: Filter by created_at. :type created_at: AudienceAudienceIdJobsGetJobIdParameter + :param is_managed: Filter by is_managed. + :type is_managed: AudienceAudienceIdJobsGetJobIdParameter :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 @@ -5798,6 +6106,7 @@ def benchmarks_get_without_preload_content( name=name, owner_mail=owner_mail, created_at=created_at, + is_managed=is_managed, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5826,6 +6135,7 @@ def _benchmarks_get_serialize( name, owner_mail, created_at, + is_managed, _request_auth, _content_type, _headers, @@ -5893,6 +6203,14 @@ def _benchmarks_get_serialize( for _k, _v in _param_val.items(): if _v is not None: _query_params.append(('created_at[' + _k + ']', _v)) + if is_managed is not None: + _param_val = is_managed + 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_managed[' + _k + ']', _v)) # process the header parameters # process the form parameters # process the body parameter diff --git a/src/rapidata/api_client/api/faucet_api.py b/src/rapidata/api_client/api/faucet_api.py new file mode 100644 index 000000000..a7ab2efdd --- /dev/null +++ b/src/rapidata/api_client/api/faucet_api.py @@ -0,0 +1,600 @@ +# 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 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing_extensions import Annotated +from rapidata.api_client.models.i_faucet_input import IFaucetInput + +from rapidata.api_client.api_client import ApiClient, RequestSerialized +from rapidata.api_client.api_response import ApiResponse +from rapidata.api_client.rest import RESTResponseType + + +class FaucetApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def participant_participant_id_faucet_delete_0( + self, + participant_id: Annotated[StrictStr, Field(description="The id of the participant.")], + _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: + """Removes the faucet configuration from a participant. + + + :param participant_id: The id of the participant. (required) + :type participant_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._participant_participant_id_faucet_delete_0_serialize( + participant_id=participant_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def participant_participant_id_faucet_delete_0_with_http_info( + self, + participant_id: Annotated[StrictStr, Field(description="The id of the participant.")], + _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]: + """Removes the faucet configuration from a participant. + + + :param participant_id: The id of the participant. (required) + :type participant_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._participant_participant_id_faucet_delete_0_serialize( + participant_id=participant_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def participant_participant_id_faucet_delete_0_without_preload_content( + self, + participant_id: Annotated[StrictStr, Field(description="The id of the participant.")], + _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: + """Removes the faucet configuration from a participant. + + + :param participant_id: The id of the participant. (required) + :type participant_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._participant_participant_id_faucet_delete_0_serialize( + participant_id=participant_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _participant_participant_id_faucet_delete_0_serialize( + self, + participant_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if participant_id is not None: + _path_params['participantId'] = participant_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/participant/{participantId}/faucet', + 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 participant_participant_id_faucet_put_0( + self, + participant_id: Annotated[StrictStr, Field(description="The id of the participant whose faucet to set.")], + i_faucet_input: Annotated[IFaucetInput, Field(description="The faucet configuration payload.")], + _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: + """Sets the faucet used to auto-generate samples for a participant. + + + :param participant_id: The id of the participant whose faucet to set. (required) + :type participant_id: str + :param i_faucet_input: The faucet configuration payload. (required) + :type i_faucet_input: IFaucetInput + :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._participant_participant_id_faucet_put_0_serialize( + participant_id=participant_id, + i_faucet_input=i_faucet_input, + _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 participant_participant_id_faucet_put_0_with_http_info( + self, + participant_id: Annotated[StrictStr, Field(description="The id of the participant whose faucet to set.")], + i_faucet_input: Annotated[IFaucetInput, Field(description="The faucet configuration payload.")], + _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]: + """Sets the faucet used to auto-generate samples for a participant. + + + :param participant_id: The id of the participant whose faucet to set. (required) + :type participant_id: str + :param i_faucet_input: The faucet configuration payload. (required) + :type i_faucet_input: IFaucetInput + :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._participant_participant_id_faucet_put_0_serialize( + participant_id=participant_id, + i_faucet_input=i_faucet_input, + _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 participant_participant_id_faucet_put_0_without_preload_content( + self, + participant_id: Annotated[StrictStr, Field(description="The id of the participant whose faucet to set.")], + i_faucet_input: Annotated[IFaucetInput, Field(description="The faucet configuration payload.")], + _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: + """Sets the faucet used to auto-generate samples for a participant. + + + :param participant_id: The id of the participant whose faucet to set. (required) + :type participant_id: str + :param i_faucet_input: The faucet configuration payload. (required) + :type i_faucet_input: IFaucetInput + :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._participant_participant_id_faucet_put_0_serialize( + participant_id=participant_id, + i_faucet_input=i_faucet_input, + _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 _participant_participant_id_faucet_put_0_serialize( + self, + participant_id, + i_faucet_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if participant_id is not None: + _path_params['participantId'] = participant_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if i_faucet_input is not None: + _body_params = i_faucet_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: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/participant/{participantId}/faucet', + 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 + ) + + diff --git a/src/rapidata/api_client/api/participant_api.py b/src/rapidata/api_client/api/participant_api.py index 8eb679170..95acaa6e7 100644 --- a/src/rapidata/api_client/api/participant_api.py +++ b/src/rapidata/api_client/api/participant_api.py @@ -23,6 +23,7 @@ from rapidata.api_client.models.create_sample_new_endpoint_input import CreateSampleNewEndpointInput from rapidata.api_client.models.create_sample_new_endpoint_output import CreateSampleNewEndpointOutput from rapidata.api_client.models.get_participant_by_id_endpoint_output import GetParticipantByIdEndpointOutput +from rapidata.api_client.models.i_faucet_input import IFaucetInput from rapidata.api_client.models.submit_participant_endpoint_output import SubmitParticipantEndpointOutput from rapidata.api_client.models.update_participant_endpoint_input import UpdateParticipantEndpointInput from rapidata.api_client.models.update_participant_name_endpoint_input import UpdateParticipantNameEndpointInput @@ -579,6 +580,568 @@ def _participant_participant_id_disable_post_serialize( + @validate_call + def participant_participant_id_faucet_delete( + self, + participant_id: Annotated[StrictStr, Field(description="The id of the participant.")], + _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: + """Removes the faucet configuration from a participant. + + + :param participant_id: The id of the participant. (required) + :type participant_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._participant_participant_id_faucet_delete_serialize( + participant_id=participant_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def participant_participant_id_faucet_delete_with_http_info( + self, + participant_id: Annotated[StrictStr, Field(description="The id of the participant.")], + _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]: + """Removes the faucet configuration from a participant. + + + :param participant_id: The id of the participant. (required) + :type participant_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._participant_participant_id_faucet_delete_serialize( + participant_id=participant_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def participant_participant_id_faucet_delete_without_preload_content( + self, + participant_id: Annotated[StrictStr, Field(description="The id of the participant.")], + _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: + """Removes the faucet configuration from a participant. + + + :param participant_id: The id of the participant. (required) + :type participant_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._participant_participant_id_faucet_delete_serialize( + participant_id=participant_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _participant_participant_id_faucet_delete_serialize( + self, + participant_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if participant_id is not None: + _path_params['participantId'] = participant_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/participant/{participantId}/faucet', + 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 participant_participant_id_faucet_put( + self, + participant_id: Annotated[StrictStr, Field(description="The id of the participant whose faucet to set.")], + i_faucet_input: Annotated[IFaucetInput, Field(description="The faucet configuration payload.")], + _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: + """Sets the faucet used to auto-generate samples for a participant. + + + :param participant_id: The id of the participant whose faucet to set. (required) + :type participant_id: str + :param i_faucet_input: The faucet configuration payload. (required) + :type i_faucet_input: IFaucetInput + :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._participant_participant_id_faucet_put_serialize( + participant_id=participant_id, + i_faucet_input=i_faucet_input, + _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 participant_participant_id_faucet_put_with_http_info( + self, + participant_id: Annotated[StrictStr, Field(description="The id of the participant whose faucet to set.")], + i_faucet_input: Annotated[IFaucetInput, Field(description="The faucet configuration payload.")], + _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]: + """Sets the faucet used to auto-generate samples for a participant. + + + :param participant_id: The id of the participant whose faucet to set. (required) + :type participant_id: str + :param i_faucet_input: The faucet configuration payload. (required) + :type i_faucet_input: IFaucetInput + :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._participant_participant_id_faucet_put_serialize( + participant_id=participant_id, + i_faucet_input=i_faucet_input, + _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 participant_participant_id_faucet_put_without_preload_content( + self, + participant_id: Annotated[StrictStr, Field(description="The id of the participant whose faucet to set.")], + i_faucet_input: Annotated[IFaucetInput, Field(description="The faucet configuration payload.")], + _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: + """Sets the faucet used to auto-generate samples for a participant. + + + :param participant_id: The id of the participant whose faucet to set. (required) + :type participant_id: str + :param i_faucet_input: The faucet configuration payload. (required) + :type i_faucet_input: IFaucetInput + :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._participant_participant_id_faucet_put_serialize( + participant_id=participant_id, + i_faucet_input=i_faucet_input, + _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 _participant_participant_id_faucet_put_serialize( + self, + participant_id, + i_faucet_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if participant_id is not None: + _path_params['participantId'] = participant_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if i_faucet_input is not None: + _body_params = i_faucet_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: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/participant/{participantId}/faucet', + 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 participant_participant_id_get( self, diff --git a/src/rapidata/api_client/api/sample_api.py b/src/rapidata/api_client/api/sample_api.py index 1a40b76b7..394878cf1 100644 --- a/src/rapidata/api_client/api/sample_api.py +++ b/src/rapidata/api_client/api/sample_api.py @@ -979,6 +979,7 @@ def participant_participant_id_samples_get( self, participant_id: Annotated[StrictStr, Field(description="The id of the participant to query samples for.")], fill_missing: Annotated[Optional[StrictBool], Field(description="Whether to fill missing samples with placeholders.")] = None, + tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to filter the samples by; a sample matches when any of its prompt tags is in this list.")] = 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, @@ -1004,6 +1005,8 @@ def participant_participant_id_samples_get( :type participant_id: str :param fill_missing: Whether to fill missing samples with placeholders. :type fill_missing: bool + :param tags: The tags to filter the samples by; a sample matches when any of its prompt tags is in this list. + :type tags: List[str] :param page: The 1-based page index. :type page: int :param page_size: The number of items per page. @@ -1039,6 +1042,7 @@ def participant_participant_id_samples_get( _param = self._participant_participant_id_samples_get_serialize( participant_id=participant_id, fill_missing=fill_missing, + tags=tags, page=page, page_size=page_size, sort=sort, @@ -1072,6 +1076,7 @@ def participant_participant_id_samples_get_with_http_info( self, participant_id: Annotated[StrictStr, Field(description="The id of the participant to query samples for.")], fill_missing: Annotated[Optional[StrictBool], Field(description="Whether to fill missing samples with placeholders.")] = None, + tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to filter the samples by; a sample matches when any of its prompt tags is in this list.")] = 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, @@ -1097,6 +1102,8 @@ def participant_participant_id_samples_get_with_http_info( :type participant_id: str :param fill_missing: Whether to fill missing samples with placeholders. :type fill_missing: bool + :param tags: The tags to filter the samples by; a sample matches when any of its prompt tags is in this list. + :type tags: List[str] :param page: The 1-based page index. :type page: int :param page_size: The number of items per page. @@ -1132,6 +1139,7 @@ def participant_participant_id_samples_get_with_http_info( _param = self._participant_participant_id_samples_get_serialize( participant_id=participant_id, fill_missing=fill_missing, + tags=tags, page=page, page_size=page_size, sort=sort, @@ -1165,6 +1173,7 @@ def participant_participant_id_samples_get_without_preload_content( self, participant_id: Annotated[StrictStr, Field(description="The id of the participant to query samples for.")], fill_missing: Annotated[Optional[StrictBool], Field(description="Whether to fill missing samples with placeholders.")] = None, + tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to filter the samples by; a sample matches when any of its prompt tags is in this list.")] = 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, @@ -1190,6 +1199,8 @@ def participant_participant_id_samples_get_without_preload_content( :type participant_id: str :param fill_missing: Whether to fill missing samples with placeholders. :type fill_missing: bool + :param tags: The tags to filter the samples by; a sample matches when any of its prompt tags is in this list. + :type tags: List[str] :param page: The 1-based page index. :type page: int :param page_size: The number of items per page. @@ -1225,6 +1236,7 @@ def participant_participant_id_samples_get_without_preload_content( _param = self._participant_participant_id_samples_get_serialize( participant_id=participant_id, fill_missing=fill_missing, + tags=tags, page=page, page_size=page_size, sort=sort, @@ -1253,6 +1265,7 @@ def _participant_participant_id_samples_get_serialize( self, participant_id, fill_missing, + tags, page, page_size, sort, @@ -1267,6 +1280,7 @@ def _participant_participant_id_samples_get_serialize( _host = None _collection_formats: Dict[str, str] = { + 'tags': 'multi', 'sort': 'multi', } @@ -1287,6 +1301,10 @@ def _participant_participant_id_samples_get_serialize( _query_params.append(('fillMissing', fill_missing)) + if tags is not None: + + _query_params.append(('tags', tags)) + if page is not None: _query_params.append(('page', page)) diff --git a/src/rapidata/api_client/api/sample_generation_api.py b/src/rapidata/api_client/api/sample_generation_api.py new file mode 100644 index 000000000..7f17072b3 --- /dev/null +++ b/src/rapidata/api_client/api/sample_generation_api.py @@ -0,0 +1,1652 @@ +# 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 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from rapidata.api_client.models.audience_audience_id_jobs_get_job_id_parameter import AudienceAudienceIdJobsGetJobIdParameter +from rapidata.api_client.models.create_sample_generation_endpoint_input import CreateSampleGenerationEndpointInput +from rapidata.api_client.models.create_sample_generation_endpoint_output import CreateSampleGenerationEndpointOutput +from rapidata.api_client.models.get_sample_generation_endpoint_output import GetSampleGenerationEndpointOutput +from rapidata.api_client.models.get_sample_generation_items_endpoint_paged_result_of_output import GetSampleGenerationItemsEndpointPagedResultOfOutput +from rapidata.api_client.models.query_sample_generations_by_benchmark_endpoint_paged_result_of_output import QuerySampleGenerationsByBenchmarkEndpointPagedResultOfOutput +from rapidata.api_client.models.retry_sample_generation_endpoint_input import RetrySampleGenerationEndpointInput +from rapidata.api_client.models.retry_sample_generation_endpoint_output import RetrySampleGenerationEndpointOutput + +from rapidata.api_client.api_client import ApiClient, RequestSerialized +from rapidata.api_client.api_response import ApiResponse +from rapidata.api_client.rest import RESTResponseType + + +class SampleGenerationApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def benchmark_benchmark_id_sample_generation_post_0( + self, + benchmark_id: Annotated[StrictStr, Field(description="The benchmark whose participants should run their faucets.")], + create_sample_generation_endpoint_input: Annotated[CreateSampleGenerationEndpointInput, Field(description="The generation configuration.")], + _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, + ) -> CreateSampleGenerationEndpointOutput: + """Starts an asynchronous sample generation run. + + + :param benchmark_id: The benchmark whose participants should run their faucets. (required) + :type benchmark_id: str + :param create_sample_generation_endpoint_input: The generation configuration. (required) + :type create_sample_generation_endpoint_input: CreateSampleGenerationEndpointInput + :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._benchmark_benchmark_id_sample_generation_post_0_serialize( + benchmark_id=benchmark_id, + create_sample_generation_endpoint_input=create_sample_generation_endpoint_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateSampleGenerationEndpointOutput", + '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 benchmark_benchmark_id_sample_generation_post_0_with_http_info( + self, + benchmark_id: Annotated[StrictStr, Field(description="The benchmark whose participants should run their faucets.")], + create_sample_generation_endpoint_input: Annotated[CreateSampleGenerationEndpointInput, Field(description="The generation configuration.")], + _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[CreateSampleGenerationEndpointOutput]: + """Starts an asynchronous sample generation run. + + + :param benchmark_id: The benchmark whose participants should run their faucets. (required) + :type benchmark_id: str + :param create_sample_generation_endpoint_input: The generation configuration. (required) + :type create_sample_generation_endpoint_input: CreateSampleGenerationEndpointInput + :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._benchmark_benchmark_id_sample_generation_post_0_serialize( + benchmark_id=benchmark_id, + create_sample_generation_endpoint_input=create_sample_generation_endpoint_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateSampleGenerationEndpointOutput", + '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 benchmark_benchmark_id_sample_generation_post_0_without_preload_content( + self, + benchmark_id: Annotated[StrictStr, Field(description="The benchmark whose participants should run their faucets.")], + create_sample_generation_endpoint_input: Annotated[CreateSampleGenerationEndpointInput, Field(description="The generation configuration.")], + _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: + """Starts an asynchronous sample generation run. + + + :param benchmark_id: The benchmark whose participants should run their faucets. (required) + :type benchmark_id: str + :param create_sample_generation_endpoint_input: The generation configuration. (required) + :type create_sample_generation_endpoint_input: CreateSampleGenerationEndpointInput + :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._benchmark_benchmark_id_sample_generation_post_0_serialize( + benchmark_id=benchmark_id, + create_sample_generation_endpoint_input=create_sample_generation_endpoint_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateSampleGenerationEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _benchmark_benchmark_id_sample_generation_post_0_serialize( + self, + benchmark_id, + create_sample_generation_endpoint_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if benchmark_id is not None: + _path_params['benchmarkId'] = benchmark_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_sample_generation_endpoint_input is not None: + _body_params = create_sample_generation_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: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/benchmark/{benchmarkId}/sample-generation', + 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 benchmark_benchmark_id_sample_generations_get( + self, + benchmark_id: Annotated[StrictStr, Field(description="The id of the benchmark whose sample generations should be listed.")], + 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, + status: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by status.")] = None, + _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, + ) -> QuerySampleGenerationsByBenchmarkEndpointPagedResultOfOutput: + """Lists historical sample generation runs for the given benchmark. + + Results are sorted by creation time (newest first) by default. + + :param benchmark_id: The id of the benchmark whose sample generations should be listed. (required) + :type benchmark_id: str + :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 status: Filter by status. + :type status: AudienceAudienceIdJobsGetJobIdParameter + :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._benchmark_benchmark_id_sample_generations_get_serialize( + benchmark_id=benchmark_id, + page=page, + page_size=page_size, + sort=sort, + status=status, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "QuerySampleGenerationsByBenchmarkEndpointPagedResultOfOutput", + '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 benchmark_benchmark_id_sample_generations_get_with_http_info( + self, + benchmark_id: Annotated[StrictStr, Field(description="The id of the benchmark whose sample generations should be listed.")], + 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, + status: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by status.")] = None, + _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[QuerySampleGenerationsByBenchmarkEndpointPagedResultOfOutput]: + """Lists historical sample generation runs for the given benchmark. + + Results are sorted by creation time (newest first) by default. + + :param benchmark_id: The id of the benchmark whose sample generations should be listed. (required) + :type benchmark_id: str + :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 status: Filter by status. + :type status: AudienceAudienceIdJobsGetJobIdParameter + :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._benchmark_benchmark_id_sample_generations_get_serialize( + benchmark_id=benchmark_id, + page=page, + page_size=page_size, + sort=sort, + status=status, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "QuerySampleGenerationsByBenchmarkEndpointPagedResultOfOutput", + '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 benchmark_benchmark_id_sample_generations_get_without_preload_content( + self, + benchmark_id: Annotated[StrictStr, Field(description="The id of the benchmark whose sample generations should be listed.")], + 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, + status: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by status.")] = None, + _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: + """Lists historical sample generation runs for the given benchmark. + + Results are sorted by creation time (newest first) by default. + + :param benchmark_id: The id of the benchmark whose sample generations should be listed. (required) + :type benchmark_id: str + :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 status: Filter by status. + :type status: AudienceAudienceIdJobsGetJobIdParameter + :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._benchmark_benchmark_id_sample_generations_get_serialize( + benchmark_id=benchmark_id, + page=page, + page_size=page_size, + sort=sort, + status=status, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "QuerySampleGenerationsByBenchmarkEndpointPagedResultOfOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _benchmark_benchmark_id_sample_generations_get_serialize( + self, + benchmark_id, + page, + page_size, + sort, + status, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'sort': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if benchmark_id is not None: + _path_params['benchmarkId'] = benchmark_id + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + 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)) + # 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] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/benchmark/{benchmarkId}/sample-generations', + 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 benchmark_sample_generation_sample_generation_id_get( + self, + sample_generation_id: Annotated[StrictStr, Field(description="The id of the sample generation request.")], + _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, + ) -> GetSampleGenerationEndpointOutput: + """Returns the current status and progress of a sample generation request. + + + :param sample_generation_id: The id of the sample generation request. (required) + :type sample_generation_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._benchmark_sample_generation_sample_generation_id_get_serialize( + sample_generation_id=sample_generation_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetSampleGenerationEndpointOutput", + '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 benchmark_sample_generation_sample_generation_id_get_with_http_info( + self, + sample_generation_id: Annotated[StrictStr, Field(description="The id of the sample generation request.")], + _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[GetSampleGenerationEndpointOutput]: + """Returns the current status and progress of a sample generation request. + + + :param sample_generation_id: The id of the sample generation request. (required) + :type sample_generation_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._benchmark_sample_generation_sample_generation_id_get_serialize( + sample_generation_id=sample_generation_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetSampleGenerationEndpointOutput", + '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 benchmark_sample_generation_sample_generation_id_get_without_preload_content( + self, + sample_generation_id: Annotated[StrictStr, Field(description="The id of the sample generation request.")], + _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: + """Returns the current status and progress of a sample generation request. + + + :param sample_generation_id: The id of the sample generation request. (required) + :type sample_generation_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._benchmark_sample_generation_sample_generation_id_get_serialize( + sample_generation_id=sample_generation_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetSampleGenerationEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _benchmark_sample_generation_sample_generation_id_get_serialize( + self, + sample_generation_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if sample_generation_id is not None: + _path_params['sampleGenerationId'] = sample_generation_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/benchmark/sample-generation/{sampleGenerationId}', + 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 benchmark_sample_generation_sample_generation_id_items_get( + self, + sample_generation_id: Annotated[StrictStr, Field(description="The id of the sample generation request.")], + 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, + status: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by status.")] = None, + participant_id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by participant_id.")] = None, + prompt_identifier: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by prompt_identifier.")] = None, + created_at: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by created_at.")] = None, + _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, + ) -> GetSampleGenerationItemsEndpointPagedResultOfOutput: + """Returns the per-item audit trail for a sample generation request. + + + :param sample_generation_id: The id of the sample generation request. (required) + :type sample_generation_id: str + :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 status: Filter by status. + :type status: AudienceAudienceIdJobsGetJobIdParameter + :param participant_id: Filter by participant_id. + :type participant_id: AudienceAudienceIdJobsGetJobIdParameter + :param prompt_identifier: Filter by prompt_identifier. + :type prompt_identifier: AudienceAudienceIdJobsGetJobIdParameter + :param created_at: Filter by created_at. + :type created_at: AudienceAudienceIdJobsGetJobIdParameter + :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._benchmark_sample_generation_sample_generation_id_items_get_serialize( + sample_generation_id=sample_generation_id, + page=page, + page_size=page_size, + sort=sort, + status=status, + participant_id=participant_id, + prompt_identifier=prompt_identifier, + created_at=created_at, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetSampleGenerationItemsEndpointPagedResultOfOutput", + '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 benchmark_sample_generation_sample_generation_id_items_get_with_http_info( + self, + sample_generation_id: Annotated[StrictStr, Field(description="The id of the sample generation request.")], + 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, + status: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by status.")] = None, + participant_id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by participant_id.")] = None, + prompt_identifier: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by prompt_identifier.")] = None, + created_at: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by created_at.")] = None, + _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[GetSampleGenerationItemsEndpointPagedResultOfOutput]: + """Returns the per-item audit trail for a sample generation request. + + + :param sample_generation_id: The id of the sample generation request. (required) + :type sample_generation_id: str + :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 status: Filter by status. + :type status: AudienceAudienceIdJobsGetJobIdParameter + :param participant_id: Filter by participant_id. + :type participant_id: AudienceAudienceIdJobsGetJobIdParameter + :param prompt_identifier: Filter by prompt_identifier. + :type prompt_identifier: AudienceAudienceIdJobsGetJobIdParameter + :param created_at: Filter by created_at. + :type created_at: AudienceAudienceIdJobsGetJobIdParameter + :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._benchmark_sample_generation_sample_generation_id_items_get_serialize( + sample_generation_id=sample_generation_id, + page=page, + page_size=page_size, + sort=sort, + status=status, + participant_id=participant_id, + prompt_identifier=prompt_identifier, + created_at=created_at, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetSampleGenerationItemsEndpointPagedResultOfOutput", + '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 benchmark_sample_generation_sample_generation_id_items_get_without_preload_content( + self, + sample_generation_id: Annotated[StrictStr, Field(description="The id of the sample generation request.")], + 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, + status: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by status.")] = None, + participant_id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by participant_id.")] = None, + prompt_identifier: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by prompt_identifier.")] = None, + created_at: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by created_at.")] = None, + _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: + """Returns the per-item audit trail for a sample generation request. + + + :param sample_generation_id: The id of the sample generation request. (required) + :type sample_generation_id: str + :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 status: Filter by status. + :type status: AudienceAudienceIdJobsGetJobIdParameter + :param participant_id: Filter by participant_id. + :type participant_id: AudienceAudienceIdJobsGetJobIdParameter + :param prompt_identifier: Filter by prompt_identifier. + :type prompt_identifier: AudienceAudienceIdJobsGetJobIdParameter + :param created_at: Filter by created_at. + :type created_at: AudienceAudienceIdJobsGetJobIdParameter + :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._benchmark_sample_generation_sample_generation_id_items_get_serialize( + sample_generation_id=sample_generation_id, + page=page, + page_size=page_size, + sort=sort, + status=status, + participant_id=participant_id, + prompt_identifier=prompt_identifier, + created_at=created_at, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetSampleGenerationItemsEndpointPagedResultOfOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _benchmark_sample_generation_sample_generation_id_items_get_serialize( + self, + sample_generation_id, + page, + page_size, + sort, + status, + participant_id, + prompt_identifier, + created_at, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'sort': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if sample_generation_id is not None: + _path_params['sampleGenerationId'] = sample_generation_id + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + 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 participant_id is not None: + _param_val = participant_id + 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(('participant_id[' + _k + ']', _v)) + if prompt_identifier is not None: + _param_val = prompt_identifier + 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(('prompt_identifier[' + _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 + + + # 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] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/benchmark/sample-generation/{sampleGenerationId}/items', + 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 benchmark_sample_generation_sample_generation_id_retry_post( + self, + sample_generation_id: Annotated[StrictStr, Field(description="The id of the sample generation request.")], + retry_sample_generation_endpoint_input: Annotated[Optional[RetrySampleGenerationEndpointInput], Field(description="Optional payload restricting the retry to specific item ids.")] = None, + _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, + ) -> RetrySampleGenerationEndpointOutput: + """Re-queues failed items of a sample generation so they run again. + + When no item ids are supplied, every failed item of the generation is retried. Item ids that do not belong to the generation or are not in a failed state are ignored. Returns the ids that were re-queued; a generation with no failed items yields an empty result. + + :param sample_generation_id: The id of the sample generation request. (required) + :type sample_generation_id: str + :param retry_sample_generation_endpoint_input: Optional payload restricting the retry to specific item ids. + :type retry_sample_generation_endpoint_input: RetrySampleGenerationEndpointInput + :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._benchmark_sample_generation_sample_generation_id_retry_post_serialize( + sample_generation_id=sample_generation_id, + retry_sample_generation_endpoint_input=retry_sample_generation_endpoint_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RetrySampleGenerationEndpointOutput", + '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 benchmark_sample_generation_sample_generation_id_retry_post_with_http_info( + self, + sample_generation_id: Annotated[StrictStr, Field(description="The id of the sample generation request.")], + retry_sample_generation_endpoint_input: Annotated[Optional[RetrySampleGenerationEndpointInput], Field(description="Optional payload restricting the retry to specific item ids.")] = None, + _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[RetrySampleGenerationEndpointOutput]: + """Re-queues failed items of a sample generation so they run again. + + When no item ids are supplied, every failed item of the generation is retried. Item ids that do not belong to the generation or are not in a failed state are ignored. Returns the ids that were re-queued; a generation with no failed items yields an empty result. + + :param sample_generation_id: The id of the sample generation request. (required) + :type sample_generation_id: str + :param retry_sample_generation_endpoint_input: Optional payload restricting the retry to specific item ids. + :type retry_sample_generation_endpoint_input: RetrySampleGenerationEndpointInput + :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._benchmark_sample_generation_sample_generation_id_retry_post_serialize( + sample_generation_id=sample_generation_id, + retry_sample_generation_endpoint_input=retry_sample_generation_endpoint_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RetrySampleGenerationEndpointOutput", + '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 benchmark_sample_generation_sample_generation_id_retry_post_without_preload_content( + self, + sample_generation_id: Annotated[StrictStr, Field(description="The id of the sample generation request.")], + retry_sample_generation_endpoint_input: Annotated[Optional[RetrySampleGenerationEndpointInput], Field(description="Optional payload restricting the retry to specific item ids.")] = None, + _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: + """Re-queues failed items of a sample generation so they run again. + + When no item ids are supplied, every failed item of the generation is retried. Item ids that do not belong to the generation or are not in a failed state are ignored. Returns the ids that were re-queued; a generation with no failed items yields an empty result. + + :param sample_generation_id: The id of the sample generation request. (required) + :type sample_generation_id: str + :param retry_sample_generation_endpoint_input: Optional payload restricting the retry to specific item ids. + :type retry_sample_generation_endpoint_input: RetrySampleGenerationEndpointInput + :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._benchmark_sample_generation_sample_generation_id_retry_post_serialize( + sample_generation_id=sample_generation_id, + retry_sample_generation_endpoint_input=retry_sample_generation_endpoint_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RetrySampleGenerationEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _benchmark_sample_generation_sample_generation_id_retry_post_serialize( + self, + sample_generation_id, + retry_sample_generation_endpoint_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if sample_generation_id is not None: + _path_params['sampleGenerationId'] = sample_generation_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if retry_sample_generation_endpoint_input is not None: + _body_params = retry_sample_generation_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: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/benchmark/sample-generation/{sampleGenerationId}/retry', + 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 + ) + + diff --git a/src/rapidata/api_client/models/audience_job_state.py b/src/rapidata/api_client/models/audience_job_state.py index a3b9b4418..e260965d6 100644 --- a/src/rapidata/api_client/models/audience_job_state.py +++ b/src/rapidata/api_client/models/audience_job_state.py @@ -31,6 +31,9 @@ class AudienceJobState(str, Enum): COMPLETED = 'Completed' FAILED = 'Failed' MANUALAPPROVAL = 'ManualApproval' + QUEUED = 'Queued' + PAUSED = 'Paused' + STALERESULTS = 'StaleResults' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/src/rapidata/api_client/models/audience_job_status.py b/src/rapidata/api_client/models/audience_job_status.py index a1d16f8c1..8785c3ada 100644 --- a/src/rapidata/api_client/models/audience_job_status.py +++ b/src/rapidata/api_client/models/audience_job_status.py @@ -31,6 +31,9 @@ class AudienceJobStatus(str, Enum): COMPLETED = 'Completed' FAILED = 'Failed' MANUALAPPROVAL = 'ManualApproval' + QUEUED = 'Queued' + PAUSED = 'Paused' + STALERESULTS = 'StaleResults' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/src/rapidata/api_client/models/create_sample_generation_endpoint_input.py b/src/rapidata/api_client/models/create_sample_generation_endpoint_input.py new file mode 100644 index 000000000..aa1d36c8a --- /dev/null +++ b/src/rapidata/api_client/models/create_sample_generation_endpoint_input.py @@ -0,0 +1,110 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class CreateSampleGenerationEndpointInput(LazyValidatedModel): + """ + CreateSampleGenerationEndpointInput + """ # noqa: E501 + samples_per_prompt: StrictInt = Field(description="How many samples to request per matching prompt (1 to 16).", alias="samplesPerPrompt") + participant_ids: Optional[List[StrictStr]] = Field(default=None, alias="participantIds") + prompt_identifiers: Optional[List[StrictStr]] = Field(default=None, alias="promptIdentifiers") + tags: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["samplesPerPrompt", "participantIds", "promptIdentifiers", "tags"] + + # model_config is inherited from LazyValidatedModel + + + 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 CreateSampleGenerationEndpointInput 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, + ) + # set to None if participant_ids (nullable) is None + # and model_fields_set contains the field + if self.participant_ids is None and "participant_ids" in self.model_fields_set: + _dict['participantIds'] = None + + # set to None if prompt_identifiers (nullable) is None + # and model_fields_set contains the field + if self.prompt_identifiers is None and "prompt_identifiers" in self.model_fields_set: + _dict['promptIdentifiers'] = None + + # set to None if tags (nullable) is None + # and model_fields_set contains the field + if self.tags is None and "tags" in self.model_fields_set: + _dict['tags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateSampleGenerationEndpointInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "samplesPerPrompt": obj.get("samplesPerPrompt"), + "participantIds": obj.get("participantIds"), + "promptIdentifiers": obj.get("promptIdentifiers"), + "tags": obj.get("tags") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/create_sample_generation_endpoint_output.py b/src/rapidata/api_client/models/create_sample_generation_endpoint_output.py new file mode 100644 index 000000000..ca3a24add --- /dev/null +++ b/src/rapidata/api_client/models/create_sample_generation_endpoint_output.py @@ -0,0 +1,93 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class CreateSampleGenerationEndpointOutput(LazyValidatedModel): + """ + CreateSampleGenerationEndpointOutput + """ # noqa: E501 + id: StrictStr = Field(description="The id of the created sample generation request.") + total_count: StrictInt = Field(description="The total number of generation items that were queued.", alias="totalCount") + skipped_participant_ids: List[StrictStr] = Field(alias="skippedParticipantIds") + __properties: ClassVar[List[str]] = ["id", "totalCount", "skippedParticipantIds"] + + # model_config is inherited from LazyValidatedModel + + + 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 CreateSampleGenerationEndpointOutput 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 CreateSampleGenerationEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "id": obj.get("id"), + "totalCount": obj.get("totalCount"), + "skippedParticipantIds": obj.get("skippedParticipantIds") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/get_benchmark_by_id_endpoint_output.py b/src/rapidata/api_client/models/get_benchmark_by_id_endpoint_output.py index e129a2049..50a2fe5df 100644 --- a/src/rapidata/api_client/models/get_benchmark_by_id_endpoint_output.py +++ b/src/rapidata/api_client/models/get_benchmark_by_id_endpoint_output.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Union +from typing import Any, ClassVar, Dict, List, Optional, Union from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel from typing import Optional, Set @@ -35,9 +35,10 @@ class GetBenchmarkByIdEndpointOutput(LazyValidatedModel): created_at: datetime = Field(description="The timestamp when the benchmark was created.", alias="createdAt") owner_id: StrictStr = Field(description="The id of the customer owning the benchmark.", alias="ownerId") owner_mail: StrictStr = Field(description="The mail of the customer owning the benchmark.", alias="ownerMail") + initial_boost_level: Optional[StrictInt] = Field(description="The initial boost level applied to the campaign of every run created from this benchmark. Null means the benchmark default is used.", alias="initialBoostLevel") score_shift: Union[StrictFloat, StrictInt] = Field(description="Additive offset applied to displayed scores on the overall scoreboard of this benchmark.", alias="scoreShift") score_scale: Union[StrictFloat, StrictInt] = Field(description="Multiplicative factor applied to displayed scores (relative to the Bradley-Terry center) on the overall scoreboard of this benchmark.", alias="scoreScale") - __properties: ClassVar[List[str]] = ["id", "name", "isPublic", "createdAt", "ownerId", "ownerMail", "scoreShift", "scoreScale"] + __properties: ClassVar[List[str]] = ["id", "name", "isPublic", "createdAt", "ownerId", "ownerMail", "initialBoostLevel", "scoreShift", "scoreScale"] # model_config is inherited from LazyValidatedModel @@ -74,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if initial_boost_level (nullable) is None + # and model_fields_set contains the field + if self.initial_boost_level is None and "initial_boost_level" in self.model_fields_set: + _dict['initialBoostLevel'] = None + return _dict @classmethod @@ -92,6 +98,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "createdAt": obj.get("createdAt"), "ownerId": obj.get("ownerId"), "ownerMail": obj.get("ownerMail"), + "initialBoostLevel": obj.get("initialBoostLevel"), "scoreShift": obj.get("scoreShift"), "scoreScale": obj.get("scoreScale") } diff --git a/src/rapidata/api_client/models/get_participant_by_id_endpoint_output.py b/src/rapidata/api_client/models/get_participant_by_id_endpoint_output.py index 6ba6f5347..320389f1e 100644 --- a/src/rapidata/api_client/models/get_participant_by_id_endpoint_output.py +++ b/src/rapidata/api_client/models/get_participant_by_id_endpoint_output.py @@ -18,7 +18,8 @@ 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.i_faucet_output import IFaucetOutput from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel from typing import Optional, Set @@ -31,7 +32,8 @@ class GetParticipantByIdEndpointOutput(LazyValidatedModel): id: StrictStr = Field(description="The unique identifier of the participant.") name: StrictStr = Field(description="The name of the participant.") benchmark_id: StrictStr = Field(description="The id of the benchmark the participant belongs to.", alias="benchmarkId") - __properties: ClassVar[List[str]] = ["id", "name", "benchmarkId"] + faucet: Optional[IFaucetOutput] = Field(default=None, description="The faucet configured to auto-generate samples, or null if none is set.") + __properties: ClassVar[List[str]] = ["id", "name", "benchmarkId", "faucet"] # model_config is inherited from LazyValidatedModel @@ -68,6 +70,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of faucet + if self.faucet: + _dict['faucet'] = self.faucet.to_dict() return _dict @classmethod @@ -82,7 +87,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _data = { "id": obj.get("id"), "name": obj.get("name"), - "benchmarkId": obj.get("benchmarkId") + "benchmarkId": obj.get("benchmarkId"), + "faucet": IFaucetOutput.from_dict(obj["faucet"]) if obj.get("faucet") is not None else None } try: _obj = cls.model_validate(_data) diff --git a/src/rapidata/api_client/models/get_sample_generation_endpoint_output.py b/src/rapidata/api_client/models/get_sample_generation_endpoint_output.py new file mode 100644 index 000000000..a729c72a2 --- /dev/null +++ b/src/rapidata/api_client/models/get_sample_generation_endpoint_output.py @@ -0,0 +1,130 @@ +# 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from rapidata.api_client.models.sample_generation_status import SampleGenerationStatus +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class GetSampleGenerationEndpointOutput(LazyValidatedModel): + """ + GetSampleGenerationEndpointOutput + """ # noqa: E501 + id: StrictStr = Field(description="The id of the sample generation request.") + benchmark_id: StrictStr = Field(description="The benchmark this generation belongs to.", alias="benchmarkId") + status: SampleGenerationStatus = Field(description="The current status of the generation.") + samples_per_prompt: StrictInt = Field(description="How many samples are being generated per prompt.", alias="samplesPerPrompt") + total_count: StrictInt = Field(description="The total number of items queued.", alias="totalCount") + completed_count: StrictInt = Field(description="The number of items that have succeeded so far.", alias="completedCount") + failed_count: StrictInt = Field(description="The number of items that have failed.", alias="failedCount") + participant_id_filter: Optional[List[StrictStr]] = Field(default=None, alias="participantIdFilter") + prompt_identifier_filter: Optional[List[StrictStr]] = Field(default=None, alias="promptIdentifierFilter") + tags_filter: Optional[List[StrictStr]] = Field(default=None, alias="tagsFilter") + owner_id: StrictStr = Field(description="The id of the customer that started this generation.", alias="ownerId") + owner_mail: StrictStr = Field(description="The mail of the customer that started this generation.", alias="ownerMail") + created_at: datetime = Field(description="When the generation was created.", alias="createdAt") + __properties: ClassVar[List[str]] = ["id", "benchmarkId", "status", "samplesPerPrompt", "totalCount", "completedCount", "failedCount", "participantIdFilter", "promptIdentifierFilter", "tagsFilter", "ownerId", "ownerMail", "createdAt"] + + # model_config is inherited from LazyValidatedModel + + + 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 GetSampleGenerationEndpointOutput 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, + ) + # set to None if participant_id_filter (nullable) is None + # and model_fields_set contains the field + if self.participant_id_filter is None and "participant_id_filter" in self.model_fields_set: + _dict['participantIdFilter'] = None + + # set to None if prompt_identifier_filter (nullable) is None + # and model_fields_set contains the field + if self.prompt_identifier_filter is None and "prompt_identifier_filter" in self.model_fields_set: + _dict['promptIdentifierFilter'] = None + + # set to None if tags_filter (nullable) is None + # and model_fields_set contains the field + if self.tags_filter is None and "tags_filter" in self.model_fields_set: + _dict['tagsFilter'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetSampleGenerationEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "id": obj.get("id"), + "benchmarkId": obj.get("benchmarkId"), + "status": obj.get("status"), + "samplesPerPrompt": obj.get("samplesPerPrompt"), + "totalCount": obj.get("totalCount"), + "completedCount": obj.get("completedCount"), + "failedCount": obj.get("failedCount"), + "participantIdFilter": obj.get("participantIdFilter"), + "promptIdentifierFilter": obj.get("promptIdentifierFilter"), + "tagsFilter": obj.get("tagsFilter"), + "ownerId": obj.get("ownerId"), + "ownerMail": obj.get("ownerMail"), + "createdAt": obj.get("createdAt") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/get_sample_generation_items_endpoint_output.py b/src/rapidata/api_client/models/get_sample_generation_items_endpoint_output.py new file mode 100644 index 000000000..7e3b529aa --- /dev/null +++ b/src/rapidata/api_client/models/get_sample_generation_items_endpoint_output.py @@ -0,0 +1,123 @@ +# 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from rapidata.api_client.models.sample_generation_item_status import SampleGenerationItemStatus +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class GetSampleGenerationItemsEndpointOutput(LazyValidatedModel): + """ + GetSampleGenerationItemsEndpointOutput + """ # noqa: E501 + id: StrictStr = Field(description="The id of the generation item.") + sample_generation_id: StrictStr = Field(description="The id of the parent sample generation.", alias="sampleGenerationId") + participant_id: StrictStr = Field(description="The participant whose faucet is producing this sample.", alias="participantId") + benchmark_prompt_id: StrictStr = Field(description="The benchmark prompt this item targets.", alias="benchmarkPromptId") + prompt_identifier: StrictStr = Field(description="The identifier of the prompt being generated.", alias="promptIdentifier") + sample_count: StrictInt = Field(description="How many samples this item produces for its (participant, prompt) pair.", alias="sampleCount") + status: SampleGenerationItemStatus = Field(description="The current status of this item.") + attempt_count: StrictInt = Field(description="Number of delivery attempts that have been made on this item.", alias="attemptCount") + provider_request_id: Optional[StrictStr] = Field(default=None, description="Provider-side request id used to correlate with the provider's logs.", alias="providerRequestId") + failure_reason: Optional[StrictStr] = Field(default=None, description="Failure reason if the item is in a failed state.", alias="failureReason") + sample_ids: List[StrictStr] = Field(alias="sampleIds") + created_at: datetime = Field(description="When the item was created.", alias="createdAt") + __properties: ClassVar[List[str]] = ["id", "sampleGenerationId", "participantId", "benchmarkPromptId", "promptIdentifier", "sampleCount", "status", "attemptCount", "providerRequestId", "failureReason", "sampleIds", "createdAt"] + + # model_config is inherited from LazyValidatedModel + + + 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 GetSampleGenerationItemsEndpointOutput 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, + ) + # set to None if provider_request_id (nullable) is None + # and model_fields_set contains the field + if self.provider_request_id is None and "provider_request_id" in self.model_fields_set: + _dict['providerRequestId'] = None + + # set to None if failure_reason (nullable) is None + # and model_fields_set contains the field + if self.failure_reason is None and "failure_reason" in self.model_fields_set: + _dict['failureReason'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetSampleGenerationItemsEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "id": obj.get("id"), + "sampleGenerationId": obj.get("sampleGenerationId"), + "participantId": obj.get("participantId"), + "benchmarkPromptId": obj.get("benchmarkPromptId"), + "promptIdentifier": obj.get("promptIdentifier"), + "sampleCount": obj.get("sampleCount"), + "status": obj.get("status"), + "attemptCount": obj.get("attemptCount"), + "providerRequestId": obj.get("providerRequestId"), + "failureReason": obj.get("failureReason"), + "sampleIds": obj.get("sampleIds"), + "createdAt": obj.get("createdAt") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/get_sample_generation_items_endpoint_paged_result_of_output.py b/src/rapidata/api_client/models/get_sample_generation_items_endpoint_paged_result_of_output.py new file mode 100644 index 000000000..a7d81e4af --- /dev/null +++ b/src/rapidata/api_client/models/get_sample_generation_items_endpoint_paged_result_of_output.py @@ -0,0 +1,105 @@ +# 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.get_sample_generation_items_endpoint_output import GetSampleGenerationItemsEndpointOutput +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class GetSampleGenerationItemsEndpointPagedResultOfOutput(LazyValidatedModel): + """ + GetSampleGenerationItemsEndpointPagedResultOfOutput + """ # noqa: E501 + total: StrictInt + page: StrictInt + page_size: StrictInt = Field(alias="pageSize") + items: List[GetSampleGenerationItemsEndpointOutput] + total_pages: Optional[StrictInt] = Field(default=None, alias="totalPages") + __properties: ClassVar[List[str]] = ["total", "page", "pageSize", "items", "totalPages"] + + # model_config is inherited from LazyValidatedModel + + + 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 GetSampleGenerationItemsEndpointPagedResultOfOutput 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 GetSampleGenerationItemsEndpointPagedResultOfOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "total": obj.get("total"), + "page": obj.get("page"), + "pageSize": obj.get("pageSize"), + "items": [GetSampleGenerationItemsEndpointOutput.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "totalPages": obj.get("totalPages") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/i_campaign_filter_model.py b/src/rapidata/api_client/models/i_campaign_filter_model.py index 3e717e0d7..4e0509f41 100644 --- a/src/rapidata/api_client/models/i_campaign_filter_model.py +++ b/src/rapidata/api_client/models/i_campaign_filter_model.py @@ -18,6 +18,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional from rapidata.api_client.models.i_campaign_filter_model_audience_state_filter_model import ICampaignFilterModelAudienceStateFilterModel +from rapidata.api_client.models.i_campaign_filter_model_campaign_cooldown_filter_model import ICampaignFilterModelCampaignCooldownFilterModel from rapidata.api_client.models.i_campaign_filter_model_campaign_id_filter_model import ICampaignFilterModelCampaignIdFilterModel from rapidata.api_client.models.i_campaign_filter_model_campaign_session_count_filter_model import ICampaignFilterModelCampaignSessionCountFilterModel from rapidata.api_client.models.i_campaign_filter_model_country_filter_model import ICampaignFilterModelCountryFilterModel @@ -34,7 +35,7 @@ from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -ICAMPAIGNFILTERMODEL_ONE_OF_SCHEMAS = ["ICampaignFilterModelAndFilterModel", "ICampaignFilterModelAudienceStateFilterModel", "ICampaignFilterModelCampaignIdFilterModel", "ICampaignFilterModelCampaignSessionCountFilterModel", "ICampaignFilterModelCountryFilterModel", "ICampaignFilterModelDemographicFilterModel", "ICampaignFilterModelDeviceFilterModel", "ICampaignFilterModelLanguageFilterModel", "ICampaignFilterModelNewUserFilterModel", "ICampaignFilterModelNotFilterModel", "ICampaignFilterModelOrFilterModel", "ICampaignFilterModelResponseCountFilterModel", "ICampaignFilterModelUserActionRestrictionFilterModel", "ICampaignFilterModelUserScoreFilterModel"] +ICAMPAIGNFILTERMODEL_ONE_OF_SCHEMAS = ["ICampaignFilterModelAndFilterModel", "ICampaignFilterModelAudienceStateFilterModel", "ICampaignFilterModelCampaignCooldownFilterModel", "ICampaignFilterModelCampaignIdFilterModel", "ICampaignFilterModelCampaignSessionCountFilterModel", "ICampaignFilterModelCountryFilterModel", "ICampaignFilterModelDemographicFilterModel", "ICampaignFilterModelDeviceFilterModel", "ICampaignFilterModelLanguageFilterModel", "ICampaignFilterModelNewUserFilterModel", "ICampaignFilterModelNotFilterModel", "ICampaignFilterModelOrFilterModel", "ICampaignFilterModelResponseCountFilterModel", "ICampaignFilterModelUserActionRestrictionFilterModel", "ICampaignFilterModelUserScoreFilterModel"] class ICampaignFilterModel(LazyValidatedModel): """ @@ -44,32 +45,34 @@ class ICampaignFilterModel(LazyValidatedModel): oneof_schema_1_validator: Optional[ICampaignFilterModelAndFilterModel] = None # data type: ICampaignFilterModelAudienceStateFilterModel oneof_schema_2_validator: Optional[ICampaignFilterModelAudienceStateFilterModel] = None + # data type: ICampaignFilterModelCampaignCooldownFilterModel + oneof_schema_3_validator: Optional[ICampaignFilterModelCampaignCooldownFilterModel] = None # data type: ICampaignFilterModelCampaignIdFilterModel - oneof_schema_3_validator: Optional[ICampaignFilterModelCampaignIdFilterModel] = None + oneof_schema_4_validator: Optional[ICampaignFilterModelCampaignIdFilterModel] = None # data type: ICampaignFilterModelCampaignSessionCountFilterModel - oneof_schema_4_validator: Optional[ICampaignFilterModelCampaignSessionCountFilterModel] = None + oneof_schema_5_validator: Optional[ICampaignFilterModelCampaignSessionCountFilterModel] = None # data type: ICampaignFilterModelCountryFilterModel - oneof_schema_5_validator: Optional[ICampaignFilterModelCountryFilterModel] = None + oneof_schema_6_validator: Optional[ICampaignFilterModelCountryFilterModel] = None # data type: ICampaignFilterModelDemographicFilterModel - oneof_schema_6_validator: Optional[ICampaignFilterModelDemographicFilterModel] = None + oneof_schema_7_validator: Optional[ICampaignFilterModelDemographicFilterModel] = None # data type: ICampaignFilterModelDeviceFilterModel - oneof_schema_7_validator: Optional[ICampaignFilterModelDeviceFilterModel] = None + oneof_schema_8_validator: Optional[ICampaignFilterModelDeviceFilterModel] = None # data type: ICampaignFilterModelLanguageFilterModel - oneof_schema_8_validator: Optional[ICampaignFilterModelLanguageFilterModel] = None + oneof_schema_9_validator: Optional[ICampaignFilterModelLanguageFilterModel] = None # data type: ICampaignFilterModelNewUserFilterModel - oneof_schema_9_validator: Optional[ICampaignFilterModelNewUserFilterModel] = None + oneof_schema_10_validator: Optional[ICampaignFilterModelNewUserFilterModel] = None # data type: ICampaignFilterModelNotFilterModel - oneof_schema_10_validator: Optional[ICampaignFilterModelNotFilterModel] = None + oneof_schema_11_validator: Optional[ICampaignFilterModelNotFilterModel] = None # data type: ICampaignFilterModelOrFilterModel - oneof_schema_11_validator: Optional[ICampaignFilterModelOrFilterModel] = None + oneof_schema_12_validator: Optional[ICampaignFilterModelOrFilterModel] = None # data type: ICampaignFilterModelResponseCountFilterModel - oneof_schema_12_validator: Optional[ICampaignFilterModelResponseCountFilterModel] = None + oneof_schema_13_validator: Optional[ICampaignFilterModelResponseCountFilterModel] = None # data type: ICampaignFilterModelUserActionRestrictionFilterModel - oneof_schema_13_validator: Optional[ICampaignFilterModelUserActionRestrictionFilterModel] = None + oneof_schema_14_validator: Optional[ICampaignFilterModelUserActionRestrictionFilterModel] = None # data type: ICampaignFilterModelUserScoreFilterModel - oneof_schema_14_validator: Optional[ICampaignFilterModelUserScoreFilterModel] = None - actual_instance: Optional[Union[ICampaignFilterModelAndFilterModel, ICampaignFilterModelAudienceStateFilterModel, ICampaignFilterModelCampaignIdFilterModel, ICampaignFilterModelCampaignSessionCountFilterModel, ICampaignFilterModelCountryFilterModel, ICampaignFilterModelDemographicFilterModel, ICampaignFilterModelDeviceFilterModel, ICampaignFilterModelLanguageFilterModel, ICampaignFilterModelNewUserFilterModel, ICampaignFilterModelNotFilterModel, ICampaignFilterModelOrFilterModel, ICampaignFilterModelResponseCountFilterModel, ICampaignFilterModelUserActionRestrictionFilterModel, ICampaignFilterModelUserScoreFilterModel]] = None - one_of_schemas: Set[str] = { "ICampaignFilterModelAndFilterModel", "ICampaignFilterModelAudienceStateFilterModel", "ICampaignFilterModelCampaignIdFilterModel", "ICampaignFilterModelCampaignSessionCountFilterModel", "ICampaignFilterModelCountryFilterModel", "ICampaignFilterModelDemographicFilterModel", "ICampaignFilterModelDeviceFilterModel", "ICampaignFilterModelLanguageFilterModel", "ICampaignFilterModelNewUserFilterModel", "ICampaignFilterModelNotFilterModel", "ICampaignFilterModelOrFilterModel", "ICampaignFilterModelResponseCountFilterModel", "ICampaignFilterModelUserActionRestrictionFilterModel", "ICampaignFilterModelUserScoreFilterModel" } + oneof_schema_15_validator: Optional[ICampaignFilterModelUserScoreFilterModel] = None + actual_instance: Optional[Union[ICampaignFilterModelAndFilterModel, ICampaignFilterModelAudienceStateFilterModel, ICampaignFilterModelCampaignCooldownFilterModel, ICampaignFilterModelCampaignIdFilterModel, ICampaignFilterModelCampaignSessionCountFilterModel, ICampaignFilterModelCountryFilterModel, ICampaignFilterModelDemographicFilterModel, ICampaignFilterModelDeviceFilterModel, ICampaignFilterModelLanguageFilterModel, ICampaignFilterModelNewUserFilterModel, ICampaignFilterModelNotFilterModel, ICampaignFilterModelOrFilterModel, ICampaignFilterModelResponseCountFilterModel, ICampaignFilterModelUserActionRestrictionFilterModel, ICampaignFilterModelUserScoreFilterModel]] = None + one_of_schemas: Set[str] = { "ICampaignFilterModelAndFilterModel", "ICampaignFilterModelAudienceStateFilterModel", "ICampaignFilterModelCampaignCooldownFilterModel", "ICampaignFilterModelCampaignIdFilterModel", "ICampaignFilterModelCampaignSessionCountFilterModel", "ICampaignFilterModelCountryFilterModel", "ICampaignFilterModelDemographicFilterModel", "ICampaignFilterModelDeviceFilterModel", "ICampaignFilterModelLanguageFilterModel", "ICampaignFilterModelNewUserFilterModel", "ICampaignFilterModelNotFilterModel", "ICampaignFilterModelOrFilterModel", "ICampaignFilterModelResponseCountFilterModel", "ICampaignFilterModelUserActionRestrictionFilterModel", "ICampaignFilterModelUserScoreFilterModel" } # model_config is inherited from LazyValidatedModel @@ -102,6 +105,11 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(f"Error! Input type `{type(v)}` is not `ICampaignFilterModelAudienceStateFilterModel`") else: match += 1 + # validate data type: ICampaignFilterModelCampaignCooldownFilterModel + if not isinstance(v, ICampaignFilterModelCampaignCooldownFilterModel): + error_messages.append(f"Error! Input type `{type(v)}` is not `ICampaignFilterModelCampaignCooldownFilterModel`") + else: + match += 1 # validate data type: ICampaignFilterModelCampaignIdFilterModel if not isinstance(v, ICampaignFilterModelCampaignIdFilterModel): error_messages.append(f"Error! Input type `{type(v)}` is not `ICampaignFilterModelCampaignIdFilterModel`") @@ -164,10 +172,10 @@ def actual_instance_must_validate_oneof(cls, v): match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in ICampaignFilterModel with oneOf schemas: ICampaignFilterModelAndFilterModel, ICampaignFilterModelAudienceStateFilterModel, ICampaignFilterModelCampaignIdFilterModel, ICampaignFilterModelCampaignSessionCountFilterModel, ICampaignFilterModelCountryFilterModel, ICampaignFilterModelDemographicFilterModel, ICampaignFilterModelDeviceFilterModel, ICampaignFilterModelLanguageFilterModel, ICampaignFilterModelNewUserFilterModel, ICampaignFilterModelNotFilterModel, ICampaignFilterModelOrFilterModel, ICampaignFilterModelResponseCountFilterModel, ICampaignFilterModelUserActionRestrictionFilterModel, ICampaignFilterModelUserScoreFilterModel. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in ICampaignFilterModel with oneOf schemas: ICampaignFilterModelAndFilterModel, ICampaignFilterModelAudienceStateFilterModel, ICampaignFilterModelCampaignCooldownFilterModel, ICampaignFilterModelCampaignIdFilterModel, ICampaignFilterModelCampaignSessionCountFilterModel, ICampaignFilterModelCountryFilterModel, ICampaignFilterModelDemographicFilterModel, ICampaignFilterModelDeviceFilterModel, ICampaignFilterModelLanguageFilterModel, ICampaignFilterModelNewUserFilterModel, ICampaignFilterModelNotFilterModel, ICampaignFilterModelOrFilterModel, ICampaignFilterModelResponseCountFilterModel, ICampaignFilterModelUserActionRestrictionFilterModel, ICampaignFilterModelUserScoreFilterModel. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in ICampaignFilterModel with oneOf schemas: ICampaignFilterModelAndFilterModel, ICampaignFilterModelAudienceStateFilterModel, ICampaignFilterModelCampaignIdFilterModel, ICampaignFilterModelCampaignSessionCountFilterModel, ICampaignFilterModelCountryFilterModel, ICampaignFilterModelDemographicFilterModel, ICampaignFilterModelDeviceFilterModel, ICampaignFilterModelLanguageFilterModel, ICampaignFilterModelNewUserFilterModel, ICampaignFilterModelNotFilterModel, ICampaignFilterModelOrFilterModel, ICampaignFilterModelResponseCountFilterModel, ICampaignFilterModelUserActionRestrictionFilterModel, ICampaignFilterModelUserScoreFilterModel. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in ICampaignFilterModel with oneOf schemas: ICampaignFilterModelAndFilterModel, ICampaignFilterModelAudienceStateFilterModel, ICampaignFilterModelCampaignCooldownFilterModel, ICampaignFilterModelCampaignIdFilterModel, ICampaignFilterModelCampaignSessionCountFilterModel, ICampaignFilterModelCountryFilterModel, ICampaignFilterModelDemographicFilterModel, ICampaignFilterModelDeviceFilterModel, ICampaignFilterModelLanguageFilterModel, ICampaignFilterModelNewUserFilterModel, ICampaignFilterModelNotFilterModel, ICampaignFilterModelOrFilterModel, ICampaignFilterModelResponseCountFilterModel, ICampaignFilterModelUserActionRestrictionFilterModel, ICampaignFilterModelUserScoreFilterModel. Details: " + ", ".join(error_messages)) else: return v @@ -194,6 +202,12 @@ def from_json(cls, json_str: str) -> Self: match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) + # deserialize data into ICampaignFilterModelCampaignCooldownFilterModel + try: + instance.actual_instance = ICampaignFilterModelCampaignCooldownFilterModel.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) # deserialize data into ICampaignFilterModelCampaignIdFilterModel try: instance.actual_instance = ICampaignFilterModelCampaignIdFilterModel.from_json(json_str) @@ -269,10 +283,10 @@ def from_json(cls, json_str: str) -> Self: if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into ICampaignFilterModel with oneOf schemas: ICampaignFilterModelAndFilterModel, ICampaignFilterModelAudienceStateFilterModel, ICampaignFilterModelCampaignIdFilterModel, ICampaignFilterModelCampaignSessionCountFilterModel, ICampaignFilterModelCountryFilterModel, ICampaignFilterModelDemographicFilterModel, ICampaignFilterModelDeviceFilterModel, ICampaignFilterModelLanguageFilterModel, ICampaignFilterModelNewUserFilterModel, ICampaignFilterModelNotFilterModel, ICampaignFilterModelOrFilterModel, ICampaignFilterModelResponseCountFilterModel, ICampaignFilterModelUserActionRestrictionFilterModel, ICampaignFilterModelUserScoreFilterModel. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into ICampaignFilterModel with oneOf schemas: ICampaignFilterModelAndFilterModel, ICampaignFilterModelAudienceStateFilterModel, ICampaignFilterModelCampaignCooldownFilterModel, ICampaignFilterModelCampaignIdFilterModel, ICampaignFilterModelCampaignSessionCountFilterModel, ICampaignFilterModelCountryFilterModel, ICampaignFilterModelDemographicFilterModel, ICampaignFilterModelDeviceFilterModel, ICampaignFilterModelLanguageFilterModel, ICampaignFilterModelNewUserFilterModel, ICampaignFilterModelNotFilterModel, ICampaignFilterModelOrFilterModel, ICampaignFilterModelResponseCountFilterModel, ICampaignFilterModelUserActionRestrictionFilterModel, ICampaignFilterModelUserScoreFilterModel. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into ICampaignFilterModel with oneOf schemas: ICampaignFilterModelAndFilterModel, ICampaignFilterModelAudienceStateFilterModel, ICampaignFilterModelCampaignIdFilterModel, ICampaignFilterModelCampaignSessionCountFilterModel, ICampaignFilterModelCountryFilterModel, ICampaignFilterModelDemographicFilterModel, ICampaignFilterModelDeviceFilterModel, ICampaignFilterModelLanguageFilterModel, ICampaignFilterModelNewUserFilterModel, ICampaignFilterModelNotFilterModel, ICampaignFilterModelOrFilterModel, ICampaignFilterModelResponseCountFilterModel, ICampaignFilterModelUserActionRestrictionFilterModel, ICampaignFilterModelUserScoreFilterModel. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into ICampaignFilterModel with oneOf schemas: ICampaignFilterModelAndFilterModel, ICampaignFilterModelAudienceStateFilterModel, ICampaignFilterModelCampaignCooldownFilterModel, ICampaignFilterModelCampaignIdFilterModel, ICampaignFilterModelCampaignSessionCountFilterModel, ICampaignFilterModelCountryFilterModel, ICampaignFilterModelDemographicFilterModel, ICampaignFilterModelDeviceFilterModel, ICampaignFilterModelLanguageFilterModel, ICampaignFilterModelNewUserFilterModel, ICampaignFilterModelNotFilterModel, ICampaignFilterModelOrFilterModel, ICampaignFilterModelResponseCountFilterModel, ICampaignFilterModelUserActionRestrictionFilterModel, ICampaignFilterModelUserScoreFilterModel. Details: " + ", ".join(error_messages)) else: return instance @@ -286,7 +300,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], ICampaignFilterModelAndFilterModel, ICampaignFilterModelAudienceStateFilterModel, ICampaignFilterModelCampaignIdFilterModel, ICampaignFilterModelCampaignSessionCountFilterModel, ICampaignFilterModelCountryFilterModel, ICampaignFilterModelDemographicFilterModel, ICampaignFilterModelDeviceFilterModel, ICampaignFilterModelLanguageFilterModel, ICampaignFilterModelNewUserFilterModel, ICampaignFilterModelNotFilterModel, ICampaignFilterModelOrFilterModel, ICampaignFilterModelResponseCountFilterModel, ICampaignFilterModelUserActionRestrictionFilterModel, ICampaignFilterModelUserScoreFilterModel]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], ICampaignFilterModelAndFilterModel, ICampaignFilterModelAudienceStateFilterModel, ICampaignFilterModelCampaignCooldownFilterModel, ICampaignFilterModelCampaignIdFilterModel, ICampaignFilterModelCampaignSessionCountFilterModel, ICampaignFilterModelCountryFilterModel, ICampaignFilterModelDemographicFilterModel, ICampaignFilterModelDeviceFilterModel, ICampaignFilterModelLanguageFilterModel, ICampaignFilterModelNewUserFilterModel, ICampaignFilterModelNotFilterModel, ICampaignFilterModelOrFilterModel, ICampaignFilterModelResponseCountFilterModel, ICampaignFilterModelUserActionRestrictionFilterModel, ICampaignFilterModelUserScoreFilterModel]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/src/rapidata/api_client/models/i_campaign_filter_model_campaign_cooldown_filter_model.py b/src/rapidata/api_client/models/i_campaign_filter_model_campaign_cooldown_filter_model.py new file mode 100644 index 000000000..4f1b7b575 --- /dev/null +++ b/src/rapidata/api_client/models/i_campaign_filter_model_campaign_cooldown_filter_model.py @@ -0,0 +1,102 @@ +# 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, field_validator +from typing import Any, ClassVar, Dict, List +from rapidata.api_client.models.i_cooldown_duration_model import ICooldownDurationModel +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class ICampaignFilterModelCampaignCooldownFilterModel(LazyValidatedModel): + """ + ICampaignFilterModelCampaignCooldownFilterModel + """ # noqa: E501 + t: StrictStr = Field(alias="_t") + cooldown: ICooldownDurationModel + __properties: ClassVar[List[str]] = ["_t", "cooldown"] + + @field_validator('t') + def t_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['CampaignCooldownFilter']): + raise ValueError("must be one of enum values ('CampaignCooldownFilter')") + return value + + # model_config is inherited from LazyValidatedModel + + + 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 ICampaignFilterModelCampaignCooldownFilterModel 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 cooldown + if self.cooldown: + _dict['cooldown'] = self.cooldown.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ICampaignFilterModelCampaignCooldownFilterModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "_t": obj.get("_t"), + "cooldown": ICooldownDurationModel.from_dict(obj["cooldown"]) if obj.get("cooldown") is not None else None + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/i_cooldown_duration_model.py b/src/rapidata/api_client/models/i_cooldown_duration_model.py new file mode 100644 index 000000000..9decaed35 --- /dev/null +++ b/src/rapidata/api_client/models/i_cooldown_duration_model.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from rapidata.api_client.models.i_cooldown_duration_model_fixed_cooldown_duration_model import ICooldownDurationModelFixedCooldownDurationModel +from rapidata.api_client.models.i_cooldown_duration_model_random_cooldown_duration_model import ICooldownDurationModelRandomCooldownDurationModel +from pydantic import StrictStr, Field +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ICOOLDOWNDURATIONMODEL_ONE_OF_SCHEMAS = ["ICooldownDurationModelFixedCooldownDurationModel", "ICooldownDurationModelRandomCooldownDurationModel"] + +class ICooldownDurationModel(LazyValidatedModel): + """ + ICooldownDurationModel + """ + # data type: ICooldownDurationModelFixedCooldownDurationModel + oneof_schema_1_validator: Optional[ICooldownDurationModelFixedCooldownDurationModel] = None + # data type: ICooldownDurationModelRandomCooldownDurationModel + oneof_schema_2_validator: Optional[ICooldownDurationModelRandomCooldownDurationModel] = None + actual_instance: Optional[Union[ICooldownDurationModelFixedCooldownDurationModel, ICooldownDurationModelRandomCooldownDurationModel]] = None + one_of_schemas: Set[str] = { "ICooldownDurationModelFixedCooldownDurationModel", "ICooldownDurationModelRandomCooldownDurationModel" } + + # model_config is inherited from LazyValidatedModel + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ICooldownDurationModel.model_construct() + error_messages = [] + match = 0 + # validate data type: ICooldownDurationModelFixedCooldownDurationModel + if not isinstance(v, ICooldownDurationModelFixedCooldownDurationModel): + error_messages.append(f"Error! Input type `{type(v)}` is not `ICooldownDurationModelFixedCooldownDurationModel`") + else: + match += 1 + # validate data type: ICooldownDurationModelRandomCooldownDurationModel + if not isinstance(v, ICooldownDurationModelRandomCooldownDurationModel): + error_messages.append(f"Error! Input type `{type(v)}` is not `ICooldownDurationModelRandomCooldownDurationModel`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ICooldownDurationModel with oneOf schemas: ICooldownDurationModelFixedCooldownDurationModel, ICooldownDurationModelRandomCooldownDurationModel. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ICooldownDurationModel with oneOf schemas: ICooldownDurationModelFixedCooldownDurationModel, ICooldownDurationModelRandomCooldownDurationModel. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ICooldownDurationModelFixedCooldownDurationModel + try: + instance.actual_instance = ICooldownDurationModelFixedCooldownDurationModel.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ICooldownDurationModelRandomCooldownDurationModel + try: + instance.actual_instance = ICooldownDurationModelRandomCooldownDurationModel.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ICooldownDurationModel with oneOf schemas: ICooldownDurationModelFixedCooldownDurationModel, ICooldownDurationModelRandomCooldownDurationModel. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ICooldownDurationModel with oneOf schemas: ICooldownDurationModelFixedCooldownDurationModel, ICooldownDurationModelRandomCooldownDurationModel. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ICooldownDurationModelFixedCooldownDurationModel, ICooldownDurationModelRandomCooldownDurationModel]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/src/rapidata/api_client/models/i_cooldown_duration_model_fixed_cooldown_duration_model.py b/src/rapidata/api_client/models/i_cooldown_duration_model_fixed_cooldown_duration_model.py new file mode 100644 index 000000000..92360527d --- /dev/null +++ b/src/rapidata/api_client/models/i_cooldown_duration_model_fixed_cooldown_duration_model.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class ICooldownDurationModelFixedCooldownDurationModel(LazyValidatedModel): + """ + ICooldownDurationModelFixedCooldownDurationModel + """ # noqa: E501 + t: StrictStr = Field(alias="_t") + duration: datetime + __properties: ClassVar[List[str]] = ["_t", "duration"] + + @field_validator('t') + def t_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['FixedCooldownDuration']): + raise ValueError("must be one of enum values ('FixedCooldownDuration')") + return value + + # model_config is inherited from LazyValidatedModel + + + 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 ICooldownDurationModelFixedCooldownDurationModel 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 ICooldownDurationModelFixedCooldownDurationModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "_t": obj.get("_t"), + "duration": obj.get("duration") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/i_cooldown_duration_model_random_cooldown_duration_model.py b/src/rapidata/api_client/models/i_cooldown_duration_model_random_cooldown_duration_model.py new file mode 100644 index 000000000..faf25bb50 --- /dev/null +++ b/src/rapidata/api_client/models/i_cooldown_duration_model_random_cooldown_duration_model.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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class ICooldownDurationModelRandomCooldownDurationModel(LazyValidatedModel): + """ + ICooldownDurationModelRandomCooldownDurationModel + """ # noqa: E501 + t: StrictStr = Field(alias="_t") + min_duration: datetime = Field(alias="minDuration") + max_duration: datetime = Field(alias="maxDuration") + seed_by_user_id: StrictBool = Field(alias="seedByUserId") + __properties: ClassVar[List[str]] = ["_t", "minDuration", "maxDuration", "seedByUserId"] + + @field_validator('t') + def t_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['RandomCooldownDuration']): + raise ValueError("must be one of enum values ('RandomCooldownDuration')") + return value + + # model_config is inherited from LazyValidatedModel + + + 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 ICooldownDurationModelRandomCooldownDurationModel 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 ICooldownDurationModelRandomCooldownDurationModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "_t": obj.get("_t"), + "minDuration": obj.get("minDuration"), + "maxDuration": obj.get("maxDuration"), + "seedByUserId": obj.get("seedByUserId") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/i_faucet_input.py b/src/rapidata/api_client/models/i_faucet_input.py new file mode 100644 index 000000000..60753fef5 --- /dev/null +++ b/src/rapidata/api_client/models/i_faucet_input.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from rapidata.api_client.models.i_faucet_input_replicate_faucet_input import IFaucetInputReplicateFaucetInput +from pydantic import StrictStr, Field +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +IFAUCETINPUT_ONE_OF_SCHEMAS = ["IFaucetInputReplicateFaucetInput"] + +class IFaucetInput(LazyValidatedModel): + """ + Polymorphic request body describing a faucet to configure on a participant. The concrete type is selected by the _t discriminator (e.g. \"Replicate\"). + """ + # data type: IFaucetInputReplicateFaucetInput + oneof_schema_1_validator: Optional[IFaucetInputReplicateFaucetInput] = None + actual_instance: Optional[Union[IFaucetInputReplicateFaucetInput]] = None + one_of_schemas: Set[str] = { "IFaucetInputReplicateFaucetInput" } + + # model_config is inherited from LazyValidatedModel + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = IFaucetInput.model_construct() + error_messages = [] + match = 0 + # validate data type: IFaucetInputReplicateFaucetInput + if not isinstance(v, IFaucetInputReplicateFaucetInput): + error_messages.append(f"Error! Input type `{type(v)}` is not `IFaucetInputReplicateFaucetInput`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in IFaucetInput with oneOf schemas: IFaucetInputReplicateFaucetInput. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in IFaucetInput with oneOf schemas: IFaucetInputReplicateFaucetInput. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into IFaucetInputReplicateFaucetInput + try: + instance.actual_instance = IFaucetInputReplicateFaucetInput.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into IFaucetInput with oneOf schemas: IFaucetInputReplicateFaucetInput. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into IFaucetInput with oneOf schemas: IFaucetInputReplicateFaucetInput. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], IFaucetInputReplicateFaucetInput]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/src/rapidata/api_client/models/i_faucet_input_replicate_faucet_input.py b/src/rapidata/api_client/models/i_faucet_input_replicate_faucet_input.py new file mode 100644 index 000000000..e21dbd13c --- /dev/null +++ b/src/rapidata/api_client/models/i_faucet_input_replicate_faucet_input.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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class IFaucetInputReplicateFaucetInput(LazyValidatedModel): + """ + Configures a faucet that generates samples via the Replicate API. + """ # noqa: E501 + t: StrictStr = Field(alias="_t") + model_owner: StrictStr = Field(description="The owner of the hosted model (e.g. \"stability-ai\").", alias="modelOwner") + model_name: StrictStr = Field(description="The model name (e.g. \"sdxl\").", alias="modelName") + model_version: Optional[StrictStr] = Field(default=None, description="Optional pinned model version hash.", alias="modelVersion") + __properties: ClassVar[List[str]] = ["_t", "modelOwner", "modelName", "modelVersion"] + + @field_validator('t') + def t_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Replicate']): + raise ValueError("must be one of enum values ('Replicate')") + return value + + # model_config is inherited from LazyValidatedModel + + + 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 IFaucetInputReplicateFaucetInput 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, + ) + # set to None if model_version (nullable) is None + # and model_fields_set contains the field + if self.model_version is None and "model_version" in self.model_fields_set: + _dict['modelVersion'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IFaucetInputReplicateFaucetInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "_t": obj.get("_t"), + "modelOwner": obj.get("modelOwner"), + "modelName": obj.get("modelName"), + "modelVersion": obj.get("modelVersion") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/i_faucet_output.py b/src/rapidata/api_client/models/i_faucet_output.py new file mode 100644 index 000000000..0ce43064b --- /dev/null +++ b/src/rapidata/api_client/models/i_faucet_output.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from rapidata.api_client.models.i_faucet_output_managed_faucet_output import IFaucetOutputManagedFaucetOutput +from rapidata.api_client.models.i_faucet_output_replicate_faucet_output import IFaucetOutputReplicateFaucetOutput +from pydantic import StrictStr, Field +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +IFAUCETOUTPUT_ONE_OF_SCHEMAS = ["IFaucetOutputManagedFaucetOutput", "IFaucetOutputReplicateFaucetOutput"] + +class IFaucetOutput(LazyValidatedModel): + """ + IFaucetOutput + """ + # data type: IFaucetOutputManagedFaucetOutput + oneof_schema_1_validator: Optional[IFaucetOutputManagedFaucetOutput] = None + # data type: IFaucetOutputReplicateFaucetOutput + oneof_schema_2_validator: Optional[IFaucetOutputReplicateFaucetOutput] = None + actual_instance: Optional[Union[IFaucetOutputManagedFaucetOutput, IFaucetOutputReplicateFaucetOutput]] = None + one_of_schemas: Set[str] = { "IFaucetOutputManagedFaucetOutput", "IFaucetOutputReplicateFaucetOutput" } + + # model_config is inherited from LazyValidatedModel + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = IFaucetOutput.model_construct() + error_messages = [] + match = 0 + # validate data type: IFaucetOutputManagedFaucetOutput + if not isinstance(v, IFaucetOutputManagedFaucetOutput): + error_messages.append(f"Error! Input type `{type(v)}` is not `IFaucetOutputManagedFaucetOutput`") + else: + match += 1 + # validate data type: IFaucetOutputReplicateFaucetOutput + if not isinstance(v, IFaucetOutputReplicateFaucetOutput): + error_messages.append(f"Error! Input type `{type(v)}` is not `IFaucetOutputReplicateFaucetOutput`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in IFaucetOutput with oneOf schemas: IFaucetOutputManagedFaucetOutput, IFaucetOutputReplicateFaucetOutput. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in IFaucetOutput with oneOf schemas: IFaucetOutputManagedFaucetOutput, IFaucetOutputReplicateFaucetOutput. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into IFaucetOutputManagedFaucetOutput + try: + instance.actual_instance = IFaucetOutputManagedFaucetOutput.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into IFaucetOutputReplicateFaucetOutput + try: + instance.actual_instance = IFaucetOutputReplicateFaucetOutput.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into IFaucetOutput with oneOf schemas: IFaucetOutputManagedFaucetOutput, IFaucetOutputReplicateFaucetOutput. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into IFaucetOutput with oneOf schemas: IFaucetOutputManagedFaucetOutput, IFaucetOutputReplicateFaucetOutput. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], IFaucetOutputManagedFaucetOutput, IFaucetOutputReplicateFaucetOutput]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/src/rapidata/api_client/models/i_faucet_output_managed_faucet_output.py b/src/rapidata/api_client/models/i_faucet_output_managed_faucet_output.py new file mode 100644 index 000000000..4dfd9ede4 --- /dev/null +++ b/src/rapidata/api_client/models/i_faucet_output_managed_faucet_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, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class IFaucetOutputManagedFaucetOutput(LazyValidatedModel): + """ + IFaucetOutputManagedFaucetOutput + """ # noqa: E501 + t: StrictStr = Field(alias="_t") + test_time_scaling: Optional[StrictInt] = Field(default=None, alias="testTimeScaling") + __properties: ClassVar[List[str]] = ["_t", "testTimeScaling"] + + @field_validator('t') + def t_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Managed']): + raise ValueError("must be one of enum values ('Managed')") + return value + + # model_config is inherited from LazyValidatedModel + + + 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 IFaucetOutputManagedFaucetOutput 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, + ) + # set to None if test_time_scaling (nullable) is None + # and model_fields_set contains the field + if self.test_time_scaling is None and "test_time_scaling" in self.model_fields_set: + _dict['testTimeScaling'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IFaucetOutputManagedFaucetOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "_t": obj.get("_t"), + "testTimeScaling": obj.get("testTimeScaling") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/i_faucet_output_replicate_faucet_output.py b/src/rapidata/api_client/models/i_faucet_output_replicate_faucet_output.py new file mode 100644 index 000000000..2efdf64bc --- /dev/null +++ b/src/rapidata/api_client/models/i_faucet_output_replicate_faucet_output.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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class IFaucetOutputReplicateFaucetOutput(LazyValidatedModel): + """ + IFaucetOutputReplicateFaucetOutput + """ # noqa: E501 + t: StrictStr = Field(alias="_t") + model_owner: StrictStr = Field(alias="modelOwner") + model_name: StrictStr = Field(alias="modelName") + model_version: Optional[StrictStr] = Field(default=None, alias="modelVersion") + __properties: ClassVar[List[str]] = ["_t", "modelOwner", "modelName", "modelVersion"] + + @field_validator('t') + def t_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Replicate']): + raise ValueError("must be one of enum values ('Replicate')") + return value + + # model_config is inherited from LazyValidatedModel + + + 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 IFaucetOutputReplicateFaucetOutput 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, + ) + # set to None if model_version (nullable) is None + # and model_fields_set contains the field + if self.model_version is None and "model_version" in self.model_fields_set: + _dict['modelVersion'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IFaucetOutputReplicateFaucetOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "_t": obj.get("_t"), + "modelOwner": obj.get("modelOwner"), + "modelName": obj.get("modelName"), + "modelVersion": obj.get("modelVersion") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/i_metadata_count_metadata.py b/src/rapidata/api_client/models/i_metadata_count_metadata.py index 3692e688b..fe1264e40 100644 --- a/src/rapidata/api_client/models/i_metadata_count_metadata.py +++ b/src/rapidata/api_client/models/i_metadata_count_metadata.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel from typing import Optional, Set @@ -29,7 +29,7 @@ class IMetadataCountMetadata(LazyValidatedModel): IMetadataCountMetadata """ # noqa: E501 t: StrictStr = Field(alias="_t") - count: StrictInt + count: Optional[StrictInt] = None visibilities: List[StrictStr] __properties: ClassVar[List[str]] = ["_t", "count", "visibilities"] diff --git a/src/rapidata/api_client/models/i_metadata_image_dimension_metadata.py b/src/rapidata/api_client/models/i_metadata_image_dimension_metadata.py index 7d6542b9b..400005f5b 100644 --- a/src/rapidata/api_client/models/i_metadata_image_dimension_metadata.py +++ b/src/rapidata/api_client/models/i_metadata_image_dimension_metadata.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel from typing import Optional, Set @@ -29,8 +29,8 @@ class IMetadataImageDimensionMetadata(LazyValidatedModel): IMetadataImageDimensionMetadata """ # noqa: E501 t: StrictStr = Field(alias="_t") - height: StrictInt - width: StrictInt + height: Optional[StrictInt] = None + width: Optional[StrictInt] = None visibilities: List[StrictStr] __properties: ClassVar[List[str]] = ["_t", "height", "width", "visibilities"] diff --git a/src/rapidata/api_client/models/i_metadata_location_metadata.py b/src/rapidata/api_client/models/i_metadata_location_metadata.py index 51b5e80d2..bb38d1feb 100644 --- a/src/rapidata/api_client/models/i_metadata_location_metadata.py +++ b/src/rapidata/api_client/models/i_metadata_location_metadata.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Union +from typing import Any, ClassVar, Dict, List, Optional, Union from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel from typing import Optional, Set @@ -29,8 +29,8 @@ class IMetadataLocationMetadata(LazyValidatedModel): IMetadataLocationMetadata """ # noqa: E501 t: StrictStr = Field(alias="_t") - x: Union[StrictFloat, StrictInt] - y: Union[StrictFloat, StrictInt] + x: Optional[Union[StrictFloat, StrictInt]] = None + y: Optional[Union[StrictFloat, StrictInt]] = None visibilities: List[StrictStr] __properties: ClassVar[List[str]] = ["_t", "x", "y", "visibilities"] diff --git a/src/rapidata/api_client/models/i_metadata_streams_metadata.py b/src/rapidata/api_client/models/i_metadata_streams_metadata.py index 62b51e556..de7595a67 100644 --- a/src/rapidata/api_client/models/i_metadata_streams_metadata.py +++ b/src/rapidata/api_client/models/i_metadata_streams_metadata.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel from typing import Optional, Set @@ -29,9 +29,9 @@ class IMetadataStreamsMetadata(LazyValidatedModel): IMetadataStreamsMetadata """ # noqa: E501 t: StrictStr = Field(alias="_t") - has_audio: StrictBool = Field(alias="hasAudio") - has_video: StrictBool = Field(alias="hasVideo") - has_subtitles: StrictBool = Field(alias="hasSubtitles") + has_audio: Optional[StrictBool] = Field(default=None, alias="hasAudio") + has_video: Optional[StrictBool] = Field(default=None, alias="hasVideo") + has_subtitles: Optional[StrictBool] = Field(default=None, alias="hasSubtitles") visibilities: List[StrictStr] __properties: ClassVar[List[str]] = ["_t", "hasAudio", "hasVideo", "hasSubtitles", "visibilities"] diff --git a/src/rapidata/api_client/models/query_sample_generations_by_benchmark_endpoint_output.py b/src/rapidata/api_client/models/query_sample_generations_by_benchmark_endpoint_output.py new file mode 100644 index 000000000..9195d3ff9 --- /dev/null +++ b/src/rapidata/api_client/models/query_sample_generations_by_benchmark_endpoint_output.py @@ -0,0 +1,130 @@ +# 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from rapidata.api_client.models.sample_generation_status import SampleGenerationStatus +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class QuerySampleGenerationsByBenchmarkEndpointOutput(LazyValidatedModel): + """ + QuerySampleGenerationsByBenchmarkEndpointOutput + """ # noqa: E501 + id: StrictStr = Field(description="The id of the sample generation request.") + benchmark_id: StrictStr = Field(description="The benchmark this generation belongs to.", alias="benchmarkId") + status: SampleGenerationStatus = Field(description="The current status of the generation.") + samples_per_prompt: StrictInt = Field(description="How many samples are being generated per prompt.", alias="samplesPerPrompt") + total_count: StrictInt = Field(description="The total number of items queued.", alias="totalCount") + completed_count: StrictInt = Field(description="The number of items that have succeeded so far.", alias="completedCount") + failed_count: StrictInt = Field(description="The number of items that have failed.", alias="failedCount") + participant_id_filter: Optional[List[StrictStr]] = Field(default=None, alias="participantIdFilter") + prompt_identifier_filter: Optional[List[StrictStr]] = Field(default=None, alias="promptIdentifierFilter") + tags_filter: Optional[List[StrictStr]] = Field(default=None, alias="tagsFilter") + owner_id: StrictStr = Field(description="The id of the customer that started this generation.", alias="ownerId") + owner_mail: StrictStr = Field(description="The mail of the customer that started this generation.", alias="ownerMail") + created_at: datetime = Field(description="When the generation was created.", alias="createdAt") + __properties: ClassVar[List[str]] = ["id", "benchmarkId", "status", "samplesPerPrompt", "totalCount", "completedCount", "failedCount", "participantIdFilter", "promptIdentifierFilter", "tagsFilter", "ownerId", "ownerMail", "createdAt"] + + # model_config is inherited from LazyValidatedModel + + + 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 QuerySampleGenerationsByBenchmarkEndpointOutput 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, + ) + # set to None if participant_id_filter (nullable) is None + # and model_fields_set contains the field + if self.participant_id_filter is None and "participant_id_filter" in self.model_fields_set: + _dict['participantIdFilter'] = None + + # set to None if prompt_identifier_filter (nullable) is None + # and model_fields_set contains the field + if self.prompt_identifier_filter is None and "prompt_identifier_filter" in self.model_fields_set: + _dict['promptIdentifierFilter'] = None + + # set to None if tags_filter (nullable) is None + # and model_fields_set contains the field + if self.tags_filter is None and "tags_filter" in self.model_fields_set: + _dict['tagsFilter'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QuerySampleGenerationsByBenchmarkEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "id": obj.get("id"), + "benchmarkId": obj.get("benchmarkId"), + "status": obj.get("status"), + "samplesPerPrompt": obj.get("samplesPerPrompt"), + "totalCount": obj.get("totalCount"), + "completedCount": obj.get("completedCount"), + "failedCount": obj.get("failedCount"), + "participantIdFilter": obj.get("participantIdFilter"), + "promptIdentifierFilter": obj.get("promptIdentifierFilter"), + "tagsFilter": obj.get("tagsFilter"), + "ownerId": obj.get("ownerId"), + "ownerMail": obj.get("ownerMail"), + "createdAt": obj.get("createdAt") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/query_sample_generations_by_benchmark_endpoint_paged_result_of_output.py b/src/rapidata/api_client/models/query_sample_generations_by_benchmark_endpoint_paged_result_of_output.py new file mode 100644 index 000000000..48d89dc50 --- /dev/null +++ b/src/rapidata/api_client/models/query_sample_generations_by_benchmark_endpoint_paged_result_of_output.py @@ -0,0 +1,105 @@ +# 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_sample_generations_by_benchmark_endpoint_output import QuerySampleGenerationsByBenchmarkEndpointOutput +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class QuerySampleGenerationsByBenchmarkEndpointPagedResultOfOutput(LazyValidatedModel): + """ + QuerySampleGenerationsByBenchmarkEndpointPagedResultOfOutput + """ # noqa: E501 + total: StrictInt + page: StrictInt + page_size: StrictInt = Field(alias="pageSize") + items: List[QuerySampleGenerationsByBenchmarkEndpointOutput] + total_pages: Optional[StrictInt] = Field(default=None, alias="totalPages") + __properties: ClassVar[List[str]] = ["total", "page", "pageSize", "items", "totalPages"] + + # model_config is inherited from LazyValidatedModel + + + 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 QuerySampleGenerationsByBenchmarkEndpointPagedResultOfOutput 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 QuerySampleGenerationsByBenchmarkEndpointPagedResultOfOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "total": obj.get("total"), + "page": obj.get("page"), + "pageSize": obj.get("pageSize"), + "items": [QuerySampleGenerationsByBenchmarkEndpointOutput.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "totalPages": obj.get("totalPages") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/retry_sample_generation_endpoint_input.py b/src/rapidata/api_client/models/retry_sample_generation_endpoint_input.py new file mode 100644 index 000000000..5c8e9a3ab --- /dev/null +++ b/src/rapidata/api_client/models/retry_sample_generation_endpoint_input.py @@ -0,0 +1,94 @@ +# 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 pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class RetrySampleGenerationEndpointInput(LazyValidatedModel): + """ + RetrySampleGenerationEndpointInput + """ # noqa: E501 + item_ids: Optional[List[StrictStr]] = Field(default=None, alias="itemIds") + __properties: ClassVar[List[str]] = ["itemIds"] + + # model_config is inherited from LazyValidatedModel + + + 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 RetrySampleGenerationEndpointInput 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, + ) + # set to None if item_ids (nullable) is None + # and model_fields_set contains the field + if self.item_ids is None and "item_ids" in self.model_fields_set: + _dict['itemIds'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RetrySampleGenerationEndpointInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "itemIds": obj.get("itemIds") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/retry_sample_generation_endpoint_output.py b/src/rapidata/api_client/models/retry_sample_generation_endpoint_output.py new file mode 100644 index 000000000..17e79c629 --- /dev/null +++ b/src/rapidata/api_client/models/retry_sample_generation_endpoint_output.py @@ -0,0 +1,91 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class RetrySampleGenerationEndpointOutput(LazyValidatedModel): + """ + RetrySampleGenerationEndpointOutput + """ # noqa: E501 + retried_count: StrictInt = Field(description="How many failed items were re-queued.", alias="retriedCount") + retried_item_ids: List[StrictStr] = Field(alias="retriedItemIds") + __properties: ClassVar[List[str]] = ["retriedCount", "retriedItemIds"] + + # model_config is inherited from LazyValidatedModel + + + 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 RetrySampleGenerationEndpointOutput 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 RetrySampleGenerationEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "retriedCount": obj.get("retriedCount"), + "retriedItemIds": obj.get("retriedItemIds") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/sample_generation_item_status.py b/src/rapidata/api_client/models/sample_generation_item_status.py new file mode 100644 index 000000000..9e35d4034 --- /dev/null +++ b/src/rapidata/api_client/models/sample_generation_item_status.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SampleGenerationItemStatus(str, Enum): + """ + SampleGenerationItemStatus + """ + + """ + allowed enum values + """ + PENDING = 'Pending' + RUNNING = 'Running' + SUCCEEDED = 'Succeeded' + FAILED = 'Failed' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SampleGenerationItemStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/src/rapidata/api_client/models/sample_generation_status.py b/src/rapidata/api_client/models/sample_generation_status.py new file mode 100644 index 000000000..90af1f723 --- /dev/null +++ b/src/rapidata/api_client/models/sample_generation_status.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SampleGenerationStatus(str, Enum): + """ + SampleGenerationStatus + """ + + """ + allowed enum values + """ + PENDING = 'Pending' + PROCESSING = 'Processing' + COMPLETED = 'Completed' + COMPLETEDWITHFAILURES = 'CompletedWithFailures' + FAILED = 'Failed' + CANCELLED = 'Cancelled' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SampleGenerationStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/src/rapidata/api_client/models/sticky_config.py b/src/rapidata/api_client/models/sticky_config.py index 3d0988edf..647209169 100644 --- a/src/rapidata/api_client/models/sticky_config.py +++ b/src/rapidata/api_client/models/sticky_config.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel @@ -29,11 +29,12 @@ class StickyConfig(LazyValidatedModel): StickyConfig """ # noqa: E501 is_enabled: Optional[StrictBool] = Field(default=None, alias="isEnabled") + dimension: StrictStr bypass_filters: Optional[StrictBool] = Field(default=None, alias="bypassFilters") bypass_priority_selection: Optional[StrictBool] = Field(default=None, alias="bypassPrioritySelection") block_other_sticky_campaigns: Optional[StrictBool] = Field(default=None, alias="blockOtherStickyCampaigns") clear_on_pause: Optional[StrictBool] = Field(default=None, alias="clearOnPause") - __properties: ClassVar[List[str]] = ["isEnabled", "bypassFilters", "bypassPrioritySelection", "blockOtherStickyCampaigns", "clearOnPause"] + __properties: ClassVar[List[str]] = ["isEnabled", "dimension", "bypassFilters", "bypassPrioritySelection", "blockOtherStickyCampaigns", "clearOnPause"] # model_config is inherited from LazyValidatedModel @@ -83,6 +84,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _data = { "isEnabled": obj.get("isEnabled"), + "dimension": obj.get("dimension"), "bypassFilters": obj.get("bypassFilters"), "bypassPrioritySelection": obj.get("bypassPrioritySelection"), "blockOtherStickyCampaigns": obj.get("blockOtherStickyCampaigns"), diff --git a/src/rapidata/api_client/models/sticky_config_model.py b/src/rapidata/api_client/models/sticky_config_model.py index 0a35eb609..e57a33148 100644 --- a/src/rapidata/api_client/models/sticky_config_model.py +++ b/src/rapidata/api_client/models/sticky_config_model.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel from typing import Optional, Set @@ -29,11 +29,12 @@ class StickyConfigModel(LazyValidatedModel): StickyConfigModel """ # noqa: E501 is_enabled: StrictBool = Field(alias="isEnabled") + dimension: Optional[StrictStr] = None bypass_filters: StrictBool = Field(alias="bypassFilters") bypass_priority_selection: StrictBool = Field(alias="bypassPrioritySelection") block_other_sticky_campaigns: StrictBool = Field(alias="blockOtherStickyCampaigns") clear_on_pause: StrictBool = Field(alias="clearOnPause") - __properties: ClassVar[List[str]] = ["isEnabled", "bypassFilters", "bypassPrioritySelection", "blockOtherStickyCampaigns", "clearOnPause"] + __properties: ClassVar[List[str]] = ["isEnabled", "dimension", "bypassFilters", "bypassPrioritySelection", "blockOtherStickyCampaigns", "clearOnPause"] # model_config is inherited from LazyValidatedModel @@ -83,6 +84,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _data = { "isEnabled": obj.get("isEnabled"), + "dimension": obj.get("dimension"), "bypassFilters": obj.get("bypassFilters"), "bypassPrioritySelection": obj.get("bypassPrioritySelection"), "blockOtherStickyCampaigns": obj.get("blockOtherStickyCampaigns"), diff --git a/src/rapidata/api_client/models/translated_string.py b/src/rapidata/api_client/models/translated_string.py index f66a68355..7e6e60ec5 100644 --- a/src/rapidata/api_client/models/translated_string.py +++ b/src/rapidata/api_client/models/translated_string.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel from typing import Optional, Set @@ -28,7 +28,7 @@ class TranslatedString(LazyValidatedModel): """ TranslatedString """ # noqa: E501 - was_translated: StrictBool = Field(alias="wasTranslated") + was_translated: Optional[StrictBool] = Field(default=None, alias="wasTranslated") english_text: StrictStr = Field(alias="englishText") text: StrictStr target_language: StrictStr = Field(alias="targetLanguage") diff --git a/src/rapidata/api_client_README.md b/src/rapidata/api_client_README.md index 62ce8ff08..dcfac723e 100644 --- a/src/rapidata/api_client_README.md +++ b/src/rapidata/api_client_README.md @@ -113,6 +113,7 @@ Class | Method | HTTP request | Description *BenchmarkApi* | [**benchmark_benchmark_id_patch**](rapidata/api_client/docs/BenchmarkApi.md#benchmark_benchmark_id_patch) | **PATCH** /benchmark/{benchmarkId} | Updates a benchmark using patch semantics. *BenchmarkApi* | [**benchmark_benchmark_id_prompt_post**](rapidata/api_client/docs/BenchmarkApi.md#benchmark_benchmark_id_prompt_post) | **POST** /benchmark/{benchmarkId}/prompt | Adds a new prompt to a benchmark. *BenchmarkApi* | [**benchmark_benchmark_id_prompts_get**](rapidata/api_client/docs/BenchmarkApi.md#benchmark_benchmark_id_prompts_get) | **GET** /benchmark/{benchmarkId}/prompts | Returns the paged prompts of a benchmark. +*BenchmarkApi* | [**benchmark_benchmark_id_sample_generation_post**](rapidata/api_client/docs/BenchmarkApi.md#benchmark_benchmark_id_sample_generation_post) | **POST** /benchmark/{benchmarkId}/sample-generation | Starts an asynchronous sample generation run. *BenchmarkApi* | [**benchmark_benchmark_id_standings_get**](rapidata/api_client/docs/BenchmarkApi.md#benchmark_benchmark_id_standings_get) | **GET** /benchmark/{benchmarkId}/standings | Queries all standings for a benchmark. *BenchmarkApi* | [**benchmark_benchmark_id_tags_get**](rapidata/api_client/docs/BenchmarkApi.md#benchmark_benchmark_id_tags_get) | **GET** /benchmark/{benchmarkId}/tags | Queries all tags within a benchmark. *BenchmarkApi* | [**benchmark_combined_matrix_get**](rapidata/api_client/docs/BenchmarkApi.md#benchmark_combined_matrix_get) | **GET** /benchmark/combined-matrix | Returns the combined pairwise vote matrix for multiple benchmarks. @@ -164,6 +165,8 @@ Class | Method | HTTP request | Description *ExamplesApi* | [**audience_example_example_id_delete**](rapidata/api_client/docs/ExamplesApi.md#audience_example_example_id_delete) | **DELETE** /audience/example/{exampleId} | Deletes the specified audience example. *ExternalAudienceApi* | [**campaign_external_audiences_get**](rapidata/api_client/docs/ExternalAudienceApi.md#campaign_external_audiences_get) | **GET** /campaign/external-audiences | Queries the cached external audiences available for targeting. *ExternalAudienceApi* | [**campaign_external_audiences_sync_post**](rapidata/api_client/docs/ExternalAudienceApi.md#campaign_external_audiences_sync_post) | **POST** /campaign/external-audiences/sync | Enqueues a background job that synchronises external audiences with the cache. +*FaucetApi* | [**participant_participant_id_faucet_delete_0**](rapidata/api_client/docs/FaucetApi.md#participant_participant_id_faucet_delete_0) | **DELETE** /participant/{participantId}/faucet | Removes the faucet configuration from a participant. +*FaucetApi* | [**participant_participant_id_faucet_put_0**](rapidata/api_client/docs/FaucetApi.md#participant_participant_id_faucet_put_0) | **PUT** /participant/{participantId}/faucet | Sets the faucet used to auto-generate samples for a participant. *FeedbackApi* | [**feedback_post**](rapidata/api_client/docs/FeedbackApi.md#feedback_post) | **POST** /feedback | Submits feedback about our services. *FlowApi* | [**flow_flow_id_delete**](rapidata/api_client/docs/FlowApi.md#flow_flow_id_delete) | **DELETE** /flow/{flowId} | Deletes a flow. *FlowApi* | [**flow_flow_id_get**](rapidata/api_client/docs/FlowApi.md#flow_flow_id_get) | **GET** /flow/{flowId} | Retrieves a flow by its ID. @@ -243,6 +246,8 @@ Class | Method | HTTP request | Description *OrganizationApi* | [**organizations_get**](rapidata/api_client/docs/OrganizationApi.md#organizations_get) | **GET** /organizations | Returns a paged list of organizations. *ParticipantApi* | [**participant_participant_id_delete**](rapidata/api_client/docs/ParticipantApi.md#participant_participant_id_delete) | **DELETE** /participant/{participantId} | Deletes a participant. *ParticipantApi* | [**participant_participant_id_disable_post**](rapidata/api_client/docs/ParticipantApi.md#participant_participant_id_disable_post) | **POST** /participant/{participantId}/disable | Disables a participant in a benchmark. +*ParticipantApi* | [**participant_participant_id_faucet_delete**](rapidata/api_client/docs/ParticipantApi.md#participant_participant_id_faucet_delete) | **DELETE** /participant/{participantId}/faucet | Removes the faucet configuration from a participant. +*ParticipantApi* | [**participant_participant_id_faucet_put**](rapidata/api_client/docs/ParticipantApi.md#participant_participant_id_faucet_put) | **PUT** /participant/{participantId}/faucet | Sets the faucet used to auto-generate samples for a participant. *ParticipantApi* | [**participant_participant_id_get**](rapidata/api_client/docs/ParticipantApi.md#participant_participant_id_get) | **GET** /participant/{participantId} | Gets a participant by its id. *ParticipantApi* | [**participant_participant_id_name_put**](rapidata/api_client/docs/ParticipantApi.md#participant_participant_id_name_put) | **PUT** /participant/{participantId}/name | Updates the name of a participant. *ParticipantApi* | [**participant_participant_id_patch**](rapidata/api_client/docs/ParticipantApi.md#participant_participant_id_patch) | **PATCH** /participant/{participantId} | Updates a participant using patch semantics. @@ -268,6 +273,11 @@ Class | Method | HTTP request | Description *SampleApi* | [**benchmark_sample_sample_id_get**](rapidata/api_client/docs/SampleApi.md#benchmark_sample_sample_id_get) | **GET** /benchmark-sample/{sampleId} | Gets a benchmark sample by its id. *SampleApi* | [**benchmark_sample_sample_id_navigation_get**](rapidata/api_client/docs/SampleApi.md#benchmark_sample_sample_id_navigation_get) | **GET** /benchmark-sample/{sampleId}/navigation | Gets navigation context (previous, next, related samples) for a sample. *SampleApi* | [**participant_participant_id_samples_get**](rapidata/api_client/docs/SampleApi.md#participant_participant_id_samples_get) | **GET** /participant/{participantId}/samples | Queries all samples of a participant. +*SampleGenerationApi* | [**benchmark_benchmark_id_sample_generation_post_0**](rapidata/api_client/docs/SampleGenerationApi.md#benchmark_benchmark_id_sample_generation_post_0) | **POST** /benchmark/{benchmarkId}/sample-generation | Starts an asynchronous sample generation run. +*SampleGenerationApi* | [**benchmark_benchmark_id_sample_generations_get**](rapidata/api_client/docs/SampleGenerationApi.md#benchmark_benchmark_id_sample_generations_get) | **GET** /benchmark/{benchmarkId}/sample-generations | Lists historical sample generation runs for the given benchmark. +*SampleGenerationApi* | [**benchmark_sample_generation_sample_generation_id_get**](rapidata/api_client/docs/SampleGenerationApi.md#benchmark_sample_generation_sample_generation_id_get) | **GET** /benchmark/sample-generation/{sampleGenerationId} | Returns the current status and progress of a sample generation request. +*SampleGenerationApi* | [**benchmark_sample_generation_sample_generation_id_items_get**](rapidata/api_client/docs/SampleGenerationApi.md#benchmark_sample_generation_sample_generation_id_items_get) | **GET** /benchmark/sample-generation/{sampleGenerationId}/items | Returns the per-item audit trail for a sample generation request. +*SampleGenerationApi* | [**benchmark_sample_generation_sample_generation_id_retry_post**](rapidata/api_client/docs/SampleGenerationApi.md#benchmark_sample_generation_sample_generation_id_retry_post) | **POST** /benchmark/sample-generation/{sampleGenerationId}/retry | Re-queues failed items of a sample generation so they run again. *SimpleWorkflowApi* | [**workflow_simple_workflow_id_results_get**](rapidata/api_client/docs/SimpleWorkflowApi.md#workflow_simple_workflow_id_results_get) | **GET** /workflow/simple/{workflowId}/results | Gets the result overview for a simple workflow. *SurveyApi* | [**identity_survey_post**](rapidata/api_client/docs/SurveyApi.md#identity_survey_post) | **POST** /identity/survey | Submits a survey for the calling customer. *TranslationApi* | [**translation_ensure_english_post**](rapidata/api_client/docs/TranslationApi.md#translation_ensure_english_post) | **POST** /translation/ensure-english | Ensures the provided text is in English, returning a suggested English text when it isn't. @@ -390,6 +400,8 @@ Class | Method | HTTP request | Description - [CreatePromptForLeaderboardEndpointOutput](rapidata/api_client/docs/CreatePromptForLeaderboardEndpointOutput.md) - [CreateSampleEndpointInput](rapidata/api_client/docs/CreateSampleEndpointInput.md) - [CreateSampleEndpointOutput](rapidata/api_client/docs/CreateSampleEndpointOutput.md) + - [CreateSampleGenerationEndpointInput](rapidata/api_client/docs/CreateSampleGenerationEndpointInput.md) + - [CreateSampleGenerationEndpointOutput](rapidata/api_client/docs/CreateSampleGenerationEndpointOutput.md) - [CreateSampleNewEndpointInput](rapidata/api_client/docs/CreateSampleNewEndpointInput.md) - [CreateSampleNewEndpointOutput](rapidata/api_client/docs/CreateSampleNewEndpointOutput.md) - [CreateUnsupportedOrderEndpointInput](rapidata/api_client/docs/CreateUnsupportedOrderEndpointInput.md) @@ -490,6 +502,9 @@ Class | Method | HTTP request | Description - [GetResponsesForRapidEndpointOutput](rapidata/api_client/docs/GetResponsesForRapidEndpointOutput.md) - [GetResponsesForRapidEndpointOutputResponse](rapidata/api_client/docs/GetResponsesForRapidEndpointOutputResponse.md) - [GetSampleByIdEndpointOutput](rapidata/api_client/docs/GetSampleByIdEndpointOutput.md) + - [GetSampleGenerationEndpointOutput](rapidata/api_client/docs/GetSampleGenerationEndpointOutput.md) + - [GetSampleGenerationItemsEndpointOutput](rapidata/api_client/docs/GetSampleGenerationItemsEndpointOutput.md) + - [GetSampleGenerationItemsEndpointPagedResultOfOutput](rapidata/api_client/docs/GetSampleGenerationItemsEndpointPagedResultOfOutput.md) - [GetSampleNavigationEndpointOutput](rapidata/api_client/docs/GetSampleNavigationEndpointOutput.md) - [GetSampleNavigationEndpointSampleModel](rapidata/api_client/docs/GetSampleNavigationEndpointSampleModel.md) - [GetSamplesByIdentifierEndpointOutput](rapidata/api_client/docs/GetSamplesByIdentifierEndpointOutput.md) @@ -544,6 +559,7 @@ Class | Method | HTTP request | Description - [ICampaignFilterModel](rapidata/api_client/docs/ICampaignFilterModel.md) - [ICampaignFilterModelAndFilterModel](rapidata/api_client/docs/ICampaignFilterModelAndFilterModel.md) - [ICampaignFilterModelAudienceStateFilterModel](rapidata/api_client/docs/ICampaignFilterModelAudienceStateFilterModel.md) + - [ICampaignFilterModelCampaignCooldownFilterModel](rapidata/api_client/docs/ICampaignFilterModelCampaignCooldownFilterModel.md) - [ICampaignFilterModelCampaignIdFilterModel](rapidata/api_client/docs/ICampaignFilterModelCampaignIdFilterModel.md) - [ICampaignFilterModelCampaignSessionCountFilterModel](rapidata/api_client/docs/ICampaignFilterModelCampaignSessionCountFilterModel.md) - [ICampaignFilterModelCountryFilterModel](rapidata/api_client/docs/ICampaignFilterModelCountryFilterModel.md) @@ -567,6 +583,9 @@ Class | Method | HTTP request | Description - [ICampaignSelectionModelShufflingSelectionModel](rapidata/api_client/docs/ICampaignSelectionModelShufflingSelectionModel.md) - [ICampaignSelectionModelStaticSelectionModel](rapidata/api_client/docs/ICampaignSelectionModelStaticSelectionModel.md) - [ICampaignSelectionModelValidationSelectionModel](rapidata/api_client/docs/ICampaignSelectionModelValidationSelectionModel.md) + - [ICooldownDurationModel](rapidata/api_client/docs/ICooldownDurationModel.md) + - [ICooldownDurationModelFixedCooldownDurationModel](rapidata/api_client/docs/ICooldownDurationModelFixedCooldownDurationModel.md) + - [ICooldownDurationModelRandomCooldownDurationModel](rapidata/api_client/docs/ICooldownDurationModelRandomCooldownDurationModel.md) - [IDatasetModel](rapidata/api_client/docs/IDatasetModel.md) - [IDatasetModelCloneDatasetModel](rapidata/api_client/docs/IDatasetModelCloneDatasetModel.md) - [IExamplePayload](rapidata/api_client/docs/IExamplePayload.md) @@ -583,6 +602,11 @@ Class | Method | HTTP request | Description - [IExampleTruthLocateExampleTruth](rapidata/api_client/docs/IExampleTruthLocateExampleTruth.md) - [IExampleTruthScrubExampleTruth](rapidata/api_client/docs/IExampleTruthScrubExampleTruth.md) - [IExampleTruthTranscriptionExampleTruth](rapidata/api_client/docs/IExampleTruthTranscriptionExampleTruth.md) + - [IFaucetInput](rapidata/api_client/docs/IFaucetInput.md) + - [IFaucetInputReplicateFaucetInput](rapidata/api_client/docs/IFaucetInputReplicateFaucetInput.md) + - [IFaucetOutput](rapidata/api_client/docs/IFaucetOutput.md) + - [IFaucetOutputManagedFaucetOutput](rapidata/api_client/docs/IFaucetOutputManagedFaucetOutput.md) + - [IFaucetOutputReplicateFaucetOutput](rapidata/api_client/docs/IFaucetOutputReplicateFaucetOutput.md) - [IFlowModel](rapidata/api_client/docs/IFlowModel.md) - [IFlowModelRankingFlowModel](rapidata/api_client/docs/IFlowModelRankingFlowModel.md) - [IMetadata](rapidata/api_client/docs/IMetadata.md) @@ -853,6 +877,8 @@ Class | Method | HTTP request | Description - [QueryParticipantsByBenchmarkEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryParticipantsByBenchmarkEndpointPagedResultOfOutput.md) - [QueryParticipantsObsoleteEndpointOutput](rapidata/api_client/docs/QueryParticipantsObsoleteEndpointOutput.md) - [QueryParticipantsObsoleteEndpointOutputItem](rapidata/api_client/docs/QueryParticipantsObsoleteEndpointOutputItem.md) + - [QuerySampleGenerationsByBenchmarkEndpointOutput](rapidata/api_client/docs/QuerySampleGenerationsByBenchmarkEndpointOutput.md) + - [QuerySampleGenerationsByBenchmarkEndpointPagedResultOfOutput](rapidata/api_client/docs/QuerySampleGenerationsByBenchmarkEndpointPagedResultOfOutput.md) - [QueryStandingsEndpointOutput](rapidata/api_client/docs/QueryStandingsEndpointOutput.md) - [QueryStandingsEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryStandingsEndpointPagedResultOfOutput.md) - [QueryTagsByBenchmarkEndpointOutput](rapidata/api_client/docs/QueryTagsByBenchmarkEndpointOutput.md) @@ -873,7 +899,11 @@ Class | Method | HTTP request | Description - [ReportRapidEndpointInput](rapidata/api_client/docs/ReportRapidEndpointInput.md) - [ResponseTally](rapidata/api_client/docs/ResponseTally.md) - [RetrievalMode](rapidata/api_client/docs/RetrievalMode.md) + - [RetrySampleGenerationEndpointInput](rapidata/api_client/docs/RetrySampleGenerationEndpointInput.md) + - [RetrySampleGenerationEndpointOutput](rapidata/api_client/docs/RetrySampleGenerationEndpointOutput.md) - [RunStatus](rapidata/api_client/docs/RunStatus.md) + - [SampleGenerationItemStatus](rapidata/api_client/docs/SampleGenerationItemStatus.md) + - [SampleGenerationStatus](rapidata/api_client/docs/SampleGenerationStatus.md) - [ScrubTruthModelScrubRange](rapidata/api_client/docs/ScrubTruthModelScrubRange.md) - [SendSurveyEndpointInput](rapidata/api_client/docs/SendSurveyEndpointInput.md) - [SetFastBidMultiplierEndpointInput](rapidata/api_client/docs/SetFastBidMultiplierEndpointInput.md)