diff --git a/openapi/schemas/asset.openapi.json b/openapi/schemas/asset.openapi.json index 276ccf96a..5ef0b5430 100644 --- a/openapi/schemas/asset.openapi.json +++ b/openapi/schemas/asset.openapi.json @@ -608,12 +608,14 @@ "originalSizeBytes": { "type": "integer", "description": "The original size of the uploaded file in bytes, if available. This may be null if the size could not be determined.", - "format": "int64" + "format": "int64", + "nullable": true }, "finalSizeBytes": { "type": "integer", "description": "The final size of the stored file in bytes after processing (e.g., compression), if available.\n This may be null if the size could not be determined. If compression was applied, this size may be smaller than the original size.", - "format": "int64" + "format": "int64", + "nullable": true } } }, @@ -647,12 +649,14 @@ "originalSizeBytes": { "type": "integer", "description": "The original size of the uploaded file in bytes, if available. This may be null if the size could not be determined.", - "format": "int64" + "format": "int64", + "nullable": true }, "finalSizeBytes": { "type": "integer", "description": "The final size of the stored file in bytes after processing (e.g., compression), if available.\n This may be smaller than the original size if compression was applied.", - "format": "int64" + "format": "int64", + "nullable": true } } }, @@ -669,7 +673,8 @@ }, "status": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "detail": { "type": "string", diff --git a/openapi/schemas/audience.openapi.json b/openapi/schemas/audience.openapi.json index 02a59a1ba..bbb11ca29 100644 --- a/openapi/schemas/audience.openapi.json +++ b/openapi/schemas/audience.openapi.json @@ -781,7 +781,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryJobsResult" + "$ref": "#/components/schemas/QueryAudienceJobsEndpoint_PagedResultOfOutput" } } } @@ -1788,7 +1788,8 @@ "sortIndex": { "type": "integer", "description": "The sort index that controls the serving order of this example within the audience.\n When null, the next sort index is automatically calculated.", - "format": "int32" + "format": "int32", + "nullable": true }, "featureFlags": { "allOf": [ @@ -1828,7 +1829,7 @@ } } }, - "AudienceJobState": { + "AudienceJobStatus": { "enum": [ "Submitted", "Running", @@ -1917,17 +1918,20 @@ "graduationScore": { "type": "number", "description": "The score used to determine whether a user graduates from the distilling campaign.", - "format": "double" + "format": "double", + "nullable": true }, "demotionScore": { "type": "number", "description": "Score below which a graduated user is demoted back to distilling.\n Must be less than or equal to GraduationScore. Defaults to null (uses GraduationScore).", - "format": "double" + "format": "double", + "nullable": true }, "minimumSizeForActivation": { "type": "integer", "description": "The minimum number of users required for an audience to be activated.", - "format": "int64" + "format": "int64", + "nullable": true }, "logo": { "allOf": [ @@ -1940,17 +1944,26 @@ "maxDistillingResponses": { "type": "integer", "description": "Maximum responses before user exits the distilling campaign.\n Defaults to 10. Set to null to disable this exit condition.", - "format": "uint32" + "format": "uint32", + "nullable": true + }, + "minResponsesToGraduate": { + "type": "integer", + "description": "Minimum responses required before a user can graduate into the audience.\n Even if the user's score is at or above the graduation threshold, they will\n remain in distilling until they have answered at least this many responses.\n Must be strictly less than MaxDistillingResponses when both are set.\n Defaults to null (no minimum — users graduate as soon as the score is reached).", + "format": "uint32", + "nullable": true }, "dropMinResponses": { "type": "integer", "description": "Minimum responses before the drop score check applies.\n Users need at least this many responses before they can be kicked out for low score.\n Defaults to 3. Set to null to apply drop score check from the first response.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "dropScore": { "type": "number", "description": "Score floor - users below this score exit the distilling campaign\n (only after completing DropMinResponses).\n Defaults to 0.2. Set to null to disable this exit condition.", - "format": "double" + "format": "double", + "nullable": true }, "isDistillingCampaignSticky": { "type": "boolean", @@ -1959,27 +1972,32 @@ "maxDistillingSessions": { "type": "integer", "description": "Maximum sessions (rapid retrievals) before user exits the distilling campaign.\n Defaults to null (disabled). Set to a value to enable session-based exit condition.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "inactivityDropDays": { "type": "integer", "description": "Number of days of inactivity before a distilling user is dropped.\n Defaults to null (disabled).", - "format": "uint32" + "format": "uint32", + "nullable": true }, "minSubmissionRate": { "type": "number", "description": "Minimum submission rate (responses / sessions) before a user is dropped.\n Defaults to null (disabled).", - "format": "double" + "format": "double", + "nullable": true }, "minSessionsForSubmissionRate": { "type": "integer", "description": "Minimum number of sessions before the submission rate check applies.\n Defaults to null (applies from first session).", - "format": "uint32" + "format": "uint32", + "nullable": true }, "minSubmissionRateGraduated": { "type": "number", "description": "Minimum submission rate for graduated users. If null, MinSubmissionRate applies to graduated users.\n Set a lower value to be more lenient with graduated users.", - "format": "double" + "format": "double", + "nullable": true }, "distillingRetrievalMode": { "allOf": [ @@ -1992,12 +2010,14 @@ "minDistillingForGlobalBoost": { "type": "integer", "description": "Minimum distilling users before disabling global boost.\n Defaults to 200. Admin-only override.", - "format": "int32" + "format": "int32", + "nullable": true }, "minGraduatedForDistillingBoost": { "type": "integer", "description": "Minimum graduated users before disabling distilling boost.\n Defaults to 100. Admin-only override.", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -2028,19 +2048,23 @@ "properties": { "xMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "xMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -2230,12 +2254,14 @@ "minGraduatedForDistillingBoost": { "type": "integer", "description": "Minimum graduated users before disabling distilling boost.", - "format": "int32" + "format": "int32", + "nullable": true }, "minDistillingForGlobalBoost": { "type": "integer", "description": "Minimum distilling users before disabling global boost.", - "format": "int32" + "format": "int32", + "nullable": true }, "graduationScore": { "type": "number", @@ -2245,47 +2271,56 @@ "demotionScore": { "type": "number", "description": "Score below which a graduated user is demoted back to distilling.", - "format": "double" + "format": "double", + "nullable": true }, "maxDistillingResponses": { "type": "integer", "description": "Maximum responses before user exits the distilling campaign.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "dropMinResponses": { "type": "integer", "description": "Minimum responses before the drop score check applies.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "dropScore": { "type": "number", "description": "Score floor - users below this score exit the distilling campaign.", - "format": "double" + "format": "double", + "nullable": true }, "maxDistillingSessions": { "type": "integer", "description": "Maximum sessions before user exits the distilling campaign.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "inactivityDropDays": { "type": "integer", "description": "Number of days of inactivity before a distilling user is dropped.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "minSubmissionRate": { "type": "number", "description": "Minimum submission rate before a user is dropped.", - "format": "double" + "format": "double", + "nullable": true }, "minSessionsForSubmissionRate": { "type": "integer", "description": "Minimum number of sessions before the submission rate check applies.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "minSubmissionRateGraduated": { "type": "number", "description": "Minimum submission rate for graduated users.", - "format": "double" + "format": "double", + "nullable": true }, "distillingRetrievalMode": { "allOf": [ @@ -2306,12 +2341,14 @@ "randomAdmissionProbability": { "type": "number", "description": "The probability of admitting a random user to the audience.", - "format": "double" + "format": "double", + "nullable": true }, "health": { "type": "number", "description": "The health score of the audience.", - "format": "double" + "format": "double", + "nullable": true }, "graduated": { "type": "integer", @@ -2763,6 +2800,9 @@ { "$ref": "#/components/schemas/IAudienceFilterCountryAudienceFilter" }, + { + "$ref": "#/components/schemas/IAudienceFilterDemographicAudienceFilter" + }, { "$ref": "#/components/schemas/IAudienceFilterLanguageAudienceFilter" }, @@ -2778,6 +2818,7 @@ "mapping": { "AndFilter": "#/components/schemas/IAudienceFilterAndAudienceFilter", "CountryFilter": "#/components/schemas/IAudienceFilterCountryAudienceFilter", + "DemographicFilter": "#/components/schemas/IAudienceFilterDemographicAudienceFilter", "LanguageFilter": "#/components/schemas/IAudienceFilterLanguageAudienceFilter", "NotFilter": "#/components/schemas/IAudienceFilterNotAudienceFilter", "OrFilter": "#/components/schemas/IAudienceFilterOrAudienceFilter" @@ -2824,6 +2865,30 @@ } } }, + "IAudienceFilterDemographicAudienceFilter": { + "required": [ + "identifier", + "values", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "DemographicFilter" + ], + "type": "string" + }, + "identifier": { + "type": "string" + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, "IAudienceFilterLanguageAudienceFilter": { "required": [ "languages", @@ -3128,11 +3193,13 @@ }, "requiredPrecision": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "requiredCompleteness": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -3156,11 +3223,13 @@ }, "requiredPrecision": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "requiredCompleteness": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -3208,11 +3277,13 @@ }, "requiredPrecision": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "requiredCompleteness": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -3529,7 +3600,60 @@ "type": "string" } }, - "PagedResultOfQueryJobsResult": { + "QueryAudienceJobsEndpoint_Output": { + "required": [ + "jobId", + "name", + "definitionId", + "audienceId", + "revisionNumber", + "pipelineId", + "status", + "createdAt" + ], + "type": "object", + "properties": { + "jobId": { + "type": "string", + "description": "The unique identifier of the job." + }, + "name": { + "type": "string", + "description": "The name of the job." + }, + "definitionId": { + "type": "string", + "description": "The identifier of the job definition." + }, + "audienceId": { + "type": "string", + "description": "The identifier of the audience the job belongs to." + }, + "revisionNumber": { + "type": "integer", + "description": "The revision number of the job definition.", + "format": "int32" + }, + "pipelineId": { + "type": "string", + "description": "The identifier of the pipeline executing the job." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/AudienceJobStatus" + } + ], + "description": "The current status of the job." + }, + "createdAt": { + "type": "string", + "description": "The timestamp when the job was created.", + "format": "date-time" + } + } + }, + "QueryAudienceJobsEndpoint_PagedResultOfOutput": { "required": [ "total", "page", @@ -3553,7 +3677,7 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryJobsResult" + "$ref": "#/components/schemas/QueryAudienceJobsEndpoint_Output" } }, "totalPages": { @@ -3638,12 +3762,14 @@ "randomAdmissionProbability": { "type": "number", "description": "The probability of admitting a random user to the audience.", - "format": "double" + "format": "double", + "nullable": true }, "health": { "type": "number", "description": "The health score of the audience.", - "format": "double" + "format": "double", + "nullable": true }, "graduated": { "type": "integer", @@ -3819,47 +3945,6 @@ } } }, - "QueryJobsResult": { - "required": [ - "jobId", - "name", - "definitionId", - "audienceId", - "revisionNumber", - "pipelineId", - "status", - "createdAt" - ], - "type": "object", - "properties": { - "jobId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "definitionId": { - "type": "string" - }, - "audienceId": { - "type": "string" - }, - "revisionNumber": { - "type": "integer", - "format": "int32" - }, - "pipelineId": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/AudienceJobState" - }, - "createdAt": { - "type": "string", - "format": "date-time" - } - } - }, "RecreateExternalAudiencesEndpoint_Input": { "required": [ "recreateAll" @@ -3942,6 +4027,12 @@ "format": "uint32", "nullable": true }, + "minResponsesToGraduate": { + "type": "integer", + "description": "Minimum responses required before a user can graduate into the audience.\n Even if the user's score is at or above the graduation threshold, they will\n remain in distilling until they have answered at least this many responses.\n Must be strictly less than MaxDistillingResponses when both are set.\n Set to null to allow graduation as soon as the score is reached.", + "format": "uint32", + "nullable": true + }, "dropMinResponses": { "type": "integer", "description": "Minimum responses before the drop score check applies.\n Users need at least this many responses before they can be kicked out for low score.\n Set to null to apply drop score check from the first response.", @@ -4072,12 +4163,14 @@ "minDistillingForGlobalBoost": { "type": "integer", "description": "Minimum number of distilling users required to activate global boost.", - "format": "int32" + "format": "int32", + "nullable": true }, "minGraduatedForDistillingBoost": { "type": "integer", "description": "Minimum number of graduated users required to activate distilling boost.", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -4104,7 +4197,8 @@ }, "status": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "detail": { "type": "string", diff --git a/openapi/schemas/campaign.openapi.json b/openapi/schemas/campaign.openapi.json index b77df324f..b8ed857c2 100644 --- a/openapi/schemas/campaign.openapi.json +++ b/openapi/schemas/campaign.openapi.json @@ -297,6 +297,7 @@ "tags": [ "Campaign" ], + "summary": "Exercises the rapid-bag pipeline with a synthetic user profile so the health of\n the campaign monitoring path can be probed externally.", "responses": { "200": { "description": "OK" @@ -359,6 +360,7 @@ "tags": [ "Campaign" ], + "summary": "Triggers a preheat pass for the boost subsystem so warm caches are ready before\n traffic spikes.", "responses": { "204": { "description": "No Content" @@ -821,6 +823,7 @@ "tags": [ "ExternalAudience" ], + "summary": "Queries the cached Kayzen external audiences available for targeting.", "parameters": [ { "name": "page", @@ -1034,6 +1037,7 @@ "tags": [ "ExternalAudience" ], + "summary": "Enqueues a background job that synchronises Kayzen external audiences with the cache.", "responses": { "202": { "description": "Accepted" @@ -1098,11 +1102,13 @@ }, "minAutoAdjustLevel": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "maxAutoAdjustLevel": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "languageBoosts": { "allOf": [ @@ -1192,7 +1198,8 @@ "level": { "type": "integer", "description": "The boost level. Takes precedence over IsActive when set.", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -1365,7 +1372,8 @@ "manualOverrideLevel": { "type": "integer", "description": "The manual override level, if manual mode is active.", - "format": "int32" + "format": "int32", + "nullable": true }, "globalBoost": { "allOf": [ @@ -2184,7 +2192,8 @@ }, "maxIterations": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -2261,7 +2270,8 @@ }, "probability": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "maxRapids": { "type": "integer", @@ -2314,7 +2324,8 @@ }, "amount": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "effortBudget": { "type": "integer", @@ -2325,7 +2336,8 @@ }, "maxIterations": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -2386,11 +2398,13 @@ }, "amount": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "effortBudget": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -2499,7 +2513,8 @@ "count": { "type": "integer", "description": "The number of users in the audience.", - "format": "int64" + "format": "int64", + "nullable": true } } }, @@ -2549,7 +2564,8 @@ "level": { "type": "integer", "description": "The global boost level. Null disables manual mode and returns to automatic.", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -2696,7 +2712,8 @@ }, "status": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "detail": { "type": "string", diff --git a/openapi/schemas/dataset.openapi.json b/openapi/schemas/dataset.openapi.json index 85df8c8b9..2d926590c 100644 --- a/openapi/schemas/dataset.openapi.json +++ b/openapi/schemas/dataset.openapi.json @@ -653,7 +653,8 @@ "sortIndex": { "type": "integer", "description": "The sort index represents the order of the datapoint in the dataset.", - "format": "int64" + "format": "int64", + "nullable": true }, "group": { "type": "string", @@ -795,7 +796,8 @@ "sortIndex": { "type": "integer", "description": "An optional upload index used to force a certain order.", - "format": "int64" + "format": "int64", + "nullable": true }, "createdAt": { "type": "string", @@ -865,7 +867,8 @@ }, "sortIndex": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, "asset": { "$ref": "#/components/schemas/IAssetModel" @@ -1537,7 +1540,8 @@ }, "status": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "detail": { "type": "string", diff --git a/openapi/schemas/flow.openapi.json b/openapi/schemas/flow.openapi.json index 6d6f7d20c..e1fcbdb37 100644 --- a/openapi/schemas/flow.openapi.json +++ b/openapi/schemas/flow.openapi.json @@ -1137,37 +1137,44 @@ "startingElo": { "type": "integer", "description": "Initial Elo rating for new items. Defaults to 1200.", - "format": "int32" + "format": "int32", + "nullable": true }, "maxResponses": { "type": "integer", "description": "Maximum number of responses per comparison.", - "format": "int32" + "format": "int32", + "nullable": true }, "serveResponses": { "type": "integer", "description": "Number of accepted responses per rapid at which to stop serving. When set, must be less than or equal to MaxResponses. Null defaults to MaxResponses.", - "format": "int32" + "format": "int32", + "nullable": true }, "serveToResponseRatio": { "type": "number", "description": "Ratio of concurrent serves to max responses. When set, limits serving to avoid over-collection.", - "format": "double" + "format": "double", + "nullable": true }, "serveTimeoutSeconds": { "type": "integer", "description": "Time in seconds a user has to submit an answer after loading the task. When set, overrides the global default.", - "format": "int32" + "format": "int32", + "nullable": true }, "minResponses": { "type": "integer", "description": "Minimum number of responses per comparison. Defaults to 20.", - "format": "int32" + "format": "int32", + "nullable": true }, "responsesRequired": { "type": "integer", "description": "Deprecated. Use MaxResponses instead.", "format": "int32", + "nullable": true, "deprecated": true }, "featureFlags": { @@ -1185,37 +1192,44 @@ "targetResponseCount": { "type": "integer", "description": "Target average response count per completed item. Enables PID control when set.", - "format": "int32" + "format": "int32", + "nullable": true }, "pidProportionalGain": { "type": "number", "description": "PID proportional gain. Defaults to 0.", - "format": "double" + "format": "double", + "nullable": true }, "pidIntegralGain": { "type": "number", "description": "PID integral gain. Defaults to 0.003.", - "format": "double" + "format": "double", + "nullable": true }, "pidDerivativeGain": { "type": "number", "description": "PID derivative gain. Defaults to 0.", - "format": "double" + "format": "double", + "nullable": true }, "pidOutputOffset": { "type": "number", "description": "Constant offset added to the PID output before clamping, shifting the controller's operating point. Defaults to 25.", - "format": "double" + "format": "double", + "nullable": true }, "pidMinSessionsPerMinute": { "type": "integer", "description": "Minimum sessions per minute the PID can set. Defaults to 20.", - "format": "int32" + "format": "int32", + "nullable": true }, "pidMaxSessionsPerMinute": { "type": "integer", "description": "Maximum sessions per minute the PID can set. Defaults to 50.", - "format": "int32" + "format": "int32", + "nullable": true }, "pidBatchMode": { "allOf": [ @@ -1228,7 +1242,8 @@ "drainDurationSeconds": { "type": "integer", "description": "Duration in seconds for draining flow items. Defaults to 40.", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -1262,12 +1277,14 @@ "timeToLiveInSeconds": { "type": "integer", "description": "Optional time-to-live in seconds before the flow item expires.", - "format": "int32" + "format": "int32", + "nullable": true }, "drainDurationInSeconds": { "type": "integer", "description": "Optional drain duration in seconds. When set, rapids are paused this many seconds before TTL expiry to allow in-flight responses to complete.", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -1783,6 +1800,7 @@ "$ref": "#/components/schemas/IFlowModelRankingFlowModel" } ], + "description": "A flow definition exposed over the API, identified by a discriminator.\n Implementations describe the flow's type-specific configuration.", "discriminator": { "propertyName": "_t", "mapping": { @@ -1853,7 +1871,8 @@ "targetResponseCount": { "type": "integer", "description": "Target average response count per completed item. Enables PID-based automatic rate control when set. Null disables PID.", - "format": "int32" + "format": "int32", + "nullable": true }, "pidProportionalGain": { "type": "number", @@ -1896,7 +1915,8 @@ "serveTimeoutSeconds": { "type": "integer", "description": "Maximum time in seconds a user has to submit an answer after loading the task. Null uses the system-wide default.", - "format": "int32" + "format": "int32", + "nullable": true }, "drainDurationSeconds": { "type": "integer", @@ -1906,12 +1926,14 @@ "serveToResponseRatio": { "type": "number", "description": "Ratio of serves to responses used to calculate how many tasks to serve per expected response.", - "format": "double" + "format": "double", + "nullable": true }, "globalBoostLevel": { "type": "integer", "description": "Priority multiplier for the flow's campaign. Higher values increase annotator compensation to attract more responses.", "format": "int32", + "nullable": true, "deprecated": true }, "audienceBoosts": { @@ -1963,12 +1985,14 @@ "maxResponses": { "type": "integer", "description": "Maximum number of responses a ranking item can receive before being removed from active ranking. Null allows unlimited responses.", - "format": "int32" + "format": "int32", + "nullable": true }, "serveResponses": { "type": "integer", "description": "Number of accepted responses per rapid at which to stop serving. Null defaults to MaxResponses.", - "format": "int32" + "format": "int32", + "nullable": true }, "featureFlags": { "allOf": [ @@ -2267,7 +2291,8 @@ }, "status": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "detail": { "type": "string", @@ -2574,7 +2599,8 @@ }, "status": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "detail": { "type": "string", diff --git a/openapi/schemas/identity.openapi.json b/openapi/schemas/identity.openapi.json index 80dd73f8b..fbe181531 100644 --- a/openapi/schemas/identity.openapi.json +++ b/openapi/schemas/identity.openapi.json @@ -1188,11 +1188,13 @@ }, "client_id_issued_at": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, "client_secret_expires_at": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, "redirect_uris": { "type": "array", @@ -1744,7 +1746,8 @@ "expiresIn": { "type": "integer", "description": "The lifetime of the access token, in seconds.", - "format": "int32" + "format": "int32", + "nullable": true }, "refreshToken": { "type": "string", @@ -1846,7 +1849,8 @@ }, "status": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "detail": { "type": "string", diff --git a/openapi/schemas/leaderboard.openapi.json b/openapi/schemas/leaderboard.openapi.json index 3dfec7d36..c2b858298 100644 --- a/openapi/schemas/leaderboard.openapi.json +++ b/openapi/schemas/leaderboard.openapi.json @@ -4335,12 +4335,14 @@ "responseBudget": { "type": "integer", "description": "Total amount of responses that get collected per run.", - "format": "int32" + "format": "int32", + "nullable": true }, "minResponses": { "type": "integer", "description": "The minimum amount of responses that need to be collected per comparison.", - "format": "int32" + "format": "int32", + "nullable": true }, "isInversed": { "type": "boolean", @@ -4730,7 +4732,8 @@ }, "score": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "wins": { "type": "number", @@ -4846,7 +4849,8 @@ }, "score": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "wins": { "type": "number", @@ -6256,7 +6260,8 @@ "score": { "type": "number", "description": "The calculated score, or null if not yet computed.", - "format": "double" + "format": "double", + "nullable": true }, "wins": { "type": "number", @@ -6709,7 +6714,8 @@ }, "score": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "wins": { "type": "number", @@ -6770,7 +6776,8 @@ "score": { "type": "number", "description": "The calculated score, or null if not yet computed.", - "format": "double" + "format": "double", + "nullable": true }, "wins": { "type": "number", @@ -7029,7 +7036,8 @@ }, "status": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "detail": { "type": "string", diff --git a/openapi/schemas/order.openapi.json b/openapi/schemas/order.openapi.json index 9c4f0f5ae..789efdac2 100644 --- a/openapi/schemas/order.openapi.json +++ b/openapi/schemas/order.openapi.json @@ -2424,6 +2424,7 @@ "tags": [ "Order" ], + "summary": "Queries orders with filtering and pagination.", "parameters": [ { "name": "page", @@ -3255,7 +3256,8 @@ "revisionNumber": { "type": "integer", "description": "The revision number to use. If not specified, the latest revision will be used.", - "format": "int32" + "format": "int32", + "nullable": true }, "name": { "type": "string", @@ -3485,7 +3487,8 @@ "priority": { "type": "integer", "description": "The priority is used to prioritize over other orders.", - "format": "int32" + "format": "int32", + "nullable": true }, "stickyState": { "allOf": [ @@ -3567,7 +3570,8 @@ "maxIterations": { "type": "integer", "description": "The maximum number of times a user is allowed to see the same rapid.", - "format": "int32" + "format": "int32", + "nullable": true }, "precedingOrderId": { "type": "string", @@ -4303,7 +4307,8 @@ }, "batchSize": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "featureFlags": { "type": "array", @@ -5198,7 +5203,8 @@ }, "maxIterations": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -5215,7 +5221,8 @@ }, "amount": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "effortBudget": { "type": "integer", @@ -5226,7 +5233,8 @@ }, "maxIterations": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -6202,7 +6210,8 @@ }, "status": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "detail": { "type": "string", diff --git a/openapi/schemas/pipeline.openapi.json b/openapi/schemas/pipeline.openapi.json index 6298ae211..e8fd6a9ed 100644 --- a/openapi/schemas/pipeline.openapi.json +++ b/openapi/schemas/pipeline.openapi.json @@ -1230,7 +1230,8 @@ }, "totalServeBudget": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -1530,7 +1531,8 @@ }, "batchSize": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "featureFlags": { "type": "array", @@ -1589,7 +1591,8 @@ }, "status": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "detail": { "type": "string", diff --git a/openapi/schemas/rapid.openapi.json b/openapi/schemas/rapid.openapi.json index 26777034c..15093a0af 100644 --- a/openapi/schemas/rapid.openapi.json +++ b/openapi/schemas/rapid.openapi.json @@ -1407,19 +1407,23 @@ "properties": { "xMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "xMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -2839,7 +2843,8 @@ }, "serveThreshold": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -3236,11 +3241,13 @@ }, "requiredPrecision": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "requiredCompleteness": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -3285,19 +3292,23 @@ "properties": { "xMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "xMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -3395,11 +3406,13 @@ "properties": { "x": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "y": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -3495,7 +3508,8 @@ "randomCorrectProbability": { "type": "number", "description": "The probability of a random correct answer.", - "format": "double" + "format": "double", + "nullable": true }, "key": { "type": "string", @@ -3949,7 +3963,8 @@ }, "status": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "detail": { "type": "string", diff --git a/openapi/schemas/rapidata.filtered.openapi.json b/openapi/schemas/rapidata.filtered.openapi.json index 3cf54acee..f003a3f41 100644 --- a/openapi/schemas/rapidata.filtered.openapi.json +++ b/openapi/schemas/rapidata.filtered.openapi.json @@ -1585,7 +1585,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryJobsResult" + "$ref": "#/components/schemas/QueryAudienceJobsEndpoint_PagedResultOfOutput" } } } @@ -3032,6 +3032,7 @@ "tags": [ "Campaign" ], + "summary": "Exercises the rapid-bag pipeline with a synthetic user profile so the health of\n the campaign monitoring path can be probed externally.", "responses": { "200": { "description": "OK" @@ -3124,6 +3125,7 @@ "tags": [ "Campaign" ], + "summary": "Triggers a preheat pass for the boost subsystem so warm caches are ready before\n traffic spikes.", "responses": { "204": { "description": "No Content" @@ -3646,6 +3648,7 @@ "tags": [ "ExternalAudience" ], + "summary": "Queries the cached Kayzen external audiences available for targeting.", "parameters": [ { "name": "page", @@ -3874,6 +3877,7 @@ "tags": [ "ExternalAudience" ], + "summary": "Enqueues a background job that synchronises Kayzen external audiences with the cache.", "responses": { "202": { "description": "Accepted" @@ -15206,6 +15210,7 @@ "tags": [ "Order" ], + "summary": "Queries orders with filtering and pagination.", "parameters": [ { "name": "page", @@ -20559,12 +20564,14 @@ "originalSizeBytes": { "type": "integer", "description": "The original size of the uploaded file in bytes, if available. This may be null if the size could not be determined.", - "format": "int64" + "format": "int64", + "nullable": true }, "finalSizeBytes": { "type": "integer", "description": "The final size of the stored file in bytes after processing (e.g., compression), if available.\n This may be null if the size could not be determined. If compression was applied, this size may be smaller than the original size.", - "format": "int64" + "format": "int64", + "nullable": true } } }, @@ -20598,12 +20605,14 @@ "originalSizeBytes": { "type": "integer", "description": "The original size of the uploaded file in bytes, if available. This may be null if the size could not be determined.", - "format": "int64" + "format": "int64", + "nullable": true }, "finalSizeBytes": { "type": "integer", "description": "The final size of the stored file in bytes after processing (e.g., compression), if available.\n This may be smaller than the original size if compression was applied.", - "format": "int64" + "format": "int64", + "nullable": true } } }, @@ -20620,7 +20629,8 @@ }, "status": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "detail": { "type": "string", @@ -20699,7 +20709,8 @@ "sortIndex": { "type": "integer", "description": "The sort index that controls the serving order of this example within the audience.\n When null, the next sort index is automatically calculated.", - "format": "int32" + "format": "int32", + "nullable": true }, "featureFlags": { "allOf": [ @@ -20739,7 +20750,7 @@ } } }, - "AudienceJobState": { + "AudienceJobStatus": { "enum": [ "Submitted", "Running", @@ -20828,17 +20839,20 @@ "graduationScore": { "type": "number", "description": "The score used to determine whether a user graduates from the distilling campaign.", - "format": "double" + "format": "double", + "nullable": true }, "demotionScore": { "type": "number", "description": "Score below which a graduated user is demoted back to distilling.\n Must be less than or equal to GraduationScore. Defaults to null (uses GraduationScore).", - "format": "double" + "format": "double", + "nullable": true }, "minimumSizeForActivation": { "type": "integer", "description": "The minimum number of users required for an audience to be activated.", - "format": "int64" + "format": "int64", + "nullable": true }, "logo": { "allOf": [ @@ -20851,17 +20865,26 @@ "maxDistillingResponses": { "type": "integer", "description": "Maximum responses before user exits the distilling campaign.\n Defaults to 10. Set to null to disable this exit condition.", - "format": "uint32" + "format": "uint32", + "nullable": true + }, + "minResponsesToGraduate": { + "type": "integer", + "description": "Minimum responses required before a user can graduate into the audience.\n Even if the user's score is at or above the graduation threshold, they will\n remain in distilling until they have answered at least this many responses.\n Must be strictly less than MaxDistillingResponses when both are set.\n Defaults to null (no minimum — users graduate as soon as the score is reached).", + "format": "uint32", + "nullable": true }, "dropMinResponses": { "type": "integer", "description": "Minimum responses before the drop score check applies.\n Users need at least this many responses before they can be kicked out for low score.\n Defaults to 3. Set to null to apply drop score check from the first response.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "dropScore": { "type": "number", "description": "Score floor - users below this score exit the distilling campaign\n (only after completing DropMinResponses).\n Defaults to 0.2. Set to null to disable this exit condition.", - "format": "double" + "format": "double", + "nullable": true }, "isDistillingCampaignSticky": { "type": "boolean", @@ -20870,27 +20893,32 @@ "maxDistillingSessions": { "type": "integer", "description": "Maximum sessions (rapid retrievals) before user exits the distilling campaign.\n Defaults to null (disabled). Set to a value to enable session-based exit condition.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "inactivityDropDays": { "type": "integer", "description": "Number of days of inactivity before a distilling user is dropped.\n Defaults to null (disabled).", - "format": "uint32" + "format": "uint32", + "nullable": true }, "minSubmissionRate": { "type": "number", "description": "Minimum submission rate (responses / sessions) before a user is dropped.\n Defaults to null (disabled).", - "format": "double" + "format": "double", + "nullable": true }, "minSessionsForSubmissionRate": { "type": "integer", "description": "Minimum number of sessions before the submission rate check applies.\n Defaults to null (applies from first session).", - "format": "uint32" + "format": "uint32", + "nullable": true }, "minSubmissionRateGraduated": { "type": "number", "description": "Minimum submission rate for graduated users. If null, MinSubmissionRate applies to graduated users.\n Set a lower value to be more lenient with graduated users.", - "format": "double" + "format": "double", + "nullable": true }, "distillingRetrievalMode": { "allOf": [ @@ -20903,12 +20931,14 @@ "minDistillingForGlobalBoost": { "type": "integer", "description": "Minimum distilling users before disabling global boost.\n Defaults to 200. Admin-only override.", - "format": "int32" + "format": "int32", + "nullable": true }, "minGraduatedForDistillingBoost": { "type": "integer", "description": "Minimum graduated users before disabling distilling boost.\n Defaults to 100. Admin-only override.", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -20939,19 +20969,23 @@ "properties": { "xMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "xMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -21141,12 +21175,14 @@ "minGraduatedForDistillingBoost": { "type": "integer", "description": "Minimum graduated users before disabling distilling boost.", - "format": "int32" + "format": "int32", + "nullable": true }, "minDistillingForGlobalBoost": { "type": "integer", "description": "Minimum distilling users before disabling global boost.", - "format": "int32" + "format": "int32", + "nullable": true }, "graduationScore": { "type": "number", @@ -21156,47 +21192,56 @@ "demotionScore": { "type": "number", "description": "Score below which a graduated user is demoted back to distilling.", - "format": "double" + "format": "double", + "nullable": true }, "maxDistillingResponses": { "type": "integer", "description": "Maximum responses before user exits the distilling campaign.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "dropMinResponses": { "type": "integer", "description": "Minimum responses before the drop score check applies.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "dropScore": { "type": "number", "description": "Score floor - users below this score exit the distilling campaign.", - "format": "double" + "format": "double", + "nullable": true }, "maxDistillingSessions": { "type": "integer", "description": "Maximum sessions before user exits the distilling campaign.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "inactivityDropDays": { "type": "integer", "description": "Number of days of inactivity before a distilling user is dropped.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "minSubmissionRate": { "type": "number", "description": "Minimum submission rate before a user is dropped.", - "format": "double" + "format": "double", + "nullable": true }, "minSessionsForSubmissionRate": { "type": "integer", "description": "Minimum number of sessions before the submission rate check applies.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "minSubmissionRateGraduated": { "type": "number", "description": "Minimum submission rate for graduated users.", - "format": "double" + "format": "double", + "nullable": true }, "distillingRetrievalMode": { "allOf": [ @@ -21217,12 +21262,14 @@ "randomAdmissionProbability": { "type": "number", "description": "The probability of admitting a random user to the audience.", - "format": "double" + "format": "double", + "nullable": true }, "health": { "type": "number", "description": "The health score of the audience.", - "format": "double" + "format": "double", + "nullable": true }, "graduated": { "type": "integer", @@ -21674,6 +21721,9 @@ { "$ref": "#/components/schemas/IAudienceFilterCountryAudienceFilter" }, + { + "$ref": "#/components/schemas/IAudienceFilterDemographicAudienceFilter" + }, { "$ref": "#/components/schemas/IAudienceFilterLanguageAudienceFilter" }, @@ -21689,6 +21739,7 @@ "mapping": { "AndFilter": "#/components/schemas/IAudienceFilterAndAudienceFilter", "CountryFilter": "#/components/schemas/IAudienceFilterCountryAudienceFilter", + "DemographicFilter": "#/components/schemas/IAudienceFilterDemographicAudienceFilter", "LanguageFilter": "#/components/schemas/IAudienceFilterLanguageAudienceFilter", "NotFilter": "#/components/schemas/IAudienceFilterNotAudienceFilter", "OrFilter": "#/components/schemas/IAudienceFilterOrAudienceFilter" @@ -21735,6 +21786,30 @@ } } }, + "IAudienceFilterDemographicAudienceFilter": { + "required": [ + "identifier", + "values", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "DemographicFilter" + ], + "type": "string" + }, + "identifier": { + "type": "string" + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, "IAudienceFilterLanguageAudienceFilter": { "required": [ "languages", @@ -22039,11 +22114,13 @@ }, "requiredPrecision": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "requiredCompleteness": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -22067,11 +22144,13 @@ }, "requiredPrecision": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "requiredCompleteness": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -22119,11 +22198,13 @@ }, "requiredPrecision": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "requiredCompleteness": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -22436,7 +22517,60 @@ "type": "string" } }, - "PagedResultOfQueryJobsResult": { + "QueryAudienceJobsEndpoint_Output": { + "required": [ + "jobId", + "name", + "definitionId", + "audienceId", + "revisionNumber", + "pipelineId", + "status", + "createdAt" + ], + "type": "object", + "properties": { + "jobId": { + "type": "string", + "description": "The unique identifier of the job." + }, + "name": { + "type": "string", + "description": "The name of the job." + }, + "definitionId": { + "type": "string", + "description": "The identifier of the job definition." + }, + "audienceId": { + "type": "string", + "description": "The identifier of the audience the job belongs to." + }, + "revisionNumber": { + "type": "integer", + "description": "The revision number of the job definition.", + "format": "int32" + }, + "pipelineId": { + "type": "string", + "description": "The identifier of the pipeline executing the job." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/AudienceJobStatus" + } + ], + "description": "The current status of the job." + }, + "createdAt": { + "type": "string", + "description": "The timestamp when the job was created.", + "format": "date-time" + } + } + }, + "QueryAudienceJobsEndpoint_PagedResultOfOutput": { "required": [ "total", "page", @@ -22460,7 +22594,7 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryJobsResult" + "$ref": "#/components/schemas/QueryAudienceJobsEndpoint_Output" } }, "totalPages": { @@ -22545,12 +22679,14 @@ "randomAdmissionProbability": { "type": "number", "description": "The probability of admitting a random user to the audience.", - "format": "double" + "format": "double", + "nullable": true }, "health": { "type": "number", "description": "The health score of the audience.", - "format": "double" + "format": "double", + "nullable": true }, "graduated": { "type": "integer", @@ -22726,47 +22862,6 @@ } } }, - "QueryJobsResult": { - "required": [ - "jobId", - "name", - "definitionId", - "audienceId", - "revisionNumber", - "pipelineId", - "status", - "createdAt" - ], - "type": "object", - "properties": { - "jobId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "definitionId": { - "type": "string" - }, - "audienceId": { - "type": "string" - }, - "revisionNumber": { - "type": "integer", - "format": "int32" - }, - "pipelineId": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/AudienceJobState" - }, - "createdAt": { - "type": "string", - "format": "date-time" - } - } - }, "RecreateExternalAudiencesEndpoint_Input": { "required": [ "recreateAll" @@ -22849,6 +22944,12 @@ "format": "uint32", "nullable": true }, + "minResponsesToGraduate": { + "type": "integer", + "description": "Minimum responses required before a user can graduate into the audience.\n Even if the user's score is at or above the graduation threshold, they will\n remain in distilling until they have answered at least this many responses.\n Must be strictly less than MaxDistillingResponses when both are set.\n Set to null to allow graduation as soon as the score is reached.", + "format": "uint32", + "nullable": true + }, "dropMinResponses": { "type": "integer", "description": "Minimum responses before the drop score check applies.\n Users need at least this many responses before they can be kicked out for low score.\n Set to null to apply drop score check from the first response.", @@ -22979,12 +23080,14 @@ "minDistillingForGlobalBoost": { "type": "integer", "description": "Minimum number of distilling users required to activate global boost.", - "format": "int32" + "format": "int32", + "nullable": true }, "minGraduatedForDistillingBoost": { "type": "integer", "description": "Minimum number of graduated users required to activate distilling boost.", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -23036,11 +23139,13 @@ }, "minAutoAdjustLevel": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "maxAutoAdjustLevel": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "languageBoosts": { "allOf": [ @@ -23130,7 +23235,8 @@ "level": { "type": "integer", "description": "The boost level. Takes precedence over IsActive when set.", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -23288,7 +23394,8 @@ "manualOverrideLevel": { "type": "integer", "description": "The manual override level, if manual mode is active.", - "format": "int32" + "format": "int32", + "nullable": true }, "globalBoost": { "allOf": [ @@ -24107,7 +24214,8 @@ }, "maxIterations": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -24184,7 +24292,8 @@ }, "probability": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "maxRapids": { "type": "integer", @@ -24237,7 +24346,8 @@ }, "amount": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "effortBudget": { "type": "integer", @@ -24248,7 +24358,8 @@ }, "maxIterations": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -24309,11 +24420,13 @@ }, "amount": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "effortBudget": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -24422,7 +24535,8 @@ "count": { "type": "integer", "description": "The number of users in the audience.", - "format": "int64" + "format": "int64", + "nullable": true } } }, @@ -24465,7 +24579,8 @@ "level": { "type": "integer", "description": "The global boost level. Null disables manual mode and returns to automatic.", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -24629,7 +24744,8 @@ "sortIndex": { "type": "integer", "description": "The sort index represents the order of the datapoint in the dataset.", - "format": "int64" + "format": "int64", + "nullable": true }, "group": { "type": "string", @@ -24763,7 +24879,8 @@ "sortIndex": { "type": "integer", "description": "An optional upload index used to force a certain order.", - "format": "int64" + "format": "int64", + "nullable": true }, "createdAt": { "type": "string", @@ -24833,7 +24950,8 @@ }, "sortIndex": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, "asset": { "$ref": "#/components/schemas/IAssetModel" @@ -24978,37 +25096,44 @@ "startingElo": { "type": "integer", "description": "Initial Elo rating for new items. Defaults to 1200.", - "format": "int32" + "format": "int32", + "nullable": true }, "maxResponses": { "type": "integer", "description": "Maximum number of responses per comparison.", - "format": "int32" + "format": "int32", + "nullable": true }, "serveResponses": { "type": "integer", "description": "Number of accepted responses per rapid at which to stop serving. When set, must be less than or equal to MaxResponses. Null defaults to MaxResponses.", - "format": "int32" + "format": "int32", + "nullable": true }, "serveToResponseRatio": { "type": "number", "description": "Ratio of concurrent serves to max responses. When set, limits serving to avoid over-collection.", - "format": "double" + "format": "double", + "nullable": true }, "serveTimeoutSeconds": { "type": "integer", "description": "Time in seconds a user has to submit an answer after loading the task. When set, overrides the global default.", - "format": "int32" + "format": "int32", + "nullable": true }, "minResponses": { "type": "integer", "description": "Minimum number of responses per comparison. Defaults to 20.", - "format": "int32" + "format": "int32", + "nullable": true }, "responsesRequired": { "type": "integer", "description": "Deprecated. Use MaxResponses instead.", "format": "int32", + "nullable": true, "deprecated": true }, "featureFlags": { @@ -25026,37 +25151,44 @@ "targetResponseCount": { "type": "integer", "description": "Target average response count per completed item. Enables PID control when set.", - "format": "int32" + "format": "int32", + "nullable": true }, "pidProportionalGain": { "type": "number", "description": "PID proportional gain. Defaults to 0.", - "format": "double" + "format": "double", + "nullable": true }, "pidIntegralGain": { "type": "number", "description": "PID integral gain. Defaults to 0.003.", - "format": "double" + "format": "double", + "nullable": true }, "pidDerivativeGain": { "type": "number", "description": "PID derivative gain. Defaults to 0.", - "format": "double" + "format": "double", + "nullable": true }, "pidOutputOffset": { "type": "number", "description": "Constant offset added to the PID output before clamping, shifting the controller's operating point. Defaults to 25.", - "format": "double" + "format": "double", + "nullable": true }, "pidMinSessionsPerMinute": { "type": "integer", "description": "Minimum sessions per minute the PID can set. Defaults to 20.", - "format": "int32" + "format": "int32", + "nullable": true }, "pidMaxSessionsPerMinute": { "type": "integer", "description": "Maximum sessions per minute the PID can set. Defaults to 50.", - "format": "int32" + "format": "int32", + "nullable": true }, "pidBatchMode": { "allOf": [ @@ -25069,7 +25201,8 @@ "drainDurationSeconds": { "type": "integer", "description": "Duration in seconds for draining flow items. Defaults to 40.", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -25103,12 +25236,14 @@ "timeToLiveInSeconds": { "type": "integer", "description": "Optional time-to-live in seconds before the flow item expires.", - "format": "int32" + "format": "int32", + "nullable": true }, "drainDurationInSeconds": { "type": "integer", "description": "Optional drain duration in seconds. When set, rapids are paused this many seconds before TTL expiry to allow in-flight responses to complete.", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -25473,6 +25608,7 @@ "$ref": "#/components/schemas/IFlowModelRankingFlowModel" } ], + "description": "A flow definition exposed over the API, identified by a discriminator.\n Implementations describe the flow's type-specific configuration.", "discriminator": { "propertyName": "_t", "mapping": { @@ -25543,7 +25679,8 @@ "targetResponseCount": { "type": "integer", "description": "Target average response count per completed item. Enables PID-based automatic rate control when set. Null disables PID.", - "format": "int32" + "format": "int32", + "nullable": true }, "pidProportionalGain": { "type": "number", @@ -25586,7 +25723,8 @@ "serveTimeoutSeconds": { "type": "integer", "description": "Maximum time in seconds a user has to submit an answer after loading the task. Null uses the system-wide default.", - "format": "int32" + "format": "int32", + "nullable": true }, "drainDurationSeconds": { "type": "integer", @@ -25596,12 +25734,14 @@ "serveToResponseRatio": { "type": "number", "description": "Ratio of serves to responses used to calculate how many tasks to serve per expected response.", - "format": "double" + "format": "double", + "nullable": true }, "globalBoostLevel": { "type": "integer", "description": "Priority multiplier for the flow's campaign. Higher values increase annotator compensation to attract more responses.", "format": "int32", + "nullable": true, "deprecated": true }, "audienceBoosts": { @@ -25653,12 +25793,14 @@ "maxResponses": { "type": "integer", "description": "Maximum number of responses a ranking item can receive before being removed from active ranking. Null allows unlimited responses.", - "format": "int32" + "format": "int32", + "nullable": true }, "serveResponses": { "type": "integer", "description": "Number of accepted responses per rapid at which to stop serving. Null defaults to MaxResponses.", - "format": "int32" + "format": "int32", + "nullable": true }, "featureFlags": { "allOf": [ @@ -25707,7 +25849,8 @@ }, "status": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "detail": { "type": "string", @@ -26031,11 +26174,13 @@ }, "client_id_issued_at": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, "client_secret_expires_at": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, "redirect_uris": { "type": "array", @@ -26587,7 +26732,8 @@ "expiresIn": { "type": "integer", "description": "The lifetime of the access token, in seconds.", - "format": "int32" + "format": "int32", + "nullable": true }, "refreshToken": { "type": "string", @@ -26808,12 +26954,14 @@ "responseBudget": { "type": "integer", "description": "Total amount of responses that get collected per run.", - "format": "int32" + "format": "int32", + "nullable": true }, "minResponses": { "type": "integer", "description": "The minimum amount of responses that need to be collected per comparison.", - "format": "int32" + "format": "int32", + "nullable": true }, "isInversed": { "type": "boolean", @@ -27180,7 +27328,8 @@ }, "score": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "wins": { "type": "number", @@ -27296,7 +27445,8 @@ }, "score": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "wins": { "type": "number", @@ -28148,7 +28298,8 @@ "score": { "type": "number", "description": "The calculated score, or null if not yet computed.", - "format": "double" + "format": "double", + "nullable": true }, "wins": { "type": "number", @@ -28601,7 +28752,8 @@ }, "score": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "wins": { "type": "number", @@ -28662,7 +28814,8 @@ "score": { "type": "number", "description": "The calculated score, or null if not yet computed.", - "format": "double" + "format": "double", + "nullable": true }, "wins": { "type": "number", @@ -28969,6 +29122,15 @@ null ] }, + "AudienceJobState": { + "enum": [ + "Submitted", + "Running", + "Completed", + "Failed", + "ManualApproval" + ] + }, "Category": { "required": [ "label", @@ -29214,7 +29376,8 @@ "revisionNumber": { "type": "integer", "description": "The revision number to use. If not specified, the latest revision will be used.", - "format": "int32" + "format": "int32", + "nullable": true }, "name": { "type": "string", @@ -29444,7 +29607,8 @@ "priority": { "type": "integer", "description": "The priority is used to prioritize over other orders.", - "format": "int32" + "format": "int32", + "nullable": true }, "stickyState": { "allOf": [ @@ -29526,7 +29690,8 @@ "maxIterations": { "type": "integer", "description": "The maximum number of times a user is allowed to see the same rapid.", - "format": "int32" + "format": "int32", + "nullable": true }, "precedingOrderId": { "type": "string", @@ -30080,7 +30245,8 @@ }, "batchSize": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "featureFlags": { "type": "array", @@ -30975,7 +31141,8 @@ }, "maxIterations": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -30992,7 +31159,8 @@ }, "amount": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "effortBudget": { "type": "integer", @@ -31003,7 +31171,8 @@ }, "maxIterations": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -32702,7 +32871,8 @@ }, "totalServeBudget": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -33002,7 +33172,8 @@ }, "batchSize": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "featureFlags": { "type": "array", @@ -33095,19 +33266,23 @@ "properties": { "xMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "xMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -33972,7 +34147,8 @@ }, "serveThreshold": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -34369,11 +34545,13 @@ }, "requiredPrecision": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "requiredCompleteness": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -34418,19 +34596,23 @@ "properties": { "xMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "xMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -34502,11 +34684,13 @@ "properties": { "x": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "y": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -34602,7 +34786,8 @@ "randomCorrectProbability": { "type": "number", "description": "The probability of a random correct answer.", - "format": "double" + "format": "double", + "nullable": true }, "key": { "type": "string", @@ -35166,7 +35351,8 @@ "randomCorrectProbability": { "type": "number", "description": "The probability for an answer to be correct when randomly guessing.", - "format": "double" + "format": "double", + "nullable": true }, "explanation": { "type": "string", @@ -35423,7 +35609,8 @@ "randomCorrectProbability": { "type": "number", "description": "The probability of a random correct answer.", - "format": "double" + "format": "double", + "nullable": true }, "state": { "allOf": [ @@ -35744,19 +35931,23 @@ "properties": { "xMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "xMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -35992,7 +36183,8 @@ "decisiveness": { "type": "number", "description": "The decisiveness of the rapid.", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -36210,7 +36402,8 @@ "decisiveness": { "type": "number", "description": "The decisiveness of the rapid.", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -37026,7 +37219,8 @@ }, "totalServeBudget": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -37648,11 +37842,13 @@ "properties": { "x": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "y": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, diff --git a/openapi/schemas/rapidata.openapi.json b/openapi/schemas/rapidata.openapi.json index 727617b60..95529a161 100644 --- a/openapi/schemas/rapidata.openapi.json +++ b/openapi/schemas/rapidata.openapi.json @@ -1585,7 +1585,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedResultOfQueryJobsResult" + "$ref": "#/components/schemas/QueryAudienceJobsEndpoint_PagedResultOfOutput" } } } @@ -3087,6 +3087,7 @@ "tags": [ "Campaign" ], + "summary": "Exercises the rapid-bag pipeline with a synthetic user profile so the health of\n the campaign monitoring path can be probed externally.", "responses": { "200": { "description": "OK" @@ -3179,6 +3180,7 @@ "tags": [ "Campaign" ], + "summary": "Triggers a preheat pass for the boost subsystem so warm caches are ready before\n traffic spikes.", "responses": { "204": { "description": "No Content" @@ -3701,6 +3703,7 @@ "tags": [ "ExternalAudience" ], + "summary": "Queries the cached Kayzen external audiences available for targeting.", "parameters": [ { "name": "page", @@ -3929,6 +3932,7 @@ "tags": [ "ExternalAudience" ], + "summary": "Enqueues a background job that synchronises Kayzen external audiences with the cache.", "responses": { "202": { "description": "Accepted" @@ -15261,6 +15265,7 @@ "tags": [ "Order" ], + "summary": "Queries orders with filtering and pagination.", "parameters": [ { "name": "page", @@ -20614,12 +20619,14 @@ "originalSizeBytes": { "type": "integer", "description": "The original size of the uploaded file in bytes, if available. This may be null if the size could not be determined.", - "format": "int64" + "format": "int64", + "nullable": true }, "finalSizeBytes": { "type": "integer", "description": "The final size of the stored file in bytes after processing (e.g., compression), if available.\n This may be null if the size could not be determined. If compression was applied, this size may be smaller than the original size.", - "format": "int64" + "format": "int64", + "nullable": true } } }, @@ -20653,12 +20660,14 @@ "originalSizeBytes": { "type": "integer", "description": "The original size of the uploaded file in bytes, if available. This may be null if the size could not be determined.", - "format": "int64" + "format": "int64", + "nullable": true }, "finalSizeBytes": { "type": "integer", "description": "The final size of the stored file in bytes after processing (e.g., compression), if available.\n This may be smaller than the original size if compression was applied.", - "format": "int64" + "format": "int64", + "nullable": true } } }, @@ -20675,7 +20684,8 @@ }, "status": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "detail": { "type": "string", @@ -20754,7 +20764,8 @@ "sortIndex": { "type": "integer", "description": "The sort index that controls the serving order of this example within the audience.\n When null, the next sort index is automatically calculated.", - "format": "int32" + "format": "int32", + "nullable": true }, "featureFlags": { "allOf": [ @@ -20794,7 +20805,7 @@ } } }, - "AudienceJobState": { + "AudienceJobStatus": { "enum": [ "Submitted", "Running", @@ -20883,17 +20894,20 @@ "graduationScore": { "type": "number", "description": "The score used to determine whether a user graduates from the distilling campaign.", - "format": "double" + "format": "double", + "nullable": true }, "demotionScore": { "type": "number", "description": "Score below which a graduated user is demoted back to distilling.\n Must be less than or equal to GraduationScore. Defaults to null (uses GraduationScore).", - "format": "double" + "format": "double", + "nullable": true }, "minimumSizeForActivation": { "type": "integer", "description": "The minimum number of users required for an audience to be activated.", - "format": "int64" + "format": "int64", + "nullable": true }, "logo": { "allOf": [ @@ -20906,17 +20920,26 @@ "maxDistillingResponses": { "type": "integer", "description": "Maximum responses before user exits the distilling campaign.\n Defaults to 10. Set to null to disable this exit condition.", - "format": "uint32" + "format": "uint32", + "nullable": true + }, + "minResponsesToGraduate": { + "type": "integer", + "description": "Minimum responses required before a user can graduate into the audience.\n Even if the user's score is at or above the graduation threshold, they will\n remain in distilling until they have answered at least this many responses.\n Must be strictly less than MaxDistillingResponses when both are set.\n Defaults to null (no minimum — users graduate as soon as the score is reached).", + "format": "uint32", + "nullable": true }, "dropMinResponses": { "type": "integer", "description": "Minimum responses before the drop score check applies.\n Users need at least this many responses before they can be kicked out for low score.\n Defaults to 3. Set to null to apply drop score check from the first response.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "dropScore": { "type": "number", "description": "Score floor - users below this score exit the distilling campaign\n (only after completing DropMinResponses).\n Defaults to 0.2. Set to null to disable this exit condition.", - "format": "double" + "format": "double", + "nullable": true }, "isDistillingCampaignSticky": { "type": "boolean", @@ -20925,27 +20948,32 @@ "maxDistillingSessions": { "type": "integer", "description": "Maximum sessions (rapid retrievals) before user exits the distilling campaign.\n Defaults to null (disabled). Set to a value to enable session-based exit condition.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "inactivityDropDays": { "type": "integer", "description": "Number of days of inactivity before a distilling user is dropped.\n Defaults to null (disabled).", - "format": "uint32" + "format": "uint32", + "nullable": true }, "minSubmissionRate": { "type": "number", "description": "Minimum submission rate (responses / sessions) before a user is dropped.\n Defaults to null (disabled).", - "format": "double" + "format": "double", + "nullable": true }, "minSessionsForSubmissionRate": { "type": "integer", "description": "Minimum number of sessions before the submission rate check applies.\n Defaults to null (applies from first session).", - "format": "uint32" + "format": "uint32", + "nullable": true }, "minSubmissionRateGraduated": { "type": "number", "description": "Minimum submission rate for graduated users. If null, MinSubmissionRate applies to graduated users.\n Set a lower value to be more lenient with graduated users.", - "format": "double" + "format": "double", + "nullable": true }, "distillingRetrievalMode": { "allOf": [ @@ -20958,12 +20986,14 @@ "minDistillingForGlobalBoost": { "type": "integer", "description": "Minimum distilling users before disabling global boost.\n Defaults to 200. Admin-only override.", - "format": "int32" + "format": "int32", + "nullable": true }, "minGraduatedForDistillingBoost": { "type": "integer", "description": "Minimum graduated users before disabling distilling boost.\n Defaults to 100. Admin-only override.", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -20994,19 +21024,23 @@ "properties": { "xMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "xMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -21196,12 +21230,14 @@ "minGraduatedForDistillingBoost": { "type": "integer", "description": "Minimum graduated users before disabling distilling boost.", - "format": "int32" + "format": "int32", + "nullable": true }, "minDistillingForGlobalBoost": { "type": "integer", "description": "Minimum distilling users before disabling global boost.", - "format": "int32" + "format": "int32", + "nullable": true }, "graduationScore": { "type": "number", @@ -21211,47 +21247,56 @@ "demotionScore": { "type": "number", "description": "Score below which a graduated user is demoted back to distilling.", - "format": "double" + "format": "double", + "nullable": true }, "maxDistillingResponses": { "type": "integer", "description": "Maximum responses before user exits the distilling campaign.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "dropMinResponses": { "type": "integer", "description": "Minimum responses before the drop score check applies.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "dropScore": { "type": "number", "description": "Score floor - users below this score exit the distilling campaign.", - "format": "double" + "format": "double", + "nullable": true }, "maxDistillingSessions": { "type": "integer", "description": "Maximum sessions before user exits the distilling campaign.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "inactivityDropDays": { "type": "integer", "description": "Number of days of inactivity before a distilling user is dropped.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "minSubmissionRate": { "type": "number", "description": "Minimum submission rate before a user is dropped.", - "format": "double" + "format": "double", + "nullable": true }, "minSessionsForSubmissionRate": { "type": "integer", "description": "Minimum number of sessions before the submission rate check applies.", - "format": "uint32" + "format": "uint32", + "nullable": true }, "minSubmissionRateGraduated": { "type": "number", "description": "Minimum submission rate for graduated users.", - "format": "double" + "format": "double", + "nullable": true }, "distillingRetrievalMode": { "allOf": [ @@ -21272,12 +21317,14 @@ "randomAdmissionProbability": { "type": "number", "description": "The probability of admitting a random user to the audience.", - "format": "double" + "format": "double", + "nullable": true }, "health": { "type": "number", "description": "The health score of the audience.", - "format": "double" + "format": "double", + "nullable": true }, "graduated": { "type": "integer", @@ -21729,6 +21776,9 @@ { "$ref": "#/components/schemas/IAudienceFilterCountryAudienceFilter" }, + { + "$ref": "#/components/schemas/IAudienceFilterDemographicAudienceFilter" + }, { "$ref": "#/components/schemas/IAudienceFilterLanguageAudienceFilter" }, @@ -21744,6 +21794,7 @@ "mapping": { "AndFilter": "#/components/schemas/IAudienceFilterAndAudienceFilter", "CountryFilter": "#/components/schemas/IAudienceFilterCountryAudienceFilter", + "DemographicFilter": "#/components/schemas/IAudienceFilterDemographicAudienceFilter", "LanguageFilter": "#/components/schemas/IAudienceFilterLanguageAudienceFilter", "NotFilter": "#/components/schemas/IAudienceFilterNotAudienceFilter", "OrFilter": "#/components/schemas/IAudienceFilterOrAudienceFilter" @@ -21790,6 +21841,30 @@ } } }, + "IAudienceFilterDemographicAudienceFilter": { + "required": [ + "identifier", + "values", + "_t" + ], + "properties": { + "_t": { + "enum": [ + "DemographicFilter" + ], + "type": "string" + }, + "identifier": { + "type": "string" + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, "IAudienceFilterLanguageAudienceFilter": { "required": [ "languages", @@ -22094,11 +22169,13 @@ }, "requiredPrecision": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "requiredCompleteness": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -22122,11 +22199,13 @@ }, "requiredPrecision": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "requiredCompleteness": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -22174,11 +22253,13 @@ }, "requiredPrecision": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "requiredCompleteness": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -22491,7 +22572,60 @@ "type": "string" } }, - "PagedResultOfQueryJobsResult": { + "QueryAudienceJobsEndpoint_Output": { + "required": [ + "jobId", + "name", + "definitionId", + "audienceId", + "revisionNumber", + "pipelineId", + "status", + "createdAt" + ], + "type": "object", + "properties": { + "jobId": { + "type": "string", + "description": "The unique identifier of the job." + }, + "name": { + "type": "string", + "description": "The name of the job." + }, + "definitionId": { + "type": "string", + "description": "The identifier of the job definition." + }, + "audienceId": { + "type": "string", + "description": "The identifier of the audience the job belongs to." + }, + "revisionNumber": { + "type": "integer", + "description": "The revision number of the job definition.", + "format": "int32" + }, + "pipelineId": { + "type": "string", + "description": "The identifier of the pipeline executing the job." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/AudienceJobStatus" + } + ], + "description": "The current status of the job." + }, + "createdAt": { + "type": "string", + "description": "The timestamp when the job was created.", + "format": "date-time" + } + } + }, + "QueryAudienceJobsEndpoint_PagedResultOfOutput": { "required": [ "total", "page", @@ -22515,7 +22649,7 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/QueryJobsResult" + "$ref": "#/components/schemas/QueryAudienceJobsEndpoint_Output" } }, "totalPages": { @@ -22600,12 +22734,14 @@ "randomAdmissionProbability": { "type": "number", "description": "The probability of admitting a random user to the audience.", - "format": "double" + "format": "double", + "nullable": true }, "health": { "type": "number", "description": "The health score of the audience.", - "format": "double" + "format": "double", + "nullable": true }, "graduated": { "type": "integer", @@ -22781,47 +22917,6 @@ } } }, - "QueryJobsResult": { - "required": [ - "jobId", - "name", - "definitionId", - "audienceId", - "revisionNumber", - "pipelineId", - "status", - "createdAt" - ], - "type": "object", - "properties": { - "jobId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "definitionId": { - "type": "string" - }, - "audienceId": { - "type": "string" - }, - "revisionNumber": { - "type": "integer", - "format": "int32" - }, - "pipelineId": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/AudienceJobState" - }, - "createdAt": { - "type": "string", - "format": "date-time" - } - } - }, "RecreateExternalAudiencesEndpoint_Input": { "required": [ "recreateAll" @@ -22904,6 +22999,12 @@ "format": "uint32", "nullable": true }, + "minResponsesToGraduate": { + "type": "integer", + "description": "Minimum responses required before a user can graduate into the audience.\n Even if the user's score is at or above the graduation threshold, they will\n remain in distilling until they have answered at least this many responses.\n Must be strictly less than MaxDistillingResponses when both are set.\n Set to null to allow graduation as soon as the score is reached.", + "format": "uint32", + "nullable": true + }, "dropMinResponses": { "type": "integer", "description": "Minimum responses before the drop score check applies.\n Users need at least this many responses before they can be kicked out for low score.\n Set to null to apply drop score check from the first response.", @@ -23034,12 +23135,14 @@ "minDistillingForGlobalBoost": { "type": "integer", "description": "Minimum number of distilling users required to activate global boost.", - "format": "int32" + "format": "int32", + "nullable": true }, "minGraduatedForDistillingBoost": { "type": "integer", "description": "Minimum number of graduated users required to activate distilling boost.", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -23091,11 +23194,13 @@ }, "minAutoAdjustLevel": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "maxAutoAdjustLevel": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "languageBoosts": { "allOf": [ @@ -23185,7 +23290,8 @@ "level": { "type": "integer", "description": "The boost level. Takes precedence over IsActive when set.", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -23343,7 +23449,8 @@ "manualOverrideLevel": { "type": "integer", "description": "The manual override level, if manual mode is active.", - "format": "int32" + "format": "int32", + "nullable": true }, "globalBoost": { "allOf": [ @@ -24162,7 +24269,8 @@ }, "maxIterations": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -24239,7 +24347,8 @@ }, "probability": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "maxRapids": { "type": "integer", @@ -24292,7 +24401,8 @@ }, "amount": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "effortBudget": { "type": "integer", @@ -24303,7 +24413,8 @@ }, "maxIterations": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -24364,11 +24475,13 @@ }, "amount": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "effortBudget": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -24477,7 +24590,8 @@ "count": { "type": "integer", "description": "The number of users in the audience.", - "format": "int64" + "format": "int64", + "nullable": true } } }, @@ -24520,7 +24634,8 @@ "level": { "type": "integer", "description": "The global boost level. Null disables manual mode and returns to automatic.", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -24684,7 +24799,8 @@ "sortIndex": { "type": "integer", "description": "The sort index represents the order of the datapoint in the dataset.", - "format": "int64" + "format": "int64", + "nullable": true }, "group": { "type": "string", @@ -24818,7 +24934,8 @@ "sortIndex": { "type": "integer", "description": "An optional upload index used to force a certain order.", - "format": "int64" + "format": "int64", + "nullable": true }, "createdAt": { "type": "string", @@ -24888,7 +25005,8 @@ }, "sortIndex": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, "asset": { "$ref": "#/components/schemas/IAssetModel" @@ -25033,37 +25151,44 @@ "startingElo": { "type": "integer", "description": "Initial Elo rating for new items. Defaults to 1200.", - "format": "int32" + "format": "int32", + "nullable": true }, "maxResponses": { "type": "integer", "description": "Maximum number of responses per comparison.", - "format": "int32" + "format": "int32", + "nullable": true }, "serveResponses": { "type": "integer", "description": "Number of accepted responses per rapid at which to stop serving. When set, must be less than or equal to MaxResponses. Null defaults to MaxResponses.", - "format": "int32" + "format": "int32", + "nullable": true }, "serveToResponseRatio": { "type": "number", "description": "Ratio of concurrent serves to max responses. When set, limits serving to avoid over-collection.", - "format": "double" + "format": "double", + "nullable": true }, "serveTimeoutSeconds": { "type": "integer", "description": "Time in seconds a user has to submit an answer after loading the task. When set, overrides the global default.", - "format": "int32" + "format": "int32", + "nullable": true }, "minResponses": { "type": "integer", "description": "Minimum number of responses per comparison. Defaults to 20.", - "format": "int32" + "format": "int32", + "nullable": true }, "responsesRequired": { "type": "integer", "description": "Deprecated. Use MaxResponses instead.", "format": "int32", + "nullable": true, "deprecated": true }, "featureFlags": { @@ -25081,37 +25206,44 @@ "targetResponseCount": { "type": "integer", "description": "Target average response count per completed item. Enables PID control when set.", - "format": "int32" + "format": "int32", + "nullable": true }, "pidProportionalGain": { "type": "number", "description": "PID proportional gain. Defaults to 0.", - "format": "double" + "format": "double", + "nullable": true }, "pidIntegralGain": { "type": "number", "description": "PID integral gain. Defaults to 0.003.", - "format": "double" + "format": "double", + "nullable": true }, "pidDerivativeGain": { "type": "number", "description": "PID derivative gain. Defaults to 0.", - "format": "double" + "format": "double", + "nullable": true }, "pidOutputOffset": { "type": "number", "description": "Constant offset added to the PID output before clamping, shifting the controller's operating point. Defaults to 25.", - "format": "double" + "format": "double", + "nullable": true }, "pidMinSessionsPerMinute": { "type": "integer", "description": "Minimum sessions per minute the PID can set. Defaults to 20.", - "format": "int32" + "format": "int32", + "nullable": true }, "pidMaxSessionsPerMinute": { "type": "integer", "description": "Maximum sessions per minute the PID can set. Defaults to 50.", - "format": "int32" + "format": "int32", + "nullable": true }, "pidBatchMode": { "allOf": [ @@ -25124,7 +25256,8 @@ "drainDurationSeconds": { "type": "integer", "description": "Duration in seconds for draining flow items. Defaults to 40.", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -25158,12 +25291,14 @@ "timeToLiveInSeconds": { "type": "integer", "description": "Optional time-to-live in seconds before the flow item expires.", - "format": "int32" + "format": "int32", + "nullable": true }, "drainDurationInSeconds": { "type": "integer", "description": "Optional drain duration in seconds. When set, rapids are paused this many seconds before TTL expiry to allow in-flight responses to complete.", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -25528,6 +25663,7 @@ "$ref": "#/components/schemas/IFlowModelRankingFlowModel" } ], + "description": "A flow definition exposed over the API, identified by a discriminator.\n Implementations describe the flow's type-specific configuration.", "discriminator": { "propertyName": "_t", "mapping": { @@ -25598,7 +25734,8 @@ "targetResponseCount": { "type": "integer", "description": "Target average response count per completed item. Enables PID-based automatic rate control when set. Null disables PID.", - "format": "int32" + "format": "int32", + "nullable": true }, "pidProportionalGain": { "type": "number", @@ -25641,7 +25778,8 @@ "serveTimeoutSeconds": { "type": "integer", "description": "Maximum time in seconds a user has to submit an answer after loading the task. Null uses the system-wide default.", - "format": "int32" + "format": "int32", + "nullable": true }, "drainDurationSeconds": { "type": "integer", @@ -25651,12 +25789,14 @@ "serveToResponseRatio": { "type": "number", "description": "Ratio of serves to responses used to calculate how many tasks to serve per expected response.", - "format": "double" + "format": "double", + "nullable": true }, "globalBoostLevel": { "type": "integer", "description": "Priority multiplier for the flow's campaign. Higher values increase annotator compensation to attract more responses.", "format": "int32", + "nullable": true, "deprecated": true }, "audienceBoosts": { @@ -25708,12 +25848,14 @@ "maxResponses": { "type": "integer", "description": "Maximum number of responses a ranking item can receive before being removed from active ranking. Null allows unlimited responses.", - "format": "int32" + "format": "int32", + "nullable": true }, "serveResponses": { "type": "integer", "description": "Number of accepted responses per rapid at which to stop serving. Null defaults to MaxResponses.", - "format": "int32" + "format": "int32", + "nullable": true }, "featureFlags": { "allOf": [ @@ -25762,7 +25904,8 @@ }, "status": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "detail": { "type": "string", @@ -26086,11 +26229,13 @@ }, "client_id_issued_at": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, "client_secret_expires_at": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, "redirect_uris": { "type": "array", @@ -26642,7 +26787,8 @@ "expiresIn": { "type": "integer", "description": "The lifetime of the access token, in seconds.", - "format": "int32" + "format": "int32", + "nullable": true }, "refreshToken": { "type": "string", @@ -26863,12 +27009,14 @@ "responseBudget": { "type": "integer", "description": "Total amount of responses that get collected per run.", - "format": "int32" + "format": "int32", + "nullable": true }, "minResponses": { "type": "integer", "description": "The minimum amount of responses that need to be collected per comparison.", - "format": "int32" + "format": "int32", + "nullable": true }, "isInversed": { "type": "boolean", @@ -27235,7 +27383,8 @@ }, "score": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "wins": { "type": "number", @@ -27351,7 +27500,8 @@ }, "score": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "wins": { "type": "number", @@ -28203,7 +28353,8 @@ "score": { "type": "number", "description": "The calculated score, or null if not yet computed.", - "format": "double" + "format": "double", + "nullable": true }, "wins": { "type": "number", @@ -28656,7 +28807,8 @@ }, "score": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "wins": { "type": "number", @@ -28717,7 +28869,8 @@ "score": { "type": "number", "description": "The calculated score, or null if not yet computed.", - "format": "double" + "format": "double", + "nullable": true }, "wins": { "type": "number", @@ -29024,6 +29177,15 @@ null ] }, + "AudienceJobState": { + "enum": [ + "Submitted", + "Running", + "Completed", + "Failed", + "ManualApproval" + ] + }, "Category": { "required": [ "label", @@ -29269,7 +29431,8 @@ "revisionNumber": { "type": "integer", "description": "The revision number to use. If not specified, the latest revision will be used.", - "format": "int32" + "format": "int32", + "nullable": true }, "name": { "type": "string", @@ -29499,7 +29662,8 @@ "priority": { "type": "integer", "description": "The priority is used to prioritize over other orders.", - "format": "int32" + "format": "int32", + "nullable": true }, "stickyState": { "allOf": [ @@ -29581,7 +29745,8 @@ "maxIterations": { "type": "integer", "description": "The maximum number of times a user is allowed to see the same rapid.", - "format": "int32" + "format": "int32", + "nullable": true }, "precedingOrderId": { "type": "string", @@ -30135,7 +30300,8 @@ }, "batchSize": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "featureFlags": { "type": "array", @@ -31030,7 +31196,8 @@ }, "maxIterations": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -31047,7 +31214,8 @@ }, "amount": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "effortBudget": { "type": "integer", @@ -31058,7 +31226,8 @@ }, "maxIterations": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -32757,7 +32926,8 @@ }, "totalServeBudget": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -33057,7 +33227,8 @@ }, "batchSize": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "featureFlags": { "type": "array", @@ -33150,19 +33321,23 @@ "properties": { "xMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "xMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -34027,7 +34202,8 @@ }, "serveThreshold": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -34424,11 +34600,13 @@ }, "requiredPrecision": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "requiredCompleteness": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -34473,19 +34651,23 @@ "properties": { "xMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "xMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -34557,11 +34739,13 @@ "properties": { "x": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "y": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -34657,7 +34841,8 @@ "randomCorrectProbability": { "type": "number", "description": "The probability of a random correct answer.", - "format": "double" + "format": "double", + "nullable": true }, "key": { "type": "string", @@ -35221,7 +35406,8 @@ "randomCorrectProbability": { "type": "number", "description": "The probability for an answer to be correct when randomly guessing.", - "format": "double" + "format": "double", + "nullable": true }, "explanation": { "type": "string", @@ -35478,7 +35664,8 @@ "randomCorrectProbability": { "type": "number", "description": "The probability of a random correct answer.", - "format": "double" + "format": "double", + "nullable": true }, "state": { "allOf": [ @@ -35799,19 +35986,23 @@ "properties": { "xMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "xMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -36047,7 +36238,8 @@ "decisiveness": { "type": "number", "description": "The decisiveness of the rapid.", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -36265,7 +36457,8 @@ "decisiveness": { "type": "number", "description": "The decisiveness of the rapid.", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -37081,7 +37274,8 @@ }, "totalServeBudget": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -37703,11 +37897,13 @@ "properties": { "x": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "y": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, diff --git a/openapi/schemas/translation.openapi.json b/openapi/schemas/translation.openapi.json index 7985b4f14..c6b1be35c 100644 --- a/openapi/schemas/translation.openapi.json +++ b/openapi/schemas/translation.openapi.json @@ -210,7 +210,8 @@ }, "status": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "detail": { "type": "string", diff --git a/openapi/schemas/validation.openapi.json b/openapi/schemas/validation.openapi.json index 9edfd4824..47de7b2dd 100644 --- a/openapi/schemas/validation.openapi.json +++ b/openapi/schemas/validation.openapi.json @@ -1298,7 +1298,8 @@ "randomCorrectProbability": { "type": "number", "description": "The probability for an answer to be correct when randomly guessing.", - "format": "double" + "format": "double", + "nullable": true }, "explanation": { "type": "string", @@ -1593,7 +1594,8 @@ "randomCorrectProbability": { "type": "number", "description": "The probability of a random correct answer.", - "format": "double" + "format": "double", + "nullable": true }, "state": { "allOf": [ @@ -2794,11 +2796,13 @@ }, "requiredPrecision": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "requiredCompleteness": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -2807,19 +2811,23 @@ "properties": { "xMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "xMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -3148,7 +3156,8 @@ }, "status": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "detail": { "type": "string", diff --git a/openapi/schemas/workflow.openapi.json b/openapi/schemas/workflow.openapi.json index 3f8285903..1e2aa0e5c 100644 --- a/openapi/schemas/workflow.openapi.json +++ b/openapi/schemas/workflow.openapi.json @@ -1041,19 +1041,23 @@ "properties": { "xMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMin": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "xMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "yMax": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -1297,7 +1301,8 @@ "decisiveness": { "type": "number", "description": "The decisiveness of the rapid.", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -1515,7 +1520,8 @@ "decisiveness": { "type": "number", "description": "The decisiveness of the rapid.", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -2770,7 +2776,8 @@ }, "totalServeBudget": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true } } }, @@ -3398,11 +3405,13 @@ "properties": { "x": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, "y": { "type": "number", - "format": "double" + "format": "double", + "nullable": true } } }, @@ -3514,7 +3523,8 @@ }, "status": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, "detail": { "type": "string", diff --git a/src/rapidata/api_client/api/audience_api.py b/src/rapidata/api_client/api/audience_api.py index f8762b9f5..74e879444 100644 --- a/src/rapidata/api_client/api/audience_api.py +++ b/src/rapidata/api_client/api/audience_api.py @@ -27,7 +27,7 @@ from rapidata.api_client.models.get_audience_state_recalculation_by_id_endpoint_output import GetAudienceStateRecalculationByIdEndpointOutput from rapidata.api_client.models.get_audience_user_state_metrics_result import GetAudienceUserStateMetricsResult from rapidata.api_client.models.get_latest_audience_state_recalculation_endpoint_output import GetLatestAudienceStateRecalculationEndpointOutput -from rapidata.api_client.models.paged_result_of_query_jobs_result import PagedResultOfQueryJobsResult +from rapidata.api_client.models.query_audience_jobs_endpoint_paged_result_of_output import QueryAudienceJobsEndpointPagedResultOfOutput from rapidata.api_client.models.query_audiences_endpoint_paged_result_of_output import QueryAudiencesEndpointPagedResultOfOutput from rapidata.api_client.models.recreate_external_audiences_endpoint_input import RecreateExternalAudiencesEndpointInput from rapidata.api_client.models.update_audience_endpoint_input import UpdateAudienceEndpointInput @@ -1209,7 +1209,7 @@ def audience_audience_id_jobs_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PagedResultOfQueryJobsResult: + ) -> QueryAudienceJobsEndpointPagedResultOfOutput: """Queries jobs for the specified audience. @@ -1270,7 +1270,7 @@ def audience_audience_id_jobs_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PagedResultOfQueryJobsResult", + '200': "QueryAudienceJobsEndpointPagedResultOfOutput", '400': "ValidationProblemDetails", '401': None, '403': None, @@ -1310,7 +1310,7 @@ def audience_audience_id_jobs_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[PagedResultOfQueryJobsResult]: + ) -> ApiResponse[QueryAudienceJobsEndpointPagedResultOfOutput]: """Queries jobs for the specified audience. @@ -1371,7 +1371,7 @@ def audience_audience_id_jobs_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PagedResultOfQueryJobsResult", + '200': "QueryAudienceJobsEndpointPagedResultOfOutput", '400': "ValidationProblemDetails", '401': None, '403': None, @@ -1472,7 +1472,7 @@ def audience_audience_id_jobs_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PagedResultOfQueryJobsResult", + '200': "QueryAudienceJobsEndpointPagedResultOfOutput", '400': "ValidationProblemDetails", '401': None, '403': None, diff --git a/src/rapidata/api_client/api/campaign_api.py b/src/rapidata/api_client/api/campaign_api.py index d26bc61c2..6f81c3364 100644 --- a/src/rapidata/api_client/api/campaign_api.py +++ b/src/rapidata/api_client/api/campaign_api.py @@ -597,7 +597,7 @@ def campaign_boost_preheat_post( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """campaign_boost_preheat_post + """Triggers a preheat pass for the boost subsystem so warm caches are ready before traffic spikes. :param _request_timeout: timeout setting for this request. If one @@ -662,7 +662,7 @@ def campaign_boost_preheat_post_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """campaign_boost_preheat_post + """Triggers a preheat pass for the boost subsystem so warm caches are ready before traffic spikes. :param _request_timeout: timeout setting for this request. If one @@ -727,7 +727,7 @@ def campaign_boost_preheat_post_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """campaign_boost_preheat_post + """Triggers a preheat pass for the boost subsystem so warm caches are ready before traffic spikes. :param _request_timeout: timeout setting for this request. If one @@ -2209,7 +2209,7 @@ def campaign_monitor_get( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """campaign_monitor_get + """Exercises the rapid-bag pipeline with a synthetic user profile so the health of the campaign monitoring path can be probed externally. :param _request_timeout: timeout setting for this request. If one @@ -2272,7 +2272,7 @@ def campaign_monitor_get_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """campaign_monitor_get + """Exercises the rapid-bag pipeline with a synthetic user profile so the health of the campaign monitoring path can be probed externally. :param _request_timeout: timeout setting for this request. If one @@ -2335,7 +2335,7 @@ def campaign_monitor_get_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """campaign_monitor_get + """Exercises the rapid-bag pipeline with a synthetic user profile so the health of the campaign monitoring path can be probed externally. :param _request_timeout: timeout setting for this request. If one diff --git a/src/rapidata/api_client/api/external_audience_api.py b/src/rapidata/api_client/api/external_audience_api.py index f9ffea1c7..1f383dcaa 100644 --- a/src/rapidata/api_client/api/external_audience_api.py +++ b/src/rapidata/api_client/api/external_audience_api.py @@ -62,7 +62,7 @@ def campaign_external_audiences_get( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> QueryExternalAudiencesEndpointPagedResultOfOutput: - """campaign_external_audiences_get + """Queries the cached Kayzen external audiences available for targeting. :param page: The 1-based page index. @@ -151,7 +151,7 @@ def campaign_external_audiences_get_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[QueryExternalAudiencesEndpointPagedResultOfOutput]: - """campaign_external_audiences_get + """Queries the cached Kayzen external audiences available for targeting. :param page: The 1-based page index. @@ -240,7 +240,7 @@ def campaign_external_audiences_get_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """campaign_external_audiences_get + """Queries the cached Kayzen external audiences available for targeting. :param page: The 1-based page index. @@ -425,7 +425,7 @@ def campaign_external_audiences_sync_post( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """campaign_external_audiences_sync_post + """Enqueues a background job that synchronises Kayzen external audiences with the cache. :param _request_timeout: timeout setting for this request. If one @@ -490,7 +490,7 @@ def campaign_external_audiences_sync_post_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """campaign_external_audiences_sync_post + """Enqueues a background job that synchronises Kayzen external audiences with the cache. :param _request_timeout: timeout setting for this request. If one @@ -555,7 +555,7 @@ def campaign_external_audiences_sync_post_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """campaign_external_audiences_sync_post + """Enqueues a background job that synchronises Kayzen external audiences with the cache. :param _request_timeout: timeout setting for this request. If one diff --git a/src/rapidata/api_client/api/order_api.py b/src/rapidata/api_client/api/order_api.py index e22bf75f8..d016ef2c6 100644 --- a/src/rapidata/api_client/api/order_api.py +++ b/src/rapidata/api_client/api/order_api.py @@ -5483,7 +5483,7 @@ def orders_get( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> QueryOrdersEndpointPagedResultOfOutput: - """orders_get + """Queries orders with filtering and pagination. :param page: The 1-based page index. @@ -5580,7 +5580,7 @@ def orders_get_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[QueryOrdersEndpointPagedResultOfOutput]: - """orders_get + """Queries orders with filtering and pagination. :param page: The 1-based page index. @@ -5677,7 +5677,7 @@ def orders_get_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """orders_get + """Queries orders with filtering and pagination. :param page: The 1-based page index. diff --git a/src/rapidata/api_client/models/add_example_to_audience_endpoint_input.py b/src/rapidata/api_client/models/add_example_to_audience_endpoint_input.py index 3df1acaaa..41bf62b41 100644 --- a/src/rapidata/api_client/models/add_example_to_audience_endpoint_input.py +++ b/src/rapidata/api_client/models/add_example_to_audience_endpoint_input.py @@ -110,6 +110,11 @@ def to_dict(self) -> Dict[str, Any]: if self.context is None and "context" in self.model_fields_set: _dict['context'] = None + # set to None if sort_index (nullable) is None + # and model_fields_set contains the field + if self.sort_index is None and "sort_index" in self.model_fields_set: + _dict['sortIndex'] = None + # set to None if feature_flags (nullable) is None # and model_fields_set contains the field if self.feature_flags is None and "feature_flags" in self.model_fields_set: diff --git a/src/rapidata/api_client/models/add_validation_rapid_endpoint_input.py b/src/rapidata/api_client/models/add_validation_rapid_endpoint_input.py index ab8e6bc1d..012955581 100644 --- a/src/rapidata/api_client/models/add_validation_rapid_endpoint_input.py +++ b/src/rapidata/api_client/models/add_validation_rapid_endpoint_input.py @@ -96,6 +96,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_feature_flags: _items.append(_item_feature_flags.to_dict()) _dict['featureFlags'] = _items + # set to None if random_correct_probability (nullable) is None + # and model_fields_set contains the field + if self.random_correct_probability is None and "random_correct_probability" in self.model_fields_set: + _dict['randomCorrectProbability'] = None + # set to None if explanation (nullable) is None # and model_fields_set contains the field if self.explanation is None and "explanation" in self.model_fields_set: diff --git a/src/rapidata/api_client/models/audience_job_status.py b/src/rapidata/api_client/models/audience_job_status.py new file mode 100644 index 000000000..a1d16f8c1 --- /dev/null +++ b/src/rapidata/api_client/models/audience_job_status.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 AudienceJobStatus(str, Enum): + """ + AudienceJobStatus + """ + + """ + allowed enum values + """ + SUBMITTED = 'Submitted' + RUNNING = 'Running' + COMPLETED = 'Completed' + FAILED = 'Failed' + MANUALAPPROVAL = 'ManualApproval' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AudienceJobStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/src/rapidata/api_client/models/boosting_profile_model.py b/src/rapidata/api_client/models/boosting_profile_model.py index 95d074b56..9fa27715b 100644 --- a/src/rapidata/api_client/models/boosting_profile_model.py +++ b/src/rapidata/api_client/models/boosting_profile_model.py @@ -88,6 +88,16 @@ def to_dict(self) -> Dict[str, Any]: if _item_labeling_boosts: _items.append(_item_labeling_boosts.to_dict()) _dict['labelingBoosts'] = _items + # set to None if min_auto_adjust_level (nullable) is None + # and model_fields_set contains the field + if self.min_auto_adjust_level is None and "min_auto_adjust_level" in self.model_fields_set: + _dict['minAutoAdjustLevel'] = None + + # set to None if max_auto_adjust_level (nullable) is None + # and model_fields_set contains the field + if self.max_auto_adjust_level is None and "max_auto_adjust_level" in self.model_fields_set: + _dict['maxAutoAdjustLevel'] = None + # set to None if language_boosts (nullable) is None # and model_fields_set contains the field if self.language_boosts is None and "language_boosts" in self.model_fields_set: diff --git a/src/rapidata/api_client/models/bounding_box_result_model_box.py b/src/rapidata/api_client/models/bounding_box_result_model_box.py index d2c3fba4f..8d0cdc1a8 100644 --- a/src/rapidata/api_client/models/bounding_box_result_model_box.py +++ b/src/rapidata/api_client/models/bounding_box_result_model_box.py @@ -69,6 +69,26 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if x_min (nullable) is None + # and model_fields_set contains the field + if self.x_min is None and "x_min" in self.model_fields_set: + _dict['xMin'] = None + + # set to None if y_min (nullable) is None + # and model_fields_set contains the field + if self.y_min is None and "y_min" in self.model_fields_set: + _dict['yMin'] = None + + # set to None if x_max (nullable) is None + # and model_fields_set contains the field + if self.x_max is None and "x_max" in self.model_fields_set: + _dict['xMax'] = None + + # set to None if y_max (nullable) is None + # and model_fields_set contains the field + if self.y_max is None and "y_max" in self.model_fields_set: + _dict['yMax'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/box_shape.py b/src/rapidata/api_client/models/box_shape.py index 3e0814253..663b91449 100644 --- a/src/rapidata/api_client/models/box_shape.py +++ b/src/rapidata/api_client/models/box_shape.py @@ -69,6 +69,26 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if x_min (nullable) is None + # and model_fields_set contains the field + if self.x_min is None and "x_min" in self.model_fields_set: + _dict['xMin'] = None + + # set to None if y_min (nullable) is None + # and model_fields_set contains the field + if self.y_min is None and "y_min" in self.model_fields_set: + _dict['yMin'] = None + + # set to None if x_max (nullable) is None + # and model_fields_set contains the field + if self.x_max is None and "x_max" in self.model_fields_set: + _dict['xMax'] = None + + # set to None if y_max (nullable) is None + # and model_fields_set contains the field + if self.y_max is None and "y_max" in self.model_fields_set: + _dict['yMax'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/change_boost_endpoint_input.py b/src/rapidata/api_client/models/change_boost_endpoint_input.py index bc317832f..c72ed7f46 100644 --- a/src/rapidata/api_client/models/change_boost_endpoint_input.py +++ b/src/rapidata/api_client/models/change_boost_endpoint_input.py @@ -68,6 +68,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if level (nullable) is None + # and model_fields_set contains the field + if self.level is None and "level" in self.model_fields_set: + _dict['level'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/client_model.py b/src/rapidata/api_client/models/client_model.py index 67f5756b1..4262cf419 100644 --- a/src/rapidata/api_client/models/client_model.py +++ b/src/rapidata/api_client/models/client_model.py @@ -31,8 +31,8 @@ class ClientModel(LazyValidatedModel): """ # noqa: E501 client_id: StrictStr client_secret: Optional[StrictStr] - client_id_issued_at: StrictInt - client_secret_expires_at: StrictInt + client_id_issued_at: Optional[StrictInt] + client_secret_expires_at: Optional[StrictInt] redirect_uris: Optional[List[List[StrictStr]]] grant_types: Optional[List[List[StrictStr]]] response_types: Optional[List[List[StrictStr]]] @@ -90,6 +90,16 @@ def to_dict(self) -> Dict[str, Any]: if self.client_secret is None and "client_secret" in self.model_fields_set: _dict['client_secret'] = None + # set to None if client_id_issued_at (nullable) is None + # and model_fields_set contains the field + if self.client_id_issued_at is None and "client_id_issued_at" in self.model_fields_set: + _dict['client_id_issued_at'] = None + + # set to None if client_secret_expires_at (nullable) is None + # and model_fields_set contains the field + if self.client_secret_expires_at is None and "client_secret_expires_at" in self.model_fields_set: + _dict['client_secret_expires_at'] = None + # set to None if redirect_uris (nullable) is None # and model_fields_set contains the field if self.redirect_uris is None and "redirect_uris" in self.model_fields_set: diff --git a/src/rapidata/api_client/models/create_audience_endpoint_input.py b/src/rapidata/api_client/models/create_audience_endpoint_input.py index d29942799..24404e5a5 100644 --- a/src/rapidata/api_client/models/create_audience_endpoint_input.py +++ b/src/rapidata/api_client/models/create_audience_endpoint_input.py @@ -39,6 +39,7 @@ class CreateAudienceEndpointInput(LazyValidatedModel): minimum_size_for_activation: Optional[StrictInt] = Field(default=None, description="The minimum number of users required for an audience to be activated.", alias="minimumSizeForActivation") logo: Optional[ExistingAssetInput] = Field(default=None, description="An optional logo image for the audience. Must be an existing image asset.") max_distilling_responses: Optional[StrictInt] = Field(default=None, description="Maximum responses before user exits the distilling campaign. Defaults to 10. Set to null to disable this exit condition.", alias="maxDistillingResponses") + min_responses_to_graduate: Optional[StrictInt] = Field(default=None, description="Minimum responses required before a user can graduate into the audience. Even if the user's score is at or above the graduation threshold, they will remain in distilling until they have answered at least this many responses. Must be strictly less than MaxDistillingResponses when both are set. Defaults to null (no minimum — users graduate as soon as the score is reached).", alias="minResponsesToGraduate") drop_min_responses: Optional[StrictInt] = Field(default=None, description="Minimum responses before the drop score check applies. Users need at least this many responses before they can be kicked out for low score. Defaults to 3. Set to null to apply drop score check from the first response.", alias="dropMinResponses") drop_score: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Score floor - users below this score exit the distilling campaign (only after completing DropMinResponses). Defaults to 0.2. Set to null to disable this exit condition.", alias="dropScore") is_distilling_campaign_sticky: Optional[StrictBool] = Field(default=None, description="Whether the distilling campaign should be sticky (users stay until filters don't match). Defaults to true (Temporary sticky).", alias="isDistillingCampaignSticky") @@ -50,7 +51,7 @@ class CreateAudienceEndpointInput(LazyValidatedModel): distilling_retrieval_mode: Optional[RetrievalMode] = Field(default=None, description="The retrieval mode used by the distilling campaign to select rapids for users. Defaults to Shuffled.", alias="distillingRetrievalMode") min_distilling_for_global_boost: Optional[StrictInt] = Field(default=None, description="Minimum distilling users before disabling global boost. Defaults to 200. Admin-only override.", alias="minDistillingForGlobalBoost") min_graduated_for_distilling_boost: Optional[StrictInt] = Field(default=None, description="Minimum graduated users before disabling distilling boost. Defaults to 100. Admin-only override.", alias="minGraduatedForDistillingBoost") - __properties: ClassVar[List[str]] = ["name", "description", "filters", "graduationScore", "demotionScore", "minimumSizeForActivation", "logo", "maxDistillingResponses", "dropMinResponses", "dropScore", "isDistillingCampaignSticky", "maxDistillingSessions", "inactivityDropDays", "minSubmissionRate", "minSessionsForSubmissionRate", "minSubmissionRateGraduated", "distillingRetrievalMode", "minDistillingForGlobalBoost", "minGraduatedForDistillingBoost"] + __properties: ClassVar[List[str]] = ["name", "description", "filters", "graduationScore", "demotionScore", "minimumSizeForActivation", "logo", "maxDistillingResponses", "minResponsesToGraduate", "dropMinResponses", "dropScore", "isDistillingCampaignSticky", "maxDistillingSessions", "inactivityDropDays", "minSubmissionRate", "minSessionsForSubmissionRate", "minSubmissionRateGraduated", "distillingRetrievalMode", "minDistillingForGlobalBoost", "minGraduatedForDistillingBoost"] # model_config is inherited from LazyValidatedModel @@ -107,6 +108,76 @@ def to_dict(self) -> Dict[str, Any]: if self.filters is None and "filters" in self.model_fields_set: _dict['filters'] = None + # set to None if graduation_score (nullable) is None + # and model_fields_set contains the field + if self.graduation_score is None and "graduation_score" in self.model_fields_set: + _dict['graduationScore'] = None + + # set to None if demotion_score (nullable) is None + # and model_fields_set contains the field + if self.demotion_score is None and "demotion_score" in self.model_fields_set: + _dict['demotionScore'] = None + + # set to None if minimum_size_for_activation (nullable) is None + # and model_fields_set contains the field + if self.minimum_size_for_activation is None and "minimum_size_for_activation" in self.model_fields_set: + _dict['minimumSizeForActivation'] = None + + # set to None if max_distilling_responses (nullable) is None + # and model_fields_set contains the field + if self.max_distilling_responses is None and "max_distilling_responses" in self.model_fields_set: + _dict['maxDistillingResponses'] = None + + # set to None if min_responses_to_graduate (nullable) is None + # and model_fields_set contains the field + if self.min_responses_to_graduate is None and "min_responses_to_graduate" in self.model_fields_set: + _dict['minResponsesToGraduate'] = None + + # set to None if drop_min_responses (nullable) is None + # and model_fields_set contains the field + if self.drop_min_responses is None and "drop_min_responses" in self.model_fields_set: + _dict['dropMinResponses'] = None + + # set to None if drop_score (nullable) is None + # and model_fields_set contains the field + if self.drop_score is None and "drop_score" in self.model_fields_set: + _dict['dropScore'] = None + + # set to None if max_distilling_sessions (nullable) is None + # and model_fields_set contains the field + if self.max_distilling_sessions is None and "max_distilling_sessions" in self.model_fields_set: + _dict['maxDistillingSessions'] = None + + # set to None if inactivity_drop_days (nullable) is None + # and model_fields_set contains the field + if self.inactivity_drop_days is None and "inactivity_drop_days" in self.model_fields_set: + _dict['inactivityDropDays'] = None + + # set to None if min_submission_rate (nullable) is None + # and model_fields_set contains the field + if self.min_submission_rate is None and "min_submission_rate" in self.model_fields_set: + _dict['minSubmissionRate'] = None + + # set to None if min_sessions_for_submission_rate (nullable) is None + # and model_fields_set contains the field + if self.min_sessions_for_submission_rate is None and "min_sessions_for_submission_rate" in self.model_fields_set: + _dict['minSessionsForSubmissionRate'] = None + + # set to None if min_submission_rate_graduated (nullable) is None + # and model_fields_set contains the field + if self.min_submission_rate_graduated is None and "min_submission_rate_graduated" in self.model_fields_set: + _dict['minSubmissionRateGraduated'] = None + + # set to None if min_distilling_for_global_boost (nullable) is None + # and model_fields_set contains the field + if self.min_distilling_for_global_boost is None and "min_distilling_for_global_boost" in self.model_fields_set: + _dict['minDistillingForGlobalBoost'] = None + + # set to None if min_graduated_for_distilling_boost (nullable) is None + # and model_fields_set contains the field + if self.min_graduated_for_distilling_boost is None and "min_graduated_for_distilling_boost" in self.model_fields_set: + _dict['minGraduatedForDistillingBoost'] = None + return _dict @classmethod @@ -127,6 +198,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "minimumSizeForActivation": obj.get("minimumSizeForActivation"), "logo": ExistingAssetInput.from_dict(obj["logo"]) if obj.get("logo") is not None else None, "maxDistillingResponses": obj.get("maxDistillingResponses"), + "minResponsesToGraduate": obj.get("minResponsesToGraduate"), "dropMinResponses": obj.get("dropMinResponses"), "dropScore": obj.get("dropScore"), "isDistillingCampaignSticky": obj.get("isDistillingCampaignSticky"), diff --git a/src/rapidata/api_client/models/create_datapoint_endpoint_input.py b/src/rapidata/api_client/models/create_datapoint_endpoint_input.py index 10e86f02e..ce4fd4ac3 100644 --- a/src/rapidata/api_client/models/create_datapoint_endpoint_input.py +++ b/src/rapidata/api_client/models/create_datapoint_endpoint_input.py @@ -84,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: if self.context is None and "context" in self.model_fields_set: _dict['context'] = None + # set to None if sort_index (nullable) is None + # and model_fields_set contains the field + if self.sort_index is None and "sort_index" in self.model_fields_set: + _dict['sortIndex'] = None + # set to None if group (nullable) is None # and model_fields_set contains the field if self.group is None and "group" in self.model_fields_set: diff --git a/src/rapidata/api_client/models/create_flow_endpoint_input.py b/src/rapidata/api_client/models/create_flow_endpoint_input.py index 28ceaf783..11ddd8531 100644 --- a/src/rapidata/api_client/models/create_flow_endpoint_input.py +++ b/src/rapidata/api_client/models/create_flow_endpoint_input.py @@ -105,11 +105,86 @@ def to_dict(self) -> Dict[str, Any]: if self.validation_set_id is None and "validation_set_id" in self.model_fields_set: _dict['validationSetId'] = None + # set to None if starting_elo (nullable) is None + # and model_fields_set contains the field + if self.starting_elo is None and "starting_elo" in self.model_fields_set: + _dict['startingElo'] = None + + # set to None if max_responses (nullable) is None + # and model_fields_set contains the field + if self.max_responses is None and "max_responses" in self.model_fields_set: + _dict['maxResponses'] = None + + # set to None if serve_responses (nullable) is None + # and model_fields_set contains the field + if self.serve_responses is None and "serve_responses" in self.model_fields_set: + _dict['serveResponses'] = None + + # set to None if serve_to_response_ratio (nullable) is None + # and model_fields_set contains the field + if self.serve_to_response_ratio is None and "serve_to_response_ratio" in self.model_fields_set: + _dict['serveToResponseRatio'] = None + + # set to None if serve_timeout_seconds (nullable) is None + # and model_fields_set contains the field + if self.serve_timeout_seconds is None and "serve_timeout_seconds" in self.model_fields_set: + _dict['serveTimeoutSeconds'] = None + + # set to None if min_responses (nullable) is None + # and model_fields_set contains the field + if self.min_responses is None and "min_responses" in self.model_fields_set: + _dict['minResponses'] = None + + # set to None if responses_required (nullable) is None + # and model_fields_set contains the field + if self.responses_required is None and "responses_required" in self.model_fields_set: + _dict['responsesRequired'] = None + # set to None if feature_flags (nullable) is None # and model_fields_set contains the field if self.feature_flags is None and "feature_flags" in self.model_fields_set: _dict['featureFlags'] = None + # set to None if target_response_count (nullable) is None + # and model_fields_set contains the field + if self.target_response_count is None and "target_response_count" in self.model_fields_set: + _dict['targetResponseCount'] = None + + # set to None if pid_proportional_gain (nullable) is None + # and model_fields_set contains the field + if self.pid_proportional_gain is None and "pid_proportional_gain" in self.model_fields_set: + _dict['pidProportionalGain'] = None + + # set to None if pid_integral_gain (nullable) is None + # and model_fields_set contains the field + if self.pid_integral_gain is None and "pid_integral_gain" in self.model_fields_set: + _dict['pidIntegralGain'] = None + + # set to None if pid_derivative_gain (nullable) is None + # and model_fields_set contains the field + if self.pid_derivative_gain is None and "pid_derivative_gain" in self.model_fields_set: + _dict['pidDerivativeGain'] = None + + # set to None if pid_output_offset (nullable) is None + # and model_fields_set contains the field + if self.pid_output_offset is None and "pid_output_offset" in self.model_fields_set: + _dict['pidOutputOffset'] = None + + # set to None if pid_min_sessions_per_minute (nullable) is None + # and model_fields_set contains the field + if self.pid_min_sessions_per_minute is None and "pid_min_sessions_per_minute" in self.model_fields_set: + _dict['pidMinSessionsPerMinute'] = None + + # set to None if pid_max_sessions_per_minute (nullable) is None + # and model_fields_set contains the field + if self.pid_max_sessions_per_minute is None and "pid_max_sessions_per_minute" in self.model_fields_set: + _dict['pidMaxSessionsPerMinute'] = None + + # set to None if drain_duration_seconds (nullable) is None + # and model_fields_set contains the field + if self.drain_duration_seconds is None and "drain_duration_seconds" in self.model_fields_set: + _dict['drainDurationSeconds'] = None + return _dict @classmethod 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 8ab96337e..cff2c7c41 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 @@ -74,6 +74,16 @@ def to_dict(self) -> Dict[str, Any]: if self.context is None and "context" in self.model_fields_set: _dict['context'] = None + # set to None if time_to_live_in_seconds (nullable) is None + # and model_fields_set contains the field + if self.time_to_live_in_seconds is None and "time_to_live_in_seconds" in self.model_fields_set: + _dict['timeToLiveInSeconds'] = None + + # set to None if drain_duration_in_seconds (nullable) is None + # and model_fields_set contains the field + if self.drain_duration_in_seconds is None and "drain_duration_in_seconds" in self.model_fields_set: + _dict['drainDurationInSeconds'] = None + return _dict @classmethod 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 73fe8ead0..dc681be97 100644 --- a/src/rapidata/api_client/models/create_job_endpoint_input.py +++ b/src/rapidata/api_client/models/create_job_endpoint_input.py @@ -70,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if revision_number (nullable) is None + # and model_fields_set contains the field + if self.revision_number is None and "revision_number" in self.model_fields_set: + _dict['revisionNumber'] = None + # set to None if name (nullable) is None # and model_fields_set contains the field if self.name is None and "name" in self.model_fields_set: diff --git a/src/rapidata/api_client/models/create_leaderboard_endpoint_input.py b/src/rapidata/api_client/models/create_leaderboard_endpoint_input.py index 1696c3a2a..2804f385a 100644 --- a/src/rapidata/api_client/models/create_leaderboard_endpoint_input.py +++ b/src/rapidata/api_client/models/create_leaderboard_endpoint_input.py @@ -94,6 +94,16 @@ def to_dict(self) -> Dict[str, Any]: if self.benchmark_name is None and "benchmark_name" in self.model_fields_set: _dict['benchmarkName'] = None + # set to None if response_budget (nullable) is None + # and model_fields_set contains the field + if self.response_budget is None and "response_budget" in self.model_fields_set: + _dict['responseBudget'] = None + + # set to None if min_responses (nullable) is None + # and model_fields_set contains the field + if self.min_responses is None and "min_responses" in self.model_fields_set: + _dict['minResponses'] = None + # set to None if audience_id (nullable) is None # and model_fields_set contains the field if self.audience_id is None and "audience_id" in self.model_fields_set: diff --git a/src/rapidata/api_client/models/create_order_model.py b/src/rapidata/api_client/models/create_order_model.py index 56c9f99a2..6c1e82c43 100644 --- a/src/rapidata/api_client/models/create_order_model.py +++ b/src/rapidata/api_client/models/create_order_model.py @@ -151,6 +151,11 @@ def to_dict(self) -> Dict[str, Any]: if self.campaign_feature_flags is None and "campaign_feature_flags" in self.model_fields_set: _dict['campaignFeatureFlags'] = None + # set to None if priority (nullable) is None + # and model_fields_set contains the field + if self.priority is None and "priority" in self.model_fields_set: + _dict['priority'] = None + # set to None if user_score_dimensions (nullable) is None # and model_fields_set contains the field if self.user_score_dimensions is None and "user_score_dimensions" in self.model_fields_set: @@ -176,6 +181,11 @@ def to_dict(self) -> Dict[str, Any]: if self.selections is None and "selections" in self.model_fields_set: _dict['selections'] = None + # set to None if max_iterations (nullable) is None + # and model_fields_set contains the field + if self.max_iterations is None and "max_iterations" in self.model_fields_set: + _dict['maxIterations'] = None + # set to None if preceding_order_id (nullable) is None # and model_fields_set contains the field if self.preceding_order_id is None and "preceding_order_id" in self.model_fields_set: diff --git a/src/rapidata/api_client/models/example_box_shape.py b/src/rapidata/api_client/models/example_box_shape.py index 92af081c7..12aee9293 100644 --- a/src/rapidata/api_client/models/example_box_shape.py +++ b/src/rapidata/api_client/models/example_box_shape.py @@ -69,6 +69,26 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if x_min (nullable) is None + # and model_fields_set contains the field + if self.x_min is None and "x_min" in self.model_fields_set: + _dict['xMin'] = None + + # set to None if y_min (nullable) is None + # and model_fields_set contains the field + if self.y_min is None and "y_min" in self.model_fields_set: + _dict['yMin'] = None + + # set to None if x_max (nullable) is None + # and model_fields_set contains the field + if self.x_max is None and "x_max" in self.model_fields_set: + _dict['xMax'] = None + + # set to None if y_max (nullable) is None + # and model_fields_set contains the field + if self.y_max is None and "y_max" in self.model_fields_set: + _dict['yMax'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/get_audience_by_id_endpoint_output.py b/src/rapidata/api_client/models/get_audience_by_id_endpoint_output.py index 270c25177..598437888 100644 --- a/src/rapidata/api_client/models/get_audience_by_id_endpoint_output.py +++ b/src/rapidata/api_client/models/get_audience_by_id_endpoint_output.py @@ -117,6 +117,71 @@ def to_dict(self) -> Dict[str, Any]: if self.logo is None and "logo" in self.model_fields_set: _dict['logo'] = None + # set to None if min_graduated_for_distilling_boost (nullable) is None + # and model_fields_set contains the field + if self.min_graduated_for_distilling_boost is None and "min_graduated_for_distilling_boost" in self.model_fields_set: + _dict['minGraduatedForDistillingBoost'] = None + + # set to None if min_distilling_for_global_boost (nullable) is None + # and model_fields_set contains the field + if self.min_distilling_for_global_boost is None and "min_distilling_for_global_boost" in self.model_fields_set: + _dict['minDistillingForGlobalBoost'] = None + + # set to None if demotion_score (nullable) is None + # and model_fields_set contains the field + if self.demotion_score is None and "demotion_score" in self.model_fields_set: + _dict['demotionScore'] = None + + # set to None if max_distilling_responses (nullable) is None + # and model_fields_set contains the field + if self.max_distilling_responses is None and "max_distilling_responses" in self.model_fields_set: + _dict['maxDistillingResponses'] = None + + # set to None if drop_min_responses (nullable) is None + # and model_fields_set contains the field + if self.drop_min_responses is None and "drop_min_responses" in self.model_fields_set: + _dict['dropMinResponses'] = None + + # set to None if drop_score (nullable) is None + # and model_fields_set contains the field + if self.drop_score is None and "drop_score" in self.model_fields_set: + _dict['dropScore'] = None + + # set to None if max_distilling_sessions (nullable) is None + # and model_fields_set contains the field + if self.max_distilling_sessions is None and "max_distilling_sessions" in self.model_fields_set: + _dict['maxDistillingSessions'] = None + + # set to None if inactivity_drop_days (nullable) is None + # and model_fields_set contains the field + if self.inactivity_drop_days is None and "inactivity_drop_days" in self.model_fields_set: + _dict['inactivityDropDays'] = None + + # set to None if min_submission_rate (nullable) is None + # and model_fields_set contains the field + if self.min_submission_rate is None and "min_submission_rate" in self.model_fields_set: + _dict['minSubmissionRate'] = None + + # set to None if min_sessions_for_submission_rate (nullable) is None + # and model_fields_set contains the field + if self.min_sessions_for_submission_rate is None and "min_sessions_for_submission_rate" in self.model_fields_set: + _dict['minSessionsForSubmissionRate'] = None + + # set to None if min_submission_rate_graduated (nullable) is None + # and model_fields_set contains the field + if self.min_submission_rate_graduated is None and "min_submission_rate_graduated" in self.model_fields_set: + _dict['minSubmissionRateGraduated'] = None + + # set to None if random_admission_probability (nullable) is None + # and model_fields_set contains the field + if self.random_admission_probability is None and "random_admission_probability" in self.model_fields_set: + _dict['randomAdmissionProbability'] = None + + # set to None if health (nullable) is None + # and model_fields_set contains the field + if self.health is None and "health" in self.model_fields_set: + _dict['health'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/get_boost_insights_endpoint_output.py b/src/rapidata/api_client/models/get_boost_insights_endpoint_output.py index e35f84c67..d0ee5c5f2 100644 --- a/src/rapidata/api_client/models/get_boost_insights_endpoint_output.py +++ b/src/rapidata/api_client/models/get_boost_insights_endpoint_output.py @@ -34,7 +34,7 @@ class GetBoostInsightsEndpointOutput(LazyValidatedModel): GetBoostInsightsEndpointOutput """ # noqa: E501 mode: BoostMode = Field(description="The current boost mode.") - manual_override_level: StrictInt = Field(description="The manual override level, if manual mode is active.", alias="manualOverrideLevel") + manual_override_level: Optional[StrictInt] = Field(description="The manual override level, if manual mode is active.", alias="manualOverrideLevel") global_boost: GetBoostInsightsEndpointGlobalBoostOutput = Field(description="Global boost insight with contributing campaigns.", alias="globalBoost") language_boosts: Optional[List[GetBoostInsightsEndpointLanguageBoostOutput]] = Field(default=None, alias="languageBoosts") audience_boosts: Optional[List[GetBoostInsightsEndpointAudienceOutput]] = Field(default=None, alias="audienceBoosts") @@ -116,6 +116,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_labeling_boosts: _items.append(_item_labeling_boosts.to_dict()) _dict['labelingBoosts'] = _items + # set to None if manual_override_level (nullable) is None + # and model_fields_set contains the field + if self.manual_override_level is None and "manual_override_level" in self.model_fields_set: + _dict['manualOverrideLevel'] = None + # set to None if language_boosts (nullable) is None # and model_fields_set contains the field if self.language_boosts is None and "language_boosts" in self.model_fields_set: diff --git a/src/rapidata/api_client/models/get_combined_benchmark_standings_endpoint_output_item.py b/src/rapidata/api_client/models/get_combined_benchmark_standings_endpoint_output_item.py index 5f75d3f0a..615109676 100644 --- a/src/rapidata/api_client/models/get_combined_benchmark_standings_endpoint_output_item.py +++ b/src/rapidata/api_client/models/get_combined_benchmark_standings_endpoint_output_item.py @@ -33,7 +33,7 @@ class GetCombinedBenchmarkStandingsEndpointOutputItem(LazyValidatedModel): id: StrictStr name: StrictStr status: StandingStatus - score: Union[StrictFloat, StrictInt] + score: Optional[Union[StrictFloat, StrictInt]] wins: Union[StrictFloat, StrictInt] total_matches: Union[StrictFloat, StrictInt] = Field(alias="totalMatches") is_disabled: StrictBool = Field(alias="isDisabled") @@ -78,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of confidence_interval if self.confidence_interval: _dict['confidenceInterval'] = self.confidence_interval.to_dict() + # set to None if score (nullable) is None + # and model_fields_set contains the field + if self.score is None and "score" in self.model_fields_set: + _dict['score'] = None + # set to None if confidence_interval (nullable) is None # and model_fields_set contains the field if self.confidence_interval is None and "confidence_interval" in self.model_fields_set: diff --git a/src/rapidata/api_client/models/get_combined_leaderboard_standings_endpoint_output_item.py b/src/rapidata/api_client/models/get_combined_leaderboard_standings_endpoint_output_item.py index 75a75cfe7..22a71d34b 100644 --- a/src/rapidata/api_client/models/get_combined_leaderboard_standings_endpoint_output_item.py +++ b/src/rapidata/api_client/models/get_combined_leaderboard_standings_endpoint_output_item.py @@ -33,7 +33,7 @@ class GetCombinedLeaderboardStandingsEndpointOutputItem(LazyValidatedModel): id: StrictStr name: StrictStr status: StandingStatus - score: Union[StrictFloat, StrictInt] + score: Optional[Union[StrictFloat, StrictInt]] wins: Union[StrictFloat, StrictInt] total_matches: Union[StrictFloat, StrictInt] = Field(alias="totalMatches") is_disabled: StrictBool = Field(alias="isDisabled") @@ -78,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of confidence_interval if self.confidence_interval: _dict['confidenceInterval'] = self.confidence_interval.to_dict() + # set to None if score (nullable) is None + # and model_fields_set contains the field + if self.score is None and "score" in self.model_fields_set: + _dict['score'] = None + # set to None if confidence_interval (nullable) is None # and model_fields_set contains the field if self.confidence_interval is None and "confidence_interval" in self.model_fields_set: diff --git a/src/rapidata/api_client/models/get_datapoint_endpoint_output.py b/src/rapidata/api_client/models/get_datapoint_endpoint_output.py index 700eee0ac..f39db5cae 100644 --- a/src/rapidata/api_client/models/get_datapoint_endpoint_output.py +++ b/src/rapidata/api_client/models/get_datapoint_endpoint_output.py @@ -77,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of asset if self.asset: _dict['asset'] = self.asset.to_dict() + # set to None if sort_index (nullable) is None + # and model_fields_set contains the field + if self.sort_index is None and "sort_index" in self.model_fields_set: + _dict['sortIndex'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/get_failed_datapoints_endpoint_datapoint.py b/src/rapidata/api_client/models/get_failed_datapoints_endpoint_datapoint.py index b3516df20..e078bafcf 100644 --- a/src/rapidata/api_client/models/get_failed_datapoints_endpoint_datapoint.py +++ b/src/rapidata/api_client/models/get_failed_datapoints_endpoint_datapoint.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from rapidata.api_client.models.i_asset_model import IAssetModel from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel @@ -32,7 +32,7 @@ class GetFailedDatapointsEndpointDatapoint(LazyValidatedModel): """ # noqa: E501 id: StrictStr dataset_id: StrictStr = Field(alias="datasetId") - sort_index: StrictInt = Field(alias="sortIndex") + sort_index: Optional[StrictInt] = Field(alias="sortIndex") asset: IAssetModel created_at: datetime = Field(alias="createdAt") __properties: ClassVar[List[str]] = ["id", "datasetId", "sortIndex", "asset", "createdAt"] @@ -75,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of asset if self.asset: _dict['asset'] = self.asset.to_dict() + # set to None if sort_index (nullable) is None + # and model_fields_set contains the field + if self.sort_index is None and "sort_index" in self.model_fields_set: + _dict['sortIndex'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/get_simple_workflow_results_endpoint_output.py b/src/rapidata/api_client/models/get_simple_workflow_results_endpoint_output.py index 0ae313850..af4adac64 100644 --- a/src/rapidata/api_client/models/get_simple_workflow_results_endpoint_output.py +++ b/src/rapidata/api_client/models/get_simple_workflow_results_endpoint_output.py @@ -98,6 +98,11 @@ def to_dict(self) -> Dict[str, Any]: if self.context is None and "context" in self.model_fields_set: _dict['context'] = None + # set to None if decisiveness (nullable) is None + # and model_fields_set contains the field + if self.decisiveness is None and "decisiveness" in self.model_fields_set: + _dict['decisiveness'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/get_validation_rapids_endpoint_output.py b/src/rapidata/api_client/models/get_validation_rapids_endpoint_output.py index 92aa7a51a..d6e158ca0 100644 --- a/src/rapidata/api_client/models/get_validation_rapids_endpoint_output.py +++ b/src/rapidata/api_client/models/get_validation_rapids_endpoint_output.py @@ -103,6 +103,11 @@ def to_dict(self) -> Dict[str, Any]: if self.explanation is None and "explanation" in self.model_fields_set: _dict['explanation'] = None + # set to None if random_correct_probability (nullable) is None + # and model_fields_set contains the field + if self.random_correct_probability is None and "random_correct_probability" in self.model_fields_set: + _dict['randomCorrectProbability'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/get_workflow_results_endpoint_output.py b/src/rapidata/api_client/models/get_workflow_results_endpoint_output.py index 070351e04..3948c2209 100644 --- a/src/rapidata/api_client/models/get_workflow_results_endpoint_output.py +++ b/src/rapidata/api_client/models/get_workflow_results_endpoint_output.py @@ -98,6 +98,11 @@ def to_dict(self) -> Dict[str, Any]: if self.context is None and "context" in self.model_fields_set: _dict['context'] = None + # set to None if decisiveness (nullable) is None + # and model_fields_set contains the field + if self.decisiveness is None and "decisiveness" in self.model_fields_set: + _dict['decisiveness'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/i_audience_filter.py b/src/rapidata/api_client/models/i_audience_filter.py index c9b0f85a1..fd7781368 100644 --- a/src/rapidata/api_client/models/i_audience_filter.py +++ b/src/rapidata/api_client/models/i_audience_filter.py @@ -18,13 +18,14 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional from rapidata.api_client.models.i_audience_filter_country_audience_filter import IAudienceFilterCountryAudienceFilter +from rapidata.api_client.models.i_audience_filter_demographic_audience_filter import IAudienceFilterDemographicAudienceFilter from rapidata.api_client.models.i_audience_filter_language_audience_filter import IAudienceFilterLanguageAudienceFilter from pydantic import StrictStr, Field from rapidata.api_client.lazy_model import LazyValidatedModel from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -IAUDIENCEFILTER_ONE_OF_SCHEMAS = ["IAudienceFilterAndAudienceFilter", "IAudienceFilterCountryAudienceFilter", "IAudienceFilterLanguageAudienceFilter", "IAudienceFilterNotAudienceFilter", "IAudienceFilterOrAudienceFilter"] +IAUDIENCEFILTER_ONE_OF_SCHEMAS = ["IAudienceFilterAndAudienceFilter", "IAudienceFilterCountryAudienceFilter", "IAudienceFilterDemographicAudienceFilter", "IAudienceFilterLanguageAudienceFilter", "IAudienceFilterNotAudienceFilter", "IAudienceFilterOrAudienceFilter"] class IAudienceFilter(LazyValidatedModel): """ @@ -34,14 +35,16 @@ class IAudienceFilter(LazyValidatedModel): oneof_schema_1_validator: Optional[IAudienceFilterAndAudienceFilter] = None # data type: IAudienceFilterCountryAudienceFilter oneof_schema_2_validator: Optional[IAudienceFilterCountryAudienceFilter] = None + # data type: IAudienceFilterDemographicAudienceFilter + oneof_schema_3_validator: Optional[IAudienceFilterDemographicAudienceFilter] = None # data type: IAudienceFilterLanguageAudienceFilter - oneof_schema_3_validator: Optional[IAudienceFilterLanguageAudienceFilter] = None + oneof_schema_4_validator: Optional[IAudienceFilterLanguageAudienceFilter] = None # data type: IAudienceFilterNotAudienceFilter - oneof_schema_4_validator: Optional[IAudienceFilterNotAudienceFilter] = None + oneof_schema_5_validator: Optional[IAudienceFilterNotAudienceFilter] = None # data type: IAudienceFilterOrAudienceFilter - oneof_schema_5_validator: Optional[IAudienceFilterOrAudienceFilter] = None - actual_instance: Optional[Union[IAudienceFilterAndAudienceFilter, IAudienceFilterCountryAudienceFilter, IAudienceFilterLanguageAudienceFilter, IAudienceFilterNotAudienceFilter, IAudienceFilterOrAudienceFilter]] = None - one_of_schemas: Set[str] = { "IAudienceFilterAndAudienceFilter", "IAudienceFilterCountryAudienceFilter", "IAudienceFilterLanguageAudienceFilter", "IAudienceFilterNotAudienceFilter", "IAudienceFilterOrAudienceFilter" } + oneof_schema_6_validator: Optional[IAudienceFilterOrAudienceFilter] = None + actual_instance: Optional[Union[IAudienceFilterAndAudienceFilter, IAudienceFilterCountryAudienceFilter, IAudienceFilterDemographicAudienceFilter, IAudienceFilterLanguageAudienceFilter, IAudienceFilterNotAudienceFilter, IAudienceFilterOrAudienceFilter]] = None + one_of_schemas: Set[str] = { "IAudienceFilterAndAudienceFilter", "IAudienceFilterCountryAudienceFilter", "IAudienceFilterDemographicAudienceFilter", "IAudienceFilterLanguageAudienceFilter", "IAudienceFilterNotAudienceFilter", "IAudienceFilterOrAudienceFilter" } # model_config is inherited from LazyValidatedModel @@ -74,6 +77,11 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(f"Error! Input type `{type(v)}` is not `IAudienceFilterCountryAudienceFilter`") else: match += 1 + # validate data type: IAudienceFilterDemographicAudienceFilter + if not isinstance(v, IAudienceFilterDemographicAudienceFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `IAudienceFilterDemographicAudienceFilter`") + else: + match += 1 # validate data type: IAudienceFilterLanguageAudienceFilter if not isinstance(v, IAudienceFilterLanguageAudienceFilter): error_messages.append(f"Error! Input type `{type(v)}` is not `IAudienceFilterLanguageAudienceFilter`") @@ -91,10 +99,10 @@ def actual_instance_must_validate_oneof(cls, v): match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in IAudienceFilter with oneOf schemas: IAudienceFilterAndAudienceFilter, IAudienceFilterCountryAudienceFilter, IAudienceFilterLanguageAudienceFilter, IAudienceFilterNotAudienceFilter, IAudienceFilterOrAudienceFilter. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in IAudienceFilter with oneOf schemas: IAudienceFilterAndAudienceFilter, IAudienceFilterCountryAudienceFilter, IAudienceFilterDemographicAudienceFilter, IAudienceFilterLanguageAudienceFilter, IAudienceFilterNotAudienceFilter, IAudienceFilterOrAudienceFilter. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in IAudienceFilter with oneOf schemas: IAudienceFilterAndAudienceFilter, IAudienceFilterCountryAudienceFilter, IAudienceFilterLanguageAudienceFilter, IAudienceFilterNotAudienceFilter, IAudienceFilterOrAudienceFilter. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in IAudienceFilter with oneOf schemas: IAudienceFilterAndAudienceFilter, IAudienceFilterCountryAudienceFilter, IAudienceFilterDemographicAudienceFilter, IAudienceFilterLanguageAudienceFilter, IAudienceFilterNotAudienceFilter, IAudienceFilterOrAudienceFilter. Details: " + ", ".join(error_messages)) else: return v @@ -121,6 +129,12 @@ def from_json(cls, json_str: str) -> Self: match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) + # deserialize data into IAudienceFilterDemographicAudienceFilter + try: + instance.actual_instance = IAudienceFilterDemographicAudienceFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) # deserialize data into IAudienceFilterLanguageAudienceFilter try: instance.actual_instance = IAudienceFilterLanguageAudienceFilter.from_json(json_str) @@ -142,10 +156,10 @@ def from_json(cls, json_str: str) -> Self: if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into IAudienceFilter with oneOf schemas: IAudienceFilterAndAudienceFilter, IAudienceFilterCountryAudienceFilter, IAudienceFilterLanguageAudienceFilter, IAudienceFilterNotAudienceFilter, IAudienceFilterOrAudienceFilter. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into IAudienceFilter with oneOf schemas: IAudienceFilterAndAudienceFilter, IAudienceFilterCountryAudienceFilter, IAudienceFilterDemographicAudienceFilter, IAudienceFilterLanguageAudienceFilter, IAudienceFilterNotAudienceFilter, IAudienceFilterOrAudienceFilter. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into IAudienceFilter with oneOf schemas: IAudienceFilterAndAudienceFilter, IAudienceFilterCountryAudienceFilter, IAudienceFilterLanguageAudienceFilter, IAudienceFilterNotAudienceFilter, IAudienceFilterOrAudienceFilter. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into IAudienceFilter with oneOf schemas: IAudienceFilterAndAudienceFilter, IAudienceFilterCountryAudienceFilter, IAudienceFilterDemographicAudienceFilter, IAudienceFilterLanguageAudienceFilter, IAudienceFilterNotAudienceFilter, IAudienceFilterOrAudienceFilter. Details: " + ", ".join(error_messages)) else: return instance @@ -159,7 +173,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], IAudienceFilterAndAudienceFilter, IAudienceFilterCountryAudienceFilter, IAudienceFilterLanguageAudienceFilter, IAudienceFilterNotAudienceFilter, IAudienceFilterOrAudienceFilter]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], IAudienceFilterAndAudienceFilter, IAudienceFilterCountryAudienceFilter, IAudienceFilterDemographicAudienceFilter, IAudienceFilterLanguageAudienceFilter, IAudienceFilterNotAudienceFilter, IAudienceFilterOrAudienceFilter]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/src/rapidata/api_client/models/i_audience_filter_demographic_audience_filter.py b/src/rapidata/api_client/models/i_audience_filter_demographic_audience_filter.py new file mode 100644 index 000000000..a4db2e454 --- /dev/null +++ b/src/rapidata/api_client/models/i_audience_filter_demographic_audience_filter.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Rapidata Asset API + + The API for the Rapidata Asset service + + The version of the OpenAPI document: v1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class IAudienceFilterDemographicAudienceFilter(LazyValidatedModel): + """ + IAudienceFilterDemographicAudienceFilter + """ # noqa: E501 + t: StrictStr = Field(alias="_t") + identifier: StrictStr + values: List[StrictStr] + __properties: ClassVar[List[str]] = ["_t", "identifier", "values"] + + @field_validator('t') + def t_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['DemographicFilter']): + raise ValueError("must be one of enum values ('DemographicFilter')") + return value + + # model_config is inherited from LazyValidatedModel + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IAudienceFilterDemographicAudienceFilter 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 IAudienceFilterDemographicAudienceFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "_t": obj.get("_t"), + "identifier": obj.get("identifier"), + "values": obj.get("values") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/i_campaign_selection_model_audience_selection_model.py b/src/rapidata/api_client/models/i_campaign_selection_model_audience_selection_model.py index a4c12f8f0..c3a2b4f25 100644 --- a/src/rapidata/api_client/models/i_campaign_selection_model_audience_selection_model.py +++ b/src/rapidata/api_client/models/i_campaign_selection_model_audience_selection_model.py @@ -78,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if max_iterations (nullable) is None + # and model_fields_set contains the field + if self.max_iterations is None and "max_iterations" in self.model_fields_set: + _dict['maxIterations'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/i_campaign_selection_model_demographic_selection_model.py b/src/rapidata/api_client/models/i_campaign_selection_model_demographic_selection_model.py index 406dd0214..7eec658f8 100644 --- a/src/rapidata/api_client/models/i_campaign_selection_model_demographic_selection_model.py +++ b/src/rapidata/api_client/models/i_campaign_selection_model_demographic_selection_model.py @@ -76,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if probability (nullable) is None + # and model_fields_set contains the field + if self.probability is None and "probability" in self.model_fields_set: + _dict['probability'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/i_campaign_selection_model_labeling_selection_model.py b/src/rapidata/api_client/models/i_campaign_selection_model_labeling_selection_model.py index a95911939..0b3ba83c7 100644 --- a/src/rapidata/api_client/models/i_campaign_selection_model_labeling_selection_model.py +++ b/src/rapidata/api_client/models/i_campaign_selection_model_labeling_selection_model.py @@ -78,6 +78,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if amount (nullable) is None + # and model_fields_set contains the field + if self.amount is None and "amount" in self.model_fields_set: + _dict['amount'] = None + + # set to None if max_iterations (nullable) is None + # and model_fields_set contains the field + if self.max_iterations is None and "max_iterations" in self.model_fields_set: + _dict['maxIterations'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/i_campaign_selection_model_validation_selection_model.py b/src/rapidata/api_client/models/i_campaign_selection_model_validation_selection_model.py index 70dbd5d80..d70e12a17 100644 --- a/src/rapidata/api_client/models/i_campaign_selection_model_validation_selection_model.py +++ b/src/rapidata/api_client/models/i_campaign_selection_model_validation_selection_model.py @@ -76,6 +76,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if amount (nullable) is None + # and model_fields_set contains the field + if self.amount is None and "amount" in self.model_fields_set: + _dict['amount'] = None + + # set to None if effort_budget (nullable) is None + # and model_fields_set contains the field + if self.effort_budget is None and "effort_budget" in self.model_fields_set: + _dict['effortBudget'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/i_example_truth_line_example_truth.py b/src/rapidata/api_client/models/i_example_truth_line_example_truth.py index 36480e181..ce32115b8 100644 --- a/src/rapidata/api_client/models/i_example_truth_line_example_truth.py +++ b/src/rapidata/api_client/models/i_example_truth_line_example_truth.py @@ -89,6 +89,16 @@ def to_dict(self) -> Dict[str, Any]: if self.bounding_boxes is None and "bounding_boxes" in self.model_fields_set: _dict['boundingBoxes'] = None + # set to None if required_precision (nullable) is None + # and model_fields_set contains the field + if self.required_precision is None and "required_precision" in self.model_fields_set: + _dict['requiredPrecision'] = None + + # set to None if required_completeness (nullable) is None + # and model_fields_set contains the field + if self.required_completeness is None and "required_completeness" in self.model_fields_set: + _dict['requiredCompleteness'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/i_example_truth_locate_example_truth.py b/src/rapidata/api_client/models/i_example_truth_locate_example_truth.py index bb3afe157..6503b309d 100644 --- a/src/rapidata/api_client/models/i_example_truth_locate_example_truth.py +++ b/src/rapidata/api_client/models/i_example_truth_locate_example_truth.py @@ -84,6 +84,16 @@ def to_dict(self) -> Dict[str, Any]: if _item_bounding_boxes: _items.append(_item_bounding_boxes.to_dict()) _dict['boundingBoxes'] = _items + # set to None if required_precision (nullable) is None + # and model_fields_set contains the field + if self.required_precision is None and "required_precision" in self.model_fields_set: + _dict['requiredPrecision'] = None + + # set to None if required_completeness (nullable) is None + # and model_fields_set contains the field + if self.required_completeness is None and "required_completeness" in self.model_fields_set: + _dict['requiredCompleteness'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/i_example_truth_transcription_example_truth.py b/src/rapidata/api_client/models/i_example_truth_transcription_example_truth.py index 4a8bc0b94..692adc5c8 100644 --- a/src/rapidata/api_client/models/i_example_truth_transcription_example_truth.py +++ b/src/rapidata/api_client/models/i_example_truth_transcription_example_truth.py @@ -90,6 +90,16 @@ def to_dict(self) -> Dict[str, Any]: if self.strict_grading is None and "strict_grading" in self.model_fields_set: _dict['strictGrading'] = None + # set to None if required_precision (nullable) is None + # and model_fields_set contains the field + if self.required_precision is None and "required_precision" in self.model_fields_set: + _dict['requiredPrecision'] = None + + # set to None if required_completeness (nullable) is None + # and model_fields_set contains the field + if self.required_completeness is None and "required_completeness" in self.model_fields_set: + _dict['requiredCompleteness'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/i_flow_model.py b/src/rapidata/api_client/models/i_flow_model.py index 9dbcda3b3..3b287c4ca 100644 --- a/src/rapidata/api_client/models/i_flow_model.py +++ b/src/rapidata/api_client/models/i_flow_model.py @@ -27,7 +27,7 @@ class IFlowModel(LazyValidatedModel): """ - IFlowModel + A flow definition exposed over the API, identified by a discriminator. Implementations describe the flow's type-specific configuration. """ # data type: IFlowModelRankingFlowModel oneof_schema_1_validator: Optional[IFlowModelRankingFlowModel] = None diff --git a/src/rapidata/api_client/models/i_flow_model_ranking_flow_model.py b/src/rapidata/api_client/models/i_flow_model_ranking_flow_model.py index 5c23f9e0f..de3a04d97 100644 --- a/src/rapidata/api_client/models/i_flow_model_ranking_flow_model.py +++ b/src/rapidata/api_client/models/i_flow_model_ranking_flow_model.py @@ -39,7 +39,7 @@ class IFlowModelRankingFlowModel(LazyValidatedModel): name: StrictStr = Field(description="The name of the flow.") campaign_id: StrictStr = Field(description="The ID of the campaign associated with this flow.", alias="campaignId") flow_item_count: StrictInt = Field(description="The total number of items that have been added to this flow. Incremented atomically on each item creation.", alias="flowItemCount") - target_response_count: StrictInt = Field(description="Target average response count per completed item. Enables PID-based automatic rate control when set. Null disables PID.", alias="targetResponseCount") + target_response_count: Optional[StrictInt] = Field(description="Target average response count per completed item. Enables PID-based automatic rate control when set. Null disables PID.", alias="targetResponseCount") pid_proportional_gain: Union[StrictFloat, StrictInt] = Field(description="PID proportional gain. Controls how strongly the rate reacts to the current error between target and actual response counts.", alias="pidProportionalGain") pid_integral_gain: Union[StrictFloat, StrictInt] = Field(description="PID integral gain. Eliminates steady-state error by accumulating error over time. Includes anti-windup clamping.", alias="pidIntegralGain") pid_derivative_gain: Union[StrictFloat, StrictInt] = Field(description="PID derivative gain. Provides damping by reacting to the rate of change of the error, helping prevent overshoot.", alias="pidDerivativeGain") @@ -47,9 +47,9 @@ class IFlowModelRankingFlowModel(LazyValidatedModel): pid_min_sessions_per_minute: StrictInt = Field(description="Minimum sessions per minute the PID controller can set. Prevents the rate from dropping to zero.", alias="pidMinSessionsPerMinute") pid_max_sessions_per_minute: StrictInt = Field(description="Maximum sessions per minute the PID controller can set. Prevents the rate from exceeding infrastructure capacity.", alias="pidMaxSessionsPerMinute") pid_batch_mode: PidBatchMode = Field(description="How the PID output maps to the campaign rate. Total: used directly. PerBatch: multiplied by active item count. PerBatchTimeWeighted: multiplied by time-weighted active item count based on remaining TTL.", alias="pidBatchMode") - serve_timeout_seconds: StrictInt = Field(description="Maximum time in seconds a user has to submit an answer after loading the task. Null uses the system-wide default.", alias="serveTimeoutSeconds") + serve_timeout_seconds: Optional[StrictInt] = Field(description="Maximum time in seconds a user has to submit an answer after loading the task. Null uses the system-wide default.", alias="serveTimeoutSeconds") drain_duration_seconds: StrictInt = Field(description="Grace period in seconds after an item stops receiving new serves, allowing in-flight responses to complete.", alias="drainDurationSeconds") - serve_to_response_ratio: Union[StrictFloat, StrictInt] = Field(description="Ratio of serves to responses used to calculate how many tasks to serve per expected response.", alias="serveToResponseRatio") + serve_to_response_ratio: Optional[Union[StrictFloat, StrictInt]] = Field(description="Ratio of serves to responses used to calculate how many tasks to serve per expected response.", alias="serveToResponseRatio") global_boost_level: Optional[StrictInt] = Field(default=None, description="Priority multiplier for the flow's campaign. Higher values increase annotator compensation to attract more responses.", alias="globalBoostLevel") audience_boosts: Optional[List[AudienceBoostModel2]] = Field(default=None, alias="audienceBoosts") audience_id: Optional[StrictStr] = Field(default=None, description="Optional audience ID. When provided, the flow will only serve items to users in this audience.", alias="audienceId") @@ -58,8 +58,8 @@ class IFlowModelRankingFlowModel(LazyValidatedModel): k_factor: Optional[StrictInt] = Field(default=None, description="Elo K-factor controlling rating volatility. Higher values cause larger rating changes per comparison. Used as a direct multiplier on the Elo change formula.", alias="kFactor") scaling_factor: Optional[StrictInt] = Field(default=None, description="Elo scaling factor that determines how rating differences translate to expected win probabilities. A difference equal to the scaling factor gives the higher-rated item approximately 90% expected win rate.", alias="scalingFactor") min_responses: StrictInt = Field(description="Minimum number of responses a ranking item must receive before it is considered sufficiently evaluated.", alias="minResponses") - max_responses: StrictInt = Field(description="Maximum number of responses a ranking item can receive before being removed from active ranking. Null allows unlimited responses.", alias="maxResponses") - serve_responses: StrictInt = Field(description="Number of accepted responses per rapid at which to stop serving. Null defaults to MaxResponses.", alias="serveResponses") + max_responses: Optional[StrictInt] = Field(description="Maximum number of responses a ranking item can receive before being removed from active ranking. Null allows unlimited responses.", alias="maxResponses") + serve_responses: Optional[StrictInt] = Field(description="Number of accepted responses per rapid at which to stop serving. Null defaults to MaxResponses.", alias="serveResponses") feature_flags: List[FeatureFlag] = Field(alias="featureFlags") owner_id: StrictStr = Field(description="The ID of the customer who owns the flow.", alias="ownerId") owner_mail: StrictStr = Field(description="The email of the customer who owns the flow.", alias="ownerMail") @@ -122,6 +122,26 @@ def to_dict(self) -> Dict[str, Any]: if _item_feature_flags: _items.append(_item_feature_flags.to_dict()) _dict['featureFlags'] = _items + # set to None if target_response_count (nullable) is None + # and model_fields_set contains the field + if self.target_response_count is None and "target_response_count" in self.model_fields_set: + _dict['targetResponseCount'] = None + + # set to None if serve_timeout_seconds (nullable) is None + # and model_fields_set contains the field + if self.serve_timeout_seconds is None and "serve_timeout_seconds" in self.model_fields_set: + _dict['serveTimeoutSeconds'] = None + + # set to None if serve_to_response_ratio (nullable) is None + # and model_fields_set contains the field + if self.serve_to_response_ratio is None and "serve_to_response_ratio" in self.model_fields_set: + _dict['serveToResponseRatio'] = None + + # set to None if global_boost_level (nullable) is None + # and model_fields_set contains the field + if self.global_boost_level is None and "global_boost_level" in self.model_fields_set: + _dict['globalBoostLevel'] = None + # set to None if audience_boosts (nullable) is None # and model_fields_set contains the field if self.audience_boosts is None and "audience_boosts" in self.model_fields_set: @@ -137,6 +157,16 @@ def to_dict(self) -> Dict[str, Any]: if self.criteria is None and "criteria" in self.model_fields_set: _dict['criteria'] = None + # set to None if max_responses (nullable) is None + # and model_fields_set contains the field + if self.max_responses is None and "max_responses" in self.model_fields_set: + _dict['maxResponses'] = None + + # set to None if serve_responses (nullable) is None + # and model_fields_set contains the field + if self.serve_responses is None and "serve_responses" in self.model_fields_set: + _dict['serveResponses'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/i_order_workflow_input_model_simple_workflow_input_model.py b/src/rapidata/api_client/models/i_order_workflow_input_model_simple_workflow_input_model.py index 1441678ec..de38d5233 100644 --- a/src/rapidata/api_client/models/i_order_workflow_input_model_simple_workflow_input_model.py +++ b/src/rapidata/api_client/models/i_order_workflow_input_model_simple_workflow_input_model.py @@ -88,6 +88,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_feature_flags: _items.append(_item_feature_flags.to_dict()) _dict['featureFlags'] = _items + # set to None if batch_size (nullable) is None + # and model_fields_set contains the field + if self.batch_size is None and "batch_size" in self.model_fields_set: + _dict['batchSize'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/i_referee_config_budget_referee_config.py b/src/rapidata/api_client/models/i_referee_config_budget_referee_config.py index a914ef4a1..7b2d3212c 100644 --- a/src/rapidata/api_client/models/i_referee_config_budget_referee_config.py +++ b/src/rapidata/api_client/models/i_referee_config_budget_referee_config.py @@ -75,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if total_serve_budget (nullable) is None + # and model_fields_set contains the field + if self.total_serve_budget is None and "total_serve_budget" in self.model_fields_set: + _dict['totalServeBudget'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/i_referee_config_model_budget_referee_config_model.py b/src/rapidata/api_client/models/i_referee_config_model_budget_referee_config_model.py index 6af81fa48..4edf4d577 100644 --- a/src/rapidata/api_client/models/i_referee_config_model_budget_referee_config_model.py +++ b/src/rapidata/api_client/models/i_referee_config_model_budget_referee_config_model.py @@ -75,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if total_serve_budget (nullable) is None + # and model_fields_set contains the field + if self.total_serve_budget is None and "total_serve_budget" in self.model_fields_set: + _dict['totalServeBudget'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/i_referee_info_model_naive_referee_info_model.py b/src/rapidata/api_client/models/i_referee_info_model_naive_referee_info_model.py index c509a54c0..3cd08cff8 100644 --- a/src/rapidata/api_client/models/i_referee_info_model_naive_referee_info_model.py +++ b/src/rapidata/api_client/models/i_referee_info_model_naive_referee_info_model.py @@ -75,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if serve_threshold (nullable) is None + # and model_fields_set contains the field + if self.serve_threshold is None and "serve_threshold" in self.model_fields_set: + _dict['serveThreshold'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/i_selection_effort_capped_selection.py b/src/rapidata/api_client/models/i_selection_effort_capped_selection.py index 975ecc1c0..860f9d306 100644 --- a/src/rapidata/api_client/models/i_selection_effort_capped_selection.py +++ b/src/rapidata/api_client/models/i_selection_effort_capped_selection.py @@ -77,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if max_iterations (nullable) is None + # and model_fields_set contains the field + if self.max_iterations is None and "max_iterations" in self.model_fields_set: + _dict['maxIterations'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/i_selection_labeling_selection.py b/src/rapidata/api_client/models/i_selection_labeling_selection.py index 38bb45a27..575ad5972 100644 --- a/src/rapidata/api_client/models/i_selection_labeling_selection.py +++ b/src/rapidata/api_client/models/i_selection_labeling_selection.py @@ -78,6 +78,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if amount (nullable) is None + # and model_fields_set contains the field + if self.amount is None and "amount" in self.model_fields_set: + _dict['amount'] = None + + # set to None if max_iterations (nullable) is None + # and model_fields_set contains the field + if self.max_iterations is None and "max_iterations" in self.model_fields_set: + _dict['maxIterations'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/i_validation_truth_model_transcription_truth_model.py b/src/rapidata/api_client/models/i_validation_truth_model_transcription_truth_model.py index 9d6121c5a..ba5741d3c 100644 --- a/src/rapidata/api_client/models/i_validation_truth_model_transcription_truth_model.py +++ b/src/rapidata/api_client/models/i_validation_truth_model_transcription_truth_model.py @@ -90,6 +90,16 @@ def to_dict(self) -> Dict[str, Any]: if self.strict_grading is None and "strict_grading" in self.model_fields_set: _dict['strictGrading'] = None + # set to None if required_precision (nullable) is None + # and model_fields_set contains the field + if self.required_precision is None and "required_precision" in self.model_fields_set: + _dict['requiredPrecision'] = None + + # set to None if required_completeness (nullable) is None + # and model_fields_set contains the field + if self.required_completeness is None and "required_completeness" in self.model_fields_set: + _dict['requiredCompleteness'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/i_workflow_config_simple_workflow_config.py b/src/rapidata/api_client/models/i_workflow_config_simple_workflow_config.py index ffa9ea1eb..3c12d589c 100644 --- a/src/rapidata/api_client/models/i_workflow_config_simple_workflow_config.py +++ b/src/rapidata/api_client/models/i_workflow_config_simple_workflow_config.py @@ -93,6 +93,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_feature_flags: _items.append(_item_feature_flags.to_dict()) _dict['featureFlags'] = _items + # set to None if batch_size (nullable) is None + # and model_fields_set contains the field + if self.batch_size is None and "batch_size" in self.model_fields_set: + _dict['batchSize'] = None + # set to None if feature_flags (nullable) is None # and model_fields_set contains the field if self.feature_flags is None and "feature_flags" in self.model_fields_set: diff --git a/src/rapidata/api_client/models/locate_box_truth_model_box.py b/src/rapidata/api_client/models/locate_box_truth_model_box.py index bfbf3515d..327c21d5c 100644 --- a/src/rapidata/api_client/models/locate_box_truth_model_box.py +++ b/src/rapidata/api_client/models/locate_box_truth_model_box.py @@ -69,6 +69,26 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if x_min (nullable) is None + # and model_fields_set contains the field + if self.x_min is None and "x_min" in self.model_fields_set: + _dict['xMin'] = None + + # set to None if y_min (nullable) is None + # and model_fields_set contains the field + if self.y_min is None and "y_min" in self.model_fields_set: + _dict['yMin'] = None + + # set to None if x_max (nullable) is None + # and model_fields_set contains the field + if self.x_max is None and "x_max" in self.model_fields_set: + _dict['xMax'] = None + + # set to None if y_max (nullable) is None + # and model_fields_set contains the field + if self.y_max is None and "y_max" in self.model_fields_set: + _dict['yMax'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/polygon_coordinate.py b/src/rapidata/api_client/models/polygon_coordinate.py index cc9c60904..b51439ee5 100644 --- a/src/rapidata/api_client/models/polygon_coordinate.py +++ b/src/rapidata/api_client/models/polygon_coordinate.py @@ -67,6 +67,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if x (nullable) is None + # and model_fields_set contains the field + if self.x is None and "x" in self.model_fields_set: + _dict['x'] = None + + # set to None if y (nullable) is None + # and model_fields_set contains the field + if self.y is None and "y" in self.model_fields_set: + _dict['y'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/polygon_result_model_coordinate.py b/src/rapidata/api_client/models/polygon_result_model_coordinate.py index 99d17fe33..0265ff485 100644 --- a/src/rapidata/api_client/models/polygon_result_model_coordinate.py +++ b/src/rapidata/api_client/models/polygon_result_model_coordinate.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Union +from typing import Any, ClassVar, Dict, List, Optional, Union from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel from typing import Optional, Set @@ -28,8 +28,8 @@ class PolygonResultModelCoordinate(LazyValidatedModel): """ PolygonResultModelCoordinate """ # noqa: E501 - x: Union[StrictFloat, StrictInt] - y: Union[StrictFloat, StrictInt] + x: Optional[Union[StrictFloat, StrictInt]] + y: Optional[Union[StrictFloat, StrictInt]] __properties: ClassVar[List[str]] = ["x", "y"] # model_config is inherited from LazyValidatedModel @@ -67,6 +67,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if x (nullable) is None + # and model_fields_set contains the field + if self.x is None and "x" in self.model_fields_set: + _dict['x'] = None + + # set to None if y (nullable) is None + # and model_fields_set contains the field + if self.y is None and "y" in self.model_fields_set: + _dict['y'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/problem_details.py b/src/rapidata/api_client/models/problem_details.py index c770b755f..a67eb9fd1 100644 --- a/src/rapidata/api_client/models/problem_details.py +++ b/src/rapidata/api_client/models/problem_details.py @@ -80,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: if self.title is None and "title" in self.model_fields_set: _dict['title'] = None + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + # set to None if detail (nullable) is None # and model_fields_set contains the field if self.detail is None and "detail" in self.model_fields_set: diff --git a/src/rapidata/api_client/models/query_audience_jobs_endpoint_output.py b/src/rapidata/api_client/models/query_audience_jobs_endpoint_output.py new file mode 100644 index 000000000..3d96c4429 --- /dev/null +++ b/src/rapidata/api_client/models/query_audience_jobs_endpoint_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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from rapidata.api_client.models.audience_job_status import AudienceJobStatus +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class QueryAudienceJobsEndpointOutput(LazyValidatedModel): + """ + QueryAudienceJobsEndpointOutput + """ # noqa: E501 + job_id: StrictStr = Field(description="The unique identifier of the job.", alias="jobId") + name: StrictStr = Field(description="The name of the job.") + definition_id: StrictStr = Field(description="The identifier of the job definition.", alias="definitionId") + audience_id: StrictStr = Field(description="The identifier of the audience the job belongs to.", alias="audienceId") + revision_number: StrictInt = Field(description="The revision number of the job definition.", alias="revisionNumber") + pipeline_id: StrictStr = Field(description="The identifier of the pipeline executing the job.", alias="pipelineId") + status: AudienceJobStatus = Field(description="The current status of the job.") + created_at: datetime = Field(description="The timestamp when the job was created.", alias="createdAt") + __properties: ClassVar[List[str]] = ["jobId", "name", "definitionId", "audienceId", "revisionNumber", "pipelineId", "status", "createdAt"] + + # model_config is inherited from LazyValidatedModel + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QueryAudienceJobsEndpointOutput 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 QueryAudienceJobsEndpointOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _data = { + "jobId": obj.get("jobId"), + "name": obj.get("name"), + "definitionId": obj.get("definitionId"), + "audienceId": obj.get("audienceId"), + "revisionNumber": obj.get("revisionNumber"), + "pipelineId": obj.get("pipelineId"), + "status": obj.get("status"), + "createdAt": obj.get("createdAt") + } + try: + _obj = cls.model_validate(_data) + except ValidationError as _val_error: + _obj = cls._lazy_construct(_data, _val_error) + return _obj + + diff --git a/src/rapidata/api_client/models/query_audience_jobs_endpoint_paged_result_of_output.py b/src/rapidata/api_client/models/query_audience_jobs_endpoint_paged_result_of_output.py new file mode 100644 index 000000000..5e22ba10e --- /dev/null +++ b/src/rapidata/api_client/models/query_audience_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_audience_jobs_endpoint_output import QueryAudienceJobsEndpointOutput +from pydantic import ValidationError +from rapidata.api_client.lazy_model import LazyValidatedModel +from typing import Optional, Set +from typing_extensions import Self + +class QueryAudienceJobsEndpointPagedResultOfOutput(LazyValidatedModel): + """ + QueryAudienceJobsEndpointPagedResultOfOutput + """ # noqa: E501 + total: StrictInt + page: StrictInt + page_size: StrictInt = Field(alias="pageSize") + items: List[QueryAudienceJobsEndpointOutput] + 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 QueryAudienceJobsEndpointPagedResultOfOutput 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 QueryAudienceJobsEndpointPagedResultOfOutput 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": [QueryAudienceJobsEndpointOutput.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_audiences_endpoint_output.py b/src/rapidata/api_client/models/query_audiences_endpoint_output.py index 36fbda61e..8cd2cef9e 100644 --- a/src/rapidata/api_client/models/query_audiences_endpoint_output.py +++ b/src/rapidata/api_client/models/query_audiences_endpoint_output.py @@ -100,6 +100,16 @@ def to_dict(self) -> Dict[str, Any]: if self.logo is None and "logo" in self.model_fields_set: _dict['logo'] = None + # set to None if random_admission_probability (nullable) is None + # and model_fields_set contains the field + if self.random_admission_probability is None and "random_admission_probability" in self.model_fields_set: + _dict['randomAdmissionProbability'] = None + + # set to None if health (nullable) is None + # and model_fields_set contains the field + if self.health is None and "health" in self.model_fields_set: + _dict['health'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/query_benchmark_standings_endpoint_output.py b/src/rapidata/api_client/models/query_benchmark_standings_endpoint_output.py index 5926c60df..04121f828 100644 --- a/src/rapidata/api_client/models/query_benchmark_standings_endpoint_output.py +++ b/src/rapidata/api_client/models/query_benchmark_standings_endpoint_output.py @@ -34,7 +34,7 @@ class QueryBenchmarkStandingsEndpointOutput(LazyValidatedModel): name: StrictStr = Field(description="The name of the participant.") benchmark_id: StrictStr = Field(description="The id of the benchmark this standing belongs to.", alias="benchmarkId") status: StandingStatus = Field(description="The status of the standing.") - score: Union[StrictFloat, StrictInt] = Field(description="The calculated score, or null if not yet computed.") + score: Optional[Union[StrictFloat, StrictInt]] = Field(description="The calculated score, or null if not yet computed.") wins: Union[StrictFloat, StrictInt] = Field(description="The number of wins.") total_matches: Union[StrictFloat, StrictInt] = Field(description="The total number of matches.", alias="totalMatches") is_disabled: StrictBool = Field(description="Whether the participant is disabled.", alias="isDisabled") @@ -79,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of confidence_interval if self.confidence_interval: _dict['confidenceInterval'] = self.confidence_interval.to_dict() + # set to None if score (nullable) is None + # and model_fields_set contains the field + if self.score is None and "score" in self.model_fields_set: + _dict['score'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/query_external_audiences_endpoint_output.py b/src/rapidata/api_client/models/query_external_audiences_endpoint_output.py index fd1eeab14..00547b316 100644 --- a/src/rapidata/api_client/models/query_external_audiences_endpoint_output.py +++ b/src/rapidata/api_client/models/query_external_audiences_endpoint_output.py @@ -68,6 +68,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if count (nullable) is None + # and model_fields_set contains the field + if self.count is None and "count" in self.model_fields_set: + _dict['count'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/query_flagged_rapids_endpoint_output.py b/src/rapidata/api_client/models/query_flagged_rapids_endpoint_output.py index 487bac9f8..510efac63 100644 --- a/src/rapidata/api_client/models/query_flagged_rapids_endpoint_output.py +++ b/src/rapidata/api_client/models/query_flagged_rapids_endpoint_output.py @@ -44,7 +44,7 @@ class QueryFlaggedRapidsEndpointOutput(LazyValidatedModel): should_accept_incorrect: StrictBool = Field(description="Whether the rapid should accept incorrect answers.", alias="shouldAcceptIncorrect") truth: IValidationTruthModel = Field(description="The optional validation truth of the rapid.") explanation: Optional[StrictStr] = Field(description="The optional explanation shown when users answer incorrectly.") - random_correct_probability: Union[StrictFloat, StrictInt] = Field(description="The probability of a random correct answer.", alias="randomCorrectProbability") + random_correct_probability: Optional[Union[StrictFloat, StrictInt]] = Field(description="The probability of a random correct answer.", alias="randomCorrectProbability") key: Optional[StrictStr] = Field(description="An optional key for the rapid.") completed_at: Optional[datetime] = Field(description="The timestamp when the rapid was completed.", alias="completedAt") feature_flags: List[FeatureFlag] = Field(alias="featureFlags") @@ -109,6 +109,11 @@ def to_dict(self) -> Dict[str, Any]: if self.explanation is None and "explanation" in self.model_fields_set: _dict['explanation'] = None + # set to None if random_correct_probability (nullable) is None + # and model_fields_set contains the field + if self.random_correct_probability is None and "random_correct_probability" in self.model_fields_set: + _dict['randomCorrectProbability'] = None + # set to None if key (nullable) is None # and model_fields_set contains the field if self.key is None and "key" in self.model_fields_set: diff --git a/src/rapidata/api_client/models/query_participants_obsolete_endpoint_output_item.py b/src/rapidata/api_client/models/query_participants_obsolete_endpoint_output_item.py index cc34d2639..68e459a66 100644 --- a/src/rapidata/api_client/models/query_participants_obsolete_endpoint_output_item.py +++ b/src/rapidata/api_client/models/query_participants_obsolete_endpoint_output_item.py @@ -34,7 +34,7 @@ class QueryParticipantsObsoleteEndpointOutputItem(LazyValidatedModel): name: StrictStr leaderboard_id: StrictStr = Field(alias="leaderboardId") status: StandingStatus - score: Union[StrictFloat, StrictInt] + score: Optional[Union[StrictFloat, StrictInt]] wins: Union[StrictFloat, StrictInt] total_matches: Union[StrictFloat, StrictInt] = Field(alias="totalMatches") is_disabled: StrictBool = Field(alias="isDisabled") @@ -79,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of confidence_interval if self.confidence_interval: _dict['confidenceInterval'] = self.confidence_interval.to_dict() + # set to None if score (nullable) is None + # and model_fields_set contains the field + if self.score is None and "score" in self.model_fields_set: + _dict['score'] = None + # set to None if confidence_interval (nullable) is None # and model_fields_set contains the field if self.confidence_interval is None and "confidence_interval" in self.model_fields_set: diff --git a/src/rapidata/api_client/models/query_standings_endpoint_output.py b/src/rapidata/api_client/models/query_standings_endpoint_output.py index e426ad6a8..e9eb8c673 100644 --- a/src/rapidata/api_client/models/query_standings_endpoint_output.py +++ b/src/rapidata/api_client/models/query_standings_endpoint_output.py @@ -34,7 +34,7 @@ class QueryStandingsEndpointOutput(LazyValidatedModel): name: StrictStr = Field(description="The name of the participant.") leaderboard_id: StrictStr = Field(description="The id of the leaderboard this standing belongs to.", alias="leaderboardId") status: StandingStatus = Field(description="The status of the standing.") - score: Union[StrictFloat, StrictInt] = Field(description="The calculated score, or null if not yet computed.") + score: Optional[Union[StrictFloat, StrictInt]] = Field(description="The calculated score, or null if not yet computed.") wins: Union[StrictFloat, StrictInt] = Field(description="The number of wins.") total_matches: Union[StrictFloat, StrictInt] = Field(description="The total number of matches.", alias="totalMatches") is_disabled: StrictBool = Field(description="Whether the participant is disabled.", alias="isDisabled") @@ -79,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of confidence_interval if self.confidence_interval: _dict['confidenceInterval'] = self.confidence_interval.to_dict() + # set to None if score (nullable) is None + # and model_fields_set contains the field + if self.score is None and "score" in self.model_fields_set: + _dict['score'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/read_bridge_token_endpoint_keys_output.py b/src/rapidata/api_client/models/read_bridge_token_endpoint_keys_output.py index eccae325d..b7dba6d2b 100644 --- a/src/rapidata/api_client/models/read_bridge_token_endpoint_keys_output.py +++ b/src/rapidata/api_client/models/read_bridge_token_endpoint_keys_output.py @@ -29,7 +29,7 @@ class ReadBridgeTokenEndpointKeysOutput(LazyValidatedModel): ReadBridgeTokenEndpointKeysOutput """ # noqa: E501 access_token: Optional[StrictStr] = Field(description="The issued access token.", alias="accessToken") - expires_in: StrictInt = Field(description="The lifetime of the access token, in seconds.", alias="expiresIn") + expires_in: Optional[StrictInt] = Field(description="The lifetime of the access token, in seconds.", alias="expiresIn") refresh_token: Optional[StrictStr] = Field(description="The refresh token used to obtain new access tokens.", alias="refreshToken") id_token: Optional[StrictStr] = Field(description="The OpenID Connect ID token.", alias="idToken") token_type: Optional[StrictStr] = Field(description="The type of the issued token.", alias="tokenType") @@ -76,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: if self.access_token is None and "access_token" in self.model_fields_set: _dict['accessToken'] = None + # set to None if expires_in (nullable) is None + # and model_fields_set contains the field + if self.expires_in is None and "expires_in" in self.model_fields_set: + _dict['expiresIn'] = None + # set to None if refresh_token (nullable) is None # and model_fields_set contains the field if self.refresh_token is None and "refresh_token" in self.model_fields_set: diff --git a/src/rapidata/api_client/models/set_manual_global_boost_level_endpoint_input.py b/src/rapidata/api_client/models/set_manual_global_boost_level_endpoint_input.py index 0bff2fbd1..8bfb5f0a1 100644 --- a/src/rapidata/api_client/models/set_manual_global_boost_level_endpoint_input.py +++ b/src/rapidata/api_client/models/set_manual_global_boost_level_endpoint_input.py @@ -66,6 +66,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if level (nullable) is None + # and model_fields_set contains the field + if self.level is None and "level" in self.model_fields_set: + _dict['level'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/update_audience_endpoint_input.py b/src/rapidata/api_client/models/update_audience_endpoint_input.py index 3e2186f67..8cad504b3 100644 --- a/src/rapidata/api_client/models/update_audience_endpoint_input.py +++ b/src/rapidata/api_client/models/update_audience_endpoint_input.py @@ -40,6 +40,7 @@ class UpdateAudienceEndpointInput(LazyValidatedModel): graduation_score: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The score used to determine whether a user graduates from the distilling campaign.", alias="graduationScore") demotion_score: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Score below which a graduated user is demoted back to distilling. Must be less than or equal to GraduationScore. Set to null to use GraduationScore.", alias="demotionScore") max_distilling_responses: Optional[StrictInt] = Field(default=None, description="Maximum responses before user exits the distilling campaign. Set to null to disable this exit condition.", alias="maxDistillingResponses") + min_responses_to_graduate: Optional[StrictInt] = Field(default=None, description="Minimum responses required before a user can graduate into the audience. Even if the user's score is at or above the graduation threshold, they will remain in distilling until they have answered at least this many responses. Must be strictly less than MaxDistillingResponses when both are set. Set to null to allow graduation as soon as the score is reached.", alias="minResponsesToGraduate") drop_min_responses: Optional[StrictInt] = Field(default=None, description="Minimum responses before the drop score check applies. Users need at least this many responses before they can be kicked out for low score. Set to null to apply drop score check from the first response.", alias="dropMinResponses") drop_score: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Score floor - users below this score exit the distilling campaign (only after completing DropMinResponses). Set to null to disable this exit condition.", alias="dropScore") max_distilling_sessions: Optional[StrictInt] = Field(default=None, description="Maximum sessions (rapid retrievals) before user exits the distilling campaign. Set to a value to enable session-based exit condition.", alias="maxDistillingSessions") @@ -48,7 +49,7 @@ class UpdateAudienceEndpointInput(LazyValidatedModel): min_sessions_for_submission_rate: Optional[StrictInt] = Field(default=None, description="Minimum number of sessions before the submission rate check applies. Set to null to apply from the first session.", alias="minSessionsForSubmissionRate") min_submission_rate_graduated: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum submission rate for graduated users. If null, MinSubmissionRate applies to graduated users. Set a lower value to be more lenient with graduated users.", alias="minSubmissionRateGraduated") distilling_retrieval_mode: Optional[RetrievalMode] = Field(default=None, description="The retrieval mode used by the distilling campaign to select rapids for users.", alias="distillingRetrievalMode") - __properties: ClassVar[List[str]] = ["name", "description", "filters", "logo", "minGraduatedForDistillingBoost", "minDistillingForGlobalBoost", "graduationScore", "demotionScore", "maxDistillingResponses", "dropMinResponses", "dropScore", "maxDistillingSessions", "inactivityDropDays", "minSubmissionRate", "minSessionsForSubmissionRate", "minSubmissionRateGraduated", "distillingRetrievalMode"] + __properties: ClassVar[List[str]] = ["name", "description", "filters", "logo", "minGraduatedForDistillingBoost", "minDistillingForGlobalBoost", "graduationScore", "demotionScore", "maxDistillingResponses", "minResponsesToGraduate", "dropMinResponses", "dropScore", "maxDistillingSessions", "inactivityDropDays", "minSubmissionRate", "minSessionsForSubmissionRate", "minSubmissionRateGraduated", "distillingRetrievalMode"] # model_config is inherited from LazyValidatedModel @@ -125,6 +126,11 @@ def to_dict(self) -> Dict[str, Any]: if self.max_distilling_responses is None and "max_distilling_responses" in self.model_fields_set: _dict['maxDistillingResponses'] = None + # set to None if min_responses_to_graduate (nullable) is None + # and model_fields_set contains the field + if self.min_responses_to_graduate is None and "min_responses_to_graduate" in self.model_fields_set: + _dict['minResponsesToGraduate'] = None + # set to None if drop_min_responses (nullable) is None # and model_fields_set contains the field if self.drop_min_responses is None and "drop_min_responses" in self.model_fields_set: @@ -181,6 +187,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "graduationScore": obj.get("graduationScore"), "demotionScore": obj.get("demotionScore"), "maxDistillingResponses": obj.get("maxDistillingResponses"), + "minResponsesToGraduate": obj.get("minResponsesToGraduate"), "dropMinResponses": obj.get("dropMinResponses"), "dropScore": obj.get("dropScore"), "maxDistillingSessions": obj.get("maxDistillingSessions"), diff --git a/src/rapidata/api_client/models/update_boost_config_endpoint_input.py b/src/rapidata/api_client/models/update_boost_config_endpoint_input.py index c77436c54..3a63b4b08 100644 --- a/src/rapidata/api_client/models/update_boost_config_endpoint_input.py +++ b/src/rapidata/api_client/models/update_boost_config_endpoint_input.py @@ -67,6 +67,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if min_distilling_for_global_boost (nullable) is None + # and model_fields_set contains the field + if self.min_distilling_for_global_boost is None and "min_distilling_for_global_boost" in self.model_fields_set: + _dict['minDistillingForGlobalBoost'] = None + + # set to None if min_graduated_for_distilling_boost (nullable) is None + # and model_fields_set contains the field + if self.min_graduated_for_distilling_boost is None and "min_graduated_for_distilling_boost" in self.model_fields_set: + _dict['minGraduatedForDistillingBoost'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/upload_file_endpoint_output.py b/src/rapidata/api_client/models/upload_file_endpoint_output.py index c3c491dff..d70537383 100644 --- a/src/rapidata/api_client/models/upload_file_endpoint_output.py +++ b/src/rapidata/api_client/models/upload_file_endpoint_output.py @@ -70,6 +70,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if original_size_bytes (nullable) is None + # and model_fields_set contains the field + if self.original_size_bytes is None and "original_size_bytes" in self.model_fields_set: + _dict['originalSizeBytes'] = None + + # set to None if final_size_bytes (nullable) is None + # and model_fields_set contains the field + if self.final_size_bytes is None and "final_size_bytes" in self.model_fields_set: + _dict['finalSizeBytes'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/upload_file_from_url_endpoint_output.py b/src/rapidata/api_client/models/upload_file_from_url_endpoint_output.py index be3dcaaff..308564de7 100644 --- a/src/rapidata/api_client/models/upload_file_from_url_endpoint_output.py +++ b/src/rapidata/api_client/models/upload_file_from_url_endpoint_output.py @@ -70,6 +70,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if original_size_bytes (nullable) is None + # and model_fields_set contains the field + if self.original_size_bytes is None and "original_size_bytes" in self.model_fields_set: + _dict['originalSizeBytes'] = None + + # set to None if final_size_bytes (nullable) is None + # and model_fields_set contains the field + if self.final_size_bytes is None and "final_size_bytes" in self.model_fields_set: + _dict['finalSizeBytes'] = None + return _dict @classmethod diff --git a/src/rapidata/api_client/models/validation_problem_details.py b/src/rapidata/api_client/models/validation_problem_details.py index 706e9b3b0..161beb8c8 100644 --- a/src/rapidata/api_client/models/validation_problem_details.py +++ b/src/rapidata/api_client/models/validation_problem_details.py @@ -81,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: if self.title is None and "title" in self.model_fields_set: _dict['title'] = None + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + # set to None if detail (nullable) is None # and model_fields_set contains the field if self.detail is None and "detail" in self.model_fields_set: diff --git a/src/rapidata/api_client_README.md b/src/rapidata/api_client_README.md index b561760cb..dee0a94a3 100644 --- a/src/rapidata/api_client_README.md +++ b/src/rapidata/api_client_README.md @@ -125,13 +125,13 @@ Class | Method | HTTP request | Description *CacheApi* | [**campaign_cache_user_scores_get**](rapidata/api_client/docs/CacheApi.md#campaign_cache_user_scores_get) | **GET** /campaign/cache/user-scores | Returns the current state of the in-memory default user score cache. *CampaignApi* | [**campaign_boost_global_level_put**](rapidata/api_client/docs/CampaignApi.md#campaign_boost_global_level_put) | **PUT** /campaign/boost/global-level | Sets or clears the manual global boost level. *CampaignApi* | [**campaign_boost_insights_get**](rapidata/api_client/docs/CampaignApi.md#campaign_boost_insights_get) | **GET** /campaign/boost/insights | Returns an attributed view of the aggregated boosting profile. -*CampaignApi* | [**campaign_boost_preheat_post**](rapidata/api_client/docs/CampaignApi.md#campaign_boost_preheat_post) | **POST** /campaign/boost/preheat | +*CampaignApi* | [**campaign_boost_preheat_post**](rapidata/api_client/docs/CampaignApi.md#campaign_boost_preheat_post) | **POST** /campaign/boost/preheat | Triggers a preheat pass for the boost subsystem so warm caches are ready before traffic spikes. *CampaignApi* | [**campaign_boost_status_get**](rapidata/api_client/docs/CampaignApi.md#campaign_boost_status_get) | **GET** /campaign/boost/status | Returns the current boost status including active and inactive campaigns. *CampaignApi* | [**campaign_campaign_id_get**](rapidata/api_client/docs/CampaignApi.md#campaign_campaign_id_get) | **GET** /campaign/{campaignId} | Retrieves the details of a specific campaign. *CampaignApi* | [**campaign_campaign_id_patch**](rapidata/api_client/docs/CampaignApi.md#campaign_campaign_id_patch) | **PATCH** /campaign/{campaignId} | Updates the specified campaign's properties. *CampaignApi* | [**campaign_campaign_id_pause_post**](rapidata/api_client/docs/CampaignApi.md#campaign_campaign_id_pause_post) | **POST** /campaign/{campaignId}/pause | Pauses the specified campaign. *CampaignApi* | [**campaign_campaign_id_resume_post**](rapidata/api_client/docs/CampaignApi.md#campaign_campaign_id_resume_post) | **POST** /campaign/{campaignId}/resume | Resumes the specified campaign. -*CampaignApi* | [**campaign_monitor_get**](rapidata/api_client/docs/CampaignApi.md#campaign_monitor_get) | **GET** /campaign/monitor | +*CampaignApi* | [**campaign_monitor_get**](rapidata/api_client/docs/CampaignApi.md#campaign_monitor_get) | **GET** /campaign/monitor | Exercises the rapid-bag pipeline with a synthetic user profile so the health of the campaign monitoring path can be probed externally. *CampaignApi* | [**campaigns_get**](rapidata/api_client/docs/CampaignApi.md#campaigns_get) | **GET** /campaigns | Queries campaigns with optional filtering, sorting, and pagination. *ClientApi* | [**client_client_id_delete**](rapidata/api_client/docs/ClientApi.md#client_client_id_delete) | **DELETE** /client/{clientId} | Deletes a client. *ClientApi* | [**client_post**](rapidata/api_client/docs/ClientApi.md#client_post) | **POST** /client | Creates a new client for the current customer. @@ -162,8 +162,8 @@ Class | Method | HTTP request | Description *ExamplesApi* | [**audience_audience_id_example_post**](rapidata/api_client/docs/ExamplesApi.md#audience_audience_id_example_post) | **POST** /audience/{audienceId}/example | Adds a new example to an audience. *ExamplesApi* | [**audience_audience_id_examples_get**](rapidata/api_client/docs/ExamplesApi.md#audience_audience_id_examples_get) | **GET** /audience/{audienceId}/examples | Queries all examples for the specified audience. *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 | -*ExternalAudienceApi* | [**campaign_external_audiences_sync_post**](rapidata/api_client/docs/ExternalAudienceApi.md#campaign_external_audiences_sync_post) | **POST** /campaign/external-audiences/sync | +*ExternalAudienceApi* | [**campaign_external_audiences_get**](rapidata/api_client/docs/ExternalAudienceApi.md#campaign_external_audiences_get) | **GET** /campaign/external-audiences | Queries the cached Kayzen 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 Kayzen external audiences with the cache. *FeedbackApi* | [**feedback_post**](rapidata/api_client/docs/FeedbackApi.md#feedback_post) | **POST** /feedback | Submits feedback about our services. *FlowApi* | [**flow_flow_id_delete**](rapidata/api_client/docs/FlowApi.md#flow_flow_id_delete) | **DELETE** /flow/{flowId} | Deletes a flow. *FlowApi* | [**flow_flow_id_get**](rapidata/api_client/docs/FlowApi.md#flow_flow_id_get) | **GET** /flow/{flowId} | Retrieves a flow by its ID. @@ -234,7 +234,7 @@ Class | Method | HTTP request | Description *OrderApi* | [**order_post**](rapidata/api_client/docs/OrderApi.md#order_post) | **POST** /order | Creates a new order with the given configuration. *OrderApi* | [**order_unsupported_post**](rapidata/api_client/docs/OrderApi.md#order_unsupported_post) | **POST** /order/unsupported | Creates a notification for an unsupported order type. *OrderApi* | [**orders_aggregated_overview_get**](rapidata/api_client/docs/OrderApi.md#orders_aggregated_overview_get) | **GET** /orders/aggregated-overview | Retrieves orders aggregated by customer with total amounts and most recent order information. -*OrderApi* | [**orders_get**](rapidata/api_client/docs/OrderApi.md#orders_get) | **GET** /orders | +*OrderApi* | [**orders_get**](rapidata/api_client/docs/OrderApi.md#orders_get) | **GET** /orders | Queries orders with filtering and pagination. *OrderApi* | [**orders_public_get**](rapidata/api_client/docs/OrderApi.md#orders_public_get) | **GET** /orders/public | Retrieves all publicly available orders. *OrganizationApi* | [**organizations_get**](rapidata/api_client/docs/OrganizationApi.md#organizations_get) | **GET** /organizations | Returns a paged list of organizations. *ParticipantApi* | [**participant_participant_id_delete**](rapidata/api_client/docs/ParticipantApi.md#participant_participant_id_delete) | **DELETE** /participant/{participantId} | Deletes a participant. @@ -311,6 +311,7 @@ Class | Method | HTTP request | Description - [AudienceBoostModel](rapidata/api_client/docs/AudienceBoostModel.md) - [AudienceBoostModel2](rapidata/api_client/docs/AudienceBoostModel2.md) - [AudienceJobState](rapidata/api_client/docs/AudienceJobState.md) + - [AudienceJobStatus](rapidata/api_client/docs/AudienceJobStatus.md) - [AudienceStateRecalculationPhase](rapidata/api_client/docs/AudienceStateRecalculationPhase.md) - [AudienceStateRecalculationState](rapidata/api_client/docs/AudienceStateRecalculationState.md) - [AudienceStatus](rapidata/api_client/docs/AudienceStatus.md) @@ -521,6 +522,7 @@ Class | Method | HTTP request | Description - [IAudienceFilter](rapidata/api_client/docs/IAudienceFilter.md) - [IAudienceFilterAndAudienceFilter](rapidata/api_client/docs/IAudienceFilterAndAudienceFilter.md) - [IAudienceFilterCountryAudienceFilter](rapidata/api_client/docs/IAudienceFilterCountryAudienceFilter.md) + - [IAudienceFilterDemographicAudienceFilter](rapidata/api_client/docs/IAudienceFilterDemographicAudienceFilter.md) - [IAudienceFilterLanguageAudienceFilter](rapidata/api_client/docs/IAudienceFilterLanguageAudienceFilter.md) - [IAudienceFilterNotAudienceFilter](rapidata/api_client/docs/IAudienceFilterNotAudienceFilter.md) - [IAudienceFilterOrAudienceFilter](rapidata/api_client/docs/IAudienceFilterOrAudienceFilter.md) @@ -777,7 +779,6 @@ Class | Method | HTTP request | Description - [NamedEntityResultModelNamedClassification](rapidata/api_client/docs/NamedEntityResultModelNamedClassification.md) - [NamedEntityTruthModelNamedClassification](rapidata/api_client/docs/NamedEntityTruthModelNamedClassification.md) - [OrderState](rapidata/api_client/docs/OrderState.md) - - [PagedResultOfQueryJobsResult](rapidata/api_client/docs/PagedResultOfQueryJobsResult.md) - [ParticipantStatus](rapidata/api_client/docs/ParticipantStatus.md) - [PidBatchMode](rapidata/api_client/docs/PidBatchMode.md) - [PolygonCoordinate](rapidata/api_client/docs/PolygonCoordinate.md) @@ -788,6 +789,8 @@ Class | Method | HTTP request | Description - [ProblemDetails](rapidata/api_client/docs/ProblemDetails.md) - [QueryAggregatedOrdersEndpointOutput](rapidata/api_client/docs/QueryAggregatedOrdersEndpointOutput.md) - [QueryAggregatedOrdersEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryAggregatedOrdersEndpointPagedResultOfOutput.md) + - [QueryAudienceJobsEndpointOutput](rapidata/api_client/docs/QueryAudienceJobsEndpointOutput.md) + - [QueryAudienceJobsEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryAudienceJobsEndpointPagedResultOfOutput.md) - [QueryAudiencesEndpointOutput](rapidata/api_client/docs/QueryAudiencesEndpointOutput.md) - [QueryAudiencesEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryAudiencesEndpointPagedResultOfOutput.md) - [QueryBenchmarkStandingsEndpointOutput](rapidata/api_client/docs/QueryBenchmarkStandingsEndpointOutput.md) @@ -818,7 +821,6 @@ Class | Method | HTTP request | Description - [QueryJobRevisionsEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryJobRevisionsEndpointPagedResultOfOutput.md) - [QueryJobsEndpointOutput](rapidata/api_client/docs/QueryJobsEndpointOutput.md) - [QueryJobsEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryJobsEndpointPagedResultOfOutput.md) - - [QueryJobsResult](rapidata/api_client/docs/QueryJobsResult.md) - [QueryLeaderboardRunsEndpointOutput](rapidata/api_client/docs/QueryLeaderboardRunsEndpointOutput.md) - [QueryLeaderboardRunsEndpointPagedResultOfOutput](rapidata/api_client/docs/QueryLeaderboardRunsEndpointPagedResultOfOutput.md) - [QueryLeaderboardsByBenchmarkEndpointOutput](rapidata/api_client/docs/QueryLeaderboardsByBenchmarkEndpointOutput.md)