use relative imports in typescript

This commit is contained in:
ramnique 2025-02-14 13:18:02 +05:30
parent 6260c64126
commit 2cdc25ab7e
50 changed files with 108 additions and 111 deletions

View file

@ -1,6 +1,6 @@
import { NextRequest } from "next/server";
import { apiV1 } from "rowboat-shared";
import { db } from "@/app/lib/mongodb";
import { db } from "../../../../../../lib/mongodb";
import { z } from "zod";
import { ObjectId } from "mongodb";
import { authCheck } from "../../../utils";

View file

@ -1,6 +1,6 @@
import { NextRequest } from "next/server";
import { apiV1 } from "rowboat-shared";
import { db } from "@/app/lib/mongodb";
import { db } from "../../../../../../lib/mongodb";
import { z } from "zod";
import { Filter, ObjectId } from "mongodb";
import { authCheck } from "../../../utils";

View file

@ -1,6 +1,6 @@
import { NextRequest } from "next/server";
import { apiV1 } from "rowboat-shared";
import { db } from "@/app/lib/mongodb";
import { db } from "../../../../../lib/mongodb";
import { z } from "zod";
import { ObjectId } from "mongodb";
import { authCheck } from "../../utils";

View file

@ -1,12 +1,12 @@
import { NextRequest } from "next/server";
import { apiV1 } from "rowboat-shared";
import { agentWorkflowsCollection, db, projectsCollection } from "@/app/lib/mongodb";
import { agentWorkflowsCollection, db, projectsCollection } from "../../../../../../lib/mongodb";
import { z } from "zod";
import { ObjectId, WithId } from "mongodb";
import { authCheck } from "../../../utils";
import { AgenticAPIChatRequest, convertFromAgenticAPIChatMessages, convertToAgenticAPIChatMessages, convertWorkflowToAgenticAPI } from "@/app/lib/types";
import { callClientToolWebhook, getAgenticApiResponse } from "@/app/lib/utils";
import { check_query_limit } from "@/app/lib/rate_limiting";
import { AgenticAPIChatRequest, convertFromAgenticAPIChatMessages, convertToAgenticAPIChatMessages, convertWorkflowToAgenticAPI } from "../../../../../../lib/types";
import { callClientToolWebhook, getAgenticApiResponse } from "../../../../../../lib/utils";
import { check_query_limit } from "../../../../../../lib/rate_limiting";
const chatsCollection = db.collection<z.infer<typeof apiV1.Chat>>("chats");
const chatMessagesCollection = db.collection<z.infer<typeof apiV1.ChatMessage>>("chatMessages");

View file

@ -1,5 +1,5 @@
import { NextRequest } from "next/server";
import { db } from "@/app/lib/mongodb";
import { db } from "../../../../lib/mongodb";
import { z } from "zod";
import { ObjectId } from "mongodb";
import { apiV1 } from "rowboat-shared";

View file

@ -4,7 +4,7 @@ import { SignJWT, jwtVerify } from "jose";
import { z } from "zod";
import { Session } from "../../utils";
import { apiV1 } from "rowboat-shared";
import { projectsCollection } from "@/app/lib/mongodb";
import { projectsCollection } from "../../../../../lib/mongodb";
export async function POST(req: NextRequest): Promise<Response> {
return await clientIdCheck(req, async (projectId) => {

View file

@ -1,7 +1,7 @@
import { NextRequest } from "next/server";
import { z } from "zod";
import { jwtVerify } from "jose";
import { projectsCollection } from "@/app/lib/mongodb";
import { projectsCollection } from "../../../lib/mongodb";
export const Session = z.object({
userId: z.string(),