import Varis from @usevaris/sdk;
const varis = Varis();
export GET(req: Request) async {
// Verify the request came from Varis.
if (!varis.request.verify(req)) throw Error("Unathorised!");
// This could be the rest of your code.
const body = await req.body;
return `Howdy, ${body.first_name}`;
}
// Define the service for Varis.
varis.services.define<Input, Output>({
path: "/greetings",
slug: "greetings",
name: "Demo Greeting Service",
description: "Describe the service in detail",
instruction: "Tell the agent how to use the service."
price_cent: 10,
categories: ["dataset", "finance"],
service_type: "data"
});