{"version":3,"sources":["../src/client.ts"],"sourcesContent":["/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Action, z } from 'genkit';\nimport {\n runFlow as baseRunFlow,\n streamFlow as baseStreamFlow,\n} from 'genkit/beta/client';\n\ntype Input =\n A extends Action ? z.infer : never;\ntype Output =\n A extends Action ? z.infer : never;\ntype Stream =\n A extends Action ? z.infer : never;\n\nexport interface RequestData {\n url: string;\n headers?: Record;\n input?: T;\n}\n\nexport function runFlow(\n req: RequestData>\n): Promise> {\n return baseRunFlow>(req);\n}\n\nexport interface StreamResponse {\n output: Promise>;\n stream: AsyncIterable>;\n}\n\nexport function streamFlow(\n req: RequestData>\n): StreamResponse {\n const res = baseStreamFlow, Stream>(req);\n return {\n output: res.output,\n stream: res.stream,\n };\n}\n"],"mappings":"AAiBA;AAAA,EACE,WAAW;AAAA,EACX,cAAc;AAAA,OACT;AAeA,SAAS,QACd,KACoB;AACpB,SAAO,YAAuB,GAAG;AACnC;AAOO,SAAS,WACd,KACmB;AACnB,QAAM,MAAM,eAAqC,GAAG;AACpD,SAAO;AAAA,IACL,QAAQ,IAAI;AAAA,IACZ,QAAQ,IAAI;AAAA,EACd;AACF;","names":[]}