Merge branch 'worktree-agent-a82ec64b6cc1a2809'
# Conflicts: # internal/app/archie/operations.go # modules/events/events.go # modules/governance/accounts_api.go # modules/governance/governance.go
This commit is contained in:
44 files changed
+1462
-266
No files matched your search
@@ -117,18 +117,18 @@ func (m *Module) confirmed(ctx context.Context, row store.Request, a *Assertion)
|
||||
// Register adds the approvals API.
|
||||
func (m *Module) Register(api huma.API) {
|
||||
tags := []string{"Approvals"}
|
||||
huma.Register(api, huma.Operation{
|
||||
httpapi.Register(api, httpapi.AdminAuthorized(governance.ActionRead, governance.KindApproval), huma.Operation{
|
||||
OperationID: "list-approvals", Method: http.MethodGet, Path: "/api/approvals",
|
||||
Summary: "List approval requests waiting for an answer", Tags: tags,
|
||||
}, m.list)
|
||||
huma.Register(api, httpapi.SignedIn(huma.Operation{
|
||||
httpapi.Register(api, httpapi.Authorized(governance.ActionApprove, governance.KindApproval), huma.Operation{
|
||||
OperationID: "answer-approval", Method: http.MethodPost, Path: "/api/approvals/{id}/answer",
|
||||
Summary: "Approve or refuse an action as the signed-in person", Tags: tags,
|
||||
}), m.answer)
|
||||
huma.Register(api, httpapi.SignedIn(huma.Operation{
|
||||
}, m.answer)
|
||||
httpapi.Register(api, httpapi.Authorized(governance.ActionApprove, governance.KindApproval), huma.Operation{
|
||||
OperationID: "begin-approval-confirmation", Method: http.MethodPost, Path: "/api/approvals/{id}/confirmation",
|
||||
Summary: "Start the passkey confirmation that approving an irreversible action needs", Tags: tags,
|
||||
}), m.beginConfirmation)
|
||||
}, m.beginConfirmation)
|
||||
}
|
||||
|
||||
type answerInput struct {
|
||||
|
||||
Reference in new issue
Block a user