MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / validActionsForStatus

Function validActionsForStatus

server/src/training-agent/task-handlers.ts:511–523  ·  view source on GitHub ↗

Map lifecycle status to valid buyer actions.

(status: string)

Source from the content-addressed store, hash-verified

509
510/** Map lifecycle status to valid buyer actions. */
511function validActionsForStatus(status: string): string[] {
512 switch (status) {
513 case 'pending_creatives':
514 case 'pending_start':
515 return ['cancel', 'sync_creatives'];
516 case 'active':
517 return ['pause', 'cancel', 'update_budget', 'update_dates', 'update_packages', 'add_packages', 'sync_creatives'];
518 case 'paused':
519 return ['resume', 'cancel', 'update_budget', 'update_dates', 'update_packages', 'add_packages', 'sync_creatives'];
520 default:
521 return [];
522 }
523}
524
525// ── Cached catalog and formats (built once at first use) ──────────
526let cachedCatalog: CatalogProduct[] | null = null;

Callers 3

handleCreateMediaBuyFunction · 0.85
handleGetMediaBuysFunction · 0.85
handleUpdateMediaBuyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected