From f56de99a7e6462b3142a26c03eab7ae78ede0c71 Mon Sep 17 00:00:00 2001 From: Rudolf the Rabbit Date: Wed, 3 Jun 2026 15:18:39 +0000 Subject: [PATCH] chore: update OpenAPI client to 2026.06.03.1459-8acb55d --- openapi/schemas/flow.openapi.json | 2 +- openapi/schemas/leaderboard.openapi.json | 686 +++- openapi/schemas/order.openapi.json | 1268 ++++++- .../schemas/rapidata.filtered.openapi.json | 3167 +++++++++++++---- openapi/schemas/rapidata.openapi.json | 3167 +++++++++++++---- src/rapidata/api_client/__init__.py | 1 + src/rapidata/api_client/api/__init__.py | 1 + src/rapidata/api_client/api/benchmark_api.py | 402 ++- src/rapidata/api_client/api/faucet_api.py | 574 +++ src/rapidata/api_client/api/job_api.py | 2839 +++++++++++++-- src/rapidata/api_client/api/replicate_api.py | 611 ++++ .../models/create_flow_item_endpoint_input.py | 2 +- .../models/create_job_endpoint_input.py | 11 +- .../models/get_job_by_id_endpoint_output.py | 6 +- ...et_job_definition_by_id_endpoint_output.py | 6 +- .../get_replicate_model_endpoint_output.py | 129 + .../get_replicate_model_endpoint_parameter.py | 138 + .../query_aggregated_jobs_endpoint_output.py | 100 + ...ed_jobs_endpoint_paged_result_of_output.py | 105 + ...uery_managed_benchmarks_endpoint_output.py | 100 + ...chmarks_endpoint_paged_result_of_output.py | 105 + ..._public_job_definitions_endpoint_output.py | 103 + ...nitions_endpoint_paged_result_of_output.py | 105 + .../models/replicate_model_parameter_type.py | 40 + .../search_replicate_models_endpoint_model.py | 112 + ...search_replicate_models_endpoint_output.py | 104 + .../update_participant_endpoint_input.py | 10 +- src/rapidata/api_client_README.md | 24 + 28 files changed, 12003 insertions(+), 1915 deletions(-) create mode 100644 src/rapidata/api_client/api/replicate_api.py create mode 100644 src/rapidata/api_client/models/get_replicate_model_endpoint_output.py create mode 100644 src/rapidata/api_client/models/get_replicate_model_endpoint_parameter.py create mode 100644 src/rapidata/api_client/models/query_aggregated_jobs_endpoint_output.py create mode 100644 src/rapidata/api_client/models/query_aggregated_jobs_endpoint_paged_result_of_output.py create mode 100644 src/rapidata/api_client/models/query_managed_benchmarks_endpoint_output.py create mode 100644 src/rapidata/api_client/models/query_managed_benchmarks_endpoint_paged_result_of_output.py create mode 100644 src/rapidata/api_client/models/query_public_job_definitions_endpoint_output.py create mode 100644 src/rapidata/api_client/models/query_public_job_definitions_endpoint_paged_result_of_output.py create mode 100644 src/rapidata/api_client/models/replicate_model_parameter_type.py create mode 100644 src/rapidata/api_client/models/search_replicate_models_endpoint_model.py create mode 100644 src/rapidata/api_client/models/search_replicate_models_endpoint_output.py diff --git a/openapi/schemas/flow.openapi.json b/openapi/schemas/flow.openapi.json index 463fcd08e..7df1dbce6 100644 --- a/openapi/schemas/flow.openapi.json +++ b/openapi/schemas/flow.openapi.json @@ -1284,7 +1284,7 @@ }, "timeToLiveInSeconds": { "type": "integer", - "description": "Optional time-to-live in seconds before the flow item expires.", + "description": "Optional time-to-live in seconds before the flow item expires. Must be between 60 seconds and 1 hour; defaults to 1 hour when omitted.", "format": "int32", "nullable": true }, diff --git a/openapi/schemas/leaderboard.openapi.json b/openapi/schemas/leaderboard.openapi.json index c73dbf67f..d70418a61 100644 --- a/openapi/schemas/leaderboard.openapi.json +++ b/openapi/schemas/leaderboard.openapi.json @@ -1343,11 +1343,140 @@ } }, "x-parameter-group": "filters" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryBenchmarksEndpoint_PagedResultOfOutput" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/benchmark/{benchmarkId}/leaderboards": { + "get": { + "tags": [ + "Benchmark" + ], + "summary": "Queries all leaderboards for the given benchmark.", + "parameters": [ + { + "name": "benchmarkId", + "in": "path", + "description": "The id of the benchmark whose leaderboards will be returned.", + "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": [ + "id", + "-id", + "name", + "-name" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "name": "id", + "in": "query", + "description": "Filter by 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": "is_managed", + "name": "name", "in": "query", - "description": "Filter by is_managed.", + "description": "Filter by name.", "style": "deepObject", "explode": true, "schema": { @@ -1397,7 +1526,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QueryBenchmarksEndpoint_PagedResultOfOutput" + "$ref": "#/components/schemas/QueryLeaderboardsByBenchmarkEndpoint_PagedResultOfOutput" } } } @@ -1421,22 +1550,13 @@ } } }, - "/benchmark/{benchmarkId}/leaderboards": { + "/benchmarks/managed": { "get": { "tags": [ "Benchmark" ], - "summary": "Queries all leaderboards for the given benchmark.", + "summary": "Queries the curated benchmarks available to every customer.", "parameters": [ - { - "name": "benchmarkId", - "in": "path", - "description": "The id of the benchmark whose leaderboards will be returned.", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "page", "in": "query", @@ -1466,7 +1586,9 @@ "id", "-id", "name", - "-name" + "-name", + "created_at", + "-created_at" ], "type": "string" } @@ -1564,6 +1686,98 @@ } }, "x-parameter-group": "filters" + }, + { + "name": "owner_mail", + "in": "query", + "description": "Filter by owner_mail.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "created_at", + "in": "query", + "description": "Filter by created_at.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" } ], "responses": { @@ -1572,7 +1786,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QueryLeaderboardsByBenchmarkEndpoint_PagedResultOfOutput" + "$ref": "#/components/schemas/QueryManagedBenchmarksEndpoint_PagedResultOfOutput" } } } @@ -1646,15 +1860,129 @@ "/benchmark/{benchmarkId}/sample-generation": { "post": { "tags": [ - "Benchmark", - "SampleGeneration" + "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": [ + "Benchmark" + ], + "summary": "Submits a participant to a benchmark.", + "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" + } + } + } + }, + "/benchmark/{benchmarkId}/name": { + "put": { + "tags": [ + "Benchmark" ], - "summary": "Starts an asynchronous sample generation run.", + "summary": "Updates the name of a benchmark.", "parameters": [ { "name": "benchmarkId", "in": "path", - "description": "The benchmark whose participants should run their faucets.", + "description": "The id of the benchmark to update.", "required": true, "schema": { "type": "string" @@ -1662,26 +1990,19 @@ } ], "requestBody": { - "description": "The generation configuration.", + "description": "The payload describing the new name.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateSampleGenerationEndpoint_Input" + "$ref": "#/components/schemas/UpdateBenchmarkNameEndpoint_Input" } } }, "required": true }, "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateSampleGenerationEndpoint_Output" - } - } - } + "204": { + "description": "No Content" }, "400": { "description": "Bad Request", @@ -1702,26 +2023,27 @@ } } }, - "/benchmark/{benchmarkId}/participants/{participantId}/submit": { - "post": { + "/leaderboard/faucet/replicate/models/{modelOwner}/{modelName}": { + "get": { "tags": [ - "Benchmark" + "Faucet", + "Replicate" ], - "summary": "Submits a participant to a benchmark.", + "summary": "Returns a single Replicate model with its input parameter schema.", "parameters": [ { - "name": "benchmarkId", + "name": "modelOwner", "in": "path", - "description": "The id of the benchmark the participant belongs to.", + "description": "The owner of the hosted model.", "required": true, "schema": { "type": "string" } }, { - "name": "participantId", + "name": "modelName", "in": "path", - "description": "The id of the participant to submit.", + "description": "The model name.", "required": true, "schema": { "type": "string" @@ -1734,7 +2056,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubmitParticipantByBenchmarkEndpoint_Output" + "$ref": "#/components/schemas/GetReplicateModelEndpoint_Output" } } } @@ -1758,38 +2080,44 @@ } } }, - "/benchmark/{benchmarkId}/name": { - "put": { + "/leaderboard/faucet/replicate/models": { + "get": { "tags": [ - "Benchmark" + "Faucet", + "Replicate" ], - "summary": "Updates the name of a benchmark.", + "summary": "Searches Replicate models by free-text term.", + "description": "Results are cursor-paginated: pass the returned nextCursor back as cursor to\n fetch the next page.", "parameters": [ { - "name": "benchmarkId", - "in": "path", - "description": "The id of the benchmark to update.", + "name": "search", + "in": "query", + "description": "The free-text term to search models by.", "required": true, "schema": { "type": "string" } + }, + { + "name": "cursor", + "in": "query", + "description": "Cursor continuing a previous search; omit for the first page.", + "schema": { + "type": "string" + } } ], - "requestBody": { - "description": "The payload describing the new name.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateBenchmarkNameEndpoint_Input" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchReplicateModelsEndpoint_Output" + } } } }, - "required": true - }, - "responses": { - "204": { - "description": "No Content" - }, "400": { "description": "Bad Request", "content": { @@ -5976,6 +6304,106 @@ } } }, + "GetReplicateModelEndpoint_Output": { + "required": [ + "modelOwner", + "modelName", + "parameters" + ], + "type": "object", + "properties": { + "modelOwner": { + "type": "string", + "description": "The owner of the hosted model." + }, + "modelName": { + "type": "string", + "description": "The model name." + }, + "description": { + "type": "string", + "description": "A short description of the model.", + "nullable": true + }, + "coverImageUrl": { + "type": "string", + "description": "URL of a representative cover image, if available.", + "nullable": true + }, + "runCount": { + "type": "integer", + "description": "Total number of times the model has been run on Replicate, if known.", + "format": "int64", + "nullable": true + }, + "latestVersion": { + "type": "string", + "description": "The model's latest version id, if reported by Replicate.", + "nullable": true + }, + "parameters": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetReplicateModelEndpoint_Parameter" + } + } + ], + "description": "The model's configurable input parameters, ordered for rendering." + } + } + }, + "GetReplicateModelEndpoint_Parameter": { + "required": [ + "key", + "type", + "required", + "enumValues" + ], + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "title": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/ReplicateModelParameterType" + }, + "required": { + "type": "boolean" + }, + "default": { }, + "enumValues": { + "type": "array", + "items": { + "type": "string" + } + }, + "minimum": { + "type": "number", + "format": "double", + "nullable": true + }, + "maximum": { + "type": "number", + "format": "double", + "nullable": true + }, + "order": { + "type": "integer", + "format": "int32", + "nullable": true + } + } + }, "GetSampleByIdEndpoint_Output": { "required": [ "id", @@ -7880,6 +8308,77 @@ } } }, + "QueryManagedBenchmarksEndpoint_Output": { + "required": [ + "id", + "name", + "isManaged", + "isPublic", + "createdAt", + "ownerMail" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the benchmark." + }, + "name": { + "type": "string", + "description": "The name of the benchmark." + }, + "isManaged": { + "type": "boolean", + "description": "Whether the benchmark is managed." + }, + "isPublic": { + "type": "boolean", + "description": "Whether the benchmark is public." + }, + "createdAt": { + "type": "string", + "description": "The timestamp when the benchmark was created.", + "format": "date-time" + }, + "ownerMail": { + "type": "string", + "description": "The mail of the customer owning the benchmark." + } + } + }, + "QueryManagedBenchmarksEndpoint_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/QueryManagedBenchmarksEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, "QueryParticipantsByBenchmarkEndpoint_Output": { "required": [ "id", @@ -8267,6 +8766,15 @@ } } }, + "ReplicateModelParameterType": { + "enum": [ + "String", + "Integer", + "Number", + "Boolean", + "Uri" + ] + }, "RetrySampleGenerationEndpoint_Input": { "type": "object", "properties": { @@ -8335,6 +8843,58 @@ "Cancelled" ] }, + "SearchReplicateModelsEndpoint_Model": { + "required": [ + "modelOwner", + "modelName" + ], + "type": "object", + "properties": { + "modelOwner": { + "type": "string" + }, + "modelName": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "coverImageUrl": { + "type": "string", + "nullable": true + }, + "runCount": { + "type": "integer", + "format": "int64", + "nullable": true + } + } + }, + "SearchReplicateModelsEndpoint_Output": { + "required": [ + "models" + ], + "type": "object", + "properties": { + "models": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchReplicateModelsEndpoint_Model" + } + } + ], + "description": "The matching models for this page." + }, + "nextCursor": { + "type": "string", + "description": "Cursor to fetch the next page, or null when there are no more results.", + "nullable": true + } + } + }, "StandingStatus": { "enum": [ "Created", @@ -8502,6 +9062,14 @@ "name": { "type": "string", "description": "The new name of the participant." + }, + "faucet": { + "allOf": [ + { + "$ref": "#/components/schemas/IFaucetInput" + } + ], + "description": "The faucet to set or replace on the participant." } } }, diff --git a/openapi/schemas/order.openapi.json b/openapi/schemas/order.openapi.json index 7c8308b45..ac4a0dcd9 100644 --- a/openapi/schemas/order.openapi.json +++ b/openapi/schemas/order.openapi.json @@ -51,6 +51,46 @@ } } }, + "/job/{jobId}/approve": { + "post": { + "tags": [ + "Job" + ], + "summary": "Approves a job in manual review so its pipeline can start processing.", + "parameters": [ + { + "name": "jobId", + "in": "path", + "description": "The ID of the job to approve.", + "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" + } + } + } + }, "/job/definition": { "post": { "tags": [ @@ -652,13 +692,52 @@ } } }, - "/job/definitions": { + "/job/{jobId}/pause": { + "post": { + "tags": [ + "Job" + ], + "summary": "Pauses a job, stopping all of its campaigns from processing.", + "parameters": [ + { + "name": "jobId", + "in": "path", + "description": "The ID of the job to pause.", + "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" + } + } + } + }, + "/jobs/aggregated-overview": { "get": { "tags": [ "Job" ], - "summary": "Queries job definitions visible to the caller.", - "description": "Results are scoped to the caller's customer unless the caller is allowed to view all job definitions.", + "summary": "Retrieves jobs aggregated by customer with total counts and most recent job information.", "parameters": [ { "name": "page", @@ -686,10 +765,14 @@ "type": "array", "items": { "enum": [ - "name", - "-name", - "created_at", - "-created_at" + "amount", + "-amount", + "last7_days", + "-last7_days", + "last_job_date", + "-last_job_date", + "owner_mail", + "-owner_mail" ], "type": "string" } @@ -697,9 +780,9 @@ "x-parameter-group": "sort" }, { - "name": "definition_id", + "name": "owner_mail", "in": "query", - "description": "Filter by definition_id.", + "description": "Filter by owner_mail.", "style": "deepObject", "explode": true, "schema": { @@ -743,9 +826,9 @@ "x-parameter-group": "filters" }, { - "name": "name", + "name": "last_job_date", "in": "query", - "description": "Filter by name.", + "description": "Filter by last_job_date.", "style": "deepObject", "explode": true, "schema": { @@ -789,9 +872,9 @@ "x-parameter-group": "filters" }, { - "name": "definition_type", + "name": "last_job_name", "in": "query", - "description": "Filter by definition_type.", + "description": "Filter by last_job_name.", "style": "deepObject", "explode": true, "schema": { @@ -833,11 +916,86 @@ } }, "x-parameter-group": "filters" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryAggregatedJobsEndpoint_PagedResultOfOutput" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/job/definitions": { + "get": { + "tags": [ + "Job" + ], + "summary": "Queries job definitions visible to the caller.", + "description": "Results are scoped to the caller's customer unless the caller is allowed to view all job definitions.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "The 1-based page index.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" }, { - "name": "created_at", + "name": "page_size", "in": "query", - "description": "Filter by created_at.", + "description": "The number of items per page.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "name", + "-name", + "created_at", + "-created_at" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "name": "definition_id", + "in": "query", + "description": "Filter by definition_id.", "style": "deepObject", "explode": true, "schema": { @@ -881,9 +1039,9 @@ "x-parameter-group": "filters" }, { - "name": "owner_id", + "name": "name", "in": "query", - "description": "Filter by owner_id.", + "description": "Filter by name.", "style": "deepObject", "explode": true, "schema": { @@ -927,9 +1085,9 @@ "x-parameter-group": "filters" }, { - "name": "owner_mail", + "name": "definition_type", "in": "query", - "description": "Filter by owner_mail.", + "description": "Filter by definition_type.", "style": "deepObject", "explode": true, "schema": { @@ -971,83 +1129,221 @@ } }, "x-parameter-group": "filters" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryJobDefinitionsEndpoint_PagedResultOfOutput" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthenticated" - }, - "403": { - "description": "Forbidden" - } - } - } - }, - "/job/definition/{definitionId}/revisions": { - "get": { - "tags": [ - "Job" - ], - "summary": "Queries the revisions of a specific job definition.", - "parameters": [ - { - "name": "definitionId", - "in": "path", - "description": "The id of the job definition.", - "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", + "name": "created_at", "in": "query", - "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "description": "Filter by created_at.", + "style": "deepObject", + "explode": true, "schema": { - "type": "array", - "items": { - "enum": [ - "revision_number", - "-revision_number", - "created_at", + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "owner_id", + "in": "query", + "description": "Filter by owner_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": "owner_mail", + "in": "query", + "description": "Filter by owner_mail.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryJobDefinitionsEndpoint_PagedResultOfOutput" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/job/definition/{definitionId}/revisions": { + "get": { + "tags": [ + "Job" + ], + "summary": "Queries the revisions of a specific job definition.", + "parameters": [ + { + "name": "definitionId", + "in": "path", + "description": "The id of the job definition.", + "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": [ + "revision_number", + "-revision_number", + "created_at", "-created_at" ], "type": "string" @@ -1501,63 +1797,591 @@ "x-parameter-group": "filters" }, { - "name": "created_at", + "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/QueryJobsEndpoint_PagedResultOfOutput" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/job/definitions/public": { + "get": { + "tags": [ + "Job" + ], + "summary": "Queries job definitions that have been shared publicly, regardless of owner, so they can be\n reused as templates.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "The 1-based page index.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "page_size", + "in": "query", + "description": "The number of items per page.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "name", + "-name", + "created_at", + "-created_at" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "name": "definition_id", + "in": "query", + "description": "Filter by definition_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": "name", + "in": "query", + "description": "Filter by name.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "definition_type", + "in": "query", + "description": "Filter by definition_type.", + "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" + }, + { + "name": "owner_id", + "in": "query", + "description": "Filter by owner_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": "owner_mail", + "in": "query", + "description": "Filter by owner_mail.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryPublicJobDefinitionsEndpoint_PagedResultOfOutput" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/job/{jobId}/resume": { + "post": { + "tags": [ + "Job" + ], + "summary": "Resumes a job, restarting all of its campaigns.", + "parameters": [ + { + "name": "jobId", + "in": "path", + "description": "The ID of the job to resume.", + "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" + } + } + } + }, + "/job/{jobId}/retry": { + "post": { + "tags": [ + "Job" + ], + "summary": "Retries processing of a failed job.", + "parameters": [ + { + "name": "jobId", + "in": "path", + "description": "The ID of the job to retry.", + "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" + } + } + } + }, + "/job/definition/{definitionId}/share": { + "patch": { + "tags": [ + "Job" + ], + "summary": "Marks or unmarks a job definition as a public template that other users can discover and run.", + "parameters": [ + { + "name": "definitionId", + "in": "path", + "description": "The ID of the job definition.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "isPublic", "in": "query", - "description": "Filter by created_at.", - "style": "deepObject", - "explode": true, + "description": "Whether to mark or unmark the definition as public.", "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" + "type": "boolean", + "default": true + } } ], "responses": { - "200": { - "description": "OK", + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QueryJobsEndpoint_PagedResultOfOutput" + "$ref": "#/components/schemas/ValidationProblemDetails" } } } }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/job/{jobId}/share": { + "patch": { + "tags": [ + "Job" + ], + "summary": "Marks or unmarks a job as public so its results can be shared with other users.", + "parameters": [ + { + "name": "jobId", + "in": "path", + "description": "The ID of the job.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "isPublic", + "in": "query", + "description": "Whether to mark or unmark the job as public.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, "400": { "description": "Bad Request", "content": { @@ -3271,6 +4095,11 @@ "type": "integer", "description": "The priority of the job. Higher values mean higher priority. Default is 50.", "format": "int32" + }, + "precedingJobId": { + "type": "string", + "description": "Optional id of a job that must finish before this job starts. When set, this job is\n queued until the preceding job completes or fails.", + "nullable": true } }, "description": "The input for the create job endpoint." @@ -3685,6 +4514,7 @@ "revisionNumber", "pipelineId", "status", + "isPublic", "createdAt", "ownerId", "ownerMail" @@ -3720,6 +4550,10 @@ "type": "string", "description": "The job status." }, + "isPublic": { + "type": "boolean", + "description": "Whether the job (and its results) is shared publicly." + }, "completedAt": { "type": "string", "description": "The timestamp when the job was completed.", @@ -3764,6 +4598,7 @@ "definitionId", "name", "definitionType", + "isPublic", "createdAt", "ownerId", "ownerMail" @@ -3786,6 +4621,10 @@ ], "description": "The type of the job definition." }, + "isPublic": { + "type": "boolean", + "description": "Whether the definition is shared publicly as a reusable template." + }, "createdAt": { "type": "string", "description": "The creation timestamp.", @@ -5686,6 +6525,79 @@ } } }, + "QueryAggregatedJobsEndpoint_Output": { + "required": [ + "amount", + "last7Days", + "lastJobDate", + "lastJobName", + "lastJobId", + "ownerMail" + ], + "type": "object", + "properties": { + "amount": { + "type": "integer", + "description": "The total number of jobs for this customer.", + "format": "int32" + }, + "last7Days": { + "type": "integer", + "description": "The number of jobs created in the last 7 days.", + "format": "int32" + }, + "lastJobDate": { + "type": "string", + "description": "The date of the most recent job.", + "format": "date-time" + }, + "lastJobName": { + "type": "string", + "description": "The name of the most recent job." + }, + "lastJobId": { + "type": "string", + "description": "The ID of the most recent job." + }, + "ownerMail": { + "type": "string", + "description": "The customer's email address." + } + } + }, + "QueryAggregatedJobsEndpoint_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/QueryAggregatedJobsEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, "QueryAggregatedOrdersEndpoint_Output": { "required": [ "amount", @@ -6079,6 +6991,88 @@ } } }, + "QueryPublicJobDefinitionsEndpoint_Output": { + "required": [ + "definitionId", + "name", + "definitionType", + "createdAt", + "revisionCount", + "ownerId", + "ownerMail" + ], + "type": "object", + "properties": { + "definitionId": { + "type": "string", + "description": "The id of the job definition." + }, + "name": { + "type": "string", + "description": "The name of the job definition." + }, + "definitionType": { + "allOf": [ + { + "$ref": "#/components/schemas/DefinitionType" + } + ], + "description": "The type of the job definition." + }, + "createdAt": { + "type": "string", + "description": "The creation timestamp of the job definition.", + "format": "date-time" + }, + "revisionCount": { + "type": "integer", + "description": "The number of revisions for this job definition.", + "format": "int32" + }, + "ownerId": { + "type": "string", + "description": "The id of the owner of the job definition.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The email of the owner of the job definition." + } + } + }, + "QueryPublicJobDefinitionsEndpoint_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/QueryPublicJobDefinitionsEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, "RetrievalMode": { "enum": [ "Random", diff --git a/openapi/schemas/rapidata.filtered.openapi.json b/openapi/schemas/rapidata.filtered.openapi.json index 4a73b8e90..46a40619c 100644 --- a/openapi/schemas/rapidata.filtered.openapi.json +++ b/openapi/schemas/rapidata.filtered.openapi.json @@ -103,6 +103,14 @@ "name": "SampleGeneration", "x-displayName": "SampleGeneration" }, + { + "name": "Faucet", + "x-displayName": "Faucet" + }, + { + "name": "Replicate", + "x-displayName": "Replicate" + }, { "name": "Leaderboard", "x-displayName": "Leaderboard" @@ -111,10 +119,6 @@ "name": "Participant", "x-displayName": "Participant" }, - { - "name": "Faucet", - "x-displayName": "Faucet" - }, { "name": "Prompt", "x-displayName": "Prompt" @@ -8928,11 +8932,150 @@ } }, "x-parameter-group": "filters" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryBenchmarksEndpoint_PagedResultOfOutput" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" }, + "403": { + "description": "Forbidden" + } + }, + "security": [ { - "name": "is_managed", + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/benchmark/{benchmarkId}/leaderboards": { + "get": { + "tags": [ + "Benchmark" + ], + "summary": "Queries all leaderboards for the given benchmark.", + "parameters": [ + { + "name": "benchmarkId", + "in": "path", + "description": "The id of the benchmark whose leaderboards will be returned.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "page", "in": "query", - "description": "Filter by is_managed.", + "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": [ + "id", + "-id", + "name", + "-name" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "name": "id", + "in": "query", + "description": "Filter by 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": "name", + "in": "query", + "description": "Filter by name.", "style": "deepObject", "explode": true, "schema": { @@ -8982,7 +9125,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QueryBenchmarksEndpoint_PagedResultOfOutput" + "$ref": "#/components/schemas/QueryLeaderboardsByBenchmarkEndpoint_PagedResultOfOutput" } } } @@ -9016,22 +9159,13 @@ ] } }, - "/benchmark/{benchmarkId}/leaderboards": { + "/benchmarks/managed": { "get": { "tags": [ "Benchmark" ], - "summary": "Queries all leaderboards for the given benchmark.", + "summary": "Queries the curated benchmarks available to every customer.", "parameters": [ - { - "name": "benchmarkId", - "in": "path", - "description": "The id of the benchmark whose leaderboards will be returned.", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "page", "in": "query", @@ -9061,7 +9195,9 @@ "id", "-id", "name", - "-name" + "-name", + "created_at", + "-created_at" ], "type": "string" } @@ -9159,6 +9295,98 @@ } }, "x-parameter-group": "filters" + }, + { + "name": "owner_mail", + "in": "query", + "description": "Filter by owner_mail.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "created_at", + "in": "query", + "description": "Filter by created_at.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" } ], "responses": { @@ -9167,7 +9395,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QueryLeaderboardsByBenchmarkEndpoint_PagedResultOfOutput" + "$ref": "#/components/schemas/QueryManagedBenchmarksEndpoint_PagedResultOfOutput" } } } @@ -9454,6 +9682,140 @@ ] } }, + "/leaderboard/faucet/replicate/models/{modelOwner}/{modelName}": { + "get": { + "tags": [ + "Faucet", + "Replicate" + ], + "summary": "Returns a single Replicate model with its input parameter schema.", + "parameters": [ + { + "name": "modelOwner", + "in": "path", + "description": "The owner of the hosted model.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "modelName", + "in": "path", + "description": "The model name.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetReplicateModelEndpoint_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/faucet/replicate/models": { + "get": { + "tags": [ + "Faucet", + "Replicate" + ], + "summary": "Searches Replicate models by free-text term.", + "description": "Results are cursor-paginated: pass the returned nextCursor back as cursor to\n fetch the next page.", + "parameters": [ + { + "name": "search", + "in": "query", + "description": "The free-text term to search models by.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cursor", + "in": "query", + "description": "Cursor continuing a previous search; omit for the first page.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchReplicateModelsEndpoint_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}/boost": { "post": { "tags": [ @@ -12999,161 +13361,211 @@ ] } }, - "/job/definition": { + "/job/{jobId}/approve": { "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.", + "summary": "Approves a job in manual review so its pipeline can start processing.", "parameters": [ { - "name": "definitionId", + "name": "jobId", "in": "path", - "description": "The id of the job definition to create a revision for.", + "description": "The ID of the job to approve.", "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" - } - } - } + "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", @@ -13730,13 +14142,62 @@ ] } }, - "/job/definitions": { + "/job/{jobId}/pause": { + "post": { + "tags": [ + "Job" + ], + "summary": "Pauses a job, stopping all of its campaigns from processing.", + "parameters": [ + { + "name": "jobId", + "in": "path", + "description": "The ID of the job to pause.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/jobs/aggregated-overview": { "get": { "tags": [ "Job" ], - "summary": "Queries job definitions visible to the caller.", - "description": "Results are scoped to the caller's customer unless the caller is allowed to view all job definitions.", + "summary": "Retrieves jobs aggregated by customer with total counts and most recent job information.", "parameters": [ { "name": "page", @@ -13764,10 +14225,14 @@ "type": "array", "items": { "enum": [ - "name", - "-name", - "created_at", - "-created_at" + "amount", + "-amount", + "last7_days", + "-last7_days", + "last_job_date", + "-last_job_date", + "owner_mail", + "-owner_mail" ], "type": "string" } @@ -13775,55 +14240,9 @@ "x-parameter-group": "sort" }, { - "name": "definition_id", - "in": "query", - "description": "Filter by definition_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": "name", + "name": "owner_mail", "in": "query", - "description": "Filter by name.", + "description": "Filter by owner_mail.", "style": "deepObject", "explode": true, "schema": { @@ -13867,9 +14286,9 @@ "x-parameter-group": "filters" }, { - "name": "definition_type", + "name": "last_job_date", "in": "query", - "description": "Filter by definition_type.", + "description": "Filter by last_job_date.", "style": "deepObject", "explode": true, "schema": { @@ -13913,9 +14332,9 @@ "x-parameter-group": "filters" }, { - "name": "created_at", + "name": "last_job_name", "in": "query", - "description": "Filter by created_at.", + "description": "Filter by last_job_name.", "style": "deepObject", "explode": true, "schema": { @@ -13957,11 +14376,96 @@ } }, "x-parameter-group": "filters" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryAggregatedJobsEndpoint_PagedResultOfOutput" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ { - "name": "owner_id", + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/job/definitions": { + "get": { + "tags": [ + "Job" + ], + "summary": "Queries job definitions visible to the caller.", + "description": "Results are scoped to the caller's customer unless the caller is allowed to view all job definitions.", + "parameters": [ + { + "name": "page", "in": "query", - "description": "Filter by owner_id.", + "description": "The 1-based page index.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "page_size", + "in": "query", + "description": "The number of items per page.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "name", + "-name", + "created_at", + "-created_at" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "name": "definition_id", + "in": "query", + "description": "Filter by definition_id.", "style": "deepObject", "explode": true, "schema": { @@ -14005,9 +14509,9 @@ "x-parameter-group": "filters" }, { - "name": "owner_mail", + "name": "name", "in": "query", - "description": "Filter by owner_mail.", + "description": "Filter by name.", "style": "deepObject", "explode": true, "schema": { @@ -14049,104 +14553,57 @@ } }, "x-parameter-group": "filters" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryJobDefinitionsEndpoint_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" - ] - } - ] - } - }, - "/job/definition/{definitionId}/revisions": { - "get": { - "tags": [ - "Job" - ], - "summary": "Queries the revisions of a specific job definition.", - "parameters": [ - { - "name": "definitionId", - "in": "path", - "description": "The id of the job definition.", - "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", + "name": "definition_type", "in": "query", - "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "description": "Filter by definition_type.", + "style": "deepObject", + "explode": true, "schema": { - "type": "array", - "items": { - "enum": [ - "revision_number", - "-revision_number", - "created_at", - "-created_at" - ], - "type": "string" + "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": "sort" + "x-parameter-group": "filters" }, { - "name": "revision_number", + "name": "created_at", "in": "query", - "description": "Filter by revision_number.", + "description": "Filter by created_at.", "style": "deepObject", "explode": true, "schema": { @@ -14190,9 +14647,9 @@ "x-parameter-group": "filters" }, { - "name": "created_at", + "name": "owner_id", "in": "query", - "description": "Filter by created_at.", + "description": "Filter by owner_id.", "style": "deepObject", "explode": true, "schema": { @@ -14236,9 +14693,9 @@ "x-parameter-group": "filters" }, { - "name": "state", + "name": "owner_mail", "in": "query", - "description": "Filter by state.", + "description": "Filter by owner_mail.", "style": "deepObject", "explode": true, "schema": { @@ -14288,7 +14745,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QueryJobRevisionsEndpoint_PagedResultOfOutput" + "$ref": "#/components/schemas/QueryJobDefinitionsEndpoint_PagedResultOfOutput" } } } @@ -14322,14 +14779,22 @@ ] } }, - "/jobs": { + "/job/definition/{definitionId}/revisions": { "get": { "tags": [ "Job" ], - "summary": "Queries jobs visible to the caller.", - "description": "Results are scoped to the caller's customer unless the caller is allowed to view all jobs.", + "summary": "Queries the revisions of a specific job definition.", "parameters": [ + { + "name": "definitionId", + "in": "path", + "description": "The id of the job definition.", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "page", "in": "query", @@ -14356,12 +14821,10 @@ "type": "array", "items": { "enum": [ - "name", - "-name", + "revision_number", + "-revision_number", "created_at", - "-created_at", - "status", - "-status" + "-created_at" ], "type": "string" } @@ -14369,9 +14832,9 @@ "x-parameter-group": "sort" }, { - "name": "job_id", + "name": "revision_number", "in": "query", - "description": "Filter by job_id.", + "description": "Filter by revision_number.", "style": "deepObject", "explode": true, "schema": { @@ -14415,9 +14878,9 @@ "x-parameter-group": "filters" }, { - "name": "name", + "name": "created_at", "in": "query", - "description": "Filter by name.", + "description": "Filter by created_at.", "style": "deepObject", "explode": true, "schema": { @@ -14461,9 +14924,234 @@ "x-parameter-group": "filters" }, { - "name": "definition_id", + "name": "state", "in": "query", - "description": "Filter by definition_id.", + "description": "Filter by state.", + "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/QueryJobRevisionsEndpoint_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" + ] + } + ] + } + }, + "/jobs": { + "get": { + "tags": [ + "Job" + ], + "summary": "Queries jobs visible to the caller.", + "description": "Results are scoped to the caller's customer unless the caller is allowed to view all jobs.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "The 1-based page index.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "page_size", + "in": "query", + "description": "The number of items per page.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "name", + "-name", + "created_at", + "-created_at", + "status", + "-status" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "name": "job_id", + "in": "query", + "description": "Filter by job_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": "name", + "in": "query", + "description": "Filter by name.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "definition_id", + "in": "query", + "description": "Filter by definition_id.", "style": "deepObject", "explode": true, "schema": { @@ -14685,6 +15373,584 @@ ] } }, + "/job/definitions/public": { + "get": { + "tags": [ + "Job" + ], + "summary": "Queries job definitions that have been shared publicly, regardless of owner, so they can be\n reused as templates.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "The 1-based page index.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "page_size", + "in": "query", + "description": "The number of items per page.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "name", + "-name", + "created_at", + "-created_at" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "name": "definition_id", + "in": "query", + "description": "Filter by definition_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": "name", + "in": "query", + "description": "Filter by name.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "definition_type", + "in": "query", + "description": "Filter by definition_type.", + "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" + }, + { + "name": "owner_id", + "in": "query", + "description": "Filter by owner_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": "owner_mail", + "in": "query", + "description": "Filter by owner_mail.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryPublicJobDefinitionsEndpoint_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" + ] + } + ] + } + }, + "/job/{jobId}/resume": { + "post": { + "tags": [ + "Job" + ], + "summary": "Resumes a job, restarting all of its campaigns.", + "parameters": [ + { + "name": "jobId", + "in": "path", + "description": "The ID of the job to resume.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/job/{jobId}/retry": { + "post": { + "tags": [ + "Job" + ], + "summary": "Retries processing of a failed job.", + "parameters": [ + { + "name": "jobId", + "in": "path", + "description": "The ID of the job to retry.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/job/definition/{definitionId}/share": { + "patch": { + "tags": [ + "Job" + ], + "summary": "Marks or unmarks a job definition as a public template that other users can discover and run.", + "parameters": [ + { + "name": "definitionId", + "in": "path", + "description": "The ID of the job definition.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "isPublic", + "in": "query", + "description": "Whether to mark or unmark the definition as public.", + "schema": { + "type": "boolean", + "default": 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/{jobId}/share": { + "patch": { + "tags": [ + "Job" + ], + "summary": "Marks or unmarks a job as public so its results can be shared with other users.", + "parameters": [ + { + "name": "jobId", + "in": "path", + "description": "The ID of the job.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "isPublic", + "in": "query", + "description": "Whether to mark or unmark the job as public.", + "schema": { + "type": "boolean", + "default": 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" + ] + } + ] + } + }, "/order/{orderId}/approve": { "post": { "tags": [ @@ -26102,7 +27368,7 @@ }, "timeToLiveInSeconds": { "type": "integer", - "description": "Optional time-to-live in seconds before the flow item expires.", + "description": "Optional time-to-live in seconds before the flow item expires. Must be between 60 seconds and 1 hour; defaults to 1 hour when omitted.", "format": "int32", "nullable": true }, @@ -28741,6 +30007,106 @@ } } }, + "GetReplicateModelEndpoint_Output": { + "required": [ + "modelOwner", + "modelName", + "parameters" + ], + "type": "object", + "properties": { + "modelOwner": { + "type": "string", + "description": "The owner of the hosted model." + }, + "modelName": { + "type": "string", + "description": "The model name." + }, + "description": { + "type": "string", + "description": "A short description of the model.", + "nullable": true + }, + "coverImageUrl": { + "type": "string", + "description": "URL of a representative cover image, if available.", + "nullable": true + }, + "runCount": { + "type": "integer", + "description": "Total number of times the model has been run on Replicate, if known.", + "format": "int64", + "nullable": true + }, + "latestVersion": { + "type": "string", + "description": "The model's latest version id, if reported by Replicate.", + "nullable": true + }, + "parameters": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetReplicateModelEndpoint_Parameter" + } + } + ], + "description": "The model's configurable input parameters, ordered for rendering." + } + } + }, + "GetReplicateModelEndpoint_Parameter": { + "required": [ + "key", + "type", + "required", + "enumValues" + ], + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "title": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/ReplicateModelParameterType" + }, + "required": { + "type": "boolean" + }, + "default": {}, + "enumValues": { + "type": "array", + "items": { + "type": "string" + } + }, + "minimum": { + "type": "number", + "format": "double", + "nullable": true + }, + "maximum": { + "type": "number", + "format": "double", + "nullable": true + }, + "order": { + "type": "integer", + "format": "int32", + "nullable": true + } + } + }, "GetSampleByIdEndpoint_Output": { "required": [ "id", @@ -29824,134 +31190,261 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryLeaderboardRunsEndpoint_Output" - } - }, - "totalPages": { - "type": "integer", - "format": "int32" - } - } - }, - "QueryLeaderboardsByBenchmarkEndpoint_Output": { - "required": [ - "id", - "name", - "instruction", - "showPrompt", - "showPromptAsset", - "isInversed", - "responseBudget", - "minResponses", - "audienceId", - "featureFlags", - "weight", - "scoreShift", - "scoreScale", - "isHidden" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the leaderboard." - }, - "name": { - "type": "string", - "description": "The name of the leaderboard." - }, - "instruction": { - "type": "string", - "description": "The instruction shown on the leaderboard." - }, - "showPrompt": { - "type": "boolean", - "description": "Whether the prompt text is shown." - }, - "showPromptAsset": { - "type": "boolean", - "description": "Whether the prompt asset is shown." - }, - "isInversed": { - "type": "boolean", - "description": "Whether the leaderboard's scoring is inversed." - }, - "responseBudget": { - "type": "integer", - "description": "The response budget for the leaderboard.", - "format": "int32" - }, - "minResponses": { - "type": "integer", - "description": "The minimum number of responses for the leaderboard.", - "format": "int32" - }, - "audienceId": { - "type": "string", - "description": "The id of the audience assigned to the leaderboard." - }, - "jobDefinitionId": { - "type": "string", - "description": "The id of the job definition assigned to the leaderboard, if any.", - "nullable": true - }, - "featureFlags": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } - } - ], - "description": "The feature flags enabled for the leaderboard." - }, - "weight": { - "type": "number", - "description": "Multiplier applied to every match result from this leaderboard when it contributes to\n the parent benchmark's overall / combined scoreboards.", - "format": "double" - }, - "scoreShift": { - "type": "number", - "description": "Additive offset applied to displayed scores on this leaderboard's per-leaderboard\n scoreboard.", - "format": "double" - }, - "scoreScale": { - "type": "number", - "description": "Multiplicative factor applied to displayed scores (relative to the Bradley-Terry\n center) on this leaderboard's per-leaderboard scoreboard.", - "format": "double" - }, - "isHidden": { - "type": "boolean", - "description": "Whether the leaderboard is hidden in listings and reads for non-admins." - } - } - }, - "QueryLeaderboardsByBenchmarkEndpoint_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/QueryLeaderboardsByBenchmarkEndpoint_Output" + "$ref": "#/components/schemas/QueryLeaderboardRunsEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, + "QueryLeaderboardsByBenchmarkEndpoint_Output": { + "required": [ + "id", + "name", + "instruction", + "showPrompt", + "showPromptAsset", + "isInversed", + "responseBudget", + "minResponses", + "audienceId", + "featureFlags", + "weight", + "scoreShift", + "scoreScale", + "isHidden" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the leaderboard." + }, + "name": { + "type": "string", + "description": "The name of the leaderboard." + }, + "instruction": { + "type": "string", + "description": "The instruction shown on the leaderboard." + }, + "showPrompt": { + "type": "boolean", + "description": "Whether the prompt text is shown." + }, + "showPromptAsset": { + "type": "boolean", + "description": "Whether the prompt asset is shown." + }, + "isInversed": { + "type": "boolean", + "description": "Whether the leaderboard's scoring is inversed." + }, + "responseBudget": { + "type": "integer", + "description": "The response budget for the leaderboard.", + "format": "int32" + }, + "minResponses": { + "type": "integer", + "description": "The minimum number of responses for the leaderboard.", + "format": "int32" + }, + "audienceId": { + "type": "string", + "description": "The id of the audience assigned to the leaderboard." + }, + "jobDefinitionId": { + "type": "string", + "description": "The id of the job definition assigned to the leaderboard, if any.", + "nullable": true + }, + "featureFlags": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } + } + ], + "description": "The feature flags enabled for the leaderboard." + }, + "weight": { + "type": "number", + "description": "Multiplier applied to every match result from this leaderboard when it contributes to\n the parent benchmark's overall / combined scoreboards.", + "format": "double" + }, + "scoreShift": { + "type": "number", + "description": "Additive offset applied to displayed scores on this leaderboard's per-leaderboard\n scoreboard.", + "format": "double" + }, + "scoreScale": { + "type": "number", + "description": "Multiplicative factor applied to displayed scores (relative to the Bradley-Terry\n center) on this leaderboard's per-leaderboard scoreboard.", + "format": "double" + }, + "isHidden": { + "type": "boolean", + "description": "Whether the leaderboard is hidden in listings and reads for non-admins." + } + } + }, + "QueryLeaderboardsByBenchmarkEndpoint_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/QueryLeaderboardsByBenchmarkEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, + "QueryLeaderboardsEndpoint_Output": { + "required": [ + "id", + "name", + "instruction", + "showPrompt", + "showPromptAsset", + "isInversed", + "responseBudget", + "minResponses", + "audienceId", + "featureFlags", + "weight", + "scoreShift", + "scoreScale", + "isHidden" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the leaderboard." + }, + "name": { + "type": "string", + "description": "The name of the leaderboard." + }, + "instruction": { + "type": "string", + "description": "The instruction used when collecting responses." + }, + "showPrompt": { + "type": "boolean", + "description": "Whether the prompt is shown on the rapids." + }, + "showPromptAsset": { + "type": "boolean", + "description": "Whether the prompt asset is shown on the rapids." + }, + "isInversed": { + "type": "boolean", + "description": "Whether the leaderboard results are inversed." + }, + "responseBudget": { + "type": "integer", + "description": "The response budget per run.", + "format": "int32" + }, + "minResponses": { + "type": "integer", + "description": "The minimum responses collected per comparison.", + "format": "int32" + }, + "audienceId": { + "type": "string", + "description": "The id of the audience that evaluates the leaderboard." + }, + "jobDefinitionId": { + "type": "string", + "description": "The id of the associated job definition, if any.", + "nullable": true + }, + "featureFlags": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } + } + ], + "description": "Feature flags applied to orders created from this leaderboard." + }, + "weight": { + "type": "number", + "description": "Multiplier applied to every match result from this leaderboard when it contributes to\n the parent benchmark's overall / combined scoreboards.", + "format": "double" + }, + "scoreShift": { + "type": "number", + "description": "Additive offset applied to displayed scores on this leaderboard's per-leaderboard\n scoreboard.", + "format": "double" + }, + "scoreScale": { + "type": "number", + "description": "Multiplicative factor applied to displayed scores (relative to the Bradley-Terry\n center) on this leaderboard's per-leaderboard scoreboard.", + "format": "double" + }, + "isHidden": { + "type": "boolean", + "description": "Whether the leaderboard is hidden in listings and reads for non-admins." + } + } + }, + "QueryLeaderboardsEndpoint_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/QueryLeaderboardsEndpoint_Output" } }, "totalPages": { @@ -29960,101 +31453,45 @@ } } }, - "QueryLeaderboardsEndpoint_Output": { + "QueryManagedBenchmarksEndpoint_Output": { "required": [ "id", "name", - "instruction", - "showPrompt", - "showPromptAsset", - "isInversed", - "responseBudget", - "minResponses", - "audienceId", - "featureFlags", - "weight", - "scoreShift", - "scoreScale", - "isHidden" + "isManaged", + "isPublic", + "createdAt", + "ownerMail" ], "type": "object", "properties": { "id": { "type": "string", - "description": "The unique identifier of the leaderboard." + "description": "The unique identifier of the benchmark." }, "name": { "type": "string", - "description": "The name of the leaderboard." - }, - "instruction": { - "type": "string", - "description": "The instruction used when collecting responses." - }, - "showPrompt": { - "type": "boolean", - "description": "Whether the prompt is shown on the rapids." + "description": "The name of the benchmark." }, - "showPromptAsset": { + "isManaged": { "type": "boolean", - "description": "Whether the prompt asset is shown on the rapids." + "description": "Whether the benchmark is managed." }, - "isInversed": { + "isPublic": { "type": "boolean", - "description": "Whether the leaderboard results are inversed." - }, - "responseBudget": { - "type": "integer", - "description": "The response budget per run.", - "format": "int32" - }, - "minResponses": { - "type": "integer", - "description": "The minimum responses collected per comparison.", - "format": "int32" + "description": "Whether the benchmark is public." }, - "audienceId": { + "createdAt": { "type": "string", - "description": "The id of the audience that evaluates the leaderboard." + "description": "The timestamp when the benchmark was created.", + "format": "date-time" }, - "jobDefinitionId": { + "ownerMail": { "type": "string", - "description": "The id of the associated job definition, if any.", - "nullable": true - }, - "featureFlags": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } - } - ], - "description": "Feature flags applied to orders created from this leaderboard." - }, - "weight": { - "type": "number", - "description": "Multiplier applied to every match result from this leaderboard when it contributes to\n the parent benchmark's overall / combined scoreboards.", - "format": "double" - }, - "scoreShift": { - "type": "number", - "description": "Additive offset applied to displayed scores on this leaderboard's per-leaderboard\n scoreboard.", - "format": "double" - }, - "scoreScale": { - "type": "number", - "description": "Multiplicative factor applied to displayed scores (relative to the Bradley-Terry\n center) on this leaderboard's per-leaderboard scoreboard.", - "format": "double" - }, - "isHidden": { - "type": "boolean", - "description": "Whether the leaderboard is hidden in listings and reads for non-admins." + "description": "The mail of the customer owning the benchmark." } } }, - "QueryLeaderboardsEndpoint_PagedResultOfOutput": { + "QueryManagedBenchmarksEndpoint_PagedResultOfOutput": { "required": [ "total", "page", @@ -30078,7 +31515,7 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryLeaderboardsEndpoint_Output" + "$ref": "#/components/schemas/QueryManagedBenchmarksEndpoint_Output" } }, "totalPages": { @@ -30474,6 +31911,15 @@ } } }, + "ReplicateModelParameterType": { + "enum": [ + "String", + "Integer", + "Number", + "Boolean", + "Uri" + ] + }, "RetrySampleGenerationEndpoint_Input": { "type": "object", "properties": { @@ -30542,6 +31988,58 @@ "Cancelled" ] }, + "SearchReplicateModelsEndpoint_Model": { + "required": [ + "modelOwner", + "modelName" + ], + "type": "object", + "properties": { + "modelOwner": { + "type": "string" + }, + "modelName": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "coverImageUrl": { + "type": "string", + "nullable": true + }, + "runCount": { + "type": "integer", + "format": "int64", + "nullable": true + } + } + }, + "SearchReplicateModelsEndpoint_Output": { + "required": [ + "models" + ], + "type": "object", + "properties": { + "models": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchReplicateModelsEndpoint_Model" + } + } + ], + "description": "The matching models for this page." + }, + "nextCursor": { + "type": "string", + "description": "Cursor to fetch the next page, or null when there are no more results.", + "nullable": true + } + } + }, "StandingStatus": { "enum": [ "Created", @@ -30709,6 +32207,14 @@ "name": { "type": "string", "description": "The new name of the participant." + }, + "faucet": { + "allOf": [ + { + "$ref": "#/components/schemas/IFaucetInput" + } + ], + "description": "The faucet to set or replace on the participant." } } }, @@ -31073,6 +32579,11 @@ "type": "integer", "description": "The priority of the job. Higher values mean higher priority. Default is 50.", "format": "int32" + }, + "precedingJobId": { + "type": "string", + "description": "Optional id of a job that must finish before this job starts. When set, this job is\n queued until the preceding job completes or fails.", + "nullable": true } }, "description": "The input for the create job endpoint." @@ -31465,6 +32976,7 @@ "revisionNumber", "pipelineId", "status", + "isPublic", "createdAt", "ownerId", "ownerMail" @@ -31500,6 +33012,10 @@ "type": "string", "description": "The job status." }, + "isPublic": { + "type": "boolean", + "description": "Whether the job (and its results) is shared publicly." + }, "completedAt": { "type": "string", "description": "The timestamp when the job was completed.", @@ -31544,6 +33060,7 @@ "definitionId", "name", "definitionType", + "isPublic", "createdAt", "ownerId", "ownerMail" @@ -31566,6 +33083,10 @@ ], "description": "The type of the job definition." }, + "isPublic": { + "type": "boolean", + "description": "Whether the definition is shared publicly as a reusable template." + }, "createdAt": { "type": "string", "description": "The creation timestamp.", @@ -33286,6 +34807,79 @@ } } }, + "QueryAggregatedJobsEndpoint_Output": { + "required": [ + "amount", + "last7Days", + "lastJobDate", + "lastJobName", + "lastJobId", + "ownerMail" + ], + "type": "object", + "properties": { + "amount": { + "type": "integer", + "description": "The total number of jobs for this customer.", + "format": "int32" + }, + "last7Days": { + "type": "integer", + "description": "The number of jobs created in the last 7 days.", + "format": "int32" + }, + "lastJobDate": { + "type": "string", + "description": "The date of the most recent job.", + "format": "date-time" + }, + "lastJobName": { + "type": "string", + "description": "The name of the most recent job." + }, + "lastJobId": { + "type": "string", + "description": "The ID of the most recent job." + }, + "ownerMail": { + "type": "string", + "description": "The customer's email address." + } + } + }, + "QueryAggregatedJobsEndpoint_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/QueryAggregatedJobsEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, "QueryAggregatedOrdersEndpoint_Output": { "required": [ "amount", @@ -33350,7 +34944,241 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryAggregatedOrdersEndpoint_Output" + "$ref": "#/components/schemas/QueryAggregatedOrdersEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, + "QueryJobDefinitionsEndpoint_Output": { + "required": [ + "definitionId", + "name", + "definitionType", + "createdAt", + "revisionCount", + "ownerId", + "ownerMail" + ], + "type": "object", + "properties": { + "definitionId": { + "type": "string", + "description": "The id of the job definition." + }, + "name": { + "type": "string", + "description": "The name of the job definition." + }, + "definitionType": { + "allOf": [ + { + "$ref": "#/components/schemas/DefinitionType" + } + ], + "description": "The type of the job definition." + }, + "createdAt": { + "type": "string", + "description": "The creation timestamp of the job definition.", + "format": "date-time" + }, + "revisionCount": { + "type": "integer", + "description": "The number of revisions for this job definition.", + "format": "int32" + }, + "ownerId": { + "type": "string", + "description": "The id of the owner of the job definition.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The email of the owner of the job definition." + } + } + }, + "QueryJobDefinitionsEndpoint_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/QueryJobDefinitionsEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, + "QueryJobRevisionsEndpoint_Output": { + "required": [ + "definitionId", + "revisionNumber", + "createdAt", + "state" + ], + "type": "object", + "properties": { + "definitionId": { + "type": "string", + "description": "The id of the job definition this revision belongs to." + }, + "revisionNumber": { + "type": "integer", + "description": "The revision number.", + "format": "int32" + }, + "createdAt": { + "type": "string", + "description": "The timestamp when this revision was created.", + "format": "date-time" + }, + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/JobDefinitionRevisionState" + } + ], + "description": "The current state of the revision." + } + } + }, + "QueryJobRevisionsEndpoint_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/QueryJobRevisionsEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, + "QueryJobsEndpoint_Output": { + "required": [ + "jobId", + "name", + "definitionId", + "audienceId", + "revisionNumber", + "pipelineId", + "status", + "createdAt" + ], + "type": "object", + "properties": { + "jobId": { + "type": "string", + "description": "The id of the job." + }, + "name": { + "type": "string", + "description": "The name of the job." + }, + "definitionId": { + "type": "string", + "description": "The id of the job definition." + }, + "audienceId": { + "type": "string", + "description": "The id of the audience associated with the job." + }, + "revisionNumber": { + "type": "integer", + "description": "The revision number of the job.", + "format": "int32" + }, + "pipelineId": { + "type": "string", + "description": "The id of the pipeline executing the job." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/AudienceJobState" + } + ], + "description": "The current status of the job." + }, + "createdAt": { + "type": "string", + "description": "The timestamp when the job was created.", + "format": "date-time" + } + } + }, + "QueryJobsEndpoint_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/QueryJobsEndpoint_Output" } }, "totalPages": { @@ -33359,56 +35187,60 @@ } } }, - "QueryJobDefinitionsEndpoint_Output": { + "QueryOrdersEndpoint_Output": { "required": [ - "definitionId", - "name", - "definitionType", - "createdAt", - "revisionCount", - "ownerId", - "ownerMail" + "id", + "pipelineId", + "orderDate", + "customerMail", + "state", + "orderName", + "isPublic" ], "type": "object", "properties": { - "definitionId": { + "id": { "type": "string", - "description": "The id of the job definition." + "description": "The unique identifier of the order." }, - "name": { + "pipelineId": { "type": "string", - "description": "The name of the job definition." + "description": "The ID of the pipeline associated with the order." }, - "definitionType": { + "orderDate": { + "type": "string", + "description": "The date the order was placed.", + "format": "date-time", + "nullable": true + }, + "customerMail": { + "type": "string", + "description": "The email of the customer who placed the order." + }, + "state": { "allOf": [ { - "$ref": "#/components/schemas/DefinitionType" + "$ref": "#/components/schemas/OrderState" } ], - "description": "The type of the job definition." + "description": "The current state of the order." }, - "createdAt": { + "orderName": { "type": "string", - "description": "The creation timestamp of the job definition.", - "format": "date-time" - }, - "revisionCount": { - "type": "integer", - "description": "The number of revisions for this job definition.", - "format": "int32" + "description": "The name of the order." }, - "ownerId": { - "type": "string", - "description": "The id of the owner of the job definition.", - "format": "uuid" + "isPublic": { + "type": "boolean", + "description": "Whether the order is publicly visible." }, - "ownerMail": { + "failureMessage": { "type": "string", - "description": "The email of the owner of the job definition." + "description": "The failure message if the order failed.", + "nullable": true } } }, - "QueryJobDefinitionsEndpoint_PagedResultOfOutput": { + "QueryOrdersEndpoint_PagedResultOfOutput": { "required": [ "total", "page", @@ -33432,7 +35264,7 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryJobDefinitionsEndpoint_Output" + "$ref": "#/components/schemas/QueryOrdersEndpoint_Output" } }, "totalPages": { @@ -33441,212 +35273,56 @@ } } }, - "QueryJobRevisionsEndpoint_Output": { + "QueryPublicJobDefinitionsEndpoint_Output": { "required": [ "definitionId", - "revisionNumber", - "createdAt", - "state" - ], - "type": "object", - "properties": { - "definitionId": { - "type": "string", - "description": "The id of the job definition this revision belongs to." - }, - "revisionNumber": { - "type": "integer", - "description": "The revision number.", - "format": "int32" - }, - "createdAt": { - "type": "string", - "description": "The timestamp when this revision was created.", - "format": "date-time" - }, - "state": { - "allOf": [ - { - "$ref": "#/components/schemas/JobDefinitionRevisionState" - } - ], - "description": "The current state of the revision." - } - } - }, - "QueryJobRevisionsEndpoint_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/QueryJobRevisionsEndpoint_Output" - } - }, - "totalPages": { - "type": "integer", - "format": "int32" - } - } - }, - "QueryJobsEndpoint_Output": { - "required": [ - "jobId", "name", - "definitionId", - "audienceId", - "revisionNumber", - "pipelineId", - "status", - "createdAt" + "definitionType", + "createdAt", + "revisionCount", + "ownerId", + "ownerMail" ], "type": "object", "properties": { - "jobId": { - "type": "string", - "description": "The id of the job." - }, - "name": { - "type": "string", - "description": "The name of the job." - }, "definitionId": { "type": "string", "description": "The id of the job definition." }, - "audienceId": { - "type": "string", - "description": "The id of the audience associated with the job." - }, - "revisionNumber": { - "type": "integer", - "description": "The revision number of the job.", - "format": "int32" - }, - "pipelineId": { + "name": { "type": "string", - "description": "The id of the pipeline executing the job." + "description": "The name of the job definition." }, - "status": { + "definitionType": { "allOf": [ { - "$ref": "#/components/schemas/AudienceJobState" + "$ref": "#/components/schemas/DefinitionType" } ], - "description": "The current status of the job." + "description": "The type of the job definition." }, "createdAt": { "type": "string", - "description": "The timestamp when the job was created.", + "description": "The creation timestamp of the job definition.", "format": "date-time" - } - } - }, - "QueryJobsEndpoint_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/QueryJobsEndpoint_Output" - } }, - "totalPages": { + "revisionCount": { "type": "integer", + "description": "The number of revisions for this job definition.", "format": "int32" - } - } - }, - "QueryOrdersEndpoint_Output": { - "required": [ - "id", - "pipelineId", - "orderDate", - "customerMail", - "state", - "orderName", - "isPublic" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the order." - }, - "pipelineId": { - "type": "string", - "description": "The ID of the pipeline associated with the order." - }, - "orderDate": { - "type": "string", - "description": "The date the order was placed.", - "format": "date-time", - "nullable": true }, - "customerMail": { - "type": "string", - "description": "The email of the customer who placed the order." - }, - "state": { - "allOf": [ - { - "$ref": "#/components/schemas/OrderState" - } - ], - "description": "The current state of the order." - }, - "orderName": { + "ownerId": { "type": "string", - "description": "The name of the order." - }, - "isPublic": { - "type": "boolean", - "description": "Whether the order is publicly visible." + "description": "The id of the owner of the job definition.", + "format": "uuid" }, - "failureMessage": { + "ownerMail": { "type": "string", - "description": "The failure message if the order failed.", - "nullable": true + "description": "The email of the owner of the job definition." } } }, - "QueryOrdersEndpoint_PagedResultOfOutput": { + "QueryPublicJobDefinitionsEndpoint_PagedResultOfOutput": { "required": [ "total", "page", @@ -33670,7 +35346,7 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryOrdersEndpoint_Output" + "$ref": "#/components/schemas/QueryPublicJobDefinitionsEndpoint_Output" } }, "totalPages": { @@ -39915,9 +41591,10 @@ "tags": [ "Benchmark", "SampleGeneration", + "Faucet", + "Replicate", "Leaderboard", "Participant", - "Faucet", "Prompt", "Sample" ] diff --git a/openapi/schemas/rapidata.openapi.json b/openapi/schemas/rapidata.openapi.json index b78ca924b..f7b653c42 100644 --- a/openapi/schemas/rapidata.openapi.json +++ b/openapi/schemas/rapidata.openapi.json @@ -103,6 +103,14 @@ "name": "SampleGeneration", "x-displayName": "SampleGeneration" }, + { + "name": "Faucet", + "x-displayName": "Faucet" + }, + { + "name": "Replicate", + "x-displayName": "Replicate" + }, { "name": "Leaderboard", "x-displayName": "Leaderboard" @@ -111,10 +119,6 @@ "name": "Participant", "x-displayName": "Participant" }, - { - "name": "Faucet", - "x-displayName": "Faucet" - }, { "name": "Prompt", "x-displayName": "Prompt" @@ -8978,11 +8982,150 @@ } }, "x-parameter-group": "filters" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryBenchmarksEndpoint_PagedResultOfOutput" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" }, + "403": { + "description": "Forbidden" + } + }, + "security": [ { - "name": "is_managed", + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/benchmark/{benchmarkId}/leaderboards": { + "get": { + "tags": [ + "Benchmark" + ], + "summary": "Queries all leaderboards for the given benchmark.", + "parameters": [ + { + "name": "benchmarkId", + "in": "path", + "description": "The id of the benchmark whose leaderboards will be returned.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "page", "in": "query", - "description": "Filter by is_managed.", + "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": [ + "id", + "-id", + "name", + "-name" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "name": "id", + "in": "query", + "description": "Filter by 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": "name", + "in": "query", + "description": "Filter by name.", "style": "deepObject", "explode": true, "schema": { @@ -9032,7 +9175,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QueryBenchmarksEndpoint_PagedResultOfOutput" + "$ref": "#/components/schemas/QueryLeaderboardsByBenchmarkEndpoint_PagedResultOfOutput" } } } @@ -9066,22 +9209,13 @@ ] } }, - "/benchmark/{benchmarkId}/leaderboards": { + "/benchmarks/managed": { "get": { "tags": [ "Benchmark" ], - "summary": "Queries all leaderboards for the given benchmark.", + "summary": "Queries the curated benchmarks available to every customer.", "parameters": [ - { - "name": "benchmarkId", - "in": "path", - "description": "The id of the benchmark whose leaderboards will be returned.", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "page", "in": "query", @@ -9111,7 +9245,9 @@ "id", "-id", "name", - "-name" + "-name", + "created_at", + "-created_at" ], "type": "string" } @@ -9209,6 +9345,98 @@ } }, "x-parameter-group": "filters" + }, + { + "name": "owner_mail", + "in": "query", + "description": "Filter by owner_mail.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "created_at", + "in": "query", + "description": "Filter by created_at.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" } ], "responses": { @@ -9217,7 +9445,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QueryLeaderboardsByBenchmarkEndpoint_PagedResultOfOutput" + "$ref": "#/components/schemas/QueryManagedBenchmarksEndpoint_PagedResultOfOutput" } } } @@ -9504,6 +9732,140 @@ ] } }, + "/leaderboard/faucet/replicate/models/{modelOwner}/{modelName}": { + "get": { + "tags": [ + "Faucet", + "Replicate" + ], + "summary": "Returns a single Replicate model with its input parameter schema.", + "parameters": [ + { + "name": "modelOwner", + "in": "path", + "description": "The owner of the hosted model.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "modelName", + "in": "path", + "description": "The model name.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetReplicateModelEndpoint_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/faucet/replicate/models": { + "get": { + "tags": [ + "Faucet", + "Replicate" + ], + "summary": "Searches Replicate models by free-text term.", + "description": "Results are cursor-paginated: pass the returned nextCursor back as cursor to\n fetch the next page.", + "parameters": [ + { + "name": "search", + "in": "query", + "description": "The free-text term to search models by.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cursor", + "in": "query", + "description": "Cursor continuing a previous search; omit for the first page.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchReplicateModelsEndpoint_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}/boost": { "post": { "tags": [ @@ -13049,161 +13411,211 @@ ] } }, - "/job/definition": { + "/job/{jobId}/approve": { "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.", + "summary": "Approves a job in manual review so its pipeline can start processing.", "parameters": [ { - "name": "definitionId", + "name": "jobId", "in": "path", - "description": "The id of the job definition to create a revision for.", + "description": "The ID of the job to approve.", "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" - } - } - } + "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", @@ -13780,13 +14192,62 @@ ] } }, - "/job/definitions": { + "/job/{jobId}/pause": { + "post": { + "tags": [ + "Job" + ], + "summary": "Pauses a job, stopping all of its campaigns from processing.", + "parameters": [ + { + "name": "jobId", + "in": "path", + "description": "The ID of the job to pause.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/jobs/aggregated-overview": { "get": { "tags": [ "Job" ], - "summary": "Queries job definitions visible to the caller.", - "description": "Results are scoped to the caller's customer unless the caller is allowed to view all job definitions.", + "summary": "Retrieves jobs aggregated by customer with total counts and most recent job information.", "parameters": [ { "name": "page", @@ -13814,10 +14275,14 @@ "type": "array", "items": { "enum": [ - "name", - "-name", - "created_at", - "-created_at" + "amount", + "-amount", + "last7_days", + "-last7_days", + "last_job_date", + "-last_job_date", + "owner_mail", + "-owner_mail" ], "type": "string" } @@ -13825,55 +14290,9 @@ "x-parameter-group": "sort" }, { - "name": "definition_id", - "in": "query", - "description": "Filter by definition_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": "name", + "name": "owner_mail", "in": "query", - "description": "Filter by name.", + "description": "Filter by owner_mail.", "style": "deepObject", "explode": true, "schema": { @@ -13917,9 +14336,9 @@ "x-parameter-group": "filters" }, { - "name": "definition_type", + "name": "last_job_date", "in": "query", - "description": "Filter by definition_type.", + "description": "Filter by last_job_date.", "style": "deepObject", "explode": true, "schema": { @@ -13963,9 +14382,9 @@ "x-parameter-group": "filters" }, { - "name": "created_at", + "name": "last_job_name", "in": "query", - "description": "Filter by created_at.", + "description": "Filter by last_job_name.", "style": "deepObject", "explode": true, "schema": { @@ -14007,11 +14426,96 @@ } }, "x-parameter-group": "filters" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryAggregatedJobsEndpoint_PagedResultOfOutput" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ { - "name": "owner_id", + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/job/definitions": { + "get": { + "tags": [ + "Job" + ], + "summary": "Queries job definitions visible to the caller.", + "description": "Results are scoped to the caller's customer unless the caller is allowed to view all job definitions.", + "parameters": [ + { + "name": "page", "in": "query", - "description": "Filter by owner_id.", + "description": "The 1-based page index.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "page_size", + "in": "query", + "description": "The number of items per page.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "name", + "-name", + "created_at", + "-created_at" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "name": "definition_id", + "in": "query", + "description": "Filter by definition_id.", "style": "deepObject", "explode": true, "schema": { @@ -14055,9 +14559,9 @@ "x-parameter-group": "filters" }, { - "name": "owner_mail", + "name": "name", "in": "query", - "description": "Filter by owner_mail.", + "description": "Filter by name.", "style": "deepObject", "explode": true, "schema": { @@ -14099,104 +14603,57 @@ } }, "x-parameter-group": "filters" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryJobDefinitionsEndpoint_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" - ] - } - ] - } - }, - "/job/definition/{definitionId}/revisions": { - "get": { - "tags": [ - "Job" - ], - "summary": "Queries the revisions of a specific job definition.", - "parameters": [ - { - "name": "definitionId", - "in": "path", - "description": "The id of the job definition.", - "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", + "name": "definition_type", "in": "query", - "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "description": "Filter by definition_type.", + "style": "deepObject", + "explode": true, "schema": { - "type": "array", - "items": { - "enum": [ - "revision_number", - "-revision_number", - "created_at", - "-created_at" - ], - "type": "string" + "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": "sort" + "x-parameter-group": "filters" }, { - "name": "revision_number", + "name": "created_at", "in": "query", - "description": "Filter by revision_number.", + "description": "Filter by created_at.", "style": "deepObject", "explode": true, "schema": { @@ -14240,9 +14697,9 @@ "x-parameter-group": "filters" }, { - "name": "created_at", + "name": "owner_id", "in": "query", - "description": "Filter by created_at.", + "description": "Filter by owner_id.", "style": "deepObject", "explode": true, "schema": { @@ -14286,9 +14743,9 @@ "x-parameter-group": "filters" }, { - "name": "state", + "name": "owner_mail", "in": "query", - "description": "Filter by state.", + "description": "Filter by owner_mail.", "style": "deepObject", "explode": true, "schema": { @@ -14338,7 +14795,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QueryJobRevisionsEndpoint_PagedResultOfOutput" + "$ref": "#/components/schemas/QueryJobDefinitionsEndpoint_PagedResultOfOutput" } } } @@ -14372,14 +14829,22 @@ ] } }, - "/jobs": { + "/job/definition/{definitionId}/revisions": { "get": { "tags": [ "Job" ], - "summary": "Queries jobs visible to the caller.", - "description": "Results are scoped to the caller's customer unless the caller is allowed to view all jobs.", + "summary": "Queries the revisions of a specific job definition.", "parameters": [ + { + "name": "definitionId", + "in": "path", + "description": "The id of the job definition.", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "page", "in": "query", @@ -14406,12 +14871,10 @@ "type": "array", "items": { "enum": [ - "name", - "-name", + "revision_number", + "-revision_number", "created_at", - "-created_at", - "status", - "-status" + "-created_at" ], "type": "string" } @@ -14419,9 +14882,9 @@ "x-parameter-group": "sort" }, { - "name": "job_id", + "name": "revision_number", "in": "query", - "description": "Filter by job_id.", + "description": "Filter by revision_number.", "style": "deepObject", "explode": true, "schema": { @@ -14465,9 +14928,9 @@ "x-parameter-group": "filters" }, { - "name": "name", + "name": "created_at", "in": "query", - "description": "Filter by name.", + "description": "Filter by created_at.", "style": "deepObject", "explode": true, "schema": { @@ -14511,9 +14974,234 @@ "x-parameter-group": "filters" }, { - "name": "definition_id", + "name": "state", "in": "query", - "description": "Filter by definition_id.", + "description": "Filter by state.", + "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/QueryJobRevisionsEndpoint_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" + ] + } + ] + } + }, + "/jobs": { + "get": { + "tags": [ + "Job" + ], + "summary": "Queries jobs visible to the caller.", + "description": "Results are scoped to the caller's customer unless the caller is allowed to view all jobs.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "The 1-based page index.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "page_size", + "in": "query", + "description": "The number of items per page.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "name", + "-name", + "created_at", + "-created_at", + "status", + "-status" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "name": "job_id", + "in": "query", + "description": "Filter by job_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": "name", + "in": "query", + "description": "Filter by name.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "definition_id", + "in": "query", + "description": "Filter by definition_id.", "style": "deepObject", "explode": true, "schema": { @@ -14735,6 +15423,584 @@ ] } }, + "/job/definitions/public": { + "get": { + "tags": [ + "Job" + ], + "summary": "Queries job definitions that have been shared publicly, regardless of owner, so they can be\n reused as templates.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "The 1-based page index.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "page_size", + "in": "query", + "description": "The number of items per page.", + "schema": { + "type": "integer" + }, + "x-parameter-group": "page" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "name", + "-name", + "created_at", + "-created_at" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" + }, + { + "name": "definition_id", + "in": "query", + "description": "Filter by definition_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": "name", + "in": "query", + "description": "Filter by name.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "definition_type", + "in": "query", + "description": "Filter by definition_type.", + "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" + }, + { + "name": "owner_id", + "in": "query", + "description": "Filter by owner_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": "owner_mail", + "in": "query", + "description": "Filter by owner_mail.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "string" + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryPublicJobDefinitionsEndpoint_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" + ] + } + ] + } + }, + "/job/{jobId}/resume": { + "post": { + "tags": [ + "Job" + ], + "summary": "Resumes a job, restarting all of its campaigns.", + "parameters": [ + { + "name": "jobId", + "in": "path", + "description": "The ID of the job to resume.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/job/{jobId}/retry": { + "post": { + "tags": [ + "Job" + ], + "summary": "Retries processing of a failed job.", + "parameters": [ + { + "name": "jobId", + "in": "path", + "description": "The ID of the job to retry.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + ] + } + }, + "/job/definition/{definitionId}/share": { + "patch": { + "tags": [ + "Job" + ], + "summary": "Marks or unmarks a job definition as a public template that other users can discover and run.", + "parameters": [ + { + "name": "definitionId", + "in": "path", + "description": "The ID of the job definition.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "isPublic", + "in": "query", + "description": "Whether to mark or unmark the definition as public.", + "schema": { + "type": "boolean", + "default": 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/{jobId}/share": { + "patch": { + "tags": [ + "Job" + ], + "summary": "Marks or unmarks a job as public so its results can be shared with other users.", + "parameters": [ + { + "name": "jobId", + "in": "path", + "description": "The ID of the job.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "isPublic", + "in": "query", + "description": "Whether to mark or unmark the job as public.", + "schema": { + "type": "boolean", + "default": 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" + ] + } + ] + } + }, "/order/{orderId}/approve": { "post": { "tags": [ @@ -26152,7 +27418,7 @@ }, "timeToLiveInSeconds": { "type": "integer", - "description": "Optional time-to-live in seconds before the flow item expires.", + "description": "Optional time-to-live in seconds before the flow item expires. Must be between 60 seconds and 1 hour; defaults to 1 hour when omitted.", "format": "int32", "nullable": true }, @@ -28791,6 +30057,106 @@ } } }, + "GetReplicateModelEndpoint_Output": { + "required": [ + "modelOwner", + "modelName", + "parameters" + ], + "type": "object", + "properties": { + "modelOwner": { + "type": "string", + "description": "The owner of the hosted model." + }, + "modelName": { + "type": "string", + "description": "The model name." + }, + "description": { + "type": "string", + "description": "A short description of the model.", + "nullable": true + }, + "coverImageUrl": { + "type": "string", + "description": "URL of a representative cover image, if available.", + "nullable": true + }, + "runCount": { + "type": "integer", + "description": "Total number of times the model has been run on Replicate, if known.", + "format": "int64", + "nullable": true + }, + "latestVersion": { + "type": "string", + "description": "The model's latest version id, if reported by Replicate.", + "nullable": true + }, + "parameters": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetReplicateModelEndpoint_Parameter" + } + } + ], + "description": "The model's configurable input parameters, ordered for rendering." + } + } + }, + "GetReplicateModelEndpoint_Parameter": { + "required": [ + "key", + "type", + "required", + "enumValues" + ], + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "title": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/ReplicateModelParameterType" + }, + "required": { + "type": "boolean" + }, + "default": {}, + "enumValues": { + "type": "array", + "items": { + "type": "string" + } + }, + "minimum": { + "type": "number", + "format": "double", + "nullable": true + }, + "maximum": { + "type": "number", + "format": "double", + "nullable": true + }, + "order": { + "type": "integer", + "format": "int32", + "nullable": true + } + } + }, "GetSampleByIdEndpoint_Output": { "required": [ "id", @@ -29874,134 +31240,261 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryLeaderboardRunsEndpoint_Output" - } - }, - "totalPages": { - "type": "integer", - "format": "int32" - } - } - }, - "QueryLeaderboardsByBenchmarkEndpoint_Output": { - "required": [ - "id", - "name", - "instruction", - "showPrompt", - "showPromptAsset", - "isInversed", - "responseBudget", - "minResponses", - "audienceId", - "featureFlags", - "weight", - "scoreShift", - "scoreScale", - "isHidden" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the leaderboard." - }, - "name": { - "type": "string", - "description": "The name of the leaderboard." - }, - "instruction": { - "type": "string", - "description": "The instruction shown on the leaderboard." - }, - "showPrompt": { - "type": "boolean", - "description": "Whether the prompt text is shown." - }, - "showPromptAsset": { - "type": "boolean", - "description": "Whether the prompt asset is shown." - }, - "isInversed": { - "type": "boolean", - "description": "Whether the leaderboard's scoring is inversed." - }, - "responseBudget": { - "type": "integer", - "description": "The response budget for the leaderboard.", - "format": "int32" - }, - "minResponses": { - "type": "integer", - "description": "The minimum number of responses for the leaderboard.", - "format": "int32" - }, - "audienceId": { - "type": "string", - "description": "The id of the audience assigned to the leaderboard." - }, - "jobDefinitionId": { - "type": "string", - "description": "The id of the job definition assigned to the leaderboard, if any.", - "nullable": true - }, - "featureFlags": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } - } - ], - "description": "The feature flags enabled for the leaderboard." - }, - "weight": { - "type": "number", - "description": "Multiplier applied to every match result from this leaderboard when it contributes to\n the parent benchmark's overall / combined scoreboards.", - "format": "double" - }, - "scoreShift": { - "type": "number", - "description": "Additive offset applied to displayed scores on this leaderboard's per-leaderboard\n scoreboard.", - "format": "double" - }, - "scoreScale": { - "type": "number", - "description": "Multiplicative factor applied to displayed scores (relative to the Bradley-Terry\n center) on this leaderboard's per-leaderboard scoreboard.", - "format": "double" - }, - "isHidden": { - "type": "boolean", - "description": "Whether the leaderboard is hidden in listings and reads for non-admins." - } - } - }, - "QueryLeaderboardsByBenchmarkEndpoint_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/QueryLeaderboardsByBenchmarkEndpoint_Output" + "$ref": "#/components/schemas/QueryLeaderboardRunsEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, + "QueryLeaderboardsByBenchmarkEndpoint_Output": { + "required": [ + "id", + "name", + "instruction", + "showPrompt", + "showPromptAsset", + "isInversed", + "responseBudget", + "minResponses", + "audienceId", + "featureFlags", + "weight", + "scoreShift", + "scoreScale", + "isHidden" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the leaderboard." + }, + "name": { + "type": "string", + "description": "The name of the leaderboard." + }, + "instruction": { + "type": "string", + "description": "The instruction shown on the leaderboard." + }, + "showPrompt": { + "type": "boolean", + "description": "Whether the prompt text is shown." + }, + "showPromptAsset": { + "type": "boolean", + "description": "Whether the prompt asset is shown." + }, + "isInversed": { + "type": "boolean", + "description": "Whether the leaderboard's scoring is inversed." + }, + "responseBudget": { + "type": "integer", + "description": "The response budget for the leaderboard.", + "format": "int32" + }, + "minResponses": { + "type": "integer", + "description": "The minimum number of responses for the leaderboard.", + "format": "int32" + }, + "audienceId": { + "type": "string", + "description": "The id of the audience assigned to the leaderboard." + }, + "jobDefinitionId": { + "type": "string", + "description": "The id of the job definition assigned to the leaderboard, if any.", + "nullable": true + }, + "featureFlags": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } + } + ], + "description": "The feature flags enabled for the leaderboard." + }, + "weight": { + "type": "number", + "description": "Multiplier applied to every match result from this leaderboard when it contributes to\n the parent benchmark's overall / combined scoreboards.", + "format": "double" + }, + "scoreShift": { + "type": "number", + "description": "Additive offset applied to displayed scores on this leaderboard's per-leaderboard\n scoreboard.", + "format": "double" + }, + "scoreScale": { + "type": "number", + "description": "Multiplicative factor applied to displayed scores (relative to the Bradley-Terry\n center) on this leaderboard's per-leaderboard scoreboard.", + "format": "double" + }, + "isHidden": { + "type": "boolean", + "description": "Whether the leaderboard is hidden in listings and reads for non-admins." + } + } + }, + "QueryLeaderboardsByBenchmarkEndpoint_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/QueryLeaderboardsByBenchmarkEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, + "QueryLeaderboardsEndpoint_Output": { + "required": [ + "id", + "name", + "instruction", + "showPrompt", + "showPromptAsset", + "isInversed", + "responseBudget", + "minResponses", + "audienceId", + "featureFlags", + "weight", + "scoreShift", + "scoreScale", + "isHidden" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the leaderboard." + }, + "name": { + "type": "string", + "description": "The name of the leaderboard." + }, + "instruction": { + "type": "string", + "description": "The instruction used when collecting responses." + }, + "showPrompt": { + "type": "boolean", + "description": "Whether the prompt is shown on the rapids." + }, + "showPromptAsset": { + "type": "boolean", + "description": "Whether the prompt asset is shown on the rapids." + }, + "isInversed": { + "type": "boolean", + "description": "Whether the leaderboard results are inversed." + }, + "responseBudget": { + "type": "integer", + "description": "The response budget per run.", + "format": "int32" + }, + "minResponses": { + "type": "integer", + "description": "The minimum responses collected per comparison.", + "format": "int32" + }, + "audienceId": { + "type": "string", + "description": "The id of the audience that evaluates the leaderboard." + }, + "jobDefinitionId": { + "type": "string", + "description": "The id of the associated job definition, if any.", + "nullable": true + }, + "featureFlags": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } + } + ], + "description": "Feature flags applied to orders created from this leaderboard." + }, + "weight": { + "type": "number", + "description": "Multiplier applied to every match result from this leaderboard when it contributes to\n the parent benchmark's overall / combined scoreboards.", + "format": "double" + }, + "scoreShift": { + "type": "number", + "description": "Additive offset applied to displayed scores on this leaderboard's per-leaderboard\n scoreboard.", + "format": "double" + }, + "scoreScale": { + "type": "number", + "description": "Multiplicative factor applied to displayed scores (relative to the Bradley-Terry\n center) on this leaderboard's per-leaderboard scoreboard.", + "format": "double" + }, + "isHidden": { + "type": "boolean", + "description": "Whether the leaderboard is hidden in listings and reads for non-admins." + } + } + }, + "QueryLeaderboardsEndpoint_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/QueryLeaderboardsEndpoint_Output" } }, "totalPages": { @@ -30010,101 +31503,45 @@ } } }, - "QueryLeaderboardsEndpoint_Output": { + "QueryManagedBenchmarksEndpoint_Output": { "required": [ "id", "name", - "instruction", - "showPrompt", - "showPromptAsset", - "isInversed", - "responseBudget", - "minResponses", - "audienceId", - "featureFlags", - "weight", - "scoreShift", - "scoreScale", - "isHidden" + "isManaged", + "isPublic", + "createdAt", + "ownerMail" ], "type": "object", "properties": { "id": { "type": "string", - "description": "The unique identifier of the leaderboard." + "description": "The unique identifier of the benchmark." }, "name": { "type": "string", - "description": "The name of the leaderboard." - }, - "instruction": { - "type": "string", - "description": "The instruction used when collecting responses." - }, - "showPrompt": { - "type": "boolean", - "description": "Whether the prompt is shown on the rapids." + "description": "The name of the benchmark." }, - "showPromptAsset": { + "isManaged": { "type": "boolean", - "description": "Whether the prompt asset is shown on the rapids." + "description": "Whether the benchmark is managed." }, - "isInversed": { + "isPublic": { "type": "boolean", - "description": "Whether the leaderboard results are inversed." - }, - "responseBudget": { - "type": "integer", - "description": "The response budget per run.", - "format": "int32" - }, - "minResponses": { - "type": "integer", - "description": "The minimum responses collected per comparison.", - "format": "int32" + "description": "Whether the benchmark is public." }, - "audienceId": { + "createdAt": { "type": "string", - "description": "The id of the audience that evaluates the leaderboard." + "description": "The timestamp when the benchmark was created.", + "format": "date-time" }, - "jobDefinitionId": { + "ownerMail": { "type": "string", - "description": "The id of the associated job definition, if any.", - "nullable": true - }, - "featureFlags": { - "allOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeatureFlag" - } - } - ], - "description": "Feature flags applied to orders created from this leaderboard." - }, - "weight": { - "type": "number", - "description": "Multiplier applied to every match result from this leaderboard when it contributes to\n the parent benchmark's overall / combined scoreboards.", - "format": "double" - }, - "scoreShift": { - "type": "number", - "description": "Additive offset applied to displayed scores on this leaderboard's per-leaderboard\n scoreboard.", - "format": "double" - }, - "scoreScale": { - "type": "number", - "description": "Multiplicative factor applied to displayed scores (relative to the Bradley-Terry\n center) on this leaderboard's per-leaderboard scoreboard.", - "format": "double" - }, - "isHidden": { - "type": "boolean", - "description": "Whether the leaderboard is hidden in listings and reads for non-admins." + "description": "The mail of the customer owning the benchmark." } } }, - "QueryLeaderboardsEndpoint_PagedResultOfOutput": { + "QueryManagedBenchmarksEndpoint_PagedResultOfOutput": { "required": [ "total", "page", @@ -30128,7 +31565,7 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryLeaderboardsEndpoint_Output" + "$ref": "#/components/schemas/QueryManagedBenchmarksEndpoint_Output" } }, "totalPages": { @@ -30524,6 +31961,15 @@ } } }, + "ReplicateModelParameterType": { + "enum": [ + "String", + "Integer", + "Number", + "Boolean", + "Uri" + ] + }, "RetrySampleGenerationEndpoint_Input": { "type": "object", "properties": { @@ -30592,6 +32038,58 @@ "Cancelled" ] }, + "SearchReplicateModelsEndpoint_Model": { + "required": [ + "modelOwner", + "modelName" + ], + "type": "object", + "properties": { + "modelOwner": { + "type": "string" + }, + "modelName": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "coverImageUrl": { + "type": "string", + "nullable": true + }, + "runCount": { + "type": "integer", + "format": "int64", + "nullable": true + } + } + }, + "SearchReplicateModelsEndpoint_Output": { + "required": [ + "models" + ], + "type": "object", + "properties": { + "models": { + "allOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchReplicateModelsEndpoint_Model" + } + } + ], + "description": "The matching models for this page." + }, + "nextCursor": { + "type": "string", + "description": "Cursor to fetch the next page, or null when there are no more results.", + "nullable": true + } + } + }, "StandingStatus": { "enum": [ "Created", @@ -30759,6 +32257,14 @@ "name": { "type": "string", "description": "The new name of the participant." + }, + "faucet": { + "allOf": [ + { + "$ref": "#/components/schemas/IFaucetInput" + } + ], + "description": "The faucet to set or replace on the participant." } } }, @@ -31123,6 +32629,11 @@ "type": "integer", "description": "The priority of the job. Higher values mean higher priority. Default is 50.", "format": "int32" + }, + "precedingJobId": { + "type": "string", + "description": "Optional id of a job that must finish before this job starts. When set, this job is\n queued until the preceding job completes or fails.", + "nullable": true } }, "description": "The input for the create job endpoint." @@ -31515,6 +33026,7 @@ "revisionNumber", "pipelineId", "status", + "isPublic", "createdAt", "ownerId", "ownerMail" @@ -31550,6 +33062,10 @@ "type": "string", "description": "The job status." }, + "isPublic": { + "type": "boolean", + "description": "Whether the job (and its results) is shared publicly." + }, "completedAt": { "type": "string", "description": "The timestamp when the job was completed.", @@ -31594,6 +33110,7 @@ "definitionId", "name", "definitionType", + "isPublic", "createdAt", "ownerId", "ownerMail" @@ -31616,6 +33133,10 @@ ], "description": "The type of the job definition." }, + "isPublic": { + "type": "boolean", + "description": "Whether the definition is shared publicly as a reusable template." + }, "createdAt": { "type": "string", "description": "The creation timestamp.", @@ -33336,6 +34857,79 @@ } } }, + "QueryAggregatedJobsEndpoint_Output": { + "required": [ + "amount", + "last7Days", + "lastJobDate", + "lastJobName", + "lastJobId", + "ownerMail" + ], + "type": "object", + "properties": { + "amount": { + "type": "integer", + "description": "The total number of jobs for this customer.", + "format": "int32" + }, + "last7Days": { + "type": "integer", + "description": "The number of jobs created in the last 7 days.", + "format": "int32" + }, + "lastJobDate": { + "type": "string", + "description": "The date of the most recent job.", + "format": "date-time" + }, + "lastJobName": { + "type": "string", + "description": "The name of the most recent job." + }, + "lastJobId": { + "type": "string", + "description": "The ID of the most recent job." + }, + "ownerMail": { + "type": "string", + "description": "The customer's email address." + } + } + }, + "QueryAggregatedJobsEndpoint_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/QueryAggregatedJobsEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, "QueryAggregatedOrdersEndpoint_Output": { "required": [ "amount", @@ -33400,7 +34994,241 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryAggregatedOrdersEndpoint_Output" + "$ref": "#/components/schemas/QueryAggregatedOrdersEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, + "QueryJobDefinitionsEndpoint_Output": { + "required": [ + "definitionId", + "name", + "definitionType", + "createdAt", + "revisionCount", + "ownerId", + "ownerMail" + ], + "type": "object", + "properties": { + "definitionId": { + "type": "string", + "description": "The id of the job definition." + }, + "name": { + "type": "string", + "description": "The name of the job definition." + }, + "definitionType": { + "allOf": [ + { + "$ref": "#/components/schemas/DefinitionType" + } + ], + "description": "The type of the job definition." + }, + "createdAt": { + "type": "string", + "description": "The creation timestamp of the job definition.", + "format": "date-time" + }, + "revisionCount": { + "type": "integer", + "description": "The number of revisions for this job definition.", + "format": "int32" + }, + "ownerId": { + "type": "string", + "description": "The id of the owner of the job definition.", + "format": "uuid" + }, + "ownerMail": { + "type": "string", + "description": "The email of the owner of the job definition." + } + } + }, + "QueryJobDefinitionsEndpoint_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/QueryJobDefinitionsEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, + "QueryJobRevisionsEndpoint_Output": { + "required": [ + "definitionId", + "revisionNumber", + "createdAt", + "state" + ], + "type": "object", + "properties": { + "definitionId": { + "type": "string", + "description": "The id of the job definition this revision belongs to." + }, + "revisionNumber": { + "type": "integer", + "description": "The revision number.", + "format": "int32" + }, + "createdAt": { + "type": "string", + "description": "The timestamp when this revision was created.", + "format": "date-time" + }, + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/JobDefinitionRevisionState" + } + ], + "description": "The current state of the revision." + } + } + }, + "QueryJobRevisionsEndpoint_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/QueryJobRevisionsEndpoint_Output" + } + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, + "QueryJobsEndpoint_Output": { + "required": [ + "jobId", + "name", + "definitionId", + "audienceId", + "revisionNumber", + "pipelineId", + "status", + "createdAt" + ], + "type": "object", + "properties": { + "jobId": { + "type": "string", + "description": "The id of the job." + }, + "name": { + "type": "string", + "description": "The name of the job." + }, + "definitionId": { + "type": "string", + "description": "The id of the job definition." + }, + "audienceId": { + "type": "string", + "description": "The id of the audience associated with the job." + }, + "revisionNumber": { + "type": "integer", + "description": "The revision number of the job.", + "format": "int32" + }, + "pipelineId": { + "type": "string", + "description": "The id of the pipeline executing the job." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/AudienceJobState" + } + ], + "description": "The current status of the job." + }, + "createdAt": { + "type": "string", + "description": "The timestamp when the job was created.", + "format": "date-time" + } + } + }, + "QueryJobsEndpoint_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/QueryJobsEndpoint_Output" } }, "totalPages": { @@ -33409,56 +35237,60 @@ } } }, - "QueryJobDefinitionsEndpoint_Output": { + "QueryOrdersEndpoint_Output": { "required": [ - "definitionId", - "name", - "definitionType", - "createdAt", - "revisionCount", - "ownerId", - "ownerMail" + "id", + "pipelineId", + "orderDate", + "customerMail", + "state", + "orderName", + "isPublic" ], "type": "object", "properties": { - "definitionId": { + "id": { "type": "string", - "description": "The id of the job definition." + "description": "The unique identifier of the order." }, - "name": { + "pipelineId": { "type": "string", - "description": "The name of the job definition." + "description": "The ID of the pipeline associated with the order." }, - "definitionType": { + "orderDate": { + "type": "string", + "description": "The date the order was placed.", + "format": "date-time", + "nullable": true + }, + "customerMail": { + "type": "string", + "description": "The email of the customer who placed the order." + }, + "state": { "allOf": [ { - "$ref": "#/components/schemas/DefinitionType" + "$ref": "#/components/schemas/OrderState" } ], - "description": "The type of the job definition." + "description": "The current state of the order." }, - "createdAt": { + "orderName": { "type": "string", - "description": "The creation timestamp of the job definition.", - "format": "date-time" - }, - "revisionCount": { - "type": "integer", - "description": "The number of revisions for this job definition.", - "format": "int32" + "description": "The name of the order." }, - "ownerId": { - "type": "string", - "description": "The id of the owner of the job definition.", - "format": "uuid" + "isPublic": { + "type": "boolean", + "description": "Whether the order is publicly visible." }, - "ownerMail": { + "failureMessage": { "type": "string", - "description": "The email of the owner of the job definition." + "description": "The failure message if the order failed.", + "nullable": true } } }, - "QueryJobDefinitionsEndpoint_PagedResultOfOutput": { + "QueryOrdersEndpoint_PagedResultOfOutput": { "required": [ "total", "page", @@ -33482,7 +35314,7 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryJobDefinitionsEndpoint_Output" + "$ref": "#/components/schemas/QueryOrdersEndpoint_Output" } }, "totalPages": { @@ -33491,212 +35323,56 @@ } } }, - "QueryJobRevisionsEndpoint_Output": { + "QueryPublicJobDefinitionsEndpoint_Output": { "required": [ "definitionId", - "revisionNumber", - "createdAt", - "state" - ], - "type": "object", - "properties": { - "definitionId": { - "type": "string", - "description": "The id of the job definition this revision belongs to." - }, - "revisionNumber": { - "type": "integer", - "description": "The revision number.", - "format": "int32" - }, - "createdAt": { - "type": "string", - "description": "The timestamp when this revision was created.", - "format": "date-time" - }, - "state": { - "allOf": [ - { - "$ref": "#/components/schemas/JobDefinitionRevisionState" - } - ], - "description": "The current state of the revision." - } - } - }, - "QueryJobRevisionsEndpoint_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/QueryJobRevisionsEndpoint_Output" - } - }, - "totalPages": { - "type": "integer", - "format": "int32" - } - } - }, - "QueryJobsEndpoint_Output": { - "required": [ - "jobId", "name", - "definitionId", - "audienceId", - "revisionNumber", - "pipelineId", - "status", - "createdAt" + "definitionType", + "createdAt", + "revisionCount", + "ownerId", + "ownerMail" ], "type": "object", "properties": { - "jobId": { - "type": "string", - "description": "The id of the job." - }, - "name": { - "type": "string", - "description": "The name of the job." - }, "definitionId": { "type": "string", "description": "The id of the job definition." }, - "audienceId": { - "type": "string", - "description": "The id of the audience associated with the job." - }, - "revisionNumber": { - "type": "integer", - "description": "The revision number of the job.", - "format": "int32" - }, - "pipelineId": { + "name": { "type": "string", - "description": "The id of the pipeline executing the job." + "description": "The name of the job definition." }, - "status": { + "definitionType": { "allOf": [ { - "$ref": "#/components/schemas/AudienceJobState" + "$ref": "#/components/schemas/DefinitionType" } ], - "description": "The current status of the job." + "description": "The type of the job definition." }, "createdAt": { "type": "string", - "description": "The timestamp when the job was created.", + "description": "The creation timestamp of the job definition.", "format": "date-time" - } - } - }, - "QueryJobsEndpoint_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/QueryJobsEndpoint_Output" - } }, - "totalPages": { + "revisionCount": { "type": "integer", + "description": "The number of revisions for this job definition.", "format": "int32" - } - } - }, - "QueryOrdersEndpoint_Output": { - "required": [ - "id", - "pipelineId", - "orderDate", - "customerMail", - "state", - "orderName", - "isPublic" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the order." - }, - "pipelineId": { - "type": "string", - "description": "The ID of the pipeline associated with the order." - }, - "orderDate": { - "type": "string", - "description": "The date the order was placed.", - "format": "date-time", - "nullable": true }, - "customerMail": { - "type": "string", - "description": "The email of the customer who placed the order." - }, - "state": { - "allOf": [ - { - "$ref": "#/components/schemas/OrderState" - } - ], - "description": "The current state of the order." - }, - "orderName": { + "ownerId": { "type": "string", - "description": "The name of the order." - }, - "isPublic": { - "type": "boolean", - "description": "Whether the order is publicly visible." + "description": "The id of the owner of the job definition.", + "format": "uuid" }, - "failureMessage": { + "ownerMail": { "type": "string", - "description": "The failure message if the order failed.", - "nullable": true + "description": "The email of the owner of the job definition." } } }, - "QueryOrdersEndpoint_PagedResultOfOutput": { + "QueryPublicJobDefinitionsEndpoint_PagedResultOfOutput": { "required": [ "total", "page", @@ -33720,7 +35396,7 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryOrdersEndpoint_Output" + "$ref": "#/components/schemas/QueryPublicJobDefinitionsEndpoint_Output" } }, "totalPages": { @@ -39965,9 +41641,10 @@ "tags": [ "Benchmark", "SampleGeneration", + "Faucet", + "Replicate", "Leaderboard", "Participant", - "Faucet", "Prompt", "Sample" ] diff --git a/src/rapidata/api_client/__init__.py b/src/rapidata/api_client/__init__.py index 6ed73c663..1b3e0a21e 100644 --- a/src/rapidata/api_client/__init__.py +++ b/src/rapidata/api_client/__init__.py @@ -64,6 +64,7 @@ "RankingFlowItemApi": "rapidata.api_client.api.ranking_flow_item_api", "RapidApi": "rapidata.api_client.api.rapid_api", "RapidataIdentityAPIApi": "rapidata.api_client.api.rapidata_identity_api_api", + "ReplicateApi": "rapidata.api_client.api.replicate_api", "SampleApi": "rapidata.api_client.api.sample_api", "SampleGenerationApi": "rapidata.api_client.api.sample_generation_api", "SimpleWorkflowApi": "rapidata.api_client.api.simple_workflow_api", diff --git a/src/rapidata/api_client/api/__init__.py b/src/rapidata/api_client/api/__init__.py index ef0051ce0..74fb7d88c 100644 --- a/src/rapidata/api_client/api/__init__.py +++ b/src/rapidata/api_client/api/__init__.py @@ -36,6 +36,7 @@ from rapidata.api_client.api.ranking_flow_item_api import RankingFlowItemApi 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.replicate_api import ReplicateApi 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 diff --git a/src/rapidata/api_client/api/benchmark_api.py b/src/rapidata/api_client/api/benchmark_api.py index 66bd55456..33d012dea 100644 --- a/src/rapidata/api_client/api/benchmark_api.py +++ b/src/rapidata/api_client/api/benchmark_api.py @@ -36,6 +36,7 @@ from rapidata.api_client.models.query_benchmark_standings_endpoint_paged_result_of_output import QueryBenchmarkStandingsEndpointPagedResultOfOutput from rapidata.api_client.models.query_benchmarks_endpoint_paged_result_of_output import QueryBenchmarksEndpointPagedResultOfOutput from rapidata.api_client.models.query_leaderboards_by_benchmark_endpoint_paged_result_of_output import QueryLeaderboardsByBenchmarkEndpointPagedResultOfOutput +from rapidata.api_client.models.query_managed_benchmarks_endpoint_paged_result_of_output import QueryManagedBenchmarksEndpointPagedResultOfOutput from rapidata.api_client.models.query_participants_by_benchmark_endpoint_paged_result_of_output import QueryParticipantsByBenchmarkEndpointPagedResultOfOutput from rapidata.api_client.models.query_tags_by_benchmark_endpoint_output import QueryTagsByBenchmarkEndpointOutput from rapidata.api_client.models.submit_participant_by_benchmark_endpoint_output import SubmitParticipantByBenchmarkEndpointOutput @@ -5849,7 +5850,6 @@ 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)], @@ -5880,8 +5880,6 @@ 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 @@ -5912,7 +5910,6 @@ 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, @@ -5946,7 +5943,6 @@ 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)], @@ -5977,8 +5973,6 @@ 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 @@ -6009,7 +6003,6 @@ 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, @@ -6043,7 +6036,6 @@ 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)], @@ -6074,8 +6066,6 @@ 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 @@ -6106,7 +6096,6 @@ 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, @@ -6135,7 +6124,6 @@ def _benchmarks_get_serialize( name, owner_mail, created_at, - is_managed, _request_auth, _content_type, _headers, @@ -6203,14 +6191,394 @@ 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 + # 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='/benchmarks', + 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 benchmarks_managed_get( + self, + page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, + sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, + id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by id.")] = None, + 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, + _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, + ) -> QueryManagedBenchmarksEndpointPagedResultOfOutput: + """Queries the curated benchmarks available to every customer. + + + :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 id: Filter by id. + :type id: AudienceAudienceIdJobsGetJobIdParameter + :param name: Filter by name. + :type name: AudienceAudienceIdJobsGetJobIdParameter + :param owner_mail: Filter by owner_mail. + :type owner_mail: 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._benchmarks_managed_get_serialize( + page=page, + page_size=page_size, + sort=sort, + id=id, + name=name, + owner_mail=owner_mail, + 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': "QueryManagedBenchmarksEndpointPagedResultOfOutput", + '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 benchmarks_managed_get_with_http_info( + self, + page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, + sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, + id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by id.")] = None, + 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, + _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[QueryManagedBenchmarksEndpointPagedResultOfOutput]: + """Queries the curated benchmarks available to every customer. + + + :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 id: Filter by id. + :type id: AudienceAudienceIdJobsGetJobIdParameter + :param name: Filter by name. + :type name: AudienceAudienceIdJobsGetJobIdParameter + :param owner_mail: Filter by owner_mail. + :type owner_mail: 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._benchmarks_managed_get_serialize( + page=page, + page_size=page_size, + sort=sort, + id=id, + name=name, + owner_mail=owner_mail, + 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': "QueryManagedBenchmarksEndpointPagedResultOfOutput", + '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 benchmarks_managed_get_without_preload_content( + self, + page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, + sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, + id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by id.")] = None, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Queries the curated benchmarks available to every customer. + + + :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 id: Filter by id. + :type id: AudienceAudienceIdJobsGetJobIdParameter + :param name: Filter by name. + :type name: AudienceAudienceIdJobsGetJobIdParameter + :param owner_mail: Filter by owner_mail. + :type owner_mail: 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._benchmarks_managed_get_serialize( + page=page, + page_size=page_size, + sort=sort, + id=id, + name=name, + owner_mail=owner_mail, + 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': "QueryManagedBenchmarksEndpointPagedResultOfOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _benchmarks_managed_get_serialize( + self, + page, + page_size, + sort, + id, + name, + owner_mail, + 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 + # 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 id is not None: + _param_val = 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(('id[' + _k + ']', _v)) + if name is not None: + _param_val = name if hasattr(_param_val, 'to_dict'): _param_val = _param_val.to_dict() if isinstance(_param_val, dict): for _k, _v in _param_val.items(): if _v is not None: - _query_params.append(('is_managed[' + _k + ']', _v)) + _query_params.append(('name[' + _k + ']', _v)) + if owner_mail is not None: + _param_val = owner_mail + if hasattr(_param_val, 'to_dict'): + _param_val = _param_val.to_dict() + if isinstance(_param_val, dict): + for _k, _v in _param_val.items(): + if _v is not None: + _query_params.append(('owner_mail[' + _k + ']', _v)) + if created_at is not None: + _param_val = created_at + if hasattr(_param_val, 'to_dict'): + _param_val = _param_val.to_dict() + if isinstance(_param_val, dict): + for _k, _v in _param_val.items(): + if _v is not None: + _query_params.append(('created_at[' + _k + ']', _v)) # process the header parameters # process the form parameters # process the body parameter @@ -6232,7 +6600,7 @@ def _benchmarks_get_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/benchmarks', + resource_path='/benchmarks/managed', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/src/rapidata/api_client/api/faucet_api.py b/src/rapidata/api_client/api/faucet_api.py index a7ab2efdd..99e00ee77 100644 --- a/src/rapidata/api_client/api/faucet_api.py +++ b/src/rapidata/api_client/api/faucet_api.py @@ -17,8 +17,11 @@ from typing_extensions import Annotated from pydantic import Field, StrictStr +from typing import Optional from typing_extensions import Annotated +from rapidata.api_client.models.get_replicate_model_endpoint_output import GetReplicateModelEndpointOutput from rapidata.api_client.models.i_faucet_input import IFaucetInput +from rapidata.api_client.models.search_replicate_models_endpoint_output import SearchReplicateModelsEndpointOutput from rapidata.api_client.api_client import ApiClient, RequestSerialized from rapidata.api_client.api_response import ApiResponse @@ -38,6 +41,577 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client + @validate_call + def leaderboard_faucet_replicate_models_get( + self, + search: Annotated[StrictStr, Field(description="The free-text term to search models by.")], + cursor: Annotated[Optional[StrictStr], Field(description="Cursor continuing a previous search; omit for the first page.")] = 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, + ) -> SearchReplicateModelsEndpointOutput: + """Searches Replicate models by free-text term. + + Results are cursor-paginated: pass the returned nextCursor back as cursor to fetch the next page. + + :param search: The free-text term to search models by. (required) + :type search: str + :param cursor: Cursor continuing a previous search; omit for the first page. + :type cursor: 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._leaderboard_faucet_replicate_models_get_serialize( + search=search, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SearchReplicateModelsEndpointOutput", + '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 leaderboard_faucet_replicate_models_get_with_http_info( + self, + search: Annotated[StrictStr, Field(description="The free-text term to search models by.")], + cursor: Annotated[Optional[StrictStr], Field(description="Cursor continuing a previous search; omit for the first page.")] = 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[SearchReplicateModelsEndpointOutput]: + """Searches Replicate models by free-text term. + + Results are cursor-paginated: pass the returned nextCursor back as cursor to fetch the next page. + + :param search: The free-text term to search models by. (required) + :type search: str + :param cursor: Cursor continuing a previous search; omit for the first page. + :type cursor: 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._leaderboard_faucet_replicate_models_get_serialize( + search=search, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SearchReplicateModelsEndpointOutput", + '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 leaderboard_faucet_replicate_models_get_without_preload_content( + self, + search: Annotated[StrictStr, Field(description="The free-text term to search models by.")], + cursor: Annotated[Optional[StrictStr], Field(description="Cursor continuing a previous search; omit for the first page.")] = 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: + """Searches Replicate models by free-text term. + + Results are cursor-paginated: pass the returned nextCursor back as cursor to fetch the next page. + + :param search: The free-text term to search models by. (required) + :type search: str + :param cursor: Cursor continuing a previous search; omit for the first page. + :type cursor: 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._leaderboard_faucet_replicate_models_get_serialize( + search=search, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SearchReplicateModelsEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _leaderboard_faucet_replicate_models_get_serialize( + self, + search, + cursor, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if search is not None: + + _query_params.append(('search', search)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + # 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='/leaderboard/faucet/replicate/models', + 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 leaderboard_faucet_replicate_models_model_owner_model_name_get( + self, + model_owner: Annotated[StrictStr, Field(description="The owner of the hosted model.")], + model_name: Annotated[StrictStr, Field(description="The model name.")], + _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, + ) -> GetReplicateModelEndpointOutput: + """Returns a single Replicate model with its input parameter schema. + + + :param model_owner: The owner of the hosted model. (required) + :type model_owner: str + :param model_name: The model name. (required) + :type model_name: 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._leaderboard_faucet_replicate_models_model_owner_model_name_get_serialize( + model_owner=model_owner, + model_name=model_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetReplicateModelEndpointOutput", + '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 leaderboard_faucet_replicate_models_model_owner_model_name_get_with_http_info( + self, + model_owner: Annotated[StrictStr, Field(description="The owner of the hosted model.")], + model_name: Annotated[StrictStr, Field(description="The model name.")], + _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[GetReplicateModelEndpointOutput]: + """Returns a single Replicate model with its input parameter schema. + + + :param model_owner: The owner of the hosted model. (required) + :type model_owner: str + :param model_name: The model name. (required) + :type model_name: 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._leaderboard_faucet_replicate_models_model_owner_model_name_get_serialize( + model_owner=model_owner, + model_name=model_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetReplicateModelEndpointOutput", + '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 leaderboard_faucet_replicate_models_model_owner_model_name_get_without_preload_content( + self, + model_owner: Annotated[StrictStr, Field(description="The owner of the hosted model.")], + model_name: Annotated[StrictStr, Field(description="The model name.")], + _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 a single Replicate model with its input parameter schema. + + + :param model_owner: The owner of the hosted model. (required) + :type model_owner: str + :param model_name: The model name. (required) + :type model_name: 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._leaderboard_faucet_replicate_models_model_owner_model_name_get_serialize( + model_owner=model_owner, + model_name=model_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetReplicateModelEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _leaderboard_faucet_replicate_models_model_owner_model_name_get_serialize( + self, + model_owner, + model_name, + _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 model_owner is not None: + _path_params['modelOwner'] = model_owner + if model_name is not None: + _path_params['modelName'] = model_name + # 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='/leaderboard/faucet/replicate/models/{modelOwner}/{modelName}', + 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_delete_0( self, diff --git a/src/rapidata/api_client/api/job_api.py b/src/rapidata/api_client/api/job_api.py index 52dac1904..7ca9691ca 100644 --- a/src/rapidata/api_client/api/job_api.py +++ b/src/rapidata/api_client/api/job_api.py @@ -16,7 +16,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictBytes, StrictInt, StrictStr, field_validator +from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr, field_validator from typing import List, Optional, Tuple, Union from typing_extensions import Annotated from rapidata.api_client.models.audience_audience_id_jobs_get_job_id_parameter import AudienceAudienceIdJobsGetJobIdParameter @@ -29,9 +29,11 @@ from rapidata.api_client.models.get_job_by_id_endpoint_output import GetJobByIdEndpointOutput from rapidata.api_client.models.get_job_definition_by_id_endpoint_output import GetJobDefinitionByIdEndpointOutput from rapidata.api_client.models.get_job_revision_endpoint_output import GetJobRevisionEndpointOutput +from rapidata.api_client.models.query_aggregated_jobs_endpoint_paged_result_of_output import QueryAggregatedJobsEndpointPagedResultOfOutput from rapidata.api_client.models.query_job_definitions_endpoint_paged_result_of_output import QueryJobDefinitionsEndpointPagedResultOfOutput from rapidata.api_client.models.query_job_revisions_endpoint_paged_result_of_output import QueryJobRevisionsEndpointPagedResultOfOutput from rapidata.api_client.models.query_jobs_endpoint_paged_result_of_output import QueryJobsEndpointPagedResultOfOutput +from rapidata.api_client.models.query_public_job_definitions_endpoint_paged_result_of_output import QueryPublicJobDefinitionsEndpointPagedResultOfOutput from rapidata.api_client.models.update_job_definition_endpoint_input import UpdateJobDefinitionEndpointInput from rapidata.api_client.models.update_job_endpoint_input import UpdateJobEndpointInput @@ -2111,6 +2113,290 @@ def _job_definition_definition_id_revisions_get_serialize( + @validate_call + def job_definition_definition_id_share_patch( + self, + definition_id: Annotated[StrictStr, Field(description="The ID of the job definition.")], + is_public: Annotated[Optional[StrictBool], Field(description="Whether to mark or unmark the definition as public.")] = 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, + ) -> None: + """Marks or unmarks a job definition as a public template that other users can discover and run. + + + :param definition_id: The ID of the job definition. (required) + :type definition_id: str + :param is_public: Whether to mark or unmark the definition as public. + :type is_public: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_definition_definition_id_share_patch_serialize( + definition_id=definition_id, + is_public=is_public, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def job_definition_definition_id_share_patch_with_http_info( + self, + definition_id: Annotated[StrictStr, Field(description="The ID of the job definition.")], + is_public: Annotated[Optional[StrictBool], Field(description="Whether to mark or unmark the definition as public.")] = 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[None]: + """Marks or unmarks a job definition as a public template that other users can discover and run. + + + :param definition_id: The ID of the job definition. (required) + :type definition_id: str + :param is_public: Whether to mark or unmark the definition as public. + :type is_public: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_definition_definition_id_share_patch_serialize( + definition_id=definition_id, + is_public=is_public, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def job_definition_definition_id_share_patch_without_preload_content( + self, + definition_id: Annotated[StrictStr, Field(description="The ID of the job definition.")], + is_public: Annotated[Optional[StrictBool], Field(description="Whether to mark or unmark the definition as public.")] = 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: + """Marks or unmarks a job definition as a public template that other users can discover and run. + + + :param definition_id: The ID of the job definition. (required) + :type definition_id: str + :param is_public: Whether to mark or unmark the definition as public. + :type is_public: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_definition_definition_id_share_patch_serialize( + definition_id=definition_id, + is_public=is_public, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _job_definition_definition_id_share_patch_serialize( + self, + definition_id, + is_public, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if definition_id is not None: + _path_params['definitionId'] = definition_id + # process the query parameters + if is_public is not None: + + _query_params.append(('isPublic', is_public)) + + # 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='PATCH', + resource_path='/job/definition/{definitionId}/share', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def job_definition_post( self, @@ -2828,11 +3114,1939 @@ def _job_definitions_get_serialize( @validate_call - def job_job_id_delete( + def job_definitions_public_get( self, - job_id: Annotated[StrictStr, Field(description="The id of the job to delete.")], - _request_timeout: Union[ - 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, + definition_id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by definition_id.")] = None, + name: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by name.")] = None, + definition_type: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by definition_type.")] = None, + created_at: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by created_at.")] = None, + owner_id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_id.")] = None, + owner_mail: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_mail.")] = 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, + ) -> QueryPublicJobDefinitionsEndpointPagedResultOfOutput: + """Queries job definitions that have been shared publicly, regardless of owner, so they can be reused as templates. + + + :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 definition_id: Filter by definition_id. + :type definition_id: AudienceAudienceIdJobsGetJobIdParameter + :param name: Filter by name. + :type name: AudienceAudienceIdJobsGetJobIdParameter + :param definition_type: Filter by definition_type. + :type definition_type: AudienceAudienceIdJobsGetJobIdParameter + :param created_at: Filter by created_at. + :type created_at: AudienceAudienceIdJobsGetJobIdParameter + :param owner_id: Filter by owner_id. + :type owner_id: AudienceAudienceIdJobsGetJobIdParameter + :param owner_mail: Filter by owner_mail. + :type owner_mail: 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._job_definitions_public_get_serialize( + page=page, + page_size=page_size, + sort=sort, + definition_id=definition_id, + name=name, + definition_type=definition_type, + created_at=created_at, + owner_id=owner_id, + owner_mail=owner_mail, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "QueryPublicJobDefinitionsEndpointPagedResultOfOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def job_definitions_public_get_with_http_info( + self, + 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, + definition_id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by definition_id.")] = None, + name: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by name.")] = None, + definition_type: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by definition_type.")] = None, + created_at: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by created_at.")] = None, + owner_id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_id.")] = None, + owner_mail: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_mail.")] = 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[QueryPublicJobDefinitionsEndpointPagedResultOfOutput]: + """Queries job definitions that have been shared publicly, regardless of owner, so they can be reused as templates. + + + :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 definition_id: Filter by definition_id. + :type definition_id: AudienceAudienceIdJobsGetJobIdParameter + :param name: Filter by name. + :type name: AudienceAudienceIdJobsGetJobIdParameter + :param definition_type: Filter by definition_type. + :type definition_type: AudienceAudienceIdJobsGetJobIdParameter + :param created_at: Filter by created_at. + :type created_at: AudienceAudienceIdJobsGetJobIdParameter + :param owner_id: Filter by owner_id. + :type owner_id: AudienceAudienceIdJobsGetJobIdParameter + :param owner_mail: Filter by owner_mail. + :type owner_mail: 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._job_definitions_public_get_serialize( + page=page, + page_size=page_size, + sort=sort, + definition_id=definition_id, + name=name, + definition_type=definition_type, + created_at=created_at, + owner_id=owner_id, + owner_mail=owner_mail, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "QueryPublicJobDefinitionsEndpointPagedResultOfOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def job_definitions_public_get_without_preload_content( + self, + 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, + definition_id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by definition_id.")] = None, + name: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by name.")] = None, + definition_type: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by definition_type.")] = None, + created_at: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by created_at.")] = None, + owner_id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_id.")] = None, + owner_mail: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_mail.")] = 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: + """Queries job definitions that have been shared publicly, regardless of owner, so they can be reused as templates. + + + :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 definition_id: Filter by definition_id. + :type definition_id: AudienceAudienceIdJobsGetJobIdParameter + :param name: Filter by name. + :type name: AudienceAudienceIdJobsGetJobIdParameter + :param definition_type: Filter by definition_type. + :type definition_type: AudienceAudienceIdJobsGetJobIdParameter + :param created_at: Filter by created_at. + :type created_at: AudienceAudienceIdJobsGetJobIdParameter + :param owner_id: Filter by owner_id. + :type owner_id: AudienceAudienceIdJobsGetJobIdParameter + :param owner_mail: Filter by owner_mail. + :type owner_mail: 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._job_definitions_public_get_serialize( + page=page, + page_size=page_size, + sort=sort, + definition_id=definition_id, + name=name, + definition_type=definition_type, + created_at=created_at, + owner_id=owner_id, + owner_mail=owner_mail, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "QueryPublicJobDefinitionsEndpointPagedResultOfOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _job_definitions_public_get_serialize( + self, + page, + page_size, + sort, + definition_id, + name, + definition_type, + created_at, + owner_id, + owner_mail, + _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 + # 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 definition_id is not None: + _param_val = definition_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(('definition_id[' + _k + ']', _v)) + if name is not None: + _param_val = name + if hasattr(_param_val, 'to_dict'): + _param_val = _param_val.to_dict() + if isinstance(_param_val, dict): + for _k, _v in _param_val.items(): + if _v is not None: + _query_params.append(('name[' + _k + ']', _v)) + if definition_type is not None: + _param_val = definition_type + 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(('definition_type[' + _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)) + if owner_id is not None: + _param_val = owner_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(('owner_id[' + _k + ']', _v)) + if owner_mail is not None: + _param_val = owner_mail + if hasattr(_param_val, 'to_dict'): + _param_val = _param_val.to_dict() + if isinstance(_param_val, dict): + for _k, _v in _param_val.items(): + if _v is not None: + _query_params.append(('owner_mail[' + _k + ']', _v)) + # 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='/job/definitions/public', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def job_job_id_approve_post( + self, + job_id: Annotated[StrictStr, Field(description="The ID of the job to approve.")], + _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: + """Approves a job in manual review so its pipeline can start processing. + + + :param job_id: The ID of the job to approve. (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_job_id_approve_post_serialize( + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def job_job_id_approve_post_with_http_info( + self, + job_id: Annotated[StrictStr, Field(description="The ID of the job to approve.")], + _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]: + """Approves a job in manual review so its pipeline can start processing. + + + :param job_id: The ID of the job to approve. (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_job_id_approve_post_serialize( + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def job_job_id_approve_post_without_preload_content( + self, + job_id: Annotated[StrictStr, Field(description="The ID of the job to approve.")], + _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: + """Approves a job in manual review so its pipeline can start processing. + + + :param job_id: The ID of the job to approve. (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_job_id_approve_post_serialize( + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _job_job_id_approve_post_serialize( + self, + job_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 job_id is not None: + _path_params['jobId'] = job_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='POST', + resource_path='/job/{jobId}/approve', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def job_job_id_delete( + self, + job_id: Annotated[StrictStr, Field(description="The id of the job to delete.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Deletes a job. + + + :param job_id: The id of the job to delete. (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_job_id_delete_serialize( + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def job_job_id_delete_with_http_info( + self, + job_id: Annotated[StrictStr, Field(description="The id of the job to delete.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Deletes a job. + + + :param job_id: The id of the job to delete. (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_job_id_delete_serialize( + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def job_job_id_delete_without_preload_content( + self, + job_id: Annotated[StrictStr, Field(description="The id of the job to delete.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Deletes a job. + + + :param job_id: The id of the job to delete. (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_job_id_delete_serialize( + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _job_job_id_delete_serialize( + self, + job_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 job_id is not None: + _path_params['jobId'] = job_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='/job/{jobId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def job_job_id_download_results_get( + self, + job_id: Annotated[StrictStr, Field(description="The id of the job to download results for.")], + _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, + ) -> bytearray: + """Downloads the results of a job as a file attachment. + + + :param job_id: The id of the job to download results for. (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_job_id_download_results_get_serialize( + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def job_job_id_download_results_get_with_http_info( + self, + job_id: Annotated[StrictStr, Field(description="The id of the job to download results for.")], + _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[bytearray]: + """Downloads the results of a job as a file attachment. + + + :param job_id: The id of the job to download results for. (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_job_id_download_results_get_serialize( + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def job_job_id_download_results_get_without_preload_content( + self, + job_id: Annotated[StrictStr, Field(description="The id of the job to download results for.")], + _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: + """Downloads the results of a job as a file attachment. + + + :param job_id: The id of the job to download results for. (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_job_id_download_results_get_serialize( + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _job_job_id_download_results_get_serialize( + self, + job_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 job_id is not None: + _path_params['jobId'] = job_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/octet-stream' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/job/{jobId}/download-results', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def job_job_id_get( + self, + job_id: Annotated[StrictStr, Field(description="The id of the job to retrieve.")], + _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, + ) -> GetJobByIdEndpointOutput: + """Gets a job by its id. + + + :param job_id: The id of the job to retrieve. (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_job_id_get_serialize( + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetJobByIdEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def job_job_id_get_with_http_info( + self, + job_id: Annotated[StrictStr, Field(description="The id of the job to retrieve.")], + _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[GetJobByIdEndpointOutput]: + """Gets a job by its id. + + + :param job_id: The id of the job to retrieve. (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_job_id_get_serialize( + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetJobByIdEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def job_job_id_get_without_preload_content( + self, + job_id: Annotated[StrictStr, Field(description="The id of the job to retrieve.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Gets a job by its id. + + + :param job_id: The id of the job to retrieve. (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_job_id_get_serialize( + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetJobByIdEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _job_job_id_get_serialize( + self, + job_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 job_id is not None: + _path_params['jobId'] = job_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='/job/{jobId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def job_job_id_patch( + self, + job_id: Annotated[StrictStr, Field(description="The id of the job to update.")], + update_job_endpoint_input: Annotated[UpdateJobEndpointInput, Field(description="The fields to update.")], + _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: + """Updates a job. + + + :param job_id: The id of the job to update. (required) + :type job_id: str + :param update_job_endpoint_input: The fields to update. (required) + :type update_job_endpoint_input: UpdateJobEndpointInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_job_id_patch_serialize( + job_id=job_id, + update_job_endpoint_input=update_job_endpoint_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 job_job_id_patch_with_http_info( + self, + job_id: Annotated[StrictStr, Field(description="The id of the job to update.")], + update_job_endpoint_input: Annotated[UpdateJobEndpointInput, Field(description="The fields to update.")], + _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]: + """Updates a job. + + + :param job_id: The id of the job to update. (required) + :type job_id: str + :param update_job_endpoint_input: The fields to update. (required) + :type update_job_endpoint_input: UpdateJobEndpointInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_job_id_patch_serialize( + job_id=job_id, + update_job_endpoint_input=update_job_endpoint_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 job_job_id_patch_without_preload_content( + self, + job_id: Annotated[StrictStr, Field(description="The id of the job to update.")], + update_job_endpoint_input: Annotated[UpdateJobEndpointInput, Field(description="The fields to update.")], + _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: + """Updates a job. + + + :param job_id: The id of the job to update. (required) + :type job_id: str + :param update_job_endpoint_input: The fields to update. (required) + :type update_job_endpoint_input: UpdateJobEndpointInput + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_job_id_patch_serialize( + job_id=job_id, + update_job_endpoint_input=update_job_endpoint_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 _job_job_id_patch_serialize( + self, + job_id, + update_job_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 job_id is not None: + _path_params['jobId'] = job_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_job_endpoint_input is not None: + _body_params = update_job_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='PATCH', + resource_path='/job/{jobId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def job_job_id_pause_post( + self, + job_id: Annotated[StrictStr, Field(description="The ID of the job to pause.")], + _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: + """Pauses a job, stopping all of its campaigns from processing. + + + :param job_id: The ID of the job to pause. (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_job_id_pause_post_serialize( + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def job_job_id_pause_post_with_http_info( + self, + job_id: Annotated[StrictStr, Field(description="The ID of the job to pause.")], + _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]: + """Pauses a job, stopping all of its campaigns from processing. + + + :param job_id: The ID of the job to pause. (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_job_id_pause_post_serialize( + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def job_job_id_pause_post_without_preload_content( + self, + job_id: Annotated[StrictStr, Field(description="The ID of the job to pause.")], + _request_timeout: Union[ + None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], @@ -2843,11 +5057,11 @@ def job_job_id_delete( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Deletes a job. + ) -> RESTResponseType: + """Pauses a job, stopping all of its campaigns from processing. - :param job_id: The id of the job to delete. (required) + :param job_id: The ID of the job to pause. (required) :type job_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2871,7 +5085,7 @@ def job_job_id_delete( :return: Returns the result object. """ # noqa: E501 - _param = self._job_job_id_delete_serialize( + _param = self._job_job_id_pause_post_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2889,6 +5103,135 @@ def job_job_id_delete( *_param, _request_timeout=_request_timeout ) + return response_data.response + + + def _job_job_id_pause_post_serialize( + self, + job_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 job_id is not None: + _path_params['jobId'] = job_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='POST', + resource_path='/job/{jobId}/pause', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def job_job_id_results_get( + self, + job_id: Annotated[StrictStr, Field(description="The id of the job to get results for.")], + _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, + ) -> str: + """Gets the results of a job as a JSON string. + + For file download, use the download-results endpoint instead. + + :param job_id: The id of the job to get results for. (required) + :type job_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._job_job_id_results_get_serialize( + job_id=job_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '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, @@ -2897,9 +5240,9 @@ def job_job_id_delete( @validate_call - def job_job_id_delete_with_http_info( + def job_job_id_results_get_with_http_info( self, - job_id: Annotated[StrictStr, Field(description="The id of the job to delete.")], + job_id: Annotated[StrictStr, Field(description="The id of the job to get results for.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2912,11 +5255,12 @@ def job_job_id_delete_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Deletes a job. + ) -> ApiResponse[str]: + """Gets the results of a job as a JSON string. + For file download, use the download-results endpoint instead. - :param job_id: The id of the job to delete. (required) + :param job_id: The id of the job to get results for. (required) :type job_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2940,7 +5284,7 @@ def job_job_id_delete_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._job_job_id_delete_serialize( + _param = self._job_job_id_results_get_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2949,8 +5293,7 @@ def job_job_id_delete_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ValidationProblemDetails", + '200': "str", '401': None, '403': None, } @@ -2966,9 +5309,9 @@ def job_job_id_delete_with_http_info( @validate_call - def job_job_id_delete_without_preload_content( + def job_job_id_results_get_without_preload_content( self, - job_id: Annotated[StrictStr, Field(description="The id of the job to delete.")], + job_id: Annotated[StrictStr, Field(description="The id of the job to get results for.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2982,10 +5325,11 @@ def job_job_id_delete_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Deletes a job. + """Gets the results of a job as a JSON string. + For file download, use the download-results endpoint instead. - :param job_id: The id of the job to delete. (required) + :param job_id: The id of the job to get results for. (required) :type job_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3009,7 +5353,7 @@ def job_job_id_delete_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._job_job_id_delete_serialize( + _param = self._job_job_id_results_get_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3018,8 +5362,7 @@ def job_job_id_delete_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ValidationProblemDetails", + '200': "str", '401': None, '403': None, } @@ -3030,7 +5373,7 @@ def job_job_id_delete_without_preload_content( return response_data.response - def _job_job_id_delete_serialize( + def _job_job_id_results_get_serialize( self, job_id, _request_auth, @@ -3077,8 +5420,8 @@ def _job_job_id_delete_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/job/{jobId}', + method='GET', + resource_path='/job/{jobId}/results', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3095,9 +5438,9 @@ def _job_job_id_delete_serialize( @validate_call - def job_job_id_download_results_get( + def job_job_id_resume_post( self, - job_id: Annotated[StrictStr, Field(description="The id of the job to download results for.")], + job_id: Annotated[StrictStr, Field(description="The ID of the job to resume.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3110,11 +5453,11 @@ def job_job_id_download_results_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytearray: - """Downloads the results of a job as a file attachment. + ) -> None: + """Resumes a job, restarting all of its campaigns. - :param job_id: The id of the job to download results for. (required) + :param job_id: The ID of the job to resume. (required) :type job_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3138,7 +5481,7 @@ def job_job_id_download_results_get( :return: Returns the result object. """ # noqa: E501 - _param = self._job_job_id_download_results_get_serialize( + _param = self._job_job_id_resume_post_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3147,7 +5490,8 @@ def job_job_id_download_results_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", + '204': None, + '400': "ValidationProblemDetails", '401': None, '403': None, } @@ -3163,9 +5507,9 @@ def job_job_id_download_results_get( @validate_call - def job_job_id_download_results_get_with_http_info( + def job_job_id_resume_post_with_http_info( self, - job_id: Annotated[StrictStr, Field(description="The id of the job to download results for.")], + job_id: Annotated[StrictStr, Field(description="The ID of the job to resume.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3178,11 +5522,11 @@ def job_job_id_download_results_get_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytearray]: - """Downloads the results of a job as a file attachment. + ) -> ApiResponse[None]: + """Resumes a job, restarting all of its campaigns. - :param job_id: The id of the job to download results for. (required) + :param job_id: The ID of the job to resume. (required) :type job_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3206,7 +5550,7 @@ def job_job_id_download_results_get_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._job_job_id_download_results_get_serialize( + _param = self._job_job_id_resume_post_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3215,7 +5559,8 @@ def job_job_id_download_results_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", + '204': None, + '400': "ValidationProblemDetails", '401': None, '403': None, } @@ -3231,9 +5576,9 @@ def job_job_id_download_results_get_with_http_info( @validate_call - def job_job_id_download_results_get_without_preload_content( + def job_job_id_resume_post_without_preload_content( self, - job_id: Annotated[StrictStr, Field(description="The id of the job to download results for.")], + job_id: Annotated[StrictStr, Field(description="The ID of the job to resume.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3247,10 +5592,10 @@ def job_job_id_download_results_get_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Downloads the results of a job as a file attachment. + """Resumes a job, restarting all of its campaigns. - :param job_id: The id of the job to download results for. (required) + :param job_id: The ID of the job to resume. (required) :type job_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3274,7 +5619,7 @@ def job_job_id_download_results_get_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._job_job_id_download_results_get_serialize( + _param = self._job_job_id_resume_post_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3283,7 +5628,8 @@ def job_job_id_download_results_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", + '204': None, + '400': "ValidationProblemDetails", '401': None, '403': None, } @@ -3294,7 +5640,7 @@ def job_job_id_download_results_get_without_preload_content( return response_data.response - def _job_job_id_download_results_get_serialize( + def _job_job_id_resume_post_serialize( self, job_id, _request_auth, @@ -3330,7 +5676,7 @@ def _job_job_id_download_results_get_serialize( if 'Accept' not in _header_params: _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/octet-stream' + 'application/json' ] ) @@ -3341,8 +5687,8 @@ def _job_job_id_download_results_get_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/job/{jobId}/download-results', + method='POST', + resource_path='/job/{jobId}/resume', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3359,9 +5705,9 @@ def _job_job_id_download_results_get_serialize( @validate_call - def job_job_id_get( + def job_job_id_retry_post( self, - job_id: Annotated[StrictStr, Field(description="The id of the job to retrieve.")], + job_id: Annotated[StrictStr, Field(description="The ID of the job to retry.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3374,11 +5720,11 @@ def job_job_id_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetJobByIdEndpointOutput: - """Gets a job by its id. + ) -> None: + """Retries processing of a failed job. - :param job_id: The id of the job to retrieve. (required) + :param job_id: The ID of the job to retry. (required) :type job_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3402,7 +5748,7 @@ def job_job_id_get( :return: Returns the result object. """ # noqa: E501 - _param = self._job_job_id_get_serialize( + _param = self._job_job_id_retry_post_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3411,7 +5757,7 @@ def job_job_id_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetJobByIdEndpointOutput", + '204': None, '400': "ValidationProblemDetails", '401': None, '403': None, @@ -3428,9 +5774,9 @@ def job_job_id_get( @validate_call - def job_job_id_get_with_http_info( + def job_job_id_retry_post_with_http_info( self, - job_id: Annotated[StrictStr, Field(description="The id of the job to retrieve.")], + job_id: Annotated[StrictStr, Field(description="The ID of the job to retry.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3443,11 +5789,11 @@ def job_job_id_get_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetJobByIdEndpointOutput]: - """Gets a job by its id. + ) -> ApiResponse[None]: + """Retries processing of a failed job. - :param job_id: The id of the job to retrieve. (required) + :param job_id: The ID of the job to retry. (required) :type job_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3471,7 +5817,7 @@ def job_job_id_get_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._job_job_id_get_serialize( + _param = self._job_job_id_retry_post_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3480,7 +5826,7 @@ def job_job_id_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetJobByIdEndpointOutput", + '204': None, '400': "ValidationProblemDetails", '401': None, '403': None, @@ -3497,9 +5843,9 @@ def job_job_id_get_with_http_info( @validate_call - def job_job_id_get_without_preload_content( + def job_job_id_retry_post_without_preload_content( self, - job_id: Annotated[StrictStr, Field(description="The id of the job to retrieve.")], + job_id: Annotated[StrictStr, Field(description="The ID of the job to retry.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3513,10 +5859,10 @@ def job_job_id_get_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Gets a job by its id. + """Retries processing of a failed job. - :param job_id: The id of the job to retrieve. (required) + :param job_id: The ID of the job to retry. (required) :type job_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3540,7 +5886,7 @@ def job_job_id_get_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._job_job_id_get_serialize( + _param = self._job_job_id_retry_post_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3549,7 +5895,7 @@ def job_job_id_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetJobByIdEndpointOutput", + '204': None, '400': "ValidationProblemDetails", '401': None, '403': None, @@ -3561,7 +5907,7 @@ def job_job_id_get_without_preload_content( return response_data.response - def _job_job_id_get_serialize( + def _job_job_id_retry_post_serialize( self, job_id, _request_auth, @@ -3608,8 +5954,8 @@ def _job_job_id_get_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/job/{jobId}', + method='POST', + resource_path='/job/{jobId}/retry', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3626,10 +5972,10 @@ def _job_job_id_get_serialize( @validate_call - def job_job_id_patch( + def job_job_id_share_patch( self, - job_id: Annotated[StrictStr, Field(description="The id of the job to update.")], - update_job_endpoint_input: Annotated[UpdateJobEndpointInput, Field(description="The fields to update.")], + job_id: Annotated[StrictStr, Field(description="The ID of the job.")], + is_public: Annotated[Optional[StrictBool], Field(description="Whether to mark or unmark the job as public.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3643,13 +5989,13 @@ def job_job_id_patch( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Updates a job. + """Marks or unmarks a job as public so its results can be shared with other users. - :param job_id: The id of the job to update. (required) + :param job_id: The ID of the job. (required) :type job_id: str - :param update_job_endpoint_input: The fields to update. (required) - :type update_job_endpoint_input: UpdateJobEndpointInput + :param is_public: Whether to mark or unmark the job as public. + :type is_public: bool :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 @@ -3672,9 +6018,9 @@ def job_job_id_patch( :return: Returns the result object. """ # noqa: E501 - _param = self._job_job_id_patch_serialize( + _param = self._job_job_id_share_patch_serialize( job_id=job_id, - update_job_endpoint_input=update_job_endpoint_input, + is_public=is_public, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3699,10 +6045,10 @@ def job_job_id_patch( @validate_call - def job_job_id_patch_with_http_info( + def job_job_id_share_patch_with_http_info( self, - job_id: Annotated[StrictStr, Field(description="The id of the job to update.")], - update_job_endpoint_input: Annotated[UpdateJobEndpointInput, Field(description="The fields to update.")], + job_id: Annotated[StrictStr, Field(description="The ID of the job.")], + is_public: Annotated[Optional[StrictBool], Field(description="Whether to mark or unmark the job as public.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3716,13 +6062,13 @@ def job_job_id_patch_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Updates a job. + """Marks or unmarks a job as public so its results can be shared with other users. - :param job_id: The id of the job to update. (required) + :param job_id: The ID of the job. (required) :type job_id: str - :param update_job_endpoint_input: The fields to update. (required) - :type update_job_endpoint_input: UpdateJobEndpointInput + :param is_public: Whether to mark or unmark the job as public. + :type is_public: bool :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 @@ -3745,9 +6091,9 @@ def job_job_id_patch_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._job_job_id_patch_serialize( + _param = self._job_job_id_share_patch_serialize( job_id=job_id, - update_job_endpoint_input=update_job_endpoint_input, + is_public=is_public, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3772,10 +6118,10 @@ def job_job_id_patch_with_http_info( @validate_call - def job_job_id_patch_without_preload_content( + def job_job_id_share_patch_without_preload_content( self, - job_id: Annotated[StrictStr, Field(description="The id of the job to update.")], - update_job_endpoint_input: Annotated[UpdateJobEndpointInput, Field(description="The fields to update.")], + job_id: Annotated[StrictStr, Field(description="The ID of the job.")], + is_public: Annotated[Optional[StrictBool], Field(description="Whether to mark or unmark the job as public.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3789,13 +6135,13 @@ def job_job_id_patch_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Updates a job. + """Marks or unmarks a job as public so its results can be shared with other users. - :param job_id: The id of the job to update. (required) + :param job_id: The ID of the job. (required) :type job_id: str - :param update_job_endpoint_input: The fields to update. (required) - :type update_job_endpoint_input: UpdateJobEndpointInput + :param is_public: Whether to mark or unmark the job as public. + :type is_public: bool :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 @@ -3818,9 +6164,9 @@ def job_job_id_patch_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._job_job_id_patch_serialize( + _param = self._job_job_id_share_patch_serialize( job_id=job_id, - update_job_endpoint_input=update_job_endpoint_input, + is_public=is_public, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3840,10 +6186,10 @@ def job_job_id_patch_without_preload_content( return response_data.response - def _job_job_id_patch_serialize( + def _job_job_id_share_patch_serialize( self, job_id, - update_job_endpoint_input, + is_public, _request_auth, _content_type, _headers, @@ -3868,11 +6214,13 @@ def _job_job_id_patch_serialize( if job_id is not None: _path_params['jobId'] = job_id # process the query parameters + if is_public is not None: + + _query_params.append(('isPublic', is_public)) + # process the header parameters # process the form parameters # process the body parameter - if update_job_endpoint_input is not None: - _body_params = update_job_endpoint_input # set the HTTP header `Accept` @@ -3883,19 +6231,6 @@ def _job_job_id_patch_serialize( ] ) - # 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] = [ @@ -3904,7 +6239,7 @@ def _job_job_id_patch_serialize( return self.api_client.param_serialize( method='PATCH', - resource_path='/job/{jobId}', + resource_path='/job/{jobId}/share', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3921,9 +6256,9 @@ def _job_job_id_patch_serialize( @validate_call - def job_job_id_results_get( + def job_post( self, - job_id: Annotated[StrictStr, Field(description="The id of the job to get results for.")], + create_job_endpoint_input: Annotated[CreateJobEndpointInput, Field(description="The job creation parameters.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3936,13 +6271,13 @@ def job_job_id_results_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> str: - """Gets the results of a job as a JSON string. + ) -> CreateJobEndpointOutput: + """Creates a new job from a job definition and audience. - For file download, use the download-results endpoint instead. + If the audience is not already recruiting, recruiting is started automatically. The RecruitingStarted field indicates whether this happened. - :param job_id: The id of the job to get results for. (required) - :type job_id: str + :param create_job_endpoint_input: The job creation parameters. (required) + :type create_job_endpoint_input: CreateJobEndpointInput :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 @@ -3965,8 +6300,8 @@ def job_job_id_results_get( :return: Returns the result object. """ # noqa: E501 - _param = self._job_job_id_results_get_serialize( - job_id=job_id, + _param = self._job_post_serialize( + create_job_endpoint_input=create_job_endpoint_input, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3974,7 +6309,8 @@ def job_job_id_results_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str", + '200': "CreateJobEndpointOutput", + '400': "ValidationProblemDetails", '401': None, '403': None, } @@ -3990,9 +6326,9 @@ def job_job_id_results_get( @validate_call - def job_job_id_results_get_with_http_info( + def job_post_with_http_info( self, - job_id: Annotated[StrictStr, Field(description="The id of the job to get results for.")], + create_job_endpoint_input: Annotated[CreateJobEndpointInput, Field(description="The job creation parameters.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4005,13 +6341,13 @@ def job_job_id_results_get_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[str]: - """Gets the results of a job as a JSON string. + ) -> ApiResponse[CreateJobEndpointOutput]: + """Creates a new job from a job definition and audience. - For file download, use the download-results endpoint instead. + If the audience is not already recruiting, recruiting is started automatically. The RecruitingStarted field indicates whether this happened. - :param job_id: The id of the job to get results for. (required) - :type job_id: str + :param create_job_endpoint_input: The job creation parameters. (required) + :type create_job_endpoint_input: CreateJobEndpointInput :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 @@ -4034,8 +6370,8 @@ def job_job_id_results_get_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._job_job_id_results_get_serialize( - job_id=job_id, + _param = self._job_post_serialize( + create_job_endpoint_input=create_job_endpoint_input, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4043,7 +6379,8 @@ def job_job_id_results_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str", + '200': "CreateJobEndpointOutput", + '400': "ValidationProblemDetails", '401': None, '403': None, } @@ -4059,9 +6396,9 @@ def job_job_id_results_get_with_http_info( @validate_call - def job_job_id_results_get_without_preload_content( + def job_post_without_preload_content( self, - job_id: Annotated[StrictStr, Field(description="The id of the job to get results for.")], + create_job_endpoint_input: Annotated[CreateJobEndpointInput, Field(description="The job creation parameters.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4075,12 +6412,12 @@ def job_job_id_results_get_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Gets the results of a job as a JSON string. + """Creates a new job from a job definition and audience. - For file download, use the download-results endpoint instead. + If the audience is not already recruiting, recruiting is started automatically. The RecruitingStarted field indicates whether this happened. - :param job_id: The id of the job to get results for. (required) - :type job_id: str + :param create_job_endpoint_input: The job creation parameters. (required) + :type create_job_endpoint_input: CreateJobEndpointInput :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 @@ -4103,8 +6440,8 @@ def job_job_id_results_get_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._job_job_id_results_get_serialize( - job_id=job_id, + _param = self._job_post_serialize( + create_job_endpoint_input=create_job_endpoint_input, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4112,7 +6449,8 @@ def job_job_id_results_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str", + '200': "CreateJobEndpointOutput", + '400': "ValidationProblemDetails", '401': None, '403': None, } @@ -4123,9 +6461,9 @@ def job_job_id_results_get_without_preload_content( return response_data.response - def _job_job_id_results_get_serialize( + def _job_post_serialize( self, - job_id, + create_job_endpoint_input, _request_auth, _content_type, _headers, @@ -4147,12 +6485,12 @@ def _job_job_id_results_get_serialize( _body_params: Optional[bytes] = None # process the path parameters - if job_id is not None: - _path_params['jobId'] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if create_job_endpoint_input is not None: + _body_params = create_job_endpoint_input # set the HTTP header `Accept` @@ -4163,6 +6501,19 @@ def _job_job_id_results_get_serialize( ] ) + # 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] = [ @@ -4170,8 +6521,8 @@ def _job_job_id_results_get_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/job/{jobId}/results', + method='POST', + resource_path='/job', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4188,9 +6539,14 @@ def _job_job_id_results_get_serialize( @validate_call - def job_post( + def jobs_aggregated_overview_get( self, - create_job_endpoint_input: Annotated[CreateJobEndpointInput, Field(description="The job creation parameters.")], + 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, + owner_mail: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_mail.")] = None, + last_job_date: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by last_job_date.")] = None, + last_job_name: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by last_job_name.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4203,13 +6559,22 @@ def job_post( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CreateJobEndpointOutput: - """Creates a new job from a job definition and audience. + ) -> QueryAggregatedJobsEndpointPagedResultOfOutput: + """Retrieves jobs aggregated by customer with total counts and most recent job information. - If the audience is not already recruiting, recruiting is started automatically. The RecruitingStarted field indicates whether this happened. - :param create_job_endpoint_input: The job creation parameters. (required) - :type create_job_endpoint_input: CreateJobEndpointInput + :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 owner_mail: Filter by owner_mail. + :type owner_mail: AudienceAudienceIdJobsGetJobIdParameter + :param last_job_date: Filter by last_job_date. + :type last_job_date: AudienceAudienceIdJobsGetJobIdParameter + :param last_job_name: Filter by last_job_name. + :type last_job_name: 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 @@ -4232,8 +6597,13 @@ def job_post( :return: Returns the result object. """ # noqa: E501 - _param = self._job_post_serialize( - create_job_endpoint_input=create_job_endpoint_input, + _param = self._jobs_aggregated_overview_get_serialize( + page=page, + page_size=page_size, + sort=sort, + owner_mail=owner_mail, + last_job_date=last_job_date, + last_job_name=last_job_name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4241,7 +6611,7 @@ def job_post( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateJobEndpointOutput", + '200': "QueryAggregatedJobsEndpointPagedResultOfOutput", '400': "ValidationProblemDetails", '401': None, '403': None, @@ -4258,9 +6628,14 @@ def job_post( @validate_call - def job_post_with_http_info( + def jobs_aggregated_overview_get_with_http_info( self, - create_job_endpoint_input: Annotated[CreateJobEndpointInput, Field(description="The job creation parameters.")], + 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, + owner_mail: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_mail.")] = None, + last_job_date: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by last_job_date.")] = None, + last_job_name: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by last_job_name.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4273,13 +6648,22 @@ def job_post_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CreateJobEndpointOutput]: - """Creates a new job from a job definition and audience. + ) -> ApiResponse[QueryAggregatedJobsEndpointPagedResultOfOutput]: + """Retrieves jobs aggregated by customer with total counts and most recent job information. - If the audience is not already recruiting, recruiting is started automatically. The RecruitingStarted field indicates whether this happened. - :param create_job_endpoint_input: The job creation parameters. (required) - :type create_job_endpoint_input: CreateJobEndpointInput + :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 owner_mail: Filter by owner_mail. + :type owner_mail: AudienceAudienceIdJobsGetJobIdParameter + :param last_job_date: Filter by last_job_date. + :type last_job_date: AudienceAudienceIdJobsGetJobIdParameter + :param last_job_name: Filter by last_job_name. + :type last_job_name: 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 @@ -4302,8 +6686,13 @@ def job_post_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._job_post_serialize( - create_job_endpoint_input=create_job_endpoint_input, + _param = self._jobs_aggregated_overview_get_serialize( + page=page, + page_size=page_size, + sort=sort, + owner_mail=owner_mail, + last_job_date=last_job_date, + last_job_name=last_job_name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4311,7 +6700,7 @@ def job_post_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateJobEndpointOutput", + '200': "QueryAggregatedJobsEndpointPagedResultOfOutput", '400': "ValidationProblemDetails", '401': None, '403': None, @@ -4328,9 +6717,14 @@ def job_post_with_http_info( @validate_call - def job_post_without_preload_content( + def jobs_aggregated_overview_get_without_preload_content( self, - create_job_endpoint_input: Annotated[CreateJobEndpointInput, Field(description="The job creation parameters.")], + 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, + owner_mail: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_mail.")] = None, + last_job_date: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by last_job_date.")] = None, + last_job_name: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by last_job_name.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4344,12 +6738,21 @@ def job_post_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Creates a new job from a job definition and audience. + """Retrieves jobs aggregated by customer with total counts and most recent job information. - If the audience is not already recruiting, recruiting is started automatically. The RecruitingStarted field indicates whether this happened. - :param create_job_endpoint_input: The job creation parameters. (required) - :type create_job_endpoint_input: CreateJobEndpointInput + :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 owner_mail: Filter by owner_mail. + :type owner_mail: AudienceAudienceIdJobsGetJobIdParameter + :param last_job_date: Filter by last_job_date. + :type last_job_date: AudienceAudienceIdJobsGetJobIdParameter + :param last_job_name: Filter by last_job_name. + :type last_job_name: 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 @@ -4372,8 +6775,13 @@ def job_post_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._job_post_serialize( - create_job_endpoint_input=create_job_endpoint_input, + _param = self._jobs_aggregated_overview_get_serialize( + page=page, + page_size=page_size, + sort=sort, + owner_mail=owner_mail, + last_job_date=last_job_date, + last_job_name=last_job_name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4381,7 +6789,7 @@ def job_post_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateJobEndpointOutput", + '200': "QueryAggregatedJobsEndpointPagedResultOfOutput", '400': "ValidationProblemDetails", '401': None, '403': None, @@ -4393,9 +6801,14 @@ def job_post_without_preload_content( return response_data.response - def _job_post_serialize( + def _jobs_aggregated_overview_get_serialize( self, - create_job_endpoint_input, + page, + page_size, + sort, + owner_mail, + last_job_date, + last_job_name, _request_auth, _content_type, _headers, @@ -4405,6 +6818,7 @@ def _job_post_serialize( _host = None _collection_formats: Dict[str, str] = { + 'sort': 'multi', } _path_params: Dict[str, str] = {} @@ -4418,11 +6832,45 @@ def _job_post_serialize( # process the path parameters # 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 owner_mail is not None: + _param_val = owner_mail + if hasattr(_param_val, 'to_dict'): + _param_val = _param_val.to_dict() + if isinstance(_param_val, dict): + for _k, _v in _param_val.items(): + if _v is not None: + _query_params.append(('owner_mail[' + _k + ']', _v)) + if last_job_date is not None: + _param_val = last_job_date + 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(('last_job_date[' + _k + ']', _v)) + if last_job_name is not None: + _param_val = last_job_name + if hasattr(_param_val, 'to_dict'): + _param_val = _param_val.to_dict() + if isinstance(_param_val, dict): + for _k, _v in _param_val.items(): + if _v is not None: + _query_params.append(('last_job_name[' + _k + ']', _v)) # process the header parameters # process the form parameters # process the body parameter - if create_job_endpoint_input is not None: - _body_params = create_job_endpoint_input # set the HTTP header `Accept` @@ -4433,19 +6881,6 @@ def _job_post_serialize( ] ) - # 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] = [ @@ -4453,8 +6888,8 @@ def _job_post_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/job', + method='GET', + resource_path='/jobs/aggregated-overview', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/src/rapidata/api_client/api/replicate_api.py b/src/rapidata/api_client/api/replicate_api.py new file mode 100644 index 000000000..499f4793e --- /dev/null +++ b/src/rapidata/api_client/api/replicate_api.py @@ -0,0 +1,611 @@ +# 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 import Optional +from typing_extensions import Annotated +from rapidata.api_client.models.get_replicate_model_endpoint_output import GetReplicateModelEndpointOutput +from rapidata.api_client.models.search_replicate_models_endpoint_output import SearchReplicateModelsEndpointOutput + +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 ReplicateApi: + """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 leaderboard_faucet_replicate_models_get_0( + self, + search: Annotated[StrictStr, Field(description="The free-text term to search models by.")], + cursor: Annotated[Optional[StrictStr], Field(description="Cursor continuing a previous search; omit for the first page.")] = 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, + ) -> SearchReplicateModelsEndpointOutput: + """Searches Replicate models by free-text term. + + Results are cursor-paginated: pass the returned nextCursor back as cursor to fetch the next page. + + :param search: The free-text term to search models by. (required) + :type search: str + :param cursor: Cursor continuing a previous search; omit for the first page. + :type cursor: 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._leaderboard_faucet_replicate_models_get_0_serialize( + search=search, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SearchReplicateModelsEndpointOutput", + '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 leaderboard_faucet_replicate_models_get_0_with_http_info( + self, + search: Annotated[StrictStr, Field(description="The free-text term to search models by.")], + cursor: Annotated[Optional[StrictStr], Field(description="Cursor continuing a previous search; omit for the first page.")] = 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[SearchReplicateModelsEndpointOutput]: + """Searches Replicate models by free-text term. + + Results are cursor-paginated: pass the returned nextCursor back as cursor to fetch the next page. + + :param search: The free-text term to search models by. (required) + :type search: str + :param cursor: Cursor continuing a previous search; omit for the first page. + :type cursor: 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._leaderboard_faucet_replicate_models_get_0_serialize( + search=search, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SearchReplicateModelsEndpointOutput", + '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 leaderboard_faucet_replicate_models_get_0_without_preload_content( + self, + search: Annotated[StrictStr, Field(description="The free-text term to search models by.")], + cursor: Annotated[Optional[StrictStr], Field(description="Cursor continuing a previous search; omit for the first page.")] = 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: + """Searches Replicate models by free-text term. + + Results are cursor-paginated: pass the returned nextCursor back as cursor to fetch the next page. + + :param search: The free-text term to search models by. (required) + :type search: str + :param cursor: Cursor continuing a previous search; omit for the first page. + :type cursor: 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._leaderboard_faucet_replicate_models_get_0_serialize( + search=search, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SearchReplicateModelsEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _leaderboard_faucet_replicate_models_get_0_serialize( + self, + search, + cursor, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if search is not None: + + _query_params.append(('search', search)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + # 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='/leaderboard/faucet/replicate/models', + 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 leaderboard_faucet_replicate_models_model_owner_model_name_get_0( + self, + model_owner: Annotated[StrictStr, Field(description="The owner of the hosted model.")], + model_name: Annotated[StrictStr, Field(description="The model name.")], + _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, + ) -> GetReplicateModelEndpointOutput: + """Returns a single Replicate model with its input parameter schema. + + + :param model_owner: The owner of the hosted model. (required) + :type model_owner: str + :param model_name: The model name. (required) + :type model_name: 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._leaderboard_faucet_replicate_models_model_owner_model_name_get_0_serialize( + model_owner=model_owner, + model_name=model_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetReplicateModelEndpointOutput", + '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 leaderboard_faucet_replicate_models_model_owner_model_name_get_0_with_http_info( + self, + model_owner: Annotated[StrictStr, Field(description="The owner of the hosted model.")], + model_name: Annotated[StrictStr, Field(description="The model name.")], + _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[GetReplicateModelEndpointOutput]: + """Returns a single Replicate model with its input parameter schema. + + + :param model_owner: The owner of the hosted model. (required) + :type model_owner: str + :param model_name: The model name. (required) + :type model_name: 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._leaderboard_faucet_replicate_models_model_owner_model_name_get_0_serialize( + model_owner=model_owner, + model_name=model_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetReplicateModelEndpointOutput", + '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 leaderboard_faucet_replicate_models_model_owner_model_name_get_0_without_preload_content( + self, + model_owner: Annotated[StrictStr, Field(description="The owner of the hosted model.")], + model_name: Annotated[StrictStr, Field(description="The model name.")], + _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 a single Replicate model with its input parameter schema. + + + :param model_owner: The owner of the hosted model. (required) + :type model_owner: str + :param model_name: The model name. (required) + :type model_name: 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._leaderboard_faucet_replicate_models_model_owner_model_name_get_0_serialize( + model_owner=model_owner, + model_name=model_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetReplicateModelEndpointOutput", + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _leaderboard_faucet_replicate_models_model_owner_model_name_get_0_serialize( + self, + model_owner, + model_name, + _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 model_owner is not None: + _path_params['modelOwner'] = model_owner + if model_name is not None: + _path_params['modelName'] = model_name + # 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='/leaderboard/faucet/replicate/models/{modelOwner}/{modelName}', + 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/create_flow_item_endpoint_input.py b/src/rapidata/api_client/models/create_flow_item_endpoint_input.py index 7086d94b8..7ea4f7d57 100644 --- a/src/rapidata/api_client/models/create_flow_item_endpoint_input.py +++ b/src/rapidata/api_client/models/create_flow_item_endpoint_input.py @@ -32,7 +32,7 @@ class CreateFlowItemEndpointInput(LazyValidatedModel): dataset_id: StrictStr = Field(description="The ID of the dataset to use for this flow item.", alias="datasetId") context: Optional[StrictStr] = Field(default=None, description="Optional context to provide additional ranking guidance.") context_asset: Optional[IAssetInput] = Field(default=None, description="Optional asset context to provide additional ranking guidance.", alias="contextAsset") - time_to_live_in_seconds: Optional[StrictInt] = Field(default=None, description="Optional time-to-live in seconds before the flow item expires.", alias="timeToLiveInSeconds") + time_to_live_in_seconds: Optional[StrictInt] = Field(default=None, description="Optional time-to-live in seconds before the flow item expires. Must be between 60 seconds and 1 hour; defaults to 1 hour when omitted.", alias="timeToLiveInSeconds") drain_duration_in_seconds: Optional[StrictInt] = Field(default=None, description="Optional drain duration in seconds. When set, rapids are paused this many seconds before TTL expiry to allow in-flight responses to complete.", alias="drainDurationInSeconds") __properties: ClassVar[List[str]] = ["datasetId", "context", "contextAsset", "timeToLiveInSeconds", "drainDurationInSeconds"] diff --git a/src/rapidata/api_client/models/create_job_endpoint_input.py b/src/rapidata/api_client/models/create_job_endpoint_input.py index dc681be97..e263011d4 100644 --- a/src/rapidata/api_client/models/create_job_endpoint_input.py +++ b/src/rapidata/api_client/models/create_job_endpoint_input.py @@ -33,7 +33,8 @@ class CreateJobEndpointInput(LazyValidatedModel): revision_number: Optional[StrictInt] = Field(default=None, description="The revision number to use. If not specified, the latest revision will be used.", alias="revisionNumber") name: Optional[StrictStr] = Field(default=None, description="The name of the job. If not specified, defaults to \"{definition name}:{revision number}\".") priority: Optional[StrictInt] = Field(default=None, description="The priority of the job. Higher values mean higher priority. Default is 50.") - __properties: ClassVar[List[str]] = ["jobDefinitionId", "audienceId", "revisionNumber", "name", "priority"] + preceding_job_id: Optional[StrictStr] = Field(default=None, description="Optional id of a job that must finish before this job starts. When set, this job is queued until the preceding job completes or fails.", alias="precedingJobId") + __properties: ClassVar[List[str]] = ["jobDefinitionId", "audienceId", "revisionNumber", "name", "priority", "precedingJobId"] # model_config is inherited from LazyValidatedModel @@ -80,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: if self.name is None and "name" in self.model_fields_set: _dict['name'] = None + # set to None if preceding_job_id (nullable) is None + # and model_fields_set contains the field + if self.preceding_job_id is None and "preceding_job_id" in self.model_fields_set: + _dict['precedingJobId'] = None + return _dict @classmethod @@ -96,7 +102,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "audienceId": obj.get("audienceId"), "revisionNumber": obj.get("revisionNumber"), "name": obj.get("name"), - "priority": obj.get("priority") + "priority": obj.get("priority"), + "precedingJobId": obj.get("precedingJobId") } try: _obj = cls.model_validate(_data) diff --git a/src/rapidata/api_client/models/get_job_by_id_endpoint_output.py b/src/rapidata/api_client/models/get_job_by_id_endpoint_output.py index 5b18ac858..9d6ff6614 100644 --- a/src/rapidata/api_client/models/get_job_by_id_endpoint_output.py +++ b/src/rapidata/api_client/models/get_job_by_id_endpoint_output.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel @@ -36,6 +36,7 @@ class GetJobByIdEndpointOutput(LazyValidatedModel): revision_number: StrictInt = Field(description="The revision number.", alias="revisionNumber") pipeline_id: StrictStr = Field(description="The pipeline id.", alias="pipelineId") status: StrictStr = Field(description="The job status.") + is_public: StrictBool = Field(description="Whether the job (and its results) is shared publicly.", alias="isPublic") completed_at: Optional[datetime] = Field(default=None, description="The timestamp when the job was completed.", alias="completedAt") result_file_name: Optional[StrictStr] = Field(default=None, description="The file name of the result.", alias="resultFileName") failed_at: Optional[datetime] = Field(default=None, description="The timestamp when the job failed.", alias="failedAt") @@ -43,7 +44,7 @@ class GetJobByIdEndpointOutput(LazyValidatedModel): created_at: datetime = Field(description="The creation timestamp.", alias="createdAt") owner_id: StrictStr = Field(description="The owner id.", alias="ownerId") owner_mail: StrictStr = Field(description="The owner email.", alias="ownerMail") - __properties: ClassVar[List[str]] = ["jobId", "name", "definitionId", "audienceId", "revisionNumber", "pipelineId", "status", "completedAt", "resultFileName", "failedAt", "failureMessage", "createdAt", "ownerId", "ownerMail"] + __properties: ClassVar[List[str]] = ["jobId", "name", "definitionId", "audienceId", "revisionNumber", "pipelineId", "status", "isPublic", "completedAt", "resultFileName", "failedAt", "failureMessage", "createdAt", "ownerId", "ownerMail"] # model_config is inherited from LazyValidatedModel @@ -119,6 +120,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "revisionNumber": obj.get("revisionNumber"), "pipelineId": obj.get("pipelineId"), "status": obj.get("status"), + "isPublic": obj.get("isPublic"), "completedAt": obj.get("completedAt"), "resultFileName": obj.get("resultFileName"), "failedAt": obj.get("failedAt"), diff --git a/src/rapidata/api_client/models/get_job_definition_by_id_endpoint_output.py b/src/rapidata/api_client/models/get_job_definition_by_id_endpoint_output.py index b0b13e40c..0699e2c5f 100644 --- a/src/rapidata/api_client/models/get_job_definition_by_id_endpoint_output.py +++ b/src/rapidata/api_client/models/get_job_definition_by_id_endpoint_output.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List from rapidata.api_client.models.definition_type import DefinitionType from pydantic import ValidationError @@ -33,10 +33,11 @@ class GetJobDefinitionByIdEndpointOutput(LazyValidatedModel): definition_id: StrictStr = Field(description="The job definition id.", alias="definitionId") name: StrictStr = Field(description="The name of the job definition.") definition_type: DefinitionType = Field(description="The type of the job definition.", alias="definitionType") + is_public: StrictBool = Field(description="Whether the definition is shared publicly as a reusable template.", alias="isPublic") created_at: datetime = Field(description="The creation timestamp.", alias="createdAt") owner_id: StrictStr = Field(description="The id of the job definition's owner.", alias="ownerId") owner_mail: StrictStr = Field(description="The email of the job definition's owner.", alias="ownerMail") - __properties: ClassVar[List[str]] = ["definitionId", "name", "definitionType", "createdAt", "ownerId", "ownerMail"] + __properties: ClassVar[List[str]] = ["definitionId", "name", "definitionType", "isPublic", "createdAt", "ownerId", "ownerMail"] # model_config is inherited from LazyValidatedModel @@ -88,6 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "definitionId": obj.get("definitionId"), "name": obj.get("name"), "definitionType": obj.get("definitionType"), + "isPublic": obj.get("isPublic"), "createdAt": obj.get("createdAt"), "ownerId": obj.get("ownerId"), "ownerMail": obj.get("ownerMail") diff --git a/src/rapidata/api_client/models/get_replicate_model_endpoint_output.py b/src/rapidata/api_client/models/get_replicate_model_endpoint_output.py new file mode 100644 index 000000000..0be167bcf --- /dev/null +++ b/src/rapidata/api_client/models/get_replicate_model_endpoint_output.py @@ -0,0 +1,129 @@ +# 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 rapidata.api_client.models.get_replicate_model_endpoint_parameter import GetReplicateModelEndpointParameter +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class GetReplicateModelEndpointOutput(LazyValidatedModel): + """ + GetReplicateModelEndpointOutput + """ # noqa: E501 + model_owner: StrictStr = Field(description="The owner of the hosted model.", alias="modelOwner") + model_name: StrictStr = Field(description="The model name.", alias="modelName") + description: Optional[StrictStr] = Field(default=None, description="A short description of the model.") + cover_image_url: Optional[StrictStr] = Field(default=None, description="URL of a representative cover image, if available.", alias="coverImageUrl") + run_count: Optional[StrictInt] = Field(default=None, description="Total number of times the model has been run on Replicate, if known.", alias="runCount") + latest_version: Optional[StrictStr] = Field(default=None, description="The model's latest version id, if reported by Replicate.", alias="latestVersion") + parameters: List[GetReplicateModelEndpointParameter] + __properties: ClassVar[List[str]] = ["modelOwner", "modelName", "description", "coverImageUrl", "runCount", "latestVersion", "parameters"] + + # 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 GetReplicateModelEndpointOutput 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 parameters (list) + _items = [] + if self.parameters: + for _item_parameters in self.parameters: + if _item_parameters: + _items.append(_item_parameters.to_dict()) + _dict['parameters'] = _items + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if cover_image_url (nullable) is None + # and model_fields_set contains the field + if self.cover_image_url is None and "cover_image_url" in self.model_fields_set: + _dict['coverImageUrl'] = None + + # set to None if run_count (nullable) is None + # and model_fields_set contains the field + if self.run_count is None and "run_count" in self.model_fields_set: + _dict['runCount'] = None + + # set to None if latest_version (nullable) is None + # and model_fields_set contains the field + if self.latest_version is None and "latest_version" in self.model_fields_set: + _dict['latestVersion'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetReplicateModelEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "modelOwner": obj.get("modelOwner"), + "modelName": obj.get("modelName"), + "description": obj.get("description"), + "coverImageUrl": obj.get("coverImageUrl"), + "runCount": obj.get("runCount"), + "latestVersion": obj.get("latestVersion"), + "parameters": [GetReplicateModelEndpointParameter.from_dict(_item) for _item in obj["parameters"]] if obj.get("parameters") 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/get_replicate_model_endpoint_parameter.py b/src/rapidata/api_client/models/get_replicate_model_endpoint_parameter.py new file mode 100644 index 000000000..cf488807a --- /dev/null +++ b/src/rapidata/api_client/models/get_replicate_model_endpoint_parameter.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 pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from rapidata.api_client.models.replicate_model_parameter_type import ReplicateModelParameterType +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class GetReplicateModelEndpointParameter(LazyValidatedModel): + """ + GetReplicateModelEndpointParameter + """ # noqa: E501 + key: StrictStr + title: Optional[StrictStr] = None + description: Optional[StrictStr] = None + type: ReplicateModelParameterType + required: StrictBool + default: Optional[Any] = None + enum_values: List[StrictStr] = Field(alias="enumValues") + minimum: Optional[Union[StrictFloat, StrictInt]] = None + maximum: Optional[Union[StrictFloat, StrictInt]] = None + order: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["key", "title", "description", "type", "required", "default", "enumValues", "minimum", "maximum", "order"] + + # 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 GetReplicateModelEndpointParameter 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 title (nullable) is None + # and model_fields_set contains the field + if self.title is None and "title" in self.model_fields_set: + _dict['title'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if default (nullable) is None + # and model_fields_set contains the field + if self.default is None and "default" in self.model_fields_set: + _dict['default'] = None + + # set to None if minimum (nullable) is None + # and model_fields_set contains the field + if self.minimum is None and "minimum" in self.model_fields_set: + _dict['minimum'] = None + + # set to None if maximum (nullable) is None + # and model_fields_set contains the field + if self.maximum is None and "maximum" in self.model_fields_set: + _dict['maximum'] = None + + # set to None if order (nullable) is None + # and model_fields_set contains the field + if self.order is None and "order" in self.model_fields_set: + _dict['order'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetReplicateModelEndpointParameter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "key": obj.get("key"), + "title": obj.get("title"), + "description": obj.get("description"), + "type": obj.get("type"), + "required": obj.get("required"), + "default": obj.get("default"), + "enumValues": obj.get("enumValues"), + "minimum": obj.get("minimum"), + "maximum": obj.get("maximum"), + "order": obj.get("order") + } + 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_aggregated_jobs_endpoint_output.py b/src/rapidata/api_client/models/query_aggregated_jobs_endpoint_output.py new file mode 100644 index 000000000..609de33eb --- /dev/null +++ b/src/rapidata/api_client/models/query_aggregated_jobs_endpoint_output.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +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 QueryAggregatedJobsEndpointOutput(LazyValidatedModel): + """ + QueryAggregatedJobsEndpointOutput + """ # noqa: E501 + amount: StrictInt = Field(description="The total number of jobs for this customer.") + last7_days: StrictInt = Field(description="The number of jobs created in the last 7 days.", alias="last7Days") + last_job_date: datetime = Field(description="The date of the most recent job.", alias="lastJobDate") + last_job_name: StrictStr = Field(description="The name of the most recent job.", alias="lastJobName") + last_job_id: StrictStr = Field(description="The ID of the most recent job.", alias="lastJobId") + owner_mail: StrictStr = Field(description="The customer's email address.", alias="ownerMail") + __properties: ClassVar[List[str]] = ["amount", "last7Days", "lastJobDate", "lastJobName", "lastJobId", "ownerMail"] + + # 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 QueryAggregatedJobsEndpointOutput 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 QueryAggregatedJobsEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "amount": obj.get("amount"), + "last7Days": obj.get("last7Days"), + "lastJobDate": obj.get("lastJobDate"), + "lastJobName": obj.get("lastJobName"), + "lastJobId": obj.get("lastJobId"), + "ownerMail": obj.get("ownerMail") + } + 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_aggregated_jobs_endpoint_paged_result_of_output.py b/src/rapidata/api_client/models/query_aggregated_jobs_endpoint_paged_result_of_output.py new file mode 100644 index 000000000..4b0b2f113 --- /dev/null +++ b/src/rapidata/api_client/models/query_aggregated_jobs_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_aggregated_jobs_endpoint_output import QueryAggregatedJobsEndpointOutput +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class QueryAggregatedJobsEndpointPagedResultOfOutput(LazyValidatedModel): + """ + QueryAggregatedJobsEndpointPagedResultOfOutput + """ # noqa: E501 + total: StrictInt + page: StrictInt + page_size: StrictInt = Field(alias="pageSize") + items: List[QueryAggregatedJobsEndpointOutput] + 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 QueryAggregatedJobsEndpointPagedResultOfOutput 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 QueryAggregatedJobsEndpointPagedResultOfOutput 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": [QueryAggregatedJobsEndpointOutput.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/query_managed_benchmarks_endpoint_output.py b/src/rapidata/api_client/models/query_managed_benchmarks_endpoint_output.py new file mode 100644 index 000000000..5ea7bd880 --- /dev/null +++ b/src/rapidata/api_client/models/query_managed_benchmarks_endpoint_output.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, 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 QueryManagedBenchmarksEndpointOutput(LazyValidatedModel): + """ + QueryManagedBenchmarksEndpointOutput + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the benchmark.") + name: StrictStr = Field(description="The name of the benchmark.") + is_managed: StrictBool = Field(description="Whether the benchmark is managed.", alias="isManaged") + is_public: StrictBool = Field(description="Whether the benchmark is public.", alias="isPublic") + created_at: datetime = Field(description="The timestamp when the benchmark was created.", alias="createdAt") + owner_mail: StrictStr = Field(description="The mail of the customer owning the benchmark.", alias="ownerMail") + __properties: ClassVar[List[str]] = ["id", "name", "isManaged", "isPublic", "createdAt", "ownerMail"] + + # 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 QueryManagedBenchmarksEndpointOutput 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 QueryManagedBenchmarksEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "id": obj.get("id"), + "name": obj.get("name"), + "isManaged": obj.get("isManaged"), + "isPublic": obj.get("isPublic"), + "createdAt": obj.get("createdAt"), + "ownerMail": obj.get("ownerMail") + } + 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_managed_benchmarks_endpoint_paged_result_of_output.py b/src/rapidata/api_client/models/query_managed_benchmarks_endpoint_paged_result_of_output.py new file mode 100644 index 000000000..e0bd521a1 --- /dev/null +++ b/src/rapidata/api_client/models/query_managed_benchmarks_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_managed_benchmarks_endpoint_output import QueryManagedBenchmarksEndpointOutput +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class QueryManagedBenchmarksEndpointPagedResultOfOutput(LazyValidatedModel): + """ + QueryManagedBenchmarksEndpointPagedResultOfOutput + """ # noqa: E501 + total: StrictInt + page: StrictInt + page_size: StrictInt = Field(alias="pageSize") + items: List[QueryManagedBenchmarksEndpointOutput] + 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 QueryManagedBenchmarksEndpointPagedResultOfOutput 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 QueryManagedBenchmarksEndpointPagedResultOfOutput 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": [QueryManagedBenchmarksEndpointOutput.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/query_public_job_definitions_endpoint_output.py b/src/rapidata/api_client/models/query_public_job_definitions_endpoint_output.py new file mode 100644 index 000000000..c914f72b9 --- /dev/null +++ b/src/rapidata/api_client/models/query_public_job_definitions_endpoint_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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from rapidata.api_client.models.definition_type import DefinitionType +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class QueryPublicJobDefinitionsEndpointOutput(LazyValidatedModel): + """ + QueryPublicJobDefinitionsEndpointOutput + """ # noqa: E501 + definition_id: StrictStr = Field(description="The id of the job definition.", alias="definitionId") + name: StrictStr = Field(description="The name of the job definition.") + definition_type: DefinitionType = Field(description="The type of the job definition.", alias="definitionType") + created_at: datetime = Field(description="The creation timestamp of the job definition.", alias="createdAt") + revision_count: StrictInt = Field(description="The number of revisions for this job definition.", alias="revisionCount") + owner_id: StrictStr = Field(description="The id of the owner of the job definition.", alias="ownerId") + owner_mail: StrictStr = Field(description="The email of the owner of the job definition.", alias="ownerMail") + __properties: ClassVar[List[str]] = ["definitionId", "name", "definitionType", "createdAt", "revisionCount", "ownerId", "ownerMail"] + + # 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 QueryPublicJobDefinitionsEndpointOutput 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 QueryPublicJobDefinitionsEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "definitionId": obj.get("definitionId"), + "name": obj.get("name"), + "definitionType": obj.get("definitionType"), + "createdAt": obj.get("createdAt"), + "revisionCount": obj.get("revisionCount"), + "ownerId": obj.get("ownerId"), + "ownerMail": obj.get("ownerMail") + } + 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_public_job_definitions_endpoint_paged_result_of_output.py b/src/rapidata/api_client/models/query_public_job_definitions_endpoint_paged_result_of_output.py new file mode 100644 index 000000000..06e67ad01 --- /dev/null +++ b/src/rapidata/api_client/models/query_public_job_definitions_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_public_job_definitions_endpoint_output import QueryPublicJobDefinitionsEndpointOutput +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class QueryPublicJobDefinitionsEndpointPagedResultOfOutput(LazyValidatedModel): + """ + QueryPublicJobDefinitionsEndpointPagedResultOfOutput + """ # noqa: E501 + total: StrictInt + page: StrictInt + page_size: StrictInt = Field(alias="pageSize") + items: List[QueryPublicJobDefinitionsEndpointOutput] + 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 QueryPublicJobDefinitionsEndpointPagedResultOfOutput 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 QueryPublicJobDefinitionsEndpointPagedResultOfOutput 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": [QueryPublicJobDefinitionsEndpointOutput.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/replicate_model_parameter_type.py b/src/rapidata/api_client/models/replicate_model_parameter_type.py new file mode 100644 index 000000000..d94bbc6eb --- /dev/null +++ b/src/rapidata/api_client/models/replicate_model_parameter_type.py @@ -0,0 +1,40 @@ +# 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 ReplicateModelParameterType(str, Enum): + """ + ReplicateModelParameterType + """ + + """ + allowed enum values + """ + STRING = 'String' + INTEGER = 'Integer' + NUMBER = 'Number' + BOOLEAN = 'Boolean' + URI = 'Uri' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ReplicateModelParameterType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/src/rapidata/api_client/models/search_replicate_models_endpoint_model.py b/src/rapidata/api_client/models/search_replicate_models_endpoint_model.py new file mode 100644 index 000000000..ad6e965d1 --- /dev/null +++ b/src/rapidata/api_client/models/search_replicate_models_endpoint_model.py @@ -0,0 +1,112 @@ +# 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 SearchReplicateModelsEndpointModel(LazyValidatedModel): + """ + SearchReplicateModelsEndpointModel + """ # noqa: E501 + model_owner: StrictStr = Field(alias="modelOwner") + model_name: StrictStr = Field(alias="modelName") + description: Optional[StrictStr] = None + cover_image_url: Optional[StrictStr] = Field(default=None, alias="coverImageUrl") + run_count: Optional[StrictInt] = Field(default=None, alias="runCount") + __properties: ClassVar[List[str]] = ["modelOwner", "modelName", "description", "coverImageUrl", "runCount"] + + # 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 SearchReplicateModelsEndpointModel 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 description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if cover_image_url (nullable) is None + # and model_fields_set contains the field + if self.cover_image_url is None and "cover_image_url" in self.model_fields_set: + _dict['coverImageUrl'] = None + + # set to None if run_count (nullable) is None + # and model_fields_set contains the field + if self.run_count is None and "run_count" in self.model_fields_set: + _dict['runCount'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchReplicateModelsEndpointModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "modelOwner": obj.get("modelOwner"), + "modelName": obj.get("modelName"), + "description": obj.get("description"), + "coverImageUrl": obj.get("coverImageUrl"), + "runCount": obj.get("runCount") + } + 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/search_replicate_models_endpoint_output.py b/src/rapidata/api_client/models/search_replicate_models_endpoint_output.py new file mode 100644 index 000000000..646f5a6a9 --- /dev/null +++ b/src/rapidata/api_client/models/search_replicate_models_endpoint_output.py @@ -0,0 +1,104 @@ +# 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 rapidata.api_client.models.search_replicate_models_endpoint_model import SearchReplicateModelsEndpointModel +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class SearchReplicateModelsEndpointOutput(LazyValidatedModel): + """ + SearchReplicateModelsEndpointOutput + """ # noqa: E501 + models: List[SearchReplicateModelsEndpointModel] + next_cursor: Optional[StrictStr] = Field(default=None, description="Cursor to fetch the next page, or null when there are no more results.", alias="nextCursor") + __properties: ClassVar[List[str]] = ["models", "nextCursor"] + + # 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 SearchReplicateModelsEndpointOutput 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 models (list) + _items = [] + if self.models: + for _item_models in self.models: + if _item_models: + _items.append(_item_models.to_dict()) + _dict['models'] = _items + # set to None if next_cursor (nullable) is None + # and model_fields_set contains the field + if self.next_cursor is None and "next_cursor" in self.model_fields_set: + _dict['nextCursor'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchReplicateModelsEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "models": [SearchReplicateModelsEndpointModel.from_dict(_item) for _item in obj["models"]] if obj.get("models") is not None else None, + "nextCursor": obj.get("nextCursor") + } + 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/update_participant_endpoint_input.py b/src/rapidata/api_client/models/update_participant_endpoint_input.py index f704963aa..2cb24636c 100644 --- a/src/rapidata/api_client/models/update_participant_endpoint_input.py +++ b/src/rapidata/api_client/models/update_participant_endpoint_input.py @@ -19,6 +19,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from rapidata.api_client.models.i_faucet_input import IFaucetInput from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel from typing import Optional, Set @@ -29,7 +30,8 @@ class UpdateParticipantEndpointInput(LazyValidatedModel): UpdateParticipantEndpointInput """ # noqa: E501 name: Optional[StrictStr] = Field(default=None, description="The new name of the participant.") - __properties: ClassVar[List[str]] = ["name"] + faucet: Optional[IFaucetInput] = Field(default=None, description="The faucet to set or replace on the participant.") + __properties: ClassVar[List[str]] = ["name", "faucet"] # model_config is inherited from LazyValidatedModel @@ -66,6 +68,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 @@ -78,7 +83,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _data = { - "name": obj.get("name") + "name": obj.get("name"), + "faucet": IFaucetInput.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_README.md b/src/rapidata/api_client_README.md index dcfac723e..8f7111e9f 100644 --- a/src/rapidata/api_client_README.md +++ b/src/rapidata/api_client_README.md @@ -120,6 +120,7 @@ Class | Method | HTTP request | Description *BenchmarkApi* | [**benchmark_combined_standings_get**](rapidata/api_client/docs/BenchmarkApi.md#benchmark_combined_standings_get) | **GET** /benchmark/combined-standings | Returns the combined standings for multiple benchmarks. *BenchmarkApi* | [**benchmark_post**](rapidata/api_client/docs/BenchmarkApi.md#benchmark_post) | **POST** /benchmark | Creates a benchmark. *BenchmarkApi* | [**benchmarks_get**](rapidata/api_client/docs/BenchmarkApi.md#benchmarks_get) | **GET** /benchmarks | Queries all benchmarks of the current user. +*BenchmarkApi* | [**benchmarks_managed_get**](rapidata/api_client/docs/BenchmarkApi.md#benchmarks_managed_get) | **GET** /benchmarks/managed | Queries the curated benchmarks available to every customer. *CacheApi* | [**campaign_cache_campaigns_get**](rapidata/api_client/docs/CacheApi.md#campaign_cache_campaigns_get) | **GET** /campaign/cache/campaigns | Returns the current state of the in-memory campaign cache. *CacheApi* | [**campaign_cache_user_scores_get**](rapidata/api_client/docs/CacheApi.md#campaign_cache_user_scores_get) | **GET** /campaign/cache/user-scores | Returns the current state of the in-memory default user score cache. *CampaignApi* | [**campaign_boost_external_campaign_id_fast_bid_multiplier_get**](rapidata/api_client/docs/CampaignApi.md#campaign_boost_external_campaign_id_fast_bid_multiplier_get) | **GET** /campaign/boost/{externalCampaignId}/fast-bid-multiplier | Returns the fast bid multiplier currently applied to an external booster campaign. @@ -165,6 +166,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* | [**leaderboard_faucet_replicate_models_get**](rapidata/api_client/docs/FaucetApi.md#leaderboard_faucet_replicate_models_get) | **GET** /leaderboard/faucet/replicate/models | Searches Replicate models by free-text term. +*FaucetApi* | [**leaderboard_faucet_replicate_models_model_owner_model_name_get**](rapidata/api_client/docs/FaucetApi.md#leaderboard_faucet_replicate_models_model_owner_model_name_get) | **GET** /leaderboard/faucet/replicate/models/{modelOwner}/{modelName} | Returns a single Replicate model with its input parameter schema. *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. @@ -192,14 +195,22 @@ Class | Method | HTTP request | Description *JobApi* | [**job_definition_definition_id_revision_post**](rapidata/api_client/docs/JobApi.md#job_definition_definition_id_revision_post) | **POST** /job/definition/{definitionId}/revision | Creates a new revision for an existing job definition. *JobApi* | [**job_definition_definition_id_revision_revision_number_get**](rapidata/api_client/docs/JobApi.md#job_definition_definition_id_revision_revision_number_get) | **GET** /job/definition/{definitionId}/revision/{revisionNumber} | Gets a specific revision for a job definition. *JobApi* | [**job_definition_definition_id_revisions_get**](rapidata/api_client/docs/JobApi.md#job_definition_definition_id_revisions_get) | **GET** /job/definition/{definitionId}/revisions | Queries the revisions of a specific job definition. +*JobApi* | [**job_definition_definition_id_share_patch**](rapidata/api_client/docs/JobApi.md#job_definition_definition_id_share_patch) | **PATCH** /job/definition/{definitionId}/share | Marks or unmarks a job definition as a public template that other users can discover and run. *JobApi* | [**job_definition_post**](rapidata/api_client/docs/JobApi.md#job_definition_post) | **POST** /job/definition | Creates a new job definition. *JobApi* | [**job_definitions_get**](rapidata/api_client/docs/JobApi.md#job_definitions_get) | **GET** /job/definitions | Queries job definitions visible to the caller. +*JobApi* | [**job_definitions_public_get**](rapidata/api_client/docs/JobApi.md#job_definitions_public_get) | **GET** /job/definitions/public | Queries job definitions that have been shared publicly, regardless of owner, so they can be reused as templates. +*JobApi* | [**job_job_id_approve_post**](rapidata/api_client/docs/JobApi.md#job_job_id_approve_post) | **POST** /job/{jobId}/approve | Approves a job in manual review so its pipeline can start processing. *JobApi* | [**job_job_id_delete**](rapidata/api_client/docs/JobApi.md#job_job_id_delete) | **DELETE** /job/{jobId} | Deletes a job. *JobApi* | [**job_job_id_download_results_get**](rapidata/api_client/docs/JobApi.md#job_job_id_download_results_get) | **GET** /job/{jobId}/download-results | Downloads the results of a job as a file attachment. *JobApi* | [**job_job_id_get**](rapidata/api_client/docs/JobApi.md#job_job_id_get) | **GET** /job/{jobId} | Gets a job by its id. *JobApi* | [**job_job_id_patch**](rapidata/api_client/docs/JobApi.md#job_job_id_patch) | **PATCH** /job/{jobId} | Updates a job. +*JobApi* | [**job_job_id_pause_post**](rapidata/api_client/docs/JobApi.md#job_job_id_pause_post) | **POST** /job/{jobId}/pause | Pauses a job, stopping all of its campaigns from processing. *JobApi* | [**job_job_id_results_get**](rapidata/api_client/docs/JobApi.md#job_job_id_results_get) | **GET** /job/{jobId}/results | Gets the results of a job as a JSON string. +*JobApi* | [**job_job_id_resume_post**](rapidata/api_client/docs/JobApi.md#job_job_id_resume_post) | **POST** /job/{jobId}/resume | Resumes a job, restarting all of its campaigns. +*JobApi* | [**job_job_id_retry_post**](rapidata/api_client/docs/JobApi.md#job_job_id_retry_post) | **POST** /job/{jobId}/retry | Retries processing of a failed job. +*JobApi* | [**job_job_id_share_patch**](rapidata/api_client/docs/JobApi.md#job_job_id_share_patch) | **PATCH** /job/{jobId}/share | Marks or unmarks a job as public so its results can be shared with other users. *JobApi* | [**job_post**](rapidata/api_client/docs/JobApi.md#job_post) | **POST** /job | Creates a new job from a job definition and audience. +*JobApi* | [**jobs_aggregated_overview_get**](rapidata/api_client/docs/JobApi.md#jobs_aggregated_overview_get) | **GET** /jobs/aggregated-overview | Retrieves jobs aggregated by customer with total counts and most recent job information. *JobApi* | [**jobs_get**](rapidata/api_client/docs/JobApi.md#jobs_get) | **GET** /jobs | Queries jobs visible to the caller. *LeaderboardApi* | [**benchmark_standing_leaderboard_id_participant_id_get**](rapidata/api_client/docs/LeaderboardApi.md#benchmark_standing_leaderboard_id_participant_id_get) | **GET** /benchmark/standing/{leaderboardId}/{participantId} | Gets a standing by leaderboard id and participant id. *LeaderboardApi* | [**leaderboard_combined_matrix_get**](rapidata/api_client/docs/LeaderboardApi.md#leaderboard_combined_matrix_get) | **GET** /leaderboard/combined-matrix | Returns the combined pairwise vote matrix for multiple leaderboards. @@ -269,6 +280,8 @@ Class | Method | HTTP request | Description *RankingFlowItemApi* | [**flow_ranking_item_flow_item_id_vote_matrix_get**](rapidata/api_client/docs/RankingFlowItemApi.md#flow_ranking_item_flow_item_id_vote_matrix_get) | **GET** /flow/ranking/item/{flowItemId}/vote-matrix | Retrieves the pairwise vote matrix for a completed flow item. *RapidApi* | [**rapid_rapid_id_reject_post**](rapidata/api_client/docs/RapidApi.md#rapid_rapid_id_reject_post) | **POST** /rapid/{rapidId}/reject | Rejects a completed rapid, marking its results as invalid. *RapidataIdentityAPIApi* | [**root_get**](rapidata/api_client/docs/RapidataIdentityAPIApi.md#root_get) | **GET** / | +*ReplicateApi* | [**leaderboard_faucet_replicate_models_get_0**](rapidata/api_client/docs/ReplicateApi.md#leaderboard_faucet_replicate_models_get_0) | **GET** /leaderboard/faucet/replicate/models | Searches Replicate models by free-text term. +*ReplicateApi* | [**leaderboard_faucet_replicate_models_model_owner_model_name_get_0**](rapidata/api_client/docs/ReplicateApi.md#leaderboard_faucet_replicate_models_model_owner_model_name_get_0) | **GET** /leaderboard/faucet/replicate/models/{modelOwner}/{modelName} | Returns a single Replicate model with its input parameter schema. *SampleApi* | [**benchmark_benchmark_id_samples_identifier_get**](rapidata/api_client/docs/SampleApi.md#benchmark_benchmark_id_samples_identifier_get) | **GET** /benchmark/{benchmarkId}/samples/{identifier} | Returns the paged samples of a benchmark filtered by an identifier. *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. @@ -495,6 +508,8 @@ Class | Method | HTTP request | Description - [GetRankingWorkflowResultsEndpointOutput](rapidata/api_client/docs/GetRankingWorkflowResultsEndpointOutput.md) - [GetRecommendedValidationSetEndpointOutput](rapidata/api_client/docs/GetRecommendedValidationSetEndpointOutput.md) - [GetRecommendedValidationSetEndpointValidationSetOutputModel](rapidata/api_client/docs/GetRecommendedValidationSetEndpointValidationSetOutputModel.md) + - [GetReplicateModelEndpointOutput](rapidata/api_client/docs/GetReplicateModelEndpointOutput.md) + - [GetReplicateModelEndpointParameter](rapidata/api_client/docs/GetReplicateModelEndpointParameter.md) - [GetResponseCountHistogramEndpointOutput](rapidata/api_client/docs/GetResponseCountHistogramEndpointOutput.md) - [GetResponseCountHistogramEndpointOutputBucket](rapidata/api_client/docs/GetResponseCountHistogramEndpointOutputBucket.md) - [GetResponseCountTimeseriesEndpointOutput](rapidata/api_client/docs/GetResponseCountTimeseriesEndpointOutput.md) @@ -829,6 +844,8 @@ Class | Method | HTTP request | Description - [PolygonShape](rapidata/api_client/docs/PolygonShape.md) - [PreviewOrderEndpointInput](rapidata/api_client/docs/PreviewOrderEndpointInput.md) - [ProblemDetails](rapidata/api_client/docs/ProblemDetails.md) + - [QueryAggregatedJobsEndpointOutput](rapidata/api_client/docs/QueryAggregatedJobsEndpointOutput.md) + - [QueryAggregatedJobsEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryAggregatedJobsEndpointPagedResultOfOutput.md) - [QueryAggregatedOrdersEndpointOutput](rapidata/api_client/docs/QueryAggregatedOrdersEndpointOutput.md) - [QueryAggregatedOrdersEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryAggregatedOrdersEndpointPagedResultOfOutput.md) - [QueryAudienceJobsEndpointOutput](rapidata/api_client/docs/QueryAudienceJobsEndpointOutput.md) @@ -869,6 +886,8 @@ Class | Method | HTTP request | Description - [QueryLeaderboardsByBenchmarkEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryLeaderboardsByBenchmarkEndpointPagedResultOfOutput.md) - [QueryLeaderboardsEndpointOutput](rapidata/api_client/docs/QueryLeaderboardsEndpointOutput.md) - [QueryLeaderboardsEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryLeaderboardsEndpointPagedResultOfOutput.md) + - [QueryManagedBenchmarksEndpointOutput](rapidata/api_client/docs/QueryManagedBenchmarksEndpointOutput.md) + - [QueryManagedBenchmarksEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryManagedBenchmarksEndpointPagedResultOfOutput.md) - [QueryOrdersEndpointOutput](rapidata/api_client/docs/QueryOrdersEndpointOutput.md) - [QueryOrdersEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryOrdersEndpointPagedResultOfOutput.md) - [QueryOrganizationsEndpointOutput](rapidata/api_client/docs/QueryOrganizationsEndpointOutput.md) @@ -877,6 +896,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) + - [QueryPublicJobDefinitionsEndpointOutput](rapidata/api_client/docs/QueryPublicJobDefinitionsEndpointOutput.md) + - [QueryPublicJobDefinitionsEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryPublicJobDefinitionsEndpointPagedResultOfOutput.md) - [QuerySampleGenerationsByBenchmarkEndpointOutput](rapidata/api_client/docs/QuerySampleGenerationsByBenchmarkEndpointOutput.md) - [QuerySampleGenerationsByBenchmarkEndpointPagedResultOfOutput](rapidata/api_client/docs/QuerySampleGenerationsByBenchmarkEndpointPagedResultOfOutput.md) - [QueryStandingsEndpointOutput](rapidata/api_client/docs/QueryStandingsEndpointOutput.md) @@ -896,6 +917,7 @@ Class | Method | HTTP request | Description - [ReadBridgeTokenEndpointKeysOutput](rapidata/api_client/docs/ReadBridgeTokenEndpointKeysOutput.md) - [ReadBridgeTokenEndpointNotAvailableOutput](rapidata/api_client/docs/ReadBridgeTokenEndpointNotAvailableOutput.md) - [RecreateExternalAudiencesEndpointInput](rapidata/api_client/docs/RecreateExternalAudiencesEndpointInput.md) + - [ReplicateModelParameterType](rapidata/api_client/docs/ReplicateModelParameterType.md) - [ReportRapidEndpointInput](rapidata/api_client/docs/ReportRapidEndpointInput.md) - [ResponseTally](rapidata/api_client/docs/ResponseTally.md) - [RetrievalMode](rapidata/api_client/docs/RetrievalMode.md) @@ -905,6 +927,8 @@ Class | Method | HTTP request | Description - [SampleGenerationItemStatus](rapidata/api_client/docs/SampleGenerationItemStatus.md) - [SampleGenerationStatus](rapidata/api_client/docs/SampleGenerationStatus.md) - [ScrubTruthModelScrubRange](rapidata/api_client/docs/ScrubTruthModelScrubRange.md) + - [SearchReplicateModelsEndpointModel](rapidata/api_client/docs/SearchReplicateModelsEndpointModel.md) + - [SearchReplicateModelsEndpointOutput](rapidata/api_client/docs/SearchReplicateModelsEndpointOutput.md) - [SendSurveyEndpointInput](rapidata/api_client/docs/SendSurveyEndpointInput.md) - [SetFastBidMultiplierEndpointInput](rapidata/api_client/docs/SetFastBidMultiplierEndpointInput.md) - [SetFastBidMultiplierEndpointOutput](rapidata/api_client/docs/SetFastBidMultiplierEndpointOutput.md)