30}) => {
31 const { z } = await import("npm:zod");
32 const RESY_API_URL = "https://api.resy.com";
33 const RESY_DEFAULT_HEADERS = {
34 accept: "application/json, text/plain, */*",
35 "accept-encoding": "gzip, deflate, br",
36 "accept-language": "en-US,en;q=0.9",
37 authorization: 'ResyAPI api_key="VbWk7s3L4KiK5fzlO7JD3Q5EYolJI7n5"',
38 "x-origin": "https://resy.com",
39 origin: "https://resy.com/",
143 params.email
144 )}&password=${encodeURIComponent(params.password)}`;
145 const response = await fetch(`${RESY_API_URL}/3/auth/password`, {
146 method: "POST",
147 body: body,
164 seats: number;
165 }) => {
166 const url = `${RESY_API_URL}/3/details`;
167 const response = await fetch(url.toString(), {
168 method: "POST",
183 seats: number;
184 }) => {
185 const url = `${RESY_API_URL}/4/find`;
186 const searchParams = new URLSearchParams();
187 searchParams.set("lat", "0");
206 city: string;
207 }) => {
208 const url = `${RESY_API_URL}/3/venue`;
209 const searchParams = new URLSearchParams();
210 searchParams.set("url_slug", params.slug);
222 authToken: string;
223 }) => {
224 const response = await fetch(`${RESY_API_URL}/3/book`, {
225 method: "POST",
226 headers: {