File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,54 @@ async def run_orchestration_task():
337337
338338@app_v3 .post ("/plan_approval" )
339339async def plan_approval (human_feedback : messages .PlanApprovalResponse , request : Request ):
340+ """
341+ Endpoint to receive plan approval or rejection from the user.
342+ ---
343+ tags:
344+ - Plans
345+ parameters:
346+ - name: user_principal_id
347+ in: header
348+ type: string
349+ required: true
350+ description: User ID extracted from the authentication header
351+ requestBody:
352+ description: Plan approval payload
353+ required: true
354+ content:
355+ application/json:
356+ schema:
357+ type: object
358+ properties:
359+ m_plan_id:
360+ type: string
361+ description: The internal m_plan id for the plan (required)
362+ approved:
363+ type: boolean
364+ description: Whether the plan is approved (true) or rejected (false)
365+ feedback:
366+ type: string
367+ description: Optional feedback or comment from the user
368+ plan_id:
369+ type: string
370+ description: Optional user-facing plan_id
371+ responses:
372+ 200:
373+ description: Approval recorded successfully
374+ content:
375+ application/json:
376+ schema:
377+ type: object
378+ properties:
379+ status:
380+ type: string
381+ 401:
382+ description: Missing or invalid user information
383+ 404:
384+ description: No active plan found for approval
385+ 500:
386+ description: Internal server error
387+ """
340388 authenticated_user = get_authenticated_user_details (request_headers = request .headers )
341389 user_id = authenticated_user ["user_principal_id" ]
342390 if not user_id :
You can’t perform that action at this time.
0 commit comments