feat(triggers): show a materialized column in pic triggers ls --app (D1)
A materialized copy of an M5 group stateful template (cron/queue/email) now reads as `materialized = true` — inherited, read-only — distinct from a hand-authored trigger. Threads a derived `materialized` bool (= `materialized_from IS NOT NULL`) row → domain → API → CLI, mirroring the `sealed`/`shared` columns; `list_for_app` SELECTs `materialized_from`. No migration. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1760,6 +1760,11 @@ pub struct TriggerDto {
|
||||
pub enabled: bool,
|
||||
pub dispatch_mode: String,
|
||||
pub retry_max_attempts: u32,
|
||||
/// §4.5 M5: true for a materialized copy of a group stateful template
|
||||
/// (inherited, read-only). `default` so an older server without the field
|
||||
/// still deserializes.
|
||||
#[serde(default)]
|
||||
pub materialized: bool,
|
||||
pub created_at: DateTime<Utc>,
|
||||
#[serde(default)]
|
||||
pub details: Value,
|
||||
|
||||
@@ -23,6 +23,7 @@ pub async fn ls(app: &str, mode: OutputMode) -> Result<()> {
|
||||
"enabled",
|
||||
"dispatch",
|
||||
"retry_max",
|
||||
"materialized",
|
||||
"created_at",
|
||||
]);
|
||||
for t in resp.triggers {
|
||||
@@ -33,6 +34,7 @@ pub async fn ls(app: &str, mode: OutputMode) -> Result<()> {
|
||||
t.enabled.to_string(),
|
||||
t.dispatch_mode,
|
||||
t.retry_max_attempts.to_string(),
|
||||
t.materialized.to_string(),
|
||||
t.created_at.to_rfc3339(),
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user