import { Flair } from "@flair/shopping-sdk";const flair = new Flair({ apiKey: process.env.FLAIR_API_KEY, app: { id: "YOUR_APP_ID", name: "AI Room Design App", },});const userId = currentUser.id;const userContext = await getUserContext({ userId, include: [ "room_type", "design_goals", "style_preferences", "favorite_decor_brands", "budget", "purchase_history", ],});const shoppableRoomLook = await flair.productGraph.search({ query: `Based on this saved room, recommend a shoppable look with furniture and decor this user loves. Match the room, style preferences, design goals, and budget.`, context: userContext, attachments: [{ type: "image", url: uploadedRoomImage.url }], rankBy: [ "user_relevance", "best_available_deal", "availability", "delivery_speed", ],});await flair.shopping.enable({ products: shoppableRoomLook, ui: "native", checkout: "embedded", redirects: false, earnOnCompletedSale: true,});import { Flair } from "@flair/shopping-sdk";const flair = new Flair({ apiKey: process.env.FLAIR_API_KEY, app: { id: "YOUR_APP_ID", name: "AI Room Design App", },});const userId = currentUser.id;const userContext = await getUserContext({ userId, include: [ "room_type", "design_goals", "style_preferences", "favorite_decor_brands", "budget", "purchase_history", ],});const shoppableRoomLook = await flair.productGraph.search({ query: `Based on this saved room, recommend a shoppable look with furniture and decor this user loves. Match the room, style preferences, design goals, and budget.`, context: userContext, attachments: [{ type: "image", url: uploadedRoomImage.url }], rankBy: [ "user_relevance", "best_available_deal", "availability", "delivery_speed", ],});await flair.shopping.enable({ products: shoppableRoomLook, ui: "native", checkout: "embedded", redirects: false, earnOnCompletedSale: true,});