Add @yaakapp/api everywhere

This commit is contained in:
Gregory Schier
2024-08-15 06:17:33 -07:00
parent bb3f948596
commit 54efb6ae4e
25 changed files with 258 additions and 1984 deletions

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);