(p: ToolPolicy)
| 7 | import { capture } from "@executor-js/api"; |
| 8 | |
| 9 | const policyToResponse = (p: ToolPolicy) => ({ |
| 10 | id: p.id, |
| 11 | owner: p.owner, |
| 12 | pattern: p.pattern, |
| 13 | action: p.action, |
| 14 | position: p.position, |
| 15 | createdAt: p.createdAt.getTime(), |
| 16 | updatedAt: p.updatedAt.getTime(), |
| 17 | }); |
| 18 | |
| 19 | export const PoliciesHandlers = HttpApiBuilder.group(ExecutorApi, "policies", (handlers) => |
| 20 | handlers |