feat: route product commands through backend targets
This commit is contained in:
@@ -57,6 +57,9 @@ use workdir::workspace::{
|
||||
use worker::feature::builtin::{WorkerObservationSubject, WorkerObservationSubjectRef};
|
||||
use worker_runtime::resource::{BackendResourceError, BackendResourceFetchRequest};
|
||||
use worker_runtime::worker_backend::{ProfileRuntimeWorkerFactory, WorkerRuntimeExecutionBackend};
|
||||
use workspace_api::{
|
||||
ObjectiveCreateRequest, ObjectiveEditRequest, ObjectiveLinkTicketRequest, ObjectiveStateRequest,
|
||||
};
|
||||
|
||||
use crate::auth::{
|
||||
AuthPublicConfig, AuthenticatedUser, RequestActor, auth_error, is_expired, mint_secret, new_id,
|
||||
@@ -2648,26 +2651,6 @@ struct ObjectiveListQuery {
|
||||
limit: Option<usize>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct ObjectiveCreateRequest {
|
||||
title: String,
|
||||
#[serde(default)]
|
||||
body_md: String,
|
||||
#[serde(default = "default_objective_state")]
|
||||
state: String,
|
||||
#[serde(default)]
|
||||
linked_tickets: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct ObjectiveEditRequest {
|
||||
title: Option<String>,
|
||||
old_string: Option<String>,
|
||||
new_string: Option<String>,
|
||||
#[serde(default)]
|
||||
replace_all: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct TicketListQuery {
|
||||
limit: Option<usize>,
|
||||
@@ -2676,16 +2659,6 @@ struct TicketListQuery {
|
||||
states: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct ObjectiveStateRequest {
|
||||
state: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct ObjectiveLinkTicketRequest {
|
||||
ticket_id: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct ScopedObjectivePath {
|
||||
workspace_id: String,
|
||||
@@ -2699,10 +2672,6 @@ struct ScopedObjectiveTicketPath {
|
||||
ticket_id: String,
|
||||
}
|
||||
|
||||
fn default_objective_state() -> String {
|
||||
"active".to_string()
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct TranscriptQuery {
|
||||
start: Option<usize>,
|
||||
|
||||
Reference in New Issue
Block a user