Base: codex-main originale (prima del fork aKode)
This commit is contained in:
6
codex-rs/codex-backend-openapi-models/BUILD.bazel
Normal file
6
codex-rs/codex-backend-openapi-models/BUILD.bazel
Normal file
@@ -0,0 +1,6 @@
|
||||
load("//:defs.bzl", "codex_rust_crate")
|
||||
|
||||
codex_rust_crate(
|
||||
name = "codex-backend-openapi-models",
|
||||
crate_name = "codex_backend_openapi_models",
|
||||
)
|
||||
24
codex-rs/codex-backend-openapi-models/Cargo.toml
Normal file
24
codex-rs/codex-backend-openapi-models/Cargo.toml
Normal file
@@ -0,0 +1,24 @@
|
||||
[package]
|
||||
name = "codex-backend-openapi-models"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
[lib]
|
||||
name = "codex_backend_openapi_models"
|
||||
path = "src/lib.rs"
|
||||
test = false
|
||||
doctest = false
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
# Important: generated code often violates our workspace lints.
|
||||
# Allow unwrap/expect in this crate so the workspace builds cleanly
|
||||
# after models are regenerated.
|
||||
# Lint overrides are applied in src/lib.rs via crate attributes
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
serde_with = "3"
|
||||
6
codex-rs/codex-backend-openapi-models/src/lib.rs
Normal file
6
codex-rs/codex-backend-openapi-models/src/lib.rs
Normal file
@@ -0,0 +1,6 @@
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used)]
|
||||
|
||||
// Re-export generated OpenAPI models.
|
||||
// The regen script populates `src/models/*.rs` and writes `src/models/mod.rs`.
|
||||
// This module intentionally contains no hand-written types.
|
||||
pub mod models;
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct AdditionalRateLimitDetails {
|
||||
#[serde(rename = "limit_name")]
|
||||
pub limit_name: String,
|
||||
#[serde(rename = "metered_feature")]
|
||||
pub metered_feature: String,
|
||||
#[serde(
|
||||
rename = "rate_limit",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub rate_limit: Option<Option<Box<models::RateLimitStatusDetails>>>,
|
||||
}
|
||||
|
||||
impl AdditionalRateLimitDetails {
|
||||
pub fn new(limit_name: String, metered_feature: String) -> AdditionalRateLimitDetails {
|
||||
AdditionalRateLimitDetails {
|
||||
limit_name,
|
||||
metered_feature,
|
||||
rate_limit: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
230
codex-rs/codex-backend-openapi-models/src/models/analytics.rs
Normal file
230
codex-rs/codex-backend-openapi-models/src/models/analytics.rs
Normal file
@@ -0,0 +1,230 @@
|
||||
// Generated by scripts/generate_analytics_models.py; do not edit.
|
||||
// Selected backend schema SHA-256: 8dad4dcab85a89fd8091236929727587118dcaad334e10148ae8cf95dd640cc8
|
||||
// String enums remain open for forward compatibility.
|
||||
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct ActiveUsersSummary {
|
||||
pub total_users: i64,
|
||||
pub clients: Vec<ClientActiveUsersCount>,
|
||||
pub models: Option<Vec<ModelActivitySummary>>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct ClientActiveUsersCount {
|
||||
pub client_id: String,
|
||||
pub users: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct ClientWorkspaceUsageCount {
|
||||
pub client_id: String,
|
||||
pub users: i64,
|
||||
pub threads: i64,
|
||||
pub turns: i64,
|
||||
pub credits: f64,
|
||||
pub cost_usd: Option<String>,
|
||||
pub on_demand_credits: Option<f64>,
|
||||
pub uncached_text_input_tokens: Option<i64>,
|
||||
pub cached_text_input_tokens: Option<i64>,
|
||||
pub text_output_tokens: Option<i64>,
|
||||
pub text_total_tokens: Option<i64>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct ConsumptionUsageGroup {
|
||||
pub dimensions: std::collections::BTreeMap<String, String>,
|
||||
pub is_other: Option<bool>,
|
||||
pub credits: f64,
|
||||
pub on_demand_credits: Option<f64>,
|
||||
pub uncached_text_input_tokens: Option<i64>,
|
||||
pub cached_text_input_tokens: Option<i64>,
|
||||
pub text_output_tokens: Option<i64>,
|
||||
pub text_total_tokens: Option<i64>,
|
||||
pub total_tokens: Option<i64>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct CreditUsageEventBySurface {
|
||||
pub date: String,
|
||||
pub product_surface: String,
|
||||
pub credit_amount: f64,
|
||||
pub usage_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct CreditUsageEventsResponse {
|
||||
pub data: Vec<CreditUsageEventBySurface>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct CurrentUserCreditUsageDatum {
|
||||
pub date: String,
|
||||
pub values: std::collections::BTreeMap<String, f64>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct CurrentUserCreditUsageResponse {
|
||||
pub breakdown: String,
|
||||
pub data: Vec<CurrentUserCreditUsageDatum>,
|
||||
pub series: Vec<CurrentUserCreditUsageSeries>,
|
||||
pub unit: Option<String>,
|
||||
pub data_freshness_ts: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct CurrentUserCreditUsageSeries {
|
||||
pub key: String,
|
||||
pub label: String,
|
||||
pub total: f64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct DailyProductSurfaceUsage {
|
||||
pub attribution: Option<Vec<PersonalUsageAttribution>>,
|
||||
pub date: String,
|
||||
pub product_surface_usage_values: std::collections::BTreeMap<String, f64>,
|
||||
pub premium_usage_values: Option<ProductSurfacePremiumUsageValues>,
|
||||
pub models: Option<Vec<ModelUsage>>,
|
||||
pub groups: Option<Vec<ConsumptionUsageGroup>>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct DailyProductSurfaceUsageResponse {
|
||||
pub data: Vec<DailyProductSurfaceUsage>,
|
||||
pub units: Option<String>,
|
||||
pub data_freshness_ts: Option<String>,
|
||||
pub group_by: Option<String>,
|
||||
pub breakdown_by: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct DailySkillUsageMetricsResponse {
|
||||
pub data: Vec<DailySkillUsageOverview>,
|
||||
pub data_freshness_ts: Option<String>,
|
||||
pub group_by: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct DailySkillUsageOverview {
|
||||
pub date: String,
|
||||
pub skill_usage_overviews: Vec<SkillUsageOverview>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct DailyWorkspaceUsageCount {
|
||||
pub date: String,
|
||||
pub totals: WorkspaceUsageCount,
|
||||
pub clients: Vec<ClientWorkspaceUsageCount>,
|
||||
pub models: Option<Vec<ModelUsage>>,
|
||||
pub groups: Option<Vec<WorkspaceUsageGroup>>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct DailyWorkspaceUsageCountResponse {
|
||||
pub data: Vec<DailyWorkspaceUsageCount>,
|
||||
pub balance_unit: Option<String>,
|
||||
pub active_users_summary: Option<ActiveUsersSummary>,
|
||||
pub group_by: Option<String>,
|
||||
pub breakdown_by: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct ModelActivitySummary {
|
||||
pub model: String,
|
||||
pub users: i64,
|
||||
pub threads: i64,
|
||||
pub turns: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct ModelUsage {
|
||||
pub model: String,
|
||||
pub speed: Option<String>,
|
||||
pub credits: f64,
|
||||
pub cost_usd: Option<String>,
|
||||
pub users: Option<i64>,
|
||||
pub threads: Option<i64>,
|
||||
pub turns: Option<i64>,
|
||||
pub on_demand_credits: Option<f64>,
|
||||
pub uncached_text_input_tokens: Option<i64>,
|
||||
pub cached_text_input_tokens: Option<i64>,
|
||||
pub text_output_tokens: Option<i64>,
|
||||
pub text_total_tokens: Option<i64>,
|
||||
pub total_tokens: Option<i64>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct PersonalUsageAttribution {
|
||||
pub thread_source: String,
|
||||
pub turn_trigger: String,
|
||||
pub model: String,
|
||||
pub surface: String,
|
||||
pub value: f64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct PluginUsageBucket {
|
||||
pub date: String,
|
||||
pub plugin_usage_overviews: Vec<PluginUsageOverview>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct PluginUsageMetricsResponse {
|
||||
pub data: Vec<PluginUsageBucket>,
|
||||
pub data_freshness_ts: Option<String>,
|
||||
pub group_by: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct PluginUsageOverview {
|
||||
pub plugin_id: Option<String>,
|
||||
pub plugin_name: String,
|
||||
pub display_name: String,
|
||||
pub marketplace: Option<String>,
|
||||
pub invocation_counts: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct ProductSurfacePremiumUsageValues {
|
||||
pub total_usage_credits: std::collections::BTreeMap<String, f64>,
|
||||
pub credit_usage_credits: std::collections::BTreeMap<String, f64>,
|
||||
pub uncached_text_input_tokens_by_surface: std::collections::BTreeMap<String, i64>,
|
||||
pub cached_text_input_tokens_by_surface: std::collections::BTreeMap<String, i64>,
|
||||
pub text_output_tokens_by_surface: std::collections::BTreeMap<String, i64>,
|
||||
pub text_total_tokens_by_surface: std::collections::BTreeMap<String, i64>,
|
||||
pub total_tokens_by_surface: Option<std::collections::BTreeMap<String, i64>>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct SkillUsageOverview {
|
||||
pub skill_name: String,
|
||||
pub display_name: String,
|
||||
pub skill_ids: Vec<String>,
|
||||
pub invocation_counts: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct WorkspaceUsageCount {
|
||||
pub users: i64,
|
||||
pub threads: i64,
|
||||
pub turns: i64,
|
||||
pub credits: f64,
|
||||
pub cost_usd: Option<String>,
|
||||
pub on_demand_credits: Option<f64>,
|
||||
pub uncached_text_input_tokens: Option<i64>,
|
||||
pub cached_text_input_tokens: Option<i64>,
|
||||
pub text_output_tokens: Option<i64>,
|
||||
pub text_total_tokens: Option<i64>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct WorkspaceUsageGroup {
|
||||
pub dimensions: std::collections::BTreeMap<String, String>,
|
||||
pub is_other: Option<bool>,
|
||||
pub users: i64,
|
||||
pub turns: i64,
|
||||
pub cost_usd: Option<String>,
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct CodeTaskDetailsResponse {
|
||||
#[serde(rename = "task")]
|
||||
pub task: Box<models::TaskResponse>,
|
||||
#[serde(rename = "current_user_turn", skip_serializing_if = "Option::is_none")]
|
||||
pub current_user_turn: Option<std::collections::HashMap<String, serde_json::Value>>,
|
||||
#[serde(
|
||||
rename = "current_assistant_turn",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub current_assistant_turn: Option<std::collections::HashMap<String, serde_json::Value>>,
|
||||
#[serde(
|
||||
rename = "current_diff_task_turn",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub current_diff_task_turn: Option<std::collections::HashMap<String, serde_json::Value>>,
|
||||
}
|
||||
|
||||
impl CodeTaskDetailsResponse {
|
||||
pub fn new(task: models::TaskResponse) -> CodeTaskDetailsResponse {
|
||||
CodeTaskDetailsResponse {
|
||||
task: Box::new(task),
|
||||
current_user_turn: None,
|
||||
current_assistant_turn: None,
|
||||
current_diff_task_turn: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct ConfigBundleResponse {
|
||||
#[serde(
|
||||
rename = "config_toml",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub config_toml: Option<Option<Box<models::DeliveredConfigToml>>>,
|
||||
#[serde(
|
||||
rename = "requirements_toml",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub requirements_toml: Option<Option<Box<models::DeliveredRequirementsToml>>>,
|
||||
}
|
||||
|
||||
impl ConfigBundleResponse {
|
||||
pub fn new() -> ConfigBundleResponse {
|
||||
ConfigBundleResponse {
|
||||
config_toml: None,
|
||||
requirements_toml: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct ConfigFileResponse {
|
||||
#[serde(rename = "contents", skip_serializing_if = "Option::is_none")]
|
||||
pub contents: Option<String>,
|
||||
#[serde(rename = "sha256", skip_serializing_if = "Option::is_none")]
|
||||
pub sha256: Option<String>,
|
||||
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
|
||||
pub updated_at: Option<String>,
|
||||
#[serde(rename = "updated_by_user_id", skip_serializing_if = "Option::is_none")]
|
||||
pub updated_by_user_id: Option<String>,
|
||||
}
|
||||
|
||||
impl ConfigFileResponse {
|
||||
pub fn new(
|
||||
contents: Option<String>,
|
||||
sha256: Option<String>,
|
||||
updated_at: Option<String>,
|
||||
updated_by_user_id: Option<String>,
|
||||
) -> ConfigFileResponse {
|
||||
ConfigFileResponse {
|
||||
contents,
|
||||
sha256,
|
||||
updated_at,
|
||||
updated_by_user_id,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct CreditStatusDetails {
|
||||
#[serde(rename = "has_credits")]
|
||||
pub has_credits: bool,
|
||||
#[serde(rename = "unlimited")]
|
||||
pub unlimited: bool,
|
||||
#[serde(
|
||||
rename = "balance",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub balance: Option<Option<String>>,
|
||||
#[serde(
|
||||
rename = "approx_local_messages",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub approx_local_messages: Option<Option<Vec<serde_json::Value>>>,
|
||||
#[serde(
|
||||
rename = "approx_cloud_messages",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub approx_cloud_messages: Option<Option<Vec<serde_json::Value>>>,
|
||||
}
|
||||
|
||||
impl CreditStatusDetails {
|
||||
pub fn new(has_credits: bool, unlimited: bool) -> CreditStatusDetails {
|
||||
CreditStatusDetails {
|
||||
has_credits,
|
||||
unlimited,
|
||||
balance: None,
|
||||
approx_local_messages: None,
|
||||
approx_cloud_messages: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct DeliveredConfigToml {
|
||||
#[serde(
|
||||
rename = "enterprise_managed",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub enterprise_managed: Option<Option<Vec<models::DeliveredTomlFragment>>>,
|
||||
#[serde(
|
||||
rename = "managed_layers",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub managed_layers: Option<Option<Box<models::DeliveredManagedLayers>>>,
|
||||
}
|
||||
|
||||
impl DeliveredConfigToml {
|
||||
pub fn new() -> DeliveredConfigToml {
|
||||
DeliveredConfigToml {
|
||||
enterprise_managed: None,
|
||||
managed_layers: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct DeliveredManagedLayers {
|
||||
#[serde(rename = "baseline")]
|
||||
pub baseline: Vec<models::DeliveredTomlFragment>,
|
||||
#[serde(rename = "system_overlay")]
|
||||
pub system_overlay: Vec<models::DeliveredTomlFragment>,
|
||||
}
|
||||
|
||||
impl DeliveredManagedLayers {
|
||||
pub fn new(
|
||||
baseline: Vec<models::DeliveredTomlFragment>,
|
||||
system_overlay: Vec<models::DeliveredTomlFragment>,
|
||||
) -> DeliveredManagedLayers {
|
||||
DeliveredManagedLayers {
|
||||
baseline,
|
||||
system_overlay,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct DeliveredRequirementsToml {
|
||||
#[serde(
|
||||
rename = "enterprise_managed",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub enterprise_managed: Option<Option<Vec<models::DeliveredTomlFragment>>>,
|
||||
#[serde(
|
||||
rename = "managed_layers",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub managed_layers: Option<Option<Box<models::DeliveredManagedLayers>>>,
|
||||
}
|
||||
|
||||
impl DeliveredRequirementsToml {
|
||||
pub fn new() -> DeliveredRequirementsToml {
|
||||
DeliveredRequirementsToml {
|
||||
enterprise_managed: None,
|
||||
managed_layers: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct DeliveredTomlFragment {
|
||||
#[serde(rename = "id")]
|
||||
pub id: String,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "contents")]
|
||||
pub contents: String,
|
||||
}
|
||||
|
||||
impl DeliveredTomlFragment {
|
||||
pub fn new(id: String, name: String, contents: String) -> DeliveredTomlFragment {
|
||||
DeliveredTomlFragment { id, name, contents }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct ExternalPullRequestResponse {
|
||||
#[serde(rename = "id")]
|
||||
pub id: String,
|
||||
#[serde(rename = "assistant_turn_id")]
|
||||
pub assistant_turn_id: String,
|
||||
#[serde(rename = "pull_request")]
|
||||
pub pull_request: Box<models::GitPullRequest>,
|
||||
#[serde(rename = "codex_updated_sha", skip_serializing_if = "Option::is_none")]
|
||||
pub codex_updated_sha: Option<String>,
|
||||
}
|
||||
|
||||
impl ExternalPullRequestResponse {
|
||||
pub fn new(
|
||||
id: String,
|
||||
assistant_turn_id: String,
|
||||
pull_request: models::GitPullRequest,
|
||||
) -> ExternalPullRequestResponse {
|
||||
ExternalPullRequestResponse {
|
||||
id,
|
||||
assistant_turn_id,
|
||||
pull_request: Box::new(pull_request),
|
||||
codex_updated_sha: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct GitPullRequest {
|
||||
#[serde(rename = "number")]
|
||||
pub number: i32,
|
||||
#[serde(rename = "url")]
|
||||
pub url: String,
|
||||
#[serde(rename = "state")]
|
||||
pub state: String,
|
||||
#[serde(rename = "merged")]
|
||||
pub merged: bool,
|
||||
#[serde(rename = "mergeable")]
|
||||
pub mergeable: bool,
|
||||
#[serde(rename = "draft", skip_serializing_if = "Option::is_none")]
|
||||
pub draft: Option<bool>,
|
||||
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
|
||||
pub title: Option<String>,
|
||||
#[serde(rename = "body", skip_serializing_if = "Option::is_none")]
|
||||
pub body: Option<String>,
|
||||
#[serde(rename = "base", skip_serializing_if = "Option::is_none")]
|
||||
pub base: Option<String>,
|
||||
#[serde(rename = "head", skip_serializing_if = "Option::is_none")]
|
||||
pub head: Option<String>,
|
||||
#[serde(rename = "base_sha", skip_serializing_if = "Option::is_none")]
|
||||
pub base_sha: Option<String>,
|
||||
#[serde(rename = "head_sha", skip_serializing_if = "Option::is_none")]
|
||||
pub head_sha: Option<String>,
|
||||
#[serde(rename = "merge_commit_sha", skip_serializing_if = "Option::is_none")]
|
||||
pub merge_commit_sha: Option<String>,
|
||||
#[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
|
||||
pub comments: Option<serde_json::Value>,
|
||||
#[serde(rename = "diff", skip_serializing_if = "Option::is_none")]
|
||||
pub diff: Option<serde_json::Value>,
|
||||
#[serde(rename = "user", skip_serializing_if = "Option::is_none")]
|
||||
pub user: Option<serde_json::Value>,
|
||||
}
|
||||
|
||||
impl GitPullRequest {
|
||||
pub fn new(
|
||||
number: i32,
|
||||
url: String,
|
||||
state: String,
|
||||
merged: bool,
|
||||
mergeable: bool,
|
||||
) -> GitPullRequest {
|
||||
GitPullRequest {
|
||||
number,
|
||||
url,
|
||||
state,
|
||||
merged,
|
||||
mergeable,
|
||||
draft: None,
|
||||
title: None,
|
||||
body: None,
|
||||
base: None,
|
||||
head: None,
|
||||
base_sha: None,
|
||||
head_sha: None,
|
||||
merge_commit_sha: None,
|
||||
comments: None,
|
||||
diff: None,
|
||||
user: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
68
codex-rs/codex-backend-openapi-models/src/models/mod.rs
Normal file
68
codex-rs/codex-backend-openapi-models/src/models/mod.rs
Normal file
@@ -0,0 +1,68 @@
|
||||
pub mod analytics;
|
||||
// Curated minimal export list for current workspace usage.
|
||||
// NOTE: This file was previously auto-generated by the OpenAPI generator.
|
||||
// Currently export only the types referenced by the workspace
|
||||
// The process for this will change
|
||||
|
||||
// Config
|
||||
pub(crate) mod config_bundle_response;
|
||||
pub use self::config_bundle_response::ConfigBundleResponse;
|
||||
|
||||
pub(crate) mod config_file_response;
|
||||
pub use self::config_file_response::ConfigFileResponse;
|
||||
|
||||
pub(crate) mod delivered_config_toml;
|
||||
pub use self::delivered_config_toml::DeliveredConfigToml;
|
||||
|
||||
pub(crate) mod delivered_managed_layers;
|
||||
pub use self::delivered_managed_layers::DeliveredManagedLayers;
|
||||
|
||||
pub(crate) mod delivered_requirements_toml;
|
||||
pub use self::delivered_requirements_toml::DeliveredRequirementsToml;
|
||||
|
||||
pub(crate) mod delivered_toml_fragment;
|
||||
pub use self::delivered_toml_fragment::DeliveredTomlFragment;
|
||||
|
||||
// Cloud Tasks
|
||||
pub(crate) mod code_task_details_response;
|
||||
pub use self::code_task_details_response::CodeTaskDetailsResponse;
|
||||
|
||||
pub(crate) mod task_response;
|
||||
pub use self::task_response::TaskResponse;
|
||||
|
||||
pub(crate) mod external_pull_request_response;
|
||||
pub use self::external_pull_request_response::ExternalPullRequestResponse;
|
||||
|
||||
pub(crate) mod git_pull_request;
|
||||
pub use self::git_pull_request::GitPullRequest;
|
||||
|
||||
pub(crate) mod task_list_item;
|
||||
pub use self::task_list_item::TaskListItem;
|
||||
|
||||
pub(crate) mod paginated_list_task_list_item_;
|
||||
pub use self::paginated_list_task_list_item_::PaginatedListTaskListItem;
|
||||
|
||||
// Rate Limits
|
||||
pub(crate) mod additional_rate_limit_details;
|
||||
pub use self::additional_rate_limit_details::AdditionalRateLimitDetails;
|
||||
|
||||
pub(crate) mod rate_limit_status_payload;
|
||||
pub use self::rate_limit_status_payload::PlanType;
|
||||
pub use self::rate_limit_status_payload::RateLimitReachedKind;
|
||||
pub use self::rate_limit_status_payload::RateLimitReachedType;
|
||||
pub use self::rate_limit_status_payload::RateLimitStatusPayload;
|
||||
|
||||
pub(crate) mod rate_limit_status_details;
|
||||
pub use self::rate_limit_status_details::RateLimitStatusDetails;
|
||||
|
||||
pub(crate) mod rate_limit_window_snapshot;
|
||||
pub use self::rate_limit_window_snapshot::RateLimitWindowSnapshot;
|
||||
|
||||
pub(crate) mod credit_status_details;
|
||||
pub use self::credit_status_details::CreditStatusDetails;
|
||||
|
||||
pub(crate) mod spend_control_limit_details;
|
||||
pub use self::spend_control_limit_details::SpendControlLimitDetails;
|
||||
|
||||
pub(crate) mod spend_control_status_details;
|
||||
pub use self::spend_control_status_details::SpendControlStatusDetails;
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct PaginatedListTaskListItem {
|
||||
#[serde(rename = "items")]
|
||||
pub items: Vec<models::TaskListItem>,
|
||||
#[serde(rename = "cursor", skip_serializing_if = "Option::is_none")]
|
||||
pub cursor: Option<String>,
|
||||
}
|
||||
|
||||
impl PaginatedListTaskListItem {
|
||||
pub fn new(items: Vec<models::TaskListItem>) -> PaginatedListTaskListItem {
|
||||
PaginatedListTaskListItem {
|
||||
items,
|
||||
cursor: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct RateLimitStatusDetails {
|
||||
#[serde(rename = "allowed")]
|
||||
pub allowed: bool,
|
||||
#[serde(rename = "limit_reached")]
|
||||
pub limit_reached: bool,
|
||||
#[serde(
|
||||
rename = "primary_window",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub primary_window: Option<Option<Box<models::RateLimitWindowSnapshot>>>,
|
||||
#[serde(
|
||||
rename = "secondary_window",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub secondary_window: Option<Option<Box<models::RateLimitWindowSnapshot>>>,
|
||||
}
|
||||
|
||||
impl RateLimitStatusDetails {
|
||||
pub fn new(allowed: bool, limit_reached: bool) -> RateLimitStatusDetails {
|
||||
RateLimitStatusDetails {
|
||||
allowed,
|
||||
limit_reached,
|
||||
primary_window: None,
|
||||
secondary_window: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct RateLimitStatusPayload {
|
||||
#[serde(rename = "plan_type")]
|
||||
pub plan_type: PlanType,
|
||||
#[serde(
|
||||
rename = "rate_limit",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub rate_limit: Option<Option<Box<models::RateLimitStatusDetails>>>,
|
||||
#[serde(
|
||||
rename = "credits",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub credits: Option<Option<Box<models::CreditStatusDetails>>>,
|
||||
#[serde(
|
||||
rename = "spend_control",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub spend_control: Option<Option<Box<models::SpendControlStatusDetails>>>,
|
||||
#[serde(
|
||||
rename = "additional_rate_limits",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub additional_rate_limits: Option<Option<Vec<models::AdditionalRateLimitDetails>>>,
|
||||
#[serde(
|
||||
rename = "rate_limit_reached_type",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub rate_limit_reached_type: Option<Option<RateLimitReachedType>>,
|
||||
}
|
||||
|
||||
impl RateLimitStatusPayload {
|
||||
pub fn new(plan_type: PlanType) -> RateLimitStatusPayload {
|
||||
RateLimitStatusPayload {
|
||||
plan_type,
|
||||
rate_limit: None,
|
||||
credits: None,
|
||||
spend_control: None,
|
||||
additional_rate_limits: None,
|
||||
rate_limit_reached_type: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct RateLimitReachedType {
|
||||
#[serde(rename = "type")]
|
||||
pub kind: RateLimitReachedKind,
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, Default,
|
||||
)]
|
||||
pub enum RateLimitReachedKind {
|
||||
#[serde(rename = "rate_limit_reached")]
|
||||
RateLimitReached,
|
||||
#[serde(rename = "workspace_owner_credits_depleted")]
|
||||
WorkspaceOwnerCreditsDepleted,
|
||||
#[serde(rename = "workspace_member_credits_depleted")]
|
||||
WorkspaceMemberCreditsDepleted,
|
||||
#[serde(rename = "workspace_owner_usage_limit_reached")]
|
||||
WorkspaceOwnerUsageLimitReached,
|
||||
#[serde(rename = "workspace_member_usage_limit_reached")]
|
||||
WorkspaceMemberUsageLimitReached,
|
||||
#[serde(rename = "unknown", other)]
|
||||
#[default]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, Default,
|
||||
)]
|
||||
pub enum PlanType {
|
||||
#[serde(rename = "guest")]
|
||||
#[default]
|
||||
Guest,
|
||||
#[serde(rename = "free")]
|
||||
Free,
|
||||
#[serde(rename = "go")]
|
||||
Go,
|
||||
#[serde(rename = "plus")]
|
||||
Plus,
|
||||
#[serde(rename = "pro")]
|
||||
Pro,
|
||||
#[serde(rename = "prolite")]
|
||||
ProLite,
|
||||
#[serde(rename = "promax")]
|
||||
ProMax,
|
||||
#[serde(rename = "free_workspace")]
|
||||
FreeWorkspace,
|
||||
#[serde(rename = "team")]
|
||||
Team,
|
||||
#[serde(rename = "self_serve_business_prolite")]
|
||||
SelfServeBusinessProLite,
|
||||
#[serde(rename = "self_serve_business_usage_based")]
|
||||
SelfServeBusinessUsageBased,
|
||||
#[serde(rename = "business")]
|
||||
Business,
|
||||
#[serde(rename = "ent26")]
|
||||
Ent26,
|
||||
#[serde(rename = "enterprise_cbp_automation")]
|
||||
EnterpriseCbpAutomation,
|
||||
#[serde(rename = "enterprise_cbp_usage_based")]
|
||||
EnterpriseCbpUsageBased,
|
||||
#[serde(rename = "education")]
|
||||
Education,
|
||||
#[serde(rename = "quorum")]
|
||||
Quorum,
|
||||
#[serde(rename = "k12")]
|
||||
K12,
|
||||
#[serde(rename = "enterprise")]
|
||||
Enterprise,
|
||||
#[serde(rename = "edu")]
|
||||
Edu,
|
||||
#[serde(rename = "edu_plus")]
|
||||
EduPlus,
|
||||
#[serde(rename = "edu_pro")]
|
||||
EduPro,
|
||||
#[serde(rename = "sci")]
|
||||
Sci,
|
||||
#[serde(rename = "sci_plus")]
|
||||
SciPlus,
|
||||
#[serde(rename = "unknown", other)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct RateLimitWindowSnapshot {
|
||||
#[serde(rename = "used_percent")]
|
||||
pub used_percent: i32,
|
||||
#[serde(rename = "limit_window_seconds")]
|
||||
pub limit_window_seconds: i32,
|
||||
#[serde(rename = "reset_after_seconds")]
|
||||
pub reset_after_seconds: i32,
|
||||
#[serde(rename = "reset_at")]
|
||||
pub reset_at: i32,
|
||||
}
|
||||
|
||||
impl RateLimitWindowSnapshot {
|
||||
pub fn new(
|
||||
used_percent: i32,
|
||||
limit_window_seconds: i32,
|
||||
reset_after_seconds: i32,
|
||||
reset_at: i32,
|
||||
) -> RateLimitWindowSnapshot {
|
||||
RateLimitWindowSnapshot {
|
||||
used_percent,
|
||||
limit_window_seconds,
|
||||
reset_after_seconds,
|
||||
reset_at,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct SpendControlLimitDetails {
|
||||
#[serde(
|
||||
rename = "source",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub source: Option<Option<String>>,
|
||||
#[serde(rename = "limit")]
|
||||
pub limit: String,
|
||||
#[serde(rename = "used")]
|
||||
pub used: String,
|
||||
#[serde(rename = "remaining")]
|
||||
pub remaining: String,
|
||||
#[serde(rename = "used_percent")]
|
||||
pub used_percent: i32,
|
||||
#[serde(rename = "remaining_percent")]
|
||||
pub remaining_percent: i32,
|
||||
#[serde(rename = "reset_after_seconds")]
|
||||
pub reset_after_seconds: i32,
|
||||
#[serde(rename = "reset_at")]
|
||||
pub reset_at: i32,
|
||||
}
|
||||
|
||||
impl SpendControlLimitDetails {
|
||||
pub fn new(
|
||||
limit: String,
|
||||
used: String,
|
||||
remaining: String,
|
||||
used_percent: i32,
|
||||
remaining_percent: i32,
|
||||
reset_after_seconds: i32,
|
||||
reset_at: i32,
|
||||
) -> SpendControlLimitDetails {
|
||||
SpendControlLimitDetails {
|
||||
source: None,
|
||||
limit,
|
||||
used,
|
||||
remaining,
|
||||
used_percent,
|
||||
remaining_percent,
|
||||
reset_after_seconds,
|
||||
reset_at,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct SpendControlStatusDetails {
|
||||
#[serde(rename = "reached")]
|
||||
pub reached: bool,
|
||||
#[serde(
|
||||
rename = "individual_limit",
|
||||
default,
|
||||
with = "::serde_with::rust::double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub individual_limit: Option<Option<Box<models::SpendControlLimitDetails>>>,
|
||||
}
|
||||
|
||||
impl SpendControlStatusDetails {
|
||||
pub fn new(reached: bool) -> SpendControlStatusDetails {
|
||||
SpendControlStatusDetails {
|
||||
reached,
|
||||
individual_limit: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct TaskListItem {
|
||||
#[serde(rename = "id")]
|
||||
pub id: String,
|
||||
#[serde(rename = "title")]
|
||||
pub title: String,
|
||||
#[serde(
|
||||
rename = "has_generated_title",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub has_generated_title: Option<bool>,
|
||||
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
|
||||
pub updated_at: Option<f64>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<f64>,
|
||||
#[serde(
|
||||
rename = "task_status_display",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub task_status_display: Option<std::collections::HashMap<String, serde_json::Value>>,
|
||||
#[serde(rename = "archived")]
|
||||
pub archived: bool,
|
||||
#[serde(rename = "has_unread_turn")]
|
||||
pub has_unread_turn: bool,
|
||||
#[serde(rename = "pull_requests", skip_serializing_if = "Option::is_none")]
|
||||
pub pull_requests: Option<Vec<models::ExternalPullRequestResponse>>,
|
||||
}
|
||||
|
||||
impl TaskListItem {
|
||||
pub fn new(
|
||||
id: String,
|
||||
title: String,
|
||||
has_generated_title: Option<bool>,
|
||||
archived: bool,
|
||||
has_unread_turn: bool,
|
||||
) -> TaskListItem {
|
||||
TaskListItem {
|
||||
id,
|
||||
title,
|
||||
has_generated_title,
|
||||
updated_at: None,
|
||||
created_at: None,
|
||||
task_status_display: None,
|
||||
archived,
|
||||
has_unread_turn,
|
||||
pull_requests: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* codex-backend
|
||||
*
|
||||
* codex-backend
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct TaskResponse {
|
||||
#[serde(rename = "id")]
|
||||
pub id: String,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<f64>,
|
||||
#[serde(rename = "title")]
|
||||
pub title: String,
|
||||
#[serde(
|
||||
rename = "has_generated_title",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub has_generated_title: Option<bool>,
|
||||
#[serde(rename = "current_turn_id", skip_serializing_if = "Option::is_none")]
|
||||
pub current_turn_id: Option<String>,
|
||||
#[serde(rename = "has_unread_turn", skip_serializing_if = "Option::is_none")]
|
||||
pub has_unread_turn: Option<bool>,
|
||||
#[serde(
|
||||
rename = "denormalized_metadata",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub denormalized_metadata: Option<std::collections::HashMap<String, serde_json::Value>>,
|
||||
#[serde(rename = "archived")]
|
||||
pub archived: bool,
|
||||
#[serde(rename = "external_pull_requests")]
|
||||
pub external_pull_requests: Vec<models::ExternalPullRequestResponse>,
|
||||
}
|
||||
|
||||
impl TaskResponse {
|
||||
pub fn new(
|
||||
id: String,
|
||||
title: String,
|
||||
archived: bool,
|
||||
external_pull_requests: Vec<models::ExternalPullRequestResponse>,
|
||||
) -> TaskResponse {
|
||||
TaskResponse {
|
||||
id,
|
||||
created_at: None,
|
||||
title,
|
||||
has_generated_title: None,
|
||||
current_turn_id: None,
|
||||
has_unread_turn: None,
|
||||
denormalized_metadata: None,
|
||||
archived,
|
||||
external_pull_requests,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user