Add @yaakapp/api everywhere

This commit is contained in:
Gregory Schier committed 2024-08-15 06:17:33 -07:00
1 parent bb3f948596
commit 54efb6ae4e
25 files changed
+258 -1984

No files matched your search

+2 -1
View File
@@ -1,6 +1,7 @@
import { YaakContext } from '@yaakapp/api';
import jp from 'jsonpath';
export function pluginHookResponseFilter(_ctx: any, args: { filter: string; body: string }) {
export function pluginHookResponseFilter(_ctx: YaakContext, args: { filter: string; body: string }) {
const parsed = JSON.parse(args.body);
const filtered = jp.query(parsed, args.filter);
return JSON.stringify(filtered, null, 2);